Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#include<string.h>
#include<math.h>

int N,S,A,C,R[257],I[257],X[257],i,j,rS,rA,rC;
double H,r;
int main()
{
	for(;scanf("%d",&N),N;)
	{
		for(i=0,r=-1;i<N;i++)
			scanf("%d",&I[i]);
		for(S=0;S<16;S++)
			for(A=0;A<16;A++)
				for(C=0;C<16;C++)
				{
					memset(X,0,sizeof(X));
					for(R[0]=S,i=1;i<=N;i++)
						R[i]=(A*R[i-1]+C)%256;
					for(i=0;i<N;i++)
						X[(I[i]+R[i+1])%256]++;
					for(H=i=0;i<256;i++)
					{
						if(X[i])
							H+=-(double)X[i]/N*log((double)X[i]/N);
					}
					if(r==-1||r-H>0.0000001)
					{
						rS=S;
						rA=A;
						rC=C;
						r=H;
					}
				}
		printf("%d %d %d\n",rS,rA,rC);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	S
	.align 4
	.type	S, @object
	.size	S, 4
S:
	.zero	4
	.globl	A
	.align 4
	.type	A, @object
	.size	A, 4
A:
	.zero	4
	.globl	C
	.align 4
	.type	C, @object
	.size	C, 4
C:
	.zero	4
	.globl	R
	.align 32
	.type	R, @object
	.size	R, 1028
R:
	.zero	1028
	.globl	I
	.align 32
	.type	I, @object
	.size	I, 1028
I:
	.zero	1028
	.globl	X
	.align 32
	.type	X, @object
	.size	X, 1028
X:
	.zero	1028
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	rS
	.align 4
	.type	rS, @object
	.size	rS, 4
rS:
	.zero	4
	.globl	rA
	.align 4
	.type	rA, @object
	.size	rA, 4
rA:
	.zero	4
	.globl	rC
	.align 4
	.type	rC, @object
	.size	rC, 4
rC:
	.zero	4
	.globl	H
	.align 8
	.type	H, @object
	.size	H, 8
H:
	.zero	8
	.globl	r
	.align 8
	.type	r, @object
	.size	r, 8
r:
	.zero	8
	.section	.rodata
.LC1:
	.string	"%d"
.LC5:
	.string	"%d %d %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	jmp	.L2
.L22:
	movl	$0, i(%rip)
	movsd	.LC0(%rip), %xmm0
	movsd	%xmm0, r(%rip)
	jmp	.L3
.L4:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	I(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L3:
	movl	i(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jl	.L4
	movl	$0, S(%rip)
	jmp	.L5
.L21:
	movl	$0, A(%rip)
	jmp	.L6
.L20:
	movl	$0, C(%rip)
	jmp	.L7
.L19:
	movl	$1028, %edx
	movl	$0, %esi
	leaq	X(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	S(%rip), %eax
	movl	%eax, R(%rip)
	movl	$1, i(%rip)
	jmp	.L8
.L9:
	movl	i(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	A(%rip), %eax
	imull	%eax, %edx
	movl	C(%rip), %eax
	addl	%edx, %eax
	movl	i(%rip), %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	shrl	$24, %ecx
	addl	%ecx, %eax
	movzbl	%al, %eax
	subl	%ecx, %eax
	movl	%eax, %ecx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L8:
	movl	i(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jle	.L9
	movl	$0, i(%rip)
	jmp	.L10
.L11:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	I(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	i(%rip), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	cltd
	shrl	$24, %edx
	addl	%edx, %eax
	movzbl	%al, %eax
	subl	%edx, %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	X(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L10:
	movl	i(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jl	.L11
	movl	$0, i(%rip)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, H(%rip)
	jmp	.L12
.L14:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L13
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	(%rdx,%rax), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	.LC3(%rip), %xmm1
	xorpd	%xmm1, %xmm0
	movl	N(%rip), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -8(%rbp)
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	(%rdx,%rax), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	N(%rip), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movapd	%xmm0, %xmm2
	divsd	%xmm1, %xmm2
	movq	%xmm2, %rax
	movq	%rax, %xmm0
	call	log@PLT
	movsd	-8(%rbp), %xmm1
	mulsd	%xmm0, %xmm1
	movsd	H(%rip), %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, H(%rip)
.L13:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L12:
	movl	i(%rip), %eax
	cmpl	$255, %eax
	jle	.L14
	movsd	r(%rip), %xmm0
	movsd	.LC0(%rip), %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L24
	movsd	.LC0(%rip), %xmm1
	ucomisd	%xmm1, %xmm0
	je	.L15
.L24:
	movsd	r(%rip), %xmm0
	movsd	H(%rip), %xmm1
	subsd	%xmm1, %xmm0
	comisd	.LC4(%rip), %xmm0
	jbe	.L17
.L15:
	movl	S(%rip), %eax
	movl	%eax, rS(%rip)
	movl	A(%rip), %eax
	movl	%eax, rA(%rip)
	movl	C(%rip), %eax
	movl	%eax, rC(%rip)
	movsd	H(%rip), %xmm0
	movsd	%xmm0, r(%rip)
.L17:
	movl	C(%rip), %eax
	addl	$1, %eax
	movl	%eax, C(%rip)
.L7:
	movl	C(%rip), %eax
	cmpl	$15, %eax
	jle	.L19
	movl	A(%rip), %eax
	addl	$1, %eax
	movl	%eax, A(%rip)
.L6:
	movl	A(%rip), %eax
	cmpl	$15, %eax
	jle	.L20
	movl	S(%rip), %eax
	addl	$1, %eax
	movl	%eax, S(%rip)
.L5:
	movl	S(%rip), %eax
	cmpl	$15, %eax
	jle	.L21
	movl	rC(%rip), %ecx
	movl	rA(%rip), %edx
	movl	rS(%rip), %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	N(%rip), %eax
	testl	%eax, %eax
	jne	.L22
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	0
	.long	-1074790400
	.align 16
.LC3:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.align 8
.LC4:
	.long	-1698910392
	.long	1048238066
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"%d"
.LC5:
	.string	"%d %d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	4+R(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
.L2:
	leaq	N(%rip), %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	N(%rip), %eax
	movl	%eax, 56(%rsp)
	testl	%eax, %eax
	je	.L33
	movq	.LC0(%rip), %rax
	movl	$0, i(%rip)
	movq	%rax, r(%rip)
	jle	.L22
	xorl	%eax, %eax
	leaq	I(%rip), %rbx
.L4:
	cltq
	leaq	.LC2(%rip), %rdi
	leaq	(%rbx,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	movl	N(%rip), %esi
	addl	$1, %eax
	movl	%esi, 56(%rsp)
	movl	%eax, i(%rip)
	cmpl	%esi, %eax
	jl	.L4
	movsd	r(%rip), %xmm5
	movl	%esi, %eax
	movsd	%xmm5, 48(%rsp)
.L3:
	leal	-1(%rax), %ebp
	leaq	8+R(%rip), %rax
	movl	$0, S(%rip)
	leaq	(%rax,%rbp,4), %r12
	movl	$0, 60(%rsp)
	leaq	X(%rip), %rbx
	movq	%r12, %rax
	leaq	-4(%rbx), %r14
	leaq	I(%rip), %r13
	movq	%rbp, %r12
	movq	%rax, %rbp
.L20:
	movl	$0, A(%rip)
	xorl	%esi, %esi
	movq	%rbp, %r9
	movq	%r12, %rbp
	movl	%esi, %r12d
	.p2align 4,,10
	.p2align 3
.L18:
	movl	$0, C(%rip)
	xorl	%edx, %edx
	movq	%rbp, %r8
	movl	%r12d, %ebp
	movl	%edx, %r12d
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%eax, %eax
	movl	$128, %ecx
	movq	%rbx, %rdi
	movl	56(%rsp), %edx
	rep stosq
	movl	60(%rsp), %eax
	leaq	R(%rip), %rsi
	movl	$1, i(%rip)
	movl	%eax, (%rsi)
	movl	$0, (%rdi)
	testl	%edx, %edx
	jle	.L5
	leaq	4(%rsi), %rcx
	.p2align 4,,10
	.p2align 3
.L6:
	imull	%ebp, %eax
	addq	$4, %rcx
	addl	%r12d, %eax
	movzbl	%al, %eax
	movl	%eax, -4(%rcx)
	cmpq	%r9, %rcx
	jne	.L6
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%r15,%rcx,4), %eax
	addl	0(%r13,%rcx,4), %eax
	cltd
	shrl	$24, %edx
	addl	%edx, %eax
	movzbl	%al, %eax
	subl	%edx, %eax
	cltq
	addl	$1, (%rbx,%rax,4)
	movq	%rcx, %rax
	addq	$1, %rcx
	cmpq	%rax, %r8
	jne	.L7
.L5:
	movq	$0x000000000, H(%rip)
	movl	$1, %eax
	pxor	%xmm2, %xmm2
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%r14,%rax,4), %edx
	testl	%edx, %edx
	jne	.L34
	movl	%eax, i(%rip)
	addq	$1, %rax
	cmpq	$257, %rax
	jne	.L11
.L10:
	movsd	48(%rsp), %xmm3
	ucomisd	.LC0(%rip), %xmm3
	jp	.L23
	je	.L12
.L23:
	movsd	48(%rsp), %xmm0
	subsd	%xmm2, %xmm0
	comisd	.LC4(%rip), %xmm0
	jbe	.L14
.L12:
	movl	60(%rsp), %eax
	movl	%ebp, rA(%rip)
	movl	%r12d, rC(%rip)
	movl	%eax, rS(%rip)
	movsd	%xmm2, r(%rip)
	movsd	%xmm2, 48(%rsp)
.L14:
	addl	$1, %r12d
	movl	%r12d, C(%rip)
	cmpl	$16, %r12d
	jne	.L16
	movl	%ebp, %r12d
	movq	%r8, %rbp
	addl	$1, %r12d
	movl	%r12d, A(%rip)
	cmpl	$16, %r12d
	je	.L17
	movsd	r(%rip), %xmm4
	movsd	%xmm4, 48(%rsp)
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L34:
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movq	%r9, 40(%rsp)
	cvtsi2sdl	56(%rsp), %xmm0
	movq	%r8, 32(%rsp)
	cvtsi2sdl	%edx, %xmm1
	xorpd	.LC3(%rip), %xmm1
	movq	%rax, 24(%rsp)
	movsd	%xmm2, 16(%rsp)
	divsd	%xmm0, %xmm1
	movapd	%xmm1, %xmm0
	xorpd	.LC3(%rip), %xmm0
	movsd	%xmm1, 8(%rsp)
	call	log@PLT
	movsd	8(%rsp), %xmm1
	movsd	16(%rsp), %xmm2
	movq	24(%rsp), %rax
	movq	32(%rsp), %r8
	mulsd	%xmm0, %xmm1
	movq	40(%rsp), %r9
	movl	%eax, i(%rip)
	addq	$1, %rax
	cmpq	$257, %rax
	addsd	%xmm1, %xmm2
	movsd	%xmm2, H(%rip)
	jne	.L11
	jmp	.L10
.L17:
	addl	$1, 60(%rsp)
	movl	60(%rsp), %eax
	movq	%r8, %r12
	movq	%r9, %rbp
	movl	%eax, S(%rip)
	cmpl	$16, %eax
	je	.L19
	movsd	r(%rip), %xmm6
	movsd	%xmm6, 48(%rsp)
	jmp	.L20
.L19:
	movl	rC(%rip), %r8d
	movl	rA(%rip), %ecx
	xorl	%eax, %eax
	leaq	.LC5(%rip), %rsi
	movl	rS(%rip), %edx
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L2
.L22:
	movq	%rax, 48(%rsp)
	movl	56(%rsp), %eax
	jmp	.L3
.L33:
	addq	$72, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	r
	.bss
	.align 8
	.type	r, @object
	.size	r, 8
r:
	.zero	8
	.globl	H
	.align 8
	.type	H, @object
	.size	H, 8
H:
	.zero	8
	.globl	rC
	.align 4
	.type	rC, @object
	.size	rC, 4
rC:
	.zero	4
	.globl	rA
	.align 4
	.type	rA, @object
	.size	rA, 4
rA:
	.zero	4
	.globl	rS
	.align 4
	.type	rS, @object
	.size	rS, 4
rS:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	X
	.align 32
	.type	X, @object
	.size	X, 1028
X:
	.zero	1028
	.globl	I
	.align 32
	.type	I, @object
	.size	I, 1028
I:
	.zero	1028
	.globl	R
	.align 32
	.type	R, @object
	.size	R, 1028
R:
	.zero	1028
	.globl	C
	.align 4
	.type	C, @object
	.size	C, 4
C:
	.zero	4
	.globl	A
	.align 4
	.type	A, @object
	.size	A, 4
A:
	.zero	4
	.globl	S
	.align 4
	.type	S, @object
	.size	S, 4
S:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	-1074790400
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.section	.rodata.cst8
	.align 8
.LC4:
	.long	-1698910392
	.long	1048238066
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"%d"
.LC5:
	.string	"%d %d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	4+R(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
.L2:
	leaq	N(%rip), %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	N(%rip), %eax
	movl	%eax, 56(%rsp)
	testl	%eax, %eax
	je	.L33
	movq	.LC0(%rip), %rax
	movl	$0, i(%rip)
	movq	%rax, r(%rip)
	jle	.L22
	xorl	%eax, %eax
	leaq	I(%rip), %rbx
.L4:
	cltq
	leaq	.LC2(%rip), %rdi
	leaq	(%rbx,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	movl	N(%rip), %esi
	addl	$1, %eax
	movl	%esi, 56(%rsp)
	movl	%eax, i(%rip)
	cmpl	%esi, %eax
	jl	.L4
	movsd	r(%rip), %xmm5
	movl	%esi, %eax
	movsd	%xmm5, 48(%rsp)
.L3:
	leal	-1(%rax), %ebp
	leaq	8+R(%rip), %rax
	movl	$0, S(%rip)
	leaq	(%rax,%rbp,4), %r12
	movl	$0, 60(%rsp)
	leaq	X(%rip), %rbx
	movq	%r12, %rax
	leaq	-4(%rbx), %r14
	leaq	I(%rip), %r13
	movq	%rbp, %r12
	movq	%rax, %rbp
.L20:
	movl	$0, A(%rip)
	xorl	%esi, %esi
	movq	%rbp, %r9
	movq	%r12, %rbp
	movl	%esi, %r12d
	.p2align 4,,10
	.p2align 3
.L18:
	movl	$0, C(%rip)
	xorl	%edx, %edx
	movq	%rbp, %r8
	movl	%r12d, %ebp
	movl	%edx, %r12d
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%eax, %eax
	movl	$128, %ecx
	movq	%rbx, %rdi
	movl	56(%rsp), %edx
	rep stosq
	movl	60(%rsp), %eax
	leaq	R(%rip), %rsi
	movl	$1, i(%rip)
	movl	%eax, (%rsi)
	movl	$0, (%rdi)
	testl	%edx, %edx
	jle	.L5
	leaq	4(%rsi), %rcx
	.p2align 4,,10
	.p2align 3
.L6:
	imull	%ebp, %eax
	addq	$4, %rcx
	addl	%r12d, %eax
	movzbl	%al, %eax
	movl	%eax, -4(%rcx)
	cmpq	%r9, %rcx
	jne	.L6
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%r15,%rcx,4), %eax
	addl	0(%r13,%rcx,4), %eax
	cltd
	shrl	$24, %edx
	addl	%edx, %eax
	movzbl	%al, %eax
	subl	%edx, %eax
	cltq
	addl	$1, (%rbx,%rax,4)
	movq	%rcx, %rax
	addq	$1, %rcx
	cmpq	%rax, %r8
	jne	.L7
.L5:
	movq	$0x000000000, H(%rip)
	movl	$1, %eax
	pxor	%xmm2, %xmm2
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%r14,%rax,4), %edx
	testl	%edx, %edx
	jne	.L34
	movl	%eax, i(%rip)
	addq	$1, %rax
	cmpq	$257, %rax
	jne	.L11
.L10:
	movsd	48(%rsp), %xmm3
	ucomisd	.LC0(%rip), %xmm3
	jp	.L23
	je	.L12
.L23:
	movsd	48(%rsp), %xmm0
	subsd	%xmm2, %xmm0
	comisd	.LC4(%rip), %xmm0
	jbe	.L14
.L12:
	movl	60(%rsp), %eax
	movl	%ebp, rA(%rip)
	movl	%r12d, rC(%rip)
	movl	%eax, rS(%rip)
	movsd	%xmm2, r(%rip)
	movsd	%xmm2, 48(%rsp)
.L14:
	addl	$1, %r12d
	movl	%r12d, C(%rip)
	cmpl	$16, %r12d
	jne	.L16
	movl	%ebp, %r12d
	movq	%r8, %rbp
	addl	$1, %r12d
	movl	%r12d, A(%rip)
	cmpl	$16, %r12d
	je	.L17
	movsd	r(%rip), %xmm4
	movsd	%xmm4, 48(%rsp)
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L34:
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movq	%r9, 40(%rsp)
	cvtsi2sdl	56(%rsp), %xmm0
	movq	%r8, 32(%rsp)
	cvtsi2sdl	%edx, %xmm1
	xorpd	.LC3(%rip), %xmm1
	movq	%rax, 24(%rsp)
	movsd	%xmm2, 16(%rsp)
	divsd	%xmm0, %xmm1
	movapd	%xmm1, %xmm0
	xorpd	.LC3(%rip), %xmm0
	movsd	%xmm1, 8(%rsp)
	call	log@PLT
	movsd	8(%rsp), %xmm1
	movsd	16(%rsp), %xmm2
	movq	24(%rsp), %rax
	movq	32(%rsp), %r8
	mulsd	%xmm0, %xmm1
	movq	40(%rsp), %r9
	movl	%eax, i(%rip)
	addq	$1, %rax
	cmpq	$257, %rax
	addsd	%xmm1, %xmm2
	movsd	%xmm2, H(%rip)
	jne	.L11
	jmp	.L10
.L17:
	addl	$1, 60(%rsp)
	movl	60(%rsp), %eax
	movq	%r8, %r12
	movq	%r9, %rbp
	movl	%eax, S(%rip)
	cmpl	$16, %eax
	je	.L19
	movsd	r(%rip), %xmm6
	movsd	%xmm6, 48(%rsp)
	jmp	.L20
.L19:
	movl	rC(%rip), %r8d
	movl	rA(%rip), %ecx
	xorl	%eax, %eax
	leaq	.LC5(%rip), %rsi
	movl	rS(%rip), %edx
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L2
.L22:
	movq	%rax, 48(%rsp)
	movl	56(%rsp), %eax
	jmp	.L3
.L33:
	addq	$72, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	r
	.bss
	.align 8
	.type	r, @object
	.size	r, 8
r:
	.zero	8
	.globl	H
	.align 8
	.type	H, @object
	.size	H, 8
H:
	.zero	8
	.globl	rC
	.align 4
	.type	rC, @object
	.size	rC, 4
rC:
	.zero	4
	.globl	rA
	.align 4
	.type	rA, @object
	.size	rA, 4
rA:
	.zero	4
	.globl	rS
	.align 4
	.type	rS, @object
	.size	rS, 4
rS:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	X
	.align 32
	.type	X, @object
	.size	X, 1028
X:
	.zero	1028
	.globl	I
	.align 32
	.type	I, @object
	.size	I, 1028
I:
	.zero	1028
	.globl	R
	.align 32
	.type	R, @object
	.size	R, 1028
R:
	.zero	1028
	.globl	C
	.align 4
	.type	C, @object
	.size	C, 4
C:
	.zero	4
	.globl	A
	.align 4
	.type	A, @object
	.size	A, 4
A:
	.zero	4
	.globl	S
	.align 4
	.type	S, @object
	.size	S, 4
S:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	-1074790400
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.section	.rodata.cst8
	.align 8
.LC4:
	.long	-1698910392
	.long	1048238066
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>
#include<string.h>
#include<math.h>

int N,S,A,C,R[257],I[257],X[257],i,j,rS,rA,rC;
double H,r;
int main()
{
	for(;scanf("%d",&N),N;)
	{
		for(i=0,r=-1;i<N;i++)
			scanf("%d",&I[i]);
		for(S=0;S<16;S++)
			for(A=0;A<16;A++)
				for(C=0;C<16;C++)
				{
					memset(X,0,sizeof(X));
					for(R[0]=S,i=1;i<=N;i++)
						R[i]=(A*R[i-1]+C)%256;
					for(i=0;i<N;i++)
						X[(I[i]+R[i+1])%256]++;
					for(H=i=0;i<256;i++)
					{
						if(X[i])
							H+=-(double)X[i]/N*log((double)X[i]/N);
					}
					if(r==-1||r-H>0.0000001)
					{
						rS=S;
						rA=A;
						rC=C;
						r=H;
					}
				}
		printf("%d %d %d\n",rS,rA,rC);
	}
	return 0;
}
5
5 4 3 2 1
5
7 7 7 7 7
10
186 8 42 24 154 40 10 56 122 141
0
 5
5 4 3 2 1
5
7 12 2 0 7
10
372 8 42 18 154 40 10 56 122 141
0
 5
5 4 3 4 1
5
7 11 7 7 14
0
186 8 42 24 154 21 10 56 122 72
0
 5
5 4 3 4 1
5
13 11 1 7 14
0
186 8 64 24 241 21 13 22 122 72
0
 5
5 4 5 4 2
5
13 11 1 7 8
0
186 4 64 24 178 15 13 44 122 72
0
 5
5 4 3 4 1
5
13 8 1 7 19
0
186 8 64 24 241 21 13 22 122 72
0
 5
5 4 3 3 1
5
7 11 1 6 14
0
186 8 64 24 154 21 13 22 122 72
0
 5
10 4 3 2 1
5
3 11 7 0 7
10
372 8 42 18 154 40 10 56 122 141
0
 5
5 3 3 4 1
5
7 11 7 4 14
0
186 8 64 24 154 21 10 22 122 96
0
 5
5 4 2 4 2
5
13 12 1 7 19
0
186 8 64 24 178 17 13 22 122 72
0

0 1 1
0 0 0
8 7 14
 0 1 1
6 11 13
8 7 14
 0 1 1
0 0 0
 0 1 1
0 1 2
 0 0 0
0 1 2
 0 1 1
0 5 1
 0 1 1
0 1 3
 0 1 1
3 8 10
8 7 14
 0 1 1
7 15 11
 0 0 0
15 11 13

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#include<string.h>
#include<math.h>

int N,S,A,C,R[257],I[257],X[257],i,j,rS,rA,rC;
double H,r;
int main()
{
	for(;scanf("%d",&N),N;)
	{
		for(i=0,r=-1;i<N;i++)
			scanf("%d",&I[i]);
		for(S=0;S<16;S++)
			for(A=0;A<16;A++)
				for(C=0;C<16;C++)
				{
					memset(X,0,sizeof(X));
					for(R[0]=S,i=1;i<=N;i++)
						R[i]=(A*R[i-1]+C)%256;
					for(i=0;i<N;i++)
						X[(I[i]+R[i+1])%256]++;
					for(H=i=0;i<256;i++)
					{
						if(X[i])
							H+=-(double)X[i]/N*log((double)X[i]/N);
					}
					if(r==-1||r-H>0.0000001)
					{
						rS=S;
						rA=A;
						rC=C;
						r=H;
					}
				}
		printf("%d %d %d\n",rS,rA,rC);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	S
	.align 4
	.type	S, @object
	.size	S, 4
S:
	.zero	4
	.globl	A
	.align 4
	.type	A, @object
	.size	A, 4
A:
	.zero	4
	.globl	C
	.align 4
	.type	C, @object
	.size	C, 4
C:
	.zero	4
	.globl	R
	.align 32
	.type	R, @object
	.size	R, 1028
R:
	.zero	1028
	.globl	I
	.align 32
	.type	I, @object
	.size	I, 1028
I:
	.zero	1028
	.globl	X
	.align 32
	.type	X, @object
	.size	X, 1028
X:
	.zero	1028
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	rS
	.align 4
	.type	rS, @object
	.size	rS, 4
rS:
	.zero	4
	.globl	rA
	.align 4
	.type	rA, @object
	.size	rA, 4
rA:
	.zero	4
	.globl	rC
	.align 4
	.type	rC, @object
	.size	rC, 4
rC:
	.zero	4
	.globl	H
	.align 8
	.type	H, @object
	.size	H, 8
H:
	.zero	8
	.globl	r
	.align 8
	.type	r, @object
	.size	r, 8
r:
	.zero	8
	.section	.rodata
.LC1:
	.string	"%d"
.LC5:
	.string	"%d %d %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	jmp	.L2
.L22:
	movl	$0, i(%rip)
	movsd	.LC0(%rip), %xmm0
	movsd	%xmm0, r(%rip)
	jmp	.L3
.L4:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	I(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L3:
	movl	i(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jl	.L4
	movl	$0, S(%rip)
	jmp	.L5
.L21:
	movl	$0, A(%rip)
	jmp	.L6
.L20:
	movl	$0, C(%rip)
	jmp	.L7
.L19:
	movl	$1028, %edx
	movl	$0, %esi
	leaq	X(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	S(%rip), %eax
	movl	%eax, R(%rip)
	movl	$1, i(%rip)
	jmp	.L8
.L9:
	movl	i(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	A(%rip), %eax
	imull	%eax, %edx
	movl	C(%rip), %eax
	addl	%edx, %eax
	movl	i(%rip), %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	shrl	$24, %ecx
	addl	%ecx, %eax
	movzbl	%al, %eax
	subl	%ecx, %eax
	movl	%eax, %ecx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L8:
	movl	i(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jle	.L9
	movl	$0, i(%rip)
	jmp	.L10
.L11:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	I(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	i(%rip), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	cltd
	shrl	$24, %edx
	addl	%edx, %eax
	movzbl	%al, %eax
	subl	%edx, %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	X(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L10:
	movl	i(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jl	.L11
	movl	$0, i(%rip)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, H(%rip)
	jmp	.L12
.L14:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L13
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	(%rdx,%rax), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	.LC3(%rip), %xmm1
	xorpd	%xmm1, %xmm0
	movl	N(%rip), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -8(%rbp)
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	(%rdx,%rax), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	N(%rip), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movapd	%xmm0, %xmm2
	divsd	%xmm1, %xmm2
	movq	%xmm2, %rax
	movq	%rax, %xmm0
	call	log@PLT
	movsd	-8(%rbp), %xmm1
	mulsd	%xmm0, %xmm1
	movsd	H(%rip), %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, H(%rip)
.L13:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L12:
	movl	i(%rip), %eax
	cmpl	$255, %eax
	jle	.L14
	movsd	r(%rip), %xmm0
	movsd	.LC0(%rip), %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L24
	movsd	.LC0(%rip), %xmm1
	ucomisd	%xmm1, %xmm0
	je	.L15
.L24:
	movsd	r(%rip), %xmm0
	movsd	H(%rip), %xmm1
	subsd	%xmm1, %xmm0
	comisd	.LC4(%rip), %xmm0
	jbe	.L17
.L15:
	movl	S(%rip), %eax
	movl	%eax, rS(%rip)
	movl	A(%rip), %eax
	movl	%eax, rA(%rip)
	movl	C(%rip), %eax
	movl	%eax, rC(%rip)
	movsd	H(%rip), %xmm0
	movsd	%xmm0, r(%rip)
.L17:
	movl	C(%rip), %eax
	addl	$1, %eax
	movl	%eax, C(%rip)
.L7:
	movl	C(%rip), %eax
	cmpl	$15, %eax
	jle	.L19
	movl	A(%rip), %eax
	addl	$1, %eax
	movl	%eax, A(%rip)
.L6:
	movl	A(%rip), %eax
	cmpl	$15, %eax
	jle	.L20
	movl	S(%rip), %eax
	addl	$1, %eax
	movl	%eax, S(%rip)
.L5:
	movl	S(%rip), %eax
	cmpl	$15, %eax
	jle	.L21
	movl	rC(%rip), %ecx
	movl	rA(%rip), %edx
	movl	rS(%rip), %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	N(%rip), %eax
	testl	%eax, %eax
	jne	.L22
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	0
	.long	-1074790400
	.align 16
.LC3:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.align 8
.LC4:
	.long	-1698910392
	.long	1048238066
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	S
	.align 4
	.type	S, @object
	.size	S, 4
S:
	.zero	4
	.globl	A
	.align 4
	.type	A, @object
	.size	A, 4
A:
	.zero	4
	.globl	C
	.align 4
	.type	C, @object
	.size	C, 4
C:
	.zero	4
	.globl	R
	.align 32
	.type	R, @object
	.size	R, 1028
R:
	.zero	1028
	.globl	I
	.align 32
	.type	I, @object
	.size	I, 1028
I:
	.zero	1028
	.globl	X
	.align 32
	.type	X, @object
	.size	X, 1028
X:
	.zero	1028
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	rS
	.align 4
	.type	rS, @object
	.size	rS, 4
rS:
	.zero	4
	.globl	rA
	.align 4
	.type	rA, @object
	.size	rA, 4
rA:
	.zero	4
	.globl	rC
	.align 4
	.type	rC, @object
	.size	rC, 4
rC:
	.zero	4
	.globl	H
	.align 8
	.type	H, @object
	.size	H, 8
H:
	.zero	8
	.globl	r
	.align 8
	.type	r, @object
	.size	r, 8
r:
	.zero	8
	.section	.rodata
.LC1:
	.string	"%d"
.LC5:
	.string	"%d %d %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	jmp	.L2
.L22:
	movl	$0, i(%rip)
	movsd	.LC0(%rip), %xmm0
	movsd	%xmm0, r(%rip)
	jmp	.L3
.L4:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	I(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L3:
	movl	i(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jl	.L4
	movl	$0, S(%rip)
	jmp	.L5
.L21:
	movl	$0, A(%rip)
	jmp	.L6
.L20:
	movl	$0, C(%rip)
	jmp	.L7
.L19:
	movl	$1028, %edx
	movl	$0, %esi
	leaq	X(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	S(%rip), %eax
	movl	%eax, R(%rip)
	movl	$1, i(%rip)
	jmp	.L8
.L9:
	movl	i(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	A(%rip), %eax
	imull	%eax, %edx
	movl	C(%rip), %eax
	addl	%edx, %eax
	movl	i(%rip), %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	shrl	$24, %ecx
	addl	%ecx, %eax
	movzbl	%al, %eax
	subl	%ecx, %eax
	movl	%eax, %ecx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L8:
	movl	i(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jle	.L9
	movl	$0, i(%rip)
	jmp	.L10
.L11:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	I(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	i(%rip), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	R(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	cltd
	shrl	$24, %edx
	addl	%edx, %eax
	movzbl	%al, %eax
	subl	%edx, %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	X(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L10:
	movl	i(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jl	.L11
	movl	$0, i(%rip)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, H(%rip)
	jmp	.L12
.L14:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L13
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	(%rdx,%rax), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	.LC3(%rip), %xmm1
	xorpd	%xmm1, %xmm0
	movl	N(%rip), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -8(%rbp)
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	(%rdx,%rax), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	N(%rip), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movapd	%xmm0, %xmm2
	divsd	%xmm1, %xmm2
	movq	%xmm2, %rax
	movq	%rax, %xmm0
	call	log@PLT
	movsd	-8(%rbp), %xmm1
	mulsd	%xmm0, %xmm1
	movsd	H(%rip), %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, H(%rip)
.L13:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L12:
	movl	i(%rip), %eax
	cmpl	$255, %eax
	jle	.L14
	movsd	r(%rip), %xmm0
	movsd	.LC0(%rip), %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L24
	movsd	.LC0(%rip), %xmm1
	ucomisd	%xmm1, %xmm0
	je	.L15
.L24:
	movsd	r(%rip), %xmm0
	movsd	H(%rip), %xmm1
	subsd	%xmm1, %xmm0
	comisd	.LC4(%rip), %xmm0
	jbe	.L17
.L15:
	movl	S(%rip), %eax
	movl	%eax, rS(%rip)
	movl	A(%rip), %eax
	movl	%eax, rA(%rip)
	movl	C(%rip), %eax
	movl	%eax, rC(%rip)
	movsd	H(%rip), %xmm0
	movsd	%xmm0, r(%rip)
.L17:
	movl	C(%rip), %eax
	addl	$1, %eax
	movl	%eax, C(%rip)
.L7:
	movl	C(%rip), %eax
	cmpl	$15, %eax
	jle	.L19
	movl	A(%rip), %eax
	addl	$1, %eax
	movl	%eax, A(%rip)
.L6:
	movl	A(%rip), %eax
	cmpl	$15, %eax
	jle	.L20
	movl	S(%rip), %eax
	addl	$1, %eax
	movl	%eax, S(%rip)
.L5:
	movl	S(%rip), %eax
	cmpl	$15, %eax
	jle	.L21
	movl	rC(%rip), %ecx
	movl	rA(%rip), %edx
	movl	rS(%rip), %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	N(%rip), %eax
	testl	%eax, %eax
	jne	.L22
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	0
	.long	-1074790400
	.align 16
.LC3:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.align 8
.LC4:
	.long	-1698910392
	.long	1048238066
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
