	.section	.text
	.global	rand
	.type	rand, @function
rand:
	pushl	%ebp
	movl	%esp, %ebp
	movl	8(%ebp), %eax
	movl	(%eax), %eax
	imull	$1103515245, %eax, %eax
	leal	12345(%eax), %edx
	movl	8(%ebp), %eax
	movl	%edx, (%eax)
	movl	(%eax), %eax
	shrl	$11, %eax
	xorl	%eax, 8(%ebp)
	movl	8(%ebp), %eax
	sall	$7, %eax
	andl	$-1658038656, %eax
	xorl	%eax, 8(%ebp)
	movl	8(%ebp), %eax
	sall	$15, %eax
	andl	$-272236544, %eax
	xorl	%eax, 8(%ebp)
	movl	8(%ebp), %eax
	shrl	$18, %eax
	xorl	%eax, 8(%ebp)
	movl	8(%ebp), %eax
	shrl	%eax
	popl	%ebp
	ret
