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 <math.h>
#include <string.h>
#include <stdlib.h>

#define llong long long
#define fr(i,l,r) for(i=(l);i<(r);i++)
#define min(p,q) ((p)<(q)?(p):(q))
#define max(p,q) ((p)>(q)?(p):(q))


int main(void)
{
	//変数の宣言
	int n;
	llong m=0;
	llong a[50];
	llong b[50];
	
	//よく使う変数
	int i,j,k,l;
	int flag=0;
	int ans=0;
	int count=0;
	int temp,temp1,temp2;
	llong int max,min;
	int len;
	llong int sum=0;
	//データの読み込み
	
	scanf("%d",&n);
	
	for(i=0;i<n;i++){
		scanf("%lld",&a[i]);
	}
	
	
	
//	printf("nは%dです\n", n);
//	printf("データの読み込み終了\n");
	//実際の処理
	
	for(i=0;i<n;i++){
		if(i==0)min=a[0];
		min = min(min,a[i]);
	}
	
//	printf("min=%d\n",min);
	
	for(i=0;i<n;i++){
		b[i]=(a[i]-min)/(n+1);
		m=m+b[i];
//		printf("b[%d]=%d\n",i,b[i]);
	}
	
	for(i=0;i<n;i++){
//		printf("a[i]=%lld,b[i]=%lld,n=%d,m=%lld,ans=%lld\n",a[i],b[i],n,m,a[i]-b[i]*n+(m-b[i]));
		a[i]=a[i]-b[i]*n+(m-b[i]);
	}
	
/*	for(i=0;i<n;i++){
		printf("%lld ",a[i]);
	}
	printf("\n");
	
	for(i=0;i<n;i++){
		printf("%lld ",b[i]);
	}
*/	
	for(i=0;i<n;i++){
		if(i==0) max=a[0];
		max=max(max,a[i]);
	}
	
	if(max>n+50){
		for(i=0;i<n;i++){
			a[i]=a[i]-(max-n-50);
		}
		m=m+(max-n-50)*n;
	}
	
	flag=1;
	while(flag==1){
		count++;
	//	printf("count=%d ",count);
	//	for(i=0;i<n;i++){
	//		printf("%lld ",a[i]);
	//	}
	//	printf("\n");

		flag=0;
		for(i=0;i<n;i++){
			if(flag==0&&a[i]>=n){
				a[i]=a[i]-n-1;
				flag=1;
			}
		}
		if(flag==1){
			for(i=0;i<n;i++){
				a[i]++;
			}
			m++;
		}
	}
	
//	printf("計算部分終了\n");
	//出力
	
	printf("%lld",m);
	
//	printf("結果の出力終了\n");
	
	return 0;
	
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$880, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -848(%rbp)
	movl	$0, -860(%rbp)
	movl	$0, -852(%rbp)
	movl	$0, -856(%rbp)
	movq	$0, -824(%rbp)
	leaq	-868(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -864(%rbp)
	jmp	.L2
.L3:
	leaq	-816(%rbp), %rdx
	movl	-864(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -864(%rbp)
.L2:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L3
	movl	$0, -864(%rbp)
	jmp	.L4
.L6:
	cmpl	$0, -864(%rbp)
	jne	.L5
	movq	-816(%rbp), %rax
	movq	%rax, -832(%rbp)
.L5:
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rax
	movq	-832(%rbp), %rdx
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -832(%rbp)
	addl	$1, -864(%rbp)
.L4:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L6
	movl	$0, -864(%rbp)
	jmp	.L7
.L8:
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rax
	subq	-832(%rbp), %rax
	movl	-868(%rbp), %edx
	addl	$1, %edx
	movslq	%edx, %rsi
	cqto
	idivq	%rsi
	movq	%rax, %rdx
	movl	-864(%rbp), %eax
	cltq
	movq	%rdx, -416(%rbp,%rax,8)
	movl	-864(%rbp), %eax
	cltq
	movq	-416(%rbp,%rax,8), %rax
	addq	%rax, -848(%rbp)
	addl	$1, -864(%rbp)
.L7:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L8
	movl	$0, -864(%rbp)
	jmp	.L9
.L10:
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rdx
	movl	-864(%rbp), %eax
	cltq
	movq	-416(%rbp,%rax,8), %rcx
	movl	-868(%rbp), %eax
	cltq
	imulq	%rcx, %rax
	movq	%rdx, %rcx
	subq	%rax, %rcx
	movl	-864(%rbp), %eax
	cltq
	movq	-416(%rbp,%rax,8), %rdx
	movq	-848(%rbp), %rax
	subq	%rdx, %rax
	leaq	(%rcx,%rax), %rdx
	movl	-864(%rbp), %eax
	cltq
	movq	%rdx, -816(%rbp,%rax,8)
	addl	$1, -864(%rbp)
.L9:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L10
	movl	$0, -864(%rbp)
	jmp	.L11
.L13:
	cmpl	$0, -864(%rbp)
	jne	.L12
	movq	-816(%rbp), %rax
	movq	%rax, -840(%rbp)
.L12:
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rax
	movq	-840(%rbp), %rdx
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	movq	%rax, -840(%rbp)
	addl	$1, -864(%rbp)
.L11:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L13
	movl	-868(%rbp), %eax
	addl	$50, %eax
	cltq
	cmpq	%rax, -840(%rbp)
	jle	.L14
	movl	$0, -864(%rbp)
	jmp	.L15
.L16:
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rax
	movl	-868(%rbp), %edx
	movslq	%edx, %rcx
	movq	-840(%rbp), %rdx
	subq	%rcx, %rdx
	leaq	-50(%rdx), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movl	-864(%rbp), %eax
	cltq
	movq	%rdx, -816(%rbp,%rax,8)
	addl	$1, -864(%rbp)
.L15:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L16
	movl	-868(%rbp), %eax
	movslq	%eax, %rdx
	movq	-840(%rbp), %rax
	subq	%rdx, %rax
	leaq	-50(%rax), %rdx
	movl	-868(%rbp), %eax
	cltq
	imulq	%rdx, %rax
	addq	%rax, -848(%rbp)
.L14:
	movl	$1, -860(%rbp)
	jmp	.L17
.L23:
	addl	$1, -856(%rbp)
	movl	$0, -860(%rbp)
	movl	$0, -864(%rbp)
	jmp	.L18
.L20:
	cmpl	$0, -860(%rbp)
	jne	.L19
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rdx
	movl	-868(%rbp), %eax
	cltq
	cmpq	%rax, %rdx
	jl	.L19
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rax
	movl	-868(%rbp), %edx
	movslq	%edx, %rdx
	subq	%rdx, %rax
	leaq	-1(%rax), %rdx
	movl	-864(%rbp), %eax
	cltq
	movq	%rdx, -816(%rbp,%rax,8)
	movl	$1, -860(%rbp)
.L19:
	addl	$1, -864(%rbp)
.L18:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L20
	cmpl	$1, -860(%rbp)
	jne	.L17
	movl	$0, -864(%rbp)
	jmp	.L21
.L22:
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rax
	leaq	1(%rax), %rdx
	movl	-864(%rbp), %eax
	cltq
	movq	%rdx, -816(%rbp,%rax,8)
	addl	$1, -864(%rbp)
.L21:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L22
	addq	$1, -848(%rbp)
.L17:
	cmpl	$1, -860(%rbp)
	je	.L23
	movq	-848(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.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
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$856, %rsp
	.cfi_def_cfa_offset 912
	movq	%fs:40, %rax
	movq	%rax, 840(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rsi
	leaq	32(%rsp), %rbx
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %esi
	testl	%esi, %esi
	jle	.L2
	movq	%rbx, (%rsp)
	movq	%rbx, %r12
	xorl	%r15d, %r15d
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %esi
	addq	$8, %r12
	cmpl	%r15d, %esi
	jg	.L3
	testl	%esi, %esi
	jle	.L2
	movq	32(%rsp), %rcx
	movslq	%esi, %rdi
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L7:
	testq	%rax, %rax
	je	.L4
.L44:
	movq	(%rbx,%rax,8), %rdx
	cmpq	%rdx, %r14
	cmovg	%rdx, %r14
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L7
.L6:
	leal	1(%rsi), %r10d
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movslq	%r10d, %r10
	leaq	432(%rsp), %r9
	.p2align 4,,10
	.p2align 3
.L8:
	movq	(%rbx,%rcx,8), %rax
	subq	%r14, %rax
	cqto
	idivq	%r10
	movq	%rax, (%r9,%rcx,8)
	addq	$1, %rcx
	addq	%rax, %r8
	cmpq	%rdi, %rcx
	jne	.L8
	cmpl	$1, %esi
	je	.L32
	movl	%esi, %edx
	movq	%rdi, %xmm3
	movq	%r8, %xmm6
	movq	%r9, %rax
	shrl	%edx
	punpcklqdq	%xmm3, %xmm3
	punpcklqdq	%xmm6, %xmm6
	subl	$1, %edx
	movdqa	%xmm3, %xmm5
	salq	$4, %rdx
	psrlq	$32, %xmm5
	leaq	16(%rbx,%rdx), %rcx
	movq	%rbx, %rdx
	.p2align 4,,10
	.p2align 3
.L10:
	movdqa	(%rax), %xmm1
	movdqa	%xmm5, %xmm4
	addq	$16, %rdx
	addq	$16, %rax
	movdqa	%xmm1, %xmm0
	pmuludq	%xmm1, %xmm4
	movdqa	%xmm1, %xmm2
	psrlq	$32, %xmm0
	pmuludq	%xmm3, %xmm2
	pmuludq	%xmm3, %xmm0
	paddq	%xmm4, %xmm0
	psllq	$32, %xmm0
	paddq	%xmm0, %xmm2
	movdqa	-16(%rdx), %xmm0
	psubq	%xmm2, %xmm0
	movdqa	%xmm6, %xmm2
	psubq	%xmm1, %xmm2
	paddq	%xmm2, %xmm0
	movaps	%xmm0, -16(%rdx)
	cmpq	%rcx, %rdx
	jne	.L10
	movl	%esi, %edx
	andl	$-2, %edx
	testb	$1, %sil
	je	.L11
.L9:
	movslq	%edx, %rdx
	movq	%rdi, %r9
	movq	432(%rsp,%rdx,8), %rcx
	movq	32(%rsp,%rdx,8), %rax
	imulq	%rcx, %r9
	subq	%r9, %rax
	movq	%r8, %r9
	subq	%rcx, %r9
	addq	%r9, %rax
	movq	%rax, 32(%rsp,%rdx,8)
.L11:
	movq	32(%rsp), %rcx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L15:
	testq	%rax, %rax
	je	.L12
.L45:
	movq	(%rbx,%rax,8), %rdx
	cmpq	%rdx, %r13
	cmovl	%rdx, %r13
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L15
.L14:
	leal	50(%rsi), %eax
	cltq
	cmpq	%r13, %rax
	jl	.L28
.L29:
	movl	%esi, %eax
	movl	%esi, %r9d
	movdqa	.LC2(%rip), %xmm1
	movslq	%esi, %rdi
	shrl	%eax
	andl	$-2, %r9d
	leal	-1(%rsi), %r10d
	subl	$1, %eax
	salq	$4, %rax
	leaq	48(%rsp,%rax), %r11
	testl	%esi, %esi
	jle	.L22
.L27:
	xorl	%edx, %edx
	movq	(%rbx,%rdx,8), %rax
	movslq	%edx, %rcx
	cmpq	%rdi, %rax
	jge	.L20
	.p2align 4,,10
	.p2align 3
.L51:
	leaq	1(%rdx), %rax
	cmpq	%rdx, %r10
	je	.L22
	movq	%rax, %rdx
	movq	(%rbx,%rdx,8), %rax
	movslq	%edx, %rcx
	cmpq	%rdi, %rax
	jl	.L51
.L20:
	subq	%rdi, %rax
	subq	$1, %rax
	movq	%rax, 32(%rsp,%rcx,8)
	cmpl	$1, %esi
	je	.L35
	movq	%rbx, %rax
.L24:
	movdqa	(%rax), %xmm0
	addq	$16, %rax
	paddq	%xmm1, %xmm0
	movaps	%xmm0, -16(%rax)
	cmpq	%r11, %rax
	jne	.L24
	movslq	%r9d, %rax
	cmpl	%esi, %r9d
	je	.L25
.L23:
	addq	$1, 32(%rsp,%rax,8)
.L25:
	addq	$1, %r8
	testl	%esi, %esi
	jg	.L27
	.p2align 4,,10
	.p2align 3
.L22:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	840(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L52
	addq	$856, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	movq	(%rbx,%rax,8), %r13
	movl	$1, %eax
	cmpq	%r13, %rcx
	cmovge	%rcx, %r13
	cmpq	%rdi, %rax
	jne	.L45
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L4:
	movq	(%rbx,%rax,8), %r14
	movl	$1, %eax
	cmpq	%r14, %rcx
	cmovle	%rcx, %r14
	cmpq	%rdi, %rax
	jne	.L44
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L35:
	xorl	%eax, %eax
	jmp	.L23
.L28:
	movq	%r13, %rdx
	subq	%rdi, %rdx
	subq	$50, %rdx
	cmpl	$1, %esi
	je	.L33
	movl	%esi, %eax
	movq	%rdx, %xmm1
	shrl	%eax
	punpcklqdq	%xmm1, %xmm1
	leal	-1(%rax), %ecx
	leaq	16(%rbx), %rax
	salq	$4, %rcx
	addq	%rax, %rcx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L53:
	addq	$16, %rax
.L17:
	movq	(%rsp), %r11
	movdqa	(%r11), %xmm7
	movdqa	%xmm7, %xmm0
	movaps	%xmm7, (%rsp)
	psubq	%xmm1, %xmm0
	movq	%rax, (%rsp)
	movaps	%xmm0, (%r11)
	cmpq	%rcx, %rax
	jne	.L53
	movl	%esi, %eax
	andl	$-2, %eax
	testb	$1, %sil
	je	.L30
.L16:
	cltq
	subq	%rdx, 32(%rsp,%rax,8)
.L30:
	subq	%rdi, %r13
	leaq	-50(%r13), %rax
	imulq	%rdi, %rax
	addq	%rax, %r8
	jmp	.L29
.L2:
	leal	50(%rsi), %eax
	xorl	%r13d, %r13d
	xorl	%r8d, %r8d
	testl	$-2147483648, %eax
	je	.L29
	movslq	%esi, %rdi
	jmp	.L30
.L32:
	xorl	%edx, %edx
	jmp	.L9
.L33:
	xorl	%eax, %eax
	jmp	.L16
.L52:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.quad	1
	.quad	1
	.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
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$856, %rsp
	.cfi_def_cfa_offset 912
	movq	%fs:40, %rax
	movq	%rax, 840(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rsi
	leaq	32(%rsp), %rbx
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %esi
	testl	%esi, %esi
	jle	.L2
	movq	%rbx, (%rsp)
	movq	%rbx, %r12
	xorl	%r15d, %r15d
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %esi
	addq	$8, %r12
	cmpl	%r15d, %esi
	jg	.L3
	testl	%esi, %esi
	jle	.L2
	movq	32(%rsp), %rcx
	movslq	%esi, %rdi
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L7:
	testq	%rax, %rax
	je	.L4
.L44:
	movq	(%rbx,%rax,8), %rdx
	cmpq	%rdx, %r14
	cmovg	%rdx, %r14
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L7
.L6:
	leal	1(%rsi), %r10d
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movslq	%r10d, %r10
	leaq	432(%rsp), %r9
	.p2align 4,,10
	.p2align 3
.L8:
	movq	(%rbx,%rcx,8), %rax
	subq	%r14, %rax
	cqto
	idivq	%r10
	movq	%rax, (%r9,%rcx,8)
	addq	$1, %rcx
	addq	%rax, %r8
	cmpq	%rdi, %rcx
	jne	.L8
	cmpl	$1, %esi
	je	.L32
	movl	%esi, %edx
	movq	%rdi, %xmm3
	movq	%r8, %xmm6
	movq	%r9, %rax
	shrl	%edx
	punpcklqdq	%xmm3, %xmm3
	punpcklqdq	%xmm6, %xmm6
	subl	$1, %edx
	movdqa	%xmm3, %xmm5
	salq	$4, %rdx
	psrlq	$32, %xmm5
	leaq	16(%rbx,%rdx), %rcx
	movq	%rbx, %rdx
	.p2align 4,,10
	.p2align 3
.L10:
	movdqa	(%rax), %xmm1
	movdqa	%xmm5, %xmm4
	addq	$16, %rdx
	addq	$16, %rax
	movdqa	%xmm1, %xmm0
	pmuludq	%xmm1, %xmm4
	movdqa	%xmm1, %xmm2
	psrlq	$32, %xmm0
	pmuludq	%xmm3, %xmm2
	pmuludq	%xmm3, %xmm0
	paddq	%xmm4, %xmm0
	psllq	$32, %xmm0
	paddq	%xmm0, %xmm2
	movdqa	-16(%rdx), %xmm0
	psubq	%xmm2, %xmm0
	movdqa	%xmm6, %xmm2
	psubq	%xmm1, %xmm2
	paddq	%xmm2, %xmm0
	movaps	%xmm0, -16(%rdx)
	cmpq	%rcx, %rdx
	jne	.L10
	movl	%esi, %edx
	andl	$-2, %edx
	testb	$1, %sil
	je	.L11
.L9:
	movslq	%edx, %rdx
	movq	%rdi, %r9
	movq	432(%rsp,%rdx,8), %rcx
	movq	32(%rsp,%rdx,8), %rax
	imulq	%rcx, %r9
	subq	%r9, %rax
	movq	%r8, %r9
	subq	%rcx, %r9
	addq	%r9, %rax
	movq	%rax, 32(%rsp,%rdx,8)
.L11:
	movq	32(%rsp), %rcx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L15:
	testq	%rax, %rax
	je	.L12
.L45:
	movq	(%rbx,%rax,8), %rdx
	cmpq	%rdx, %r13
	cmovl	%rdx, %r13
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L15
.L14:
	leal	50(%rsi), %eax
	cltq
	cmpq	%r13, %rax
	jl	.L28
.L29:
	movl	%esi, %eax
	movl	%esi, %r9d
	movdqa	.LC2(%rip), %xmm1
	movslq	%esi, %rdi
	shrl	%eax
	andl	$-2, %r9d
	leal	-1(%rsi), %r10d
	subl	$1, %eax
	salq	$4, %rax
	leaq	48(%rsp,%rax), %r11
	testl	%esi, %esi
	jle	.L22
.L27:
	xorl	%edx, %edx
	movq	(%rbx,%rdx,8), %rax
	movslq	%edx, %rcx
	cmpq	%rdi, %rax
	jge	.L20
	.p2align 4,,10
	.p2align 3
.L51:
	leaq	1(%rdx), %rax
	cmpq	%rdx, %r10
	je	.L22
	movq	%rax, %rdx
	movq	(%rbx,%rdx,8), %rax
	movslq	%edx, %rcx
	cmpq	%rdi, %rax
	jl	.L51
.L20:
	subq	%rdi, %rax
	subq	$1, %rax
	movq	%rax, 32(%rsp,%rcx,8)
	cmpl	$1, %esi
	je	.L35
	movq	%rbx, %rax
.L24:
	movdqa	(%rax), %xmm0
	addq	$16, %rax
	paddq	%xmm1, %xmm0
	movaps	%xmm0, -16(%rax)
	cmpq	%r11, %rax
	jne	.L24
	movslq	%r9d, %rax
	cmpl	%esi, %r9d
	je	.L25
.L23:
	addq	$1, 32(%rsp,%rax,8)
.L25:
	addq	$1, %r8
	testl	%esi, %esi
	jg	.L27
	.p2align 4,,10
	.p2align 3
.L22:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	840(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L52
	addq	$856, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	movq	(%rbx,%rax,8), %r13
	movl	$1, %eax
	cmpq	%r13, %rcx
	cmovge	%rcx, %r13
	cmpq	%rdi, %rax
	jne	.L45
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L4:
	movq	(%rbx,%rax,8), %r14
	movl	$1, %eax
	cmpq	%r14, %rcx
	cmovle	%rcx, %r14
	cmpq	%rdi, %rax
	jne	.L44
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L35:
	xorl	%eax, %eax
	jmp	.L23
.L28:
	movq	%r13, %rdx
	subq	%rdi, %rdx
	subq	$50, %rdx
	cmpl	$1, %esi
	je	.L33
	movl	%esi, %eax
	movq	%rdx, %xmm1
	shrl	%eax
	punpcklqdq	%xmm1, %xmm1
	leal	-1(%rax), %ecx
	leaq	16(%rbx), %rax
	salq	$4, %rcx
	addq	%rax, %rcx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L53:
	addq	$16, %rax
.L17:
	movq	(%rsp), %r11
	movdqa	(%r11), %xmm7
	movdqa	%xmm7, %xmm0
	movaps	%xmm7, (%rsp)
	psubq	%xmm1, %xmm0
	movq	%rax, (%rsp)
	movaps	%xmm0, (%r11)
	cmpq	%rcx, %rax
	jne	.L53
	movl	%esi, %eax
	andl	$-2, %eax
	testb	$1, %sil
	je	.L30
.L16:
	cltq
	subq	%rdx, 32(%rsp,%rax,8)
.L30:
	subq	%rdi, %r13
	leaq	-50(%r13), %rax
	imulq	%rdi, %rax
	addq	%rax, %r8
	jmp	.L29
.L2:
	leal	50(%rsi), %eax
	xorl	%r13d, %r13d
	xorl	%r8d, %r8d
	testl	$-2147483648, %eax
	je	.L29
	movslq	%esi, %rdi
	jmp	.L30
.L32:
	xorl	%edx, %edx
	jmp	.L9
.L33:
	xorl	%eax, %eax
	jmp	.L16
.L52:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.quad	1
	.quad	1
	.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 <math.h>
#include <string.h>
#include <stdlib.h>

#define llong long long
#define fr(i,l,r) for(i=(l);i<(r);i++)
#define min(p,q) ((p)<(q)?(p):(q))
#define max(p,q) ((p)>(q)?(p):(q))


int main(void)
{
	//変数の宣言
	int n;
	llong m=0;
	llong a[50];
	llong b[50];
	
	//よく使う変数
	int i,j,k,l;
	int flag=0;
	int ans=0;
	int count=0;
	int temp,temp1,temp2;
	llong int max,min;
	int len;
	llong int sum=0;
	//データの読み込み
	
	scanf("%d",&n);
	
	for(i=0;i<n;i++){
		scanf("%lld",&a[i]);
	}
	
	
	
//	printf("nは%dです\n", n);
//	printf("データの読み込み終了\n");
	//実際の処理
	
	for(i=0;i<n;i++){
		if(i==0)min=a[0];
		min = min(min,a[i]);
	}
	
//	printf("min=%d\n",min);
	
	for(i=0;i<n;i++){
		b[i]=(a[i]-min)/(n+1);
		m=m+b[i];
//		printf("b[%d]=%d\n",i,b[i]);
	}
	
	for(i=0;i<n;i++){
//		printf("a[i]=%lld,b[i]=%lld,n=%d,m=%lld,ans=%lld\n",a[i],b[i],n,m,a[i]-b[i]*n+(m-b[i]));
		a[i]=a[i]-b[i]*n+(m-b[i]);
	}
	
/*	for(i=0;i<n;i++){
		printf("%lld ",a[i]);
	}
	printf("\n");
	
	for(i=0;i<n;i++){
		printf("%lld ",b[i]);
	}
*/	
	for(i=0;i<n;i++){
		if(i==0) max=a[0];
		max=max(max,a[i]);
	}
	
	if(max>n+50){
		for(i=0;i<n;i++){
			a[i]=a[i]-(max-n-50);
		}
		m=m+(max-n-50)*n;
	}
	
	flag=1;
	while(flag==1){
		count++;
	//	printf("count=%d ",count);
	//	for(i=0;i<n;i++){
	//		printf("%lld ",a[i]);
	//	}
	//	printf("\n");

		flag=0;
		for(i=0;i<n;i++){
			if(flag==0&&a[i]>=n){
				a[i]=a[i]-n-1;
				flag=1;
			}
		}
		if(flag==1){
			for(i=0;i<n;i++){
				a[i]++;
			}
			m++;
		}
	}
	
//	printf("計算部分終了\n");
	//出力
	
	printf("%lld",m);
	
//	printf("結果の出力終了\n");
	
	return 0;
	
}


2
2 4
 4
3 3 3 2
 10
1000 193 256 777 0 2 1192 1234567891011 48 425
 2
2 7
 10
1000 193 256 777 0 2 1192 2138223215855 48 425
 2
0 7
 10
1000 193 256 777 0 2 2173 2138223215855 48 425
 4
1 6 3 4
 10
1000 193 256 777 0 2 2173 2532903011866 48 425
 4
1 8 3 4

5 0 1234567894848 8 2138223219695 6 2138223220674 7 2532903016679 9
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 <math.h>
#include <string.h>
#include <stdlib.h>

#define llong long long
#define fr(i,l,r) for(i=(l);i<(r);i++)
#define min(p,q) ((p)<(q)?(p):(q))
#define max(p,q) ((p)>(q)?(p):(q))


int main(void)
{
	//変数の宣言
	int n;
	llong m=0;
	llong a[50];
	llong b[50];
	
	//よく使う変数
	int i,j,k,l;
	int flag=0;
	int ans=0;
	int count=0;
	int temp,temp1,temp2;
	llong int max,min;
	int len;
	llong int sum=0;
	//データの読み込み
	
	scanf("%d",&n);
	
	for(i=0;i<n;i++){
		scanf("%lld",&a[i]);
	}
	
	
	
//	printf("nは%dです\n", n);
//	printf("データの読み込み終了\n");
	//実際の処理
	
	for(i=0;i<n;i++){
		if(i==0)min=a[0];
		min = min(min,a[i]);
	}
	
//	printf("min=%d\n",min);
	
	for(i=0;i<n;i++){
		b[i]=(a[i]-min)/(n+1);
		m=m+b[i];
//		printf("b[%d]=%d\n",i,b[i]);
	}
	
	for(i=0;i<n;i++){
//		printf("a[i]=%lld,b[i]=%lld,n=%d,m=%lld,ans=%lld\n",a[i],b[i],n,m,a[i]-b[i]*n+(m-b[i]));
		a[i]=a[i]-b[i]*n+(m-b[i]);
	}
	
/*	for(i=0;i<n;i++){
		printf("%lld ",a[i]);
	}
	printf("\n");
	
	for(i=0;i<n;i++){
		printf("%lld ",b[i]);
	}
*/	
	for(i=0;i<n;i++){
		if(i==0) max=a[0];
		max=max(max,a[i]);
	}
	
	if(max>n+50){
		for(i=0;i<n;i++){
			a[i]=a[i]-(max-n-50);
		}
		m=m+(max-n-50)*n;
	}
	
	flag=1;
	while(flag==1){
		count++;
	//	printf("count=%d ",count);
	//	for(i=0;i<n;i++){
	//		printf("%lld ",a[i]);
	//	}
	//	printf("\n");

		flag=0;
		for(i=0;i<n;i++){
			if(flag==0&&a[i]>=n){
				a[i]=a[i]-n-1;
				flag=1;
			}
		}
		if(flag==1){
			for(i=0;i<n;i++){
				a[i]++;
			}
			m++;
		}
	}
	
//	printf("計算部分終了\n");
	//出力
	
	printf("%lld",m);
	
//	printf("結果の出力終了\n");
	
	return 0;
	
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$880, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -848(%rbp)
	movl	$0, -860(%rbp)
	movl	$0, -852(%rbp)
	movl	$0, -856(%rbp)
	movq	$0, -824(%rbp)
	leaq	-868(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -864(%rbp)
	jmp	.L2
.L3:
	leaq	-816(%rbp), %rdx
	movl	-864(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -864(%rbp)
.L2:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L3
	movl	$0, -864(%rbp)
	jmp	.L4
.L6:
	cmpl	$0, -864(%rbp)
	jne	.L5
	movq	-816(%rbp), %rax
	movq	%rax, -832(%rbp)
.L5:
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rax
	movq	-832(%rbp), %rdx
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -832(%rbp)
	addl	$1, -864(%rbp)
.L4:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L6
	movl	$0, -864(%rbp)
	jmp	.L7
.L8:
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rax
	subq	-832(%rbp), %rax
	movl	-868(%rbp), %edx
	addl	$1, %edx
	movslq	%edx, %rsi
	cqto
	idivq	%rsi
	movq	%rax, %rdx
	movl	-864(%rbp), %eax
	cltq
	movq	%rdx, -416(%rbp,%rax,8)
	movl	-864(%rbp), %eax
	cltq
	movq	-416(%rbp,%rax,8), %rax
	addq	%rax, -848(%rbp)
	addl	$1, -864(%rbp)
.L7:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L8
	movl	$0, -864(%rbp)
	jmp	.L9
.L10:
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rdx
	movl	-864(%rbp), %eax
	cltq
	movq	-416(%rbp,%rax,8), %rcx
	movl	-868(%rbp), %eax
	cltq
	imulq	%rcx, %rax
	movq	%rdx, %rcx
	subq	%rax, %rcx
	movl	-864(%rbp), %eax
	cltq
	movq	-416(%rbp,%rax,8), %rdx
	movq	-848(%rbp), %rax
	subq	%rdx, %rax
	leaq	(%rcx,%rax), %rdx
	movl	-864(%rbp), %eax
	cltq
	movq	%rdx, -816(%rbp,%rax,8)
	addl	$1, -864(%rbp)
.L9:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L10
	movl	$0, -864(%rbp)
	jmp	.L11
.L13:
	cmpl	$0, -864(%rbp)
	jne	.L12
	movq	-816(%rbp), %rax
	movq	%rax, -840(%rbp)
.L12:
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rax
	movq	-840(%rbp), %rdx
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	movq	%rax, -840(%rbp)
	addl	$1, -864(%rbp)
.L11:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L13
	movl	-868(%rbp), %eax
	addl	$50, %eax
	cltq
	cmpq	%rax, -840(%rbp)
	jle	.L14
	movl	$0, -864(%rbp)
	jmp	.L15
.L16:
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rax
	movl	-868(%rbp), %edx
	movslq	%edx, %rcx
	movq	-840(%rbp), %rdx
	subq	%rcx, %rdx
	leaq	-50(%rdx), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movl	-864(%rbp), %eax
	cltq
	movq	%rdx, -816(%rbp,%rax,8)
	addl	$1, -864(%rbp)
.L15:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L16
	movl	-868(%rbp), %eax
	movslq	%eax, %rdx
	movq	-840(%rbp), %rax
	subq	%rdx, %rax
	leaq	-50(%rax), %rdx
	movl	-868(%rbp), %eax
	cltq
	imulq	%rdx, %rax
	addq	%rax, -848(%rbp)
.L14:
	movl	$1, -860(%rbp)
	jmp	.L17
.L23:
	addl	$1, -856(%rbp)
	movl	$0, -860(%rbp)
	movl	$0, -864(%rbp)
	jmp	.L18
.L20:
	cmpl	$0, -860(%rbp)
	jne	.L19
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rdx
	movl	-868(%rbp), %eax
	cltq
	cmpq	%rax, %rdx
	jl	.L19
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rax
	movl	-868(%rbp), %edx
	movslq	%edx, %rdx
	subq	%rdx, %rax
	leaq	-1(%rax), %rdx
	movl	-864(%rbp), %eax
	cltq
	movq	%rdx, -816(%rbp,%rax,8)
	movl	$1, -860(%rbp)
.L19:
	addl	$1, -864(%rbp)
.L18:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L20
	cmpl	$1, -860(%rbp)
	jne	.L17
	movl	$0, -864(%rbp)
	jmp	.L21
.L22:
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rax
	leaq	1(%rax), %rdx
	movl	-864(%rbp), %eax
	cltq
	movq	%rdx, -816(%rbp,%rax,8)
	addl	$1, -864(%rbp)
.L21:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L22
	addq	$1, -848(%rbp)
.L17:
	cmpl	$1, -860(%rbp)
	je	.L23
	movq	-848(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.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.
val
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$880, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -848(%rbp)
	movl	$0, -860(%rbp)
	movl	$0, -852(%rbp)
	movl	$0, -856(%rbp)
	movq	$0, -824(%rbp)
	leaq	-868(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -864(%rbp)
	jmp	.L2
.L3:
	leaq	-816(%rbp), %rdx
	movl	-864(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -864(%rbp)
.L2:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L3
	movl	$0, -864(%rbp)
	jmp	.L4
.L6:
	cmpl	$0, -864(%rbp)
	jne	.L5
	movq	-816(%rbp), %rax
	movq	%rax, -832(%rbp)
.L5:
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rax
	movq	-832(%rbp), %rdx
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -832(%rbp)
	addl	$1, -864(%rbp)
.L4:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L6
	movl	$0, -864(%rbp)
	jmp	.L7
.L8:
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rax
	subq	-832(%rbp), %rax
	movl	-868(%rbp), %edx
	addl	$1, %edx
	movslq	%edx, %rsi
	cqto
	idivq	%rsi
	movq	%rax, %rdx
	movl	-864(%rbp), %eax
	cltq
	movq	%rdx, -416(%rbp,%rax,8)
	movl	-864(%rbp), %eax
	cltq
	movq	-416(%rbp,%rax,8), %rax
	addq	%rax, -848(%rbp)
	addl	$1, -864(%rbp)
.L7:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L8
	movl	$0, -864(%rbp)
	jmp	.L9
.L10:
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rdx
	movl	-864(%rbp), %eax
	cltq
	movq	-416(%rbp,%rax,8), %rcx
	movl	-868(%rbp), %eax
	cltq
	imulq	%rcx, %rax
	movq	%rdx, %rcx
	subq	%rax, %rcx
	movl	-864(%rbp), %eax
	cltq
	movq	-416(%rbp,%rax,8), %rdx
	movq	-848(%rbp), %rax
	subq	%rdx, %rax
	leaq	(%rcx,%rax), %rdx
	movl	-864(%rbp), %eax
	cltq
	movq	%rdx, -816(%rbp,%rax,8)
	addl	$1, -864(%rbp)
.L9:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L10
	movl	$0, -864(%rbp)
	jmp	.L11
.L13:
	cmpl	$0, -864(%rbp)
	jne	.L12
	movq	-816(%rbp), %rax
	movq	%rax, -840(%rbp)
.L12:
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rax
	movq	-840(%rbp), %rdx
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	movq	%rax, -840(%rbp)
	addl	$1, -864(%rbp)
.L11:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L13
	movl	-868(%rbp), %eax
	addl	$50, %eax
	cltq
	cmpq	%rax, -840(%rbp)
	jle	.L14
	movl	$0, -864(%rbp)
	jmp	.L15
.L16:
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rax
	movl	-868(%rbp), %edx
	movslq	%edx, %rcx
	movq	-840(%rbp), %rdx
	subq	%rcx, %rdx
	leaq	-50(%rdx), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movl	-864(%rbp), %eax
	cltq
	movq	%rdx, -816(%rbp,%rax,8)
	addl	$1, -864(%rbp)
.L15:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L16
	movl	-868(%rbp), %eax
	movslq	%eax, %rdx
	movq	-840(%rbp), %rax
	subq	%rdx, %rax
	leaq	-50(%rax), %rdx
	movl	-868(%rbp), %eax
	cltq
	imulq	%rdx, %rax
	addq	%rax, -848(%rbp)
.L14:
	movl	$1, -860(%rbp)
	jmp	.L17
.L23:
	addl	$1, -856(%rbp)
	movl	$0, -860(%rbp)
	movl	$0, -864(%rbp)
	jmp	.L18
.L20:
	cmpl	$0, -860(%rbp)
	jne	.L19
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rdx
	movl	-868(%rbp), %eax
	cltq
	cmpq	%rax, %rdx
	jl	.L19
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rax
	movl	-868(%rbp), %edx
	movslq	%edx, %rdx
	subq	%rdx, %rax
	leaq	-1(%rax), %rdx
	movl	-864(%rbp), %eax
	cltq
	movq	%rdx, -816(%rbp,%rax,8)
	movl	$1, -860(%rbp)
.L19:
	addl	$1, -864(%rbp)
.L18:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L20
	cmpl	$1, -860(%rbp)
	jne	.L17
	movl	$0, -864(%rbp)
	jmp	.L21
.L22:
	movl	-864(%rbp), %eax
	cltq
	movq	-816(%rbp,%rax,8), %rax
	leaq	1(%rax), %rdx
	movl	-864(%rbp), %eax
	cltq
	movq	%rdx, -816(%rbp,%rax,8)
	addl	$1, -864(%rbp)
.L21:
	movl	-868(%rbp), %eax
	cmpl	%eax, -864(%rbp)
	jl	.L22
	addq	$1, -848(%rbp)
.L17:
	cmpl	$1, -860(%rbp)
	je	.L23
	movq	-848(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.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:
