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>
#define max(a,b) (a)>(b) ? (a):(b);
int n;
int a[100][100];
int psum[100][100][100];
int getpsum(int uly,int ulx,int lry,int lrx){
	psum[ulx][lry][lrx]=0;
	int i,j;

	for(i=uly;i<=lry;i++)
		for(j=ulx;j<=lrx;j++)
			psum[ulx][lry][lrx]+=a[i][j];
	return psum[ulx][lry][lrx];
}
int getpsumu(int uly,int ulx,int lry,int lrx){
	int i;

	for(i=ulx;i<=lrx;i++)
		psum[ulx][lry][lrx]-=a[uly-1][i];

	return psum[ulx][lry][lrx];
}
int getpsuml(int uly,int ulx,int lry,int lrx){
	int i;
	psum[ulx][lry][lrx]=psum[ulx-1][lry][lrx];

	for(i=uly;i<=lry;i++)
		psum[ulx][lry][lrx]-=a[i][ulx-1];

	return psum[ulx][lry][lrx];
}
main(){
	int i,j,k,l;
	int  maxsum=-100000000LL;
	int tmp;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		for(j=0;j<n;j++)
			scanf("%d",&a[i][j]);
	/*
	for(i=0;i<n;i++)
		for(j=0;j<n;j++)
			for(k=i;k<n;k++)
				for(l=j;l<n;l++)
					maxsum=max(maxsum,getpsum(i,j,k,l));
	*/
	for(i=0;i<n;i++)
		for(j=0;j<n;j++)
			for(k=i;k<n;k++)
				for(l=j;l<n;l++){
					if(i==0){
						if(j==0){
							tmp=getpsum(i,j,k,l);
							maxsum=max(maxsum,tmp);
						}else{
							tmp=getpsuml(i,j,k,l);
							maxsum=max(maxsum,tmp);
						}
					}else{
						tmp=getpsumu(i,j,k,l);
						maxsum=max(maxsum,tmp);
					}
				}

	printf("%d\n",maxsum);
	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	a
	.align 32
	.type	a, @object
	.size	a, 40000
a:
	.zero	40000
	.globl	psum
	.align 32
	.type	psum, @object
	.size	psum, 4000000
psum:
	.zero	4000000
	.text
	.globl	getpsum
	.type	getpsum, @function
getpsum:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-20(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L2
.L5:
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L3
.L4:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rdi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L3:
	movl	-4(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L4
	addl	$1, -8(%rbp)
.L2:
	movl	-8(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L5
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	(%rdx,%rax), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	getpsum, .-getpsum
	.globl	getpsumu
	.type	getpsumu, @function
getpsumu:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L8
.L9:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	%eax, %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rdi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L8:
	movl	-4(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L9
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	(%rdx,%rax), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	getpsumu, .-getpsumu
	.globl	getpsuml
	.type	getpsuml, @function
getpsuml:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	$10000, %rax, %rdi
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rcx
	leaq	psum(%rip), %rax
	movl	%edx, (%rcx,%rax)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L12
.L13:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rsi
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	%eax, %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rdi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L12:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L13
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	(%rdx,%rax), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	getpsuml, .-getpsuml
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	$-100000000, -8(%rbp)
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -24(%rbp)
	jmp	.L16
.L19:
	movl	$0, -20(%rbp)
	jmp	.L17
.L18:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20(%rbp)
.L17:
	movl	n(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L18
	addl	$1, -24(%rbp)
.L16:
	movl	n(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L19
	movl	$0, -24(%rbp)
	jmp	.L20
.L30:
	movl	$0, -20(%rbp)
	jmp	.L21
.L29:
	movl	-24(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L22
.L28:
	movl	-20(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L23
.L27:
	cmpl	$0, -24(%rbp)
	jne	.L24
	cmpl	$0, -20(%rbp)
	jne	.L25
	movl	-12(%rbp), %ecx
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	getpsum
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -8(%rbp)
	jmp	.L26
.L25:
	movl	-12(%rbp), %ecx
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	getpsuml
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -8(%rbp)
	jmp	.L26
.L24:
	movl	-12(%rbp), %ecx
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	getpsumu
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -8(%rbp)
.L26:
	addl	$1, -12(%rbp)
.L23:
	movl	n(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L27
	addl	$1, -16(%rbp)
.L22:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L28
	addl	$1, -20(%rbp)
.L21:
	movl	n(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L29
	addl	$1, -24(%rbp)
.L20:
	movl	n(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L30
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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
	.p2align 4
	.globl	getpsum
	.type	getpsum, @function
getpsum:
.LFB23:
	.cfi_startproc
	endbr64
	movslq	%edx, %rax
	movslq	%esi, %rdx
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%ecx, %rcx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rax, %r11
	leaq	(%rax,%rax,4), %rax
	leaq	psum(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	(%rax,%rax,4), %rax
	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
	movl	%esi, %ebx
	imulq	$10000, %rdx, %rsi
	leaq	(%rsi,%rax,4), %rbp
	addq	%rcx, %rbp
	movl	$0, (%r14,%rbp,4)
	cmpl	%edi, %r11d
	jl	.L9
	movslq	%edi, %rax
	movl	%ecx, %r15d
	leaq	a(%rip), %r10
	movq	%rcx, %r9
	leaq	(%rax,%rax,4), %rax
	subl	%ebx, %r15d
	addl	$1, %r11d
	leaq	(%rax,%rax,4), %rax
	leal	1(%r15), %r13d
	leaq	(%rdx,%rax,4), %rax
	leaq	(%r10,%rax,4), %r8
	movl	%r13d, %eax
	shrl	$2, %eax
	leal	-1(%rax), %r12d
	movl	%r13d, %eax
	andl	$-4, %eax
	addq	$1, %r12
	movl	%eax, -16(%rsp)
	addl	%ebx, %eax
	salq	$4, %r12
	movl	%eax, -12(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	%r9d, %ebx
	jg	.L8
	cmpl	$2, %r15d
	jbe	.L10
	leaq	(%r12,%r8), %rcx
	movq	%r8, %rdx
	pxor	%xmm0, %xmm0
	.p2align 4,,10
	.p2align 3
.L5:
	movdqu	(%rdx), %xmm2
	addq	$16, %rdx
	paddd	%xmm2, %xmm0
	cmpq	%rdx, %rcx
	jne	.L5
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	addl	%edx, %eax
	cmpl	-16(%rsp), %r13d
	je	.L6
	movl	-12(%rsp), %edx
.L4:
	movslq	%edi, %rcx
	movslq	%edx, %rsi
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	salq	$2, %rcx
	addq	%rcx, %rsi
	addl	(%r10,%rsi,4), %eax
	leal	1(%rdx), %esi
	cmpl	%esi, %r9d
	jl	.L6
	movslq	%esi, %rsi
	addl	$2, %edx
	addq	%rcx, %rsi
	addl	(%r10,%rsi,4), %eax
	cmpl	%edx, %r9d
	jl	.L6
	movslq	%edx, %rdx
	addq	%rdx, %rcx
	addl	(%r10,%rcx,4), %eax
.L6:
	movl	%eax, (%r14,%rbp,4)
.L8:
	addl	$1, %edi
	addq	$400, %r8
	cmpl	%r11d, %edi
	jne	.L3
	popq	%rbx
	.cfi_remember_state
	.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
.L10:
	.cfi_restore_state
	movl	%ebx, %edx
	jmp	.L4
.L9:
	popq	%rbx
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	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
.LFE23:
	.size	getpsum, .-getpsum
	.p2align 4
	.globl	getpsumu
	.type	getpsumu, @function
getpsumu:
.LFB24:
	.cfi_startproc
	endbr64
	movslq	%esi, %r10
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movslq	%edx, %r9
	movslq	%ecx, %r13
	imulq	$10000, %r10, %rcx
	leaq	(%r9,%r9,4), %rdx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	(%rdx,%rdx,4), %rdx
	leaq	psum(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	(%rcx,%rdx,4), %rdx
	addq	%r13, %rdx
	movl	(%r12,%rdx,4), %r8d
	cmpl	%r13d, %esi
	jg	.L15
	movl	%r13d, %edx
	movslq	%edi, %rax
	movq	%r13, %rdi
	subl	%esi, %edx
	leal	-1(%rax), %r11d
	leal	1(%rdx), %ebp
	cmpl	$2, %edx
	jbe	.L20
	leaq	(%rax,%rax,4), %rax
	leaq	a(%rip), %rbx
	pxor	%xmm0, %xmm0
	leaq	(%rax,%rax,4), %rax
	leaq	(%r10,%rax,4), %rax
	leaq	-400(%rbx,%rax,4), %rdx
	movl	%ebp, %eax
	shrl	$2, %eax
	leal	-1(%rax), %ecx
	leaq	16(%rdx), %rax
	salq	$4, %rcx
	addq	%rax, %rcx
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L24:
	addq	$16, %rax
.L18:
	movdqu	(%rdx), %xmm1
	movq	%rax, %rdx
	psubd	%xmm1, %xmm0
	cmpq	%rax, %rcx
	jne	.L24
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%eax, %r8d
	movl	%ebp, %eax
	andl	$-4, %eax
	addl	%eax, %esi
	cmpl	%eax, %ebp
	je	.L19
.L17:
	movslq	%r11d, %r11
	movslq	%esi, %rdx
	leaq	(%r11,%r11,4), %rax
	leaq	(%rax,%rax,4), %rax
	salq	$2, %rax
	addq	%rax, %rdx
	subl	(%rbx,%rdx,4), %r8d
	leal	1(%rsi), %edx
	cmpl	%edx, %edi
	jl	.L19
	movslq	%edx, %rdx
	addl	$2, %esi
	addq	%rax, %rdx
	subl	(%rbx,%rdx,4), %r8d
	cmpl	%esi, %edi
	jl	.L19
	movslq	%esi, %rsi
	addq	%rsi, %rax
	subl	(%rbx,%rax,4), %r8d
.L19:
	imulq	$10000, %r10, %r10
	leaq	(%r9,%r9,4), %rax
	leaq	(%rax,%rax,4), %rax
	leaq	(%r10,%rax,4), %rax
	addq	%r13, %rax
	movl	%r8d, (%r12,%rax,4)
.L15:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	movl	%r8d, %eax
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L20:
	.cfi_restore_state
	leaq	a(%rip), %rbx
	jmp	.L17
	.cfi_endproc
.LFE24:
	.size	getpsumu, .-getpsumu
	.p2align 4
	.globl	getpsuml
	.type	getpsuml, @function
getpsuml:
.LFB25:
	.cfi_startproc
	endbr64
	leal	-1(%rsi), %r11d
	movslq	%edx, %r9
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%esi, %ebp
	movslq	%r11d, %r11
	movslq	%ecx, %rsi
	leaq	(%r9,%r9,4), %rcx
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	imulq	$10000, %r11, %rax
	leaq	(%rcx,%rcx,4), %rbx
	movslq	%ebp, %rcx
	salq	$2, %rbx
	leaq	psum(%rip), %r10
	addq	%rbx, %rax
	addq	%rsi, %rax
	movl	(%r10,%rax,4), %r8d
	imulq	$10000, %rcx, %rax
	addq	%rbx, %rax
	addq	%rsi, %rax
	movl	%r8d, (%r10,%rax,4)
	cmpl	%edi, %edx
	jl	.L25
	movslq	%edi, %rbx
	subl	%edi, %edx
	addq	%rbx, %rdx
	leaq	(%rbx,%rbx,4), %rax
	leaq	(%rdx,%rdx,4), %rdx
	leaq	(%rax,%rax,4), %rax
	leaq	(%rdx,%rdx,4), %rdx
	leaq	(%r11,%rax,4), %rbp
	leaq	(%r11,%rdx,4), %rdi
	leaq	a(%rip), %rax
	leaq	400+a(%rip), %rdx
	leaq	(%rax,%rbp,4), %rax
	leaq	(%rdx,%rdi,4), %rdx
	.p2align 4,,10
	.p2align 3
.L27:
	subl	(%rax), %r8d
	addq	$400, %rax
	cmpq	%rdx, %rax
	jne	.L27
	imulq	$10000, %rcx, %rcx
	leaq	(%r9,%r9,4), %rax
	leaq	(%rax,%rax,4), %rax
	leaq	(%rcx,%rax,4), %rax
	addq	%rsi, %rax
	movl	%r8d, (%r10,%rax,4)
.L25:
	movl	%r8d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE25:
	.size	getpsuml, .-getpsuml
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	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	$152, %rsp
	.cfi_def_cfa_offset 208
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L32
	xorl	%ebp, %ebp
	xorl	%ebx, %ebx
	leaq	a(%rip), %r15
.L35:
	leaq	(%r15,%rbp,4), %r13
	xorl	%r12d, %r12d
.L33:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movslq	n(%rip), %rax
	addq	$4, %r13
	cmpl	%r12d, %eax
	jg	.L33
	addl	$1, %ebx
	cmpl	%ebx, %eax
	jle	.L79
	addq	$100, %rbp
	testl	%eax, %eax
	jg	.L35
.L32:
	movl	$-100000000, %r14d
.L56:
	movl	%r14d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$152, %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
.L79:
	.cfi_restore_state
	movl	%eax, 24(%rsp)
	testl	%eax, %eax
	jle	.L32
	movq	%rax, 112(%rsp)
	leaq	-4(%r15), %rax
	leaq	psum(%rip), %rdi
	movl	$-100000000, %r14d
	movq	%rax, 136(%rsp)
	leaq	400(%r15), %rax
	movq	%rdi, 104(%rsp)
	movq	$0, 16(%rsp)
	movq	%rax, 88(%rsp)
.L36:
	movq	$0, 72(%rsp)
	movq	16(%rsp), %rbx
	movl	%ebx, %eax
	leaq	(%rbx,%rbx,4), %rdx
	movq	104(%rsp), %rbx
	leaq	(%rdx,%rdx,4), %rdx
	movq	%rbx, 96(%rsp)
	leal	1(%rax), %ebx
	subl	$1, %eax
	salq	$4, %rdx
	cltq
	leaq	-400(%r15,%rdx), %rdi
	movl	%ebx, 132(%rsp)
	leaq	(%rax,%rax,4), %rax
	movq	%rdi, 120(%rsp)
	leaq	(%rax,%rax,4), %rax
	salq	$2, %rax
	movq	%rax, 80(%rsp)
.L57:
	movq	72(%rsp), %rbx
	movq	120(%rsp), %rdi
	movl	132(%rsp), %r12d
	leaq	0(,%rbx,4), %rax
	movl	%ebx, 128(%rsp)
	addq	%rax, %rdi
	addq	136(%rsp), %rax
	movl	%ebx, 28(%rsp)
	movq	%rdi, 56(%rsp)
	imulq	$-40000, %rbx, %rdi
	movq	$-40000, %rbx
	movq	%rax, 48(%rsp)
	movq	96(%rsp), %rax
	subq	%rdi, %rbx
	movq	%rdi, 32(%rsp)
	movq	%rbx, 40(%rsp)
	movq	%rax, 64(%rsp)
.L55:
	movl	28(%rsp), %edi
	cmpl	%edi, 24(%rsp)
	jle	.L53
	leal	-1(%r12), %eax
	movq	72(%rsp), %rbx
	movq	88(%rsp), %rdi
	movl	$1, 12(%rsp)
	leaq	(%rax,%rax,4), %rax
	movq	64(%rsp), %rbp
	movl	128(%rsp), %r9d
	leaq	(%rax,%rax,4), %rax
	leaq	-1(%rbx,%rax,4), %rax
	leaq	(%rdi,%rax,4), %r13
	.p2align 4,,10
	.p2align 3
.L50:
	cmpq	$0, 16(%rsp)
	jne	.L80
	movl	28(%rsp), %edx
	movq	32(%rsp), %rax
	testl	%edx, %edx
	jne	.L43
	leal	1(%r9), %r10d
	movl	$0, 0(%rbp,%rax)
	movq	%r15, %rdi
	xorl	%r8d, %r8d
	movl	%r10d, %eax
	movl	%r10d, %r11d
	shrl	$2, %eax
	andl	$-4, %r11d
	leal	-1(%rax), %ebx
	xorl	%eax, %eax
	addq	$1, %rbx
	salq	$4, %rbx
	.p2align 4,,10
	.p2align 3
.L47:
	cmpl	$2, %r9d
	jbe	.L62
	leaq	(%rbx,%rdi), %rcx
	movq	%rdi, %rdx
	pxor	%xmm0, %xmm0
	.p2align 4,,10
	.p2align 3
.L45:
	paddd	(%rdx), %xmm0
	addq	$16, %rdx
	cmpq	%rcx, %rdx
	jne	.L45
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	addl	%edx, %eax
	movl	%r11d, %edx
	cmpl	%r11d, %r10d
	je	.L48
.L44:
	movslq	%r8d, %rcx
	movslq	%edx, %rsi
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	salq	$2, %rcx
	addq	%rcx, %rsi
	addl	(%r15,%rsi,4), %eax
	leal	1(%rdx), %esi
	cmpl	%r9d, %esi
	jg	.L48
	movslq	%esi, %rsi
	addl	$2, %edx
	addq	%rcx, %rsi
	addl	(%r15,%rsi,4), %eax
	cmpl	%r9d, %edx
	jg	.L48
	movslq	%edx, %rdx
	addq	%rdx, %rcx
	addl	(%r15,%rcx,4), %eax
.L48:
	addl	$1, %r8d
	addq	$400, %rdi
	cmpl	%r12d, %r8d
	jne	.L47
	movq	32(%rsp), %rbx
	cmpl	%eax, %r14d
	cmovl	%eax, %r14d
	movl	%eax, 0(%rbp,%rbx)
.L41:
	addl	$1, 12(%rsp)
	movl	%r10d, %r9d
	addq	$4, %rbp
	cmpl	%r10d, 24(%rsp)
	jne	.L50
.L53:
	addq	$400, 64(%rsp)
	leal	1(%r12), %eax
	cmpl	%r12d, 24(%rsp)
	jle	.L51
	movl	%eax, %r12d
	jmp	.L55
	.p2align 4,,10
	.p2align 3
.L43:
	movq	40(%rsp), %rbx
	addq	%rbp, %rax
	movl	(%rax,%rbx), %edx
	movq	48(%rsp), %rax
	.p2align 4,,10
	.p2align 3
.L49:
	subl	(%rax), %edx
	addq	$400, %rax
	cmpq	%r13, %rax
	jne	.L49
.L78:
	cmpl	%edx, %r14d
	movl	%edx, 0(%rbp)
	leal	1(%r9), %r10d
	cmovl	%edx, %r14d
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L62:
	xorl	%edx, %edx
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L80:
	movl	12(%rsp), %eax
	cmpl	%r9d, 128(%rsp)
	movl	$1, %ecx
	movl	0(%rbp), %edx
	cmovle	%eax, %ecx
	subl	$1, %eax
	cmpl	$2, %eax
	jbe	.L61
	cmpl	28(%rsp), %r9d
	jl	.L61
	movl	%ecx, %eax
	movq	56(%rsp), %rbx
	pxor	%xmm0, %xmm0
	shrl	$2, %eax
	subl	$1, %eax
	salq	$4, %rax
	leaq	16(%rbx,%rax), %rsi
	movq	%rbx, %rax
	.p2align 4,,10
	.p2align 3
.L39:
	movdqu	(%rax), %xmm2
	addq	$16, %rax
	psubd	%xmm2, %xmm0
	cmpq	%rsi, %rax
	jne	.L39
	movdqa	%xmm0, %xmm1
	movl	%ecx, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%eax, %edx
	movl	128(%rsp), %eax
	addl	%esi, %eax
	cmpl	%ecx, %esi
	je	.L78
.L38:
	movq	80(%rsp), %rbx
	movslq	%eax, %rcx
	addq	%rbx, %rcx
	subl	(%r15,%rcx,4), %edx
	leal	1(%rax), %ecx
	cmpl	%r9d, %ecx
	jg	.L78
	movslq	%ecx, %rcx
	addl	$2, %eax
	addq	%rbx, %rcx
	subl	(%r15,%rcx,4), %edx
	cmpl	%eax, %r9d
	jl	.L78
	cltq
	leal	1(%r9), %r10d
	addq	%rbx, %rax
	subl	(%r15,%rax,4), %edx
	cmpl	%edx, %r14d
	movl	%edx, 0(%rbp)
	cmovl	%edx, %r14d
	jmp	.L41
.L61:
	movl	128(%rsp), %eax
	jmp	.L38
.L51:
	addq	$1, 72(%rsp)
	movq	72(%rsp), %rax
	addq	$40004, 96(%rsp)
	cmpq	112(%rsp), %rax
	jne	.L57
	addq	$1, 16(%rsp)
	movq	16(%rsp), %rax
	addq	$400, 104(%rsp)
	cmpq	112(%rsp), %rax
	jne	.L36
	jmp	.L56
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.globl	psum
	.bss
	.align 32
	.type	psum, @object
	.size	psum, 4000000
psum:
	.zero	4000000
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 40000
a:
	.zero	40000
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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
	.p2align 4
	.globl	getpsum
	.type	getpsum, @function
getpsum:
.LFB23:
	.cfi_startproc
	endbr64
	movslq	%edx, %rax
	movslq	%esi, %rdx
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%ecx, %rcx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rax, %r11
	leaq	(%rax,%rax,4), %rax
	leaq	psum(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	(%rax,%rax,4), %rax
	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
	movl	%esi, %ebx
	imulq	$10000, %rdx, %rsi
	leaq	(%rsi,%rax,4), %rbp
	addq	%rcx, %rbp
	movl	$0, (%r14,%rbp,4)
	cmpl	%edi, %r11d
	jl	.L9
	movslq	%edi, %rax
	movl	%ecx, %r15d
	leaq	a(%rip), %r10
	movq	%rcx, %r9
	leaq	(%rax,%rax,4), %rax
	subl	%ebx, %r15d
	addl	$1, %r11d
	leaq	(%rax,%rax,4), %rax
	leal	1(%r15), %r13d
	leaq	(%rdx,%rax,4), %rax
	leaq	(%r10,%rax,4), %r8
	movl	%r13d, %eax
	shrl	$2, %eax
	leal	-1(%rax), %r12d
	movl	%r13d, %eax
	andl	$-4, %eax
	addq	$1, %r12
	movl	%eax, -16(%rsp)
	addl	%ebx, %eax
	salq	$4, %r12
	movl	%eax, -12(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	%r9d, %ebx
	jg	.L8
	cmpl	$2, %r15d
	jbe	.L10
	leaq	(%r12,%r8), %rcx
	movq	%r8, %rdx
	pxor	%xmm0, %xmm0
	.p2align 4,,10
	.p2align 3
.L5:
	movdqu	(%rdx), %xmm2
	addq	$16, %rdx
	paddd	%xmm2, %xmm0
	cmpq	%rdx, %rcx
	jne	.L5
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	addl	%edx, %eax
	cmpl	-16(%rsp), %r13d
	je	.L6
	movl	-12(%rsp), %edx
.L4:
	movslq	%edi, %rcx
	movslq	%edx, %rsi
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	salq	$2, %rcx
	addq	%rcx, %rsi
	addl	(%r10,%rsi,4), %eax
	leal	1(%rdx), %esi
	cmpl	%esi, %r9d
	jl	.L6
	movslq	%esi, %rsi
	addl	$2, %edx
	addq	%rcx, %rsi
	addl	(%r10,%rsi,4), %eax
	cmpl	%edx, %r9d
	jl	.L6
	movslq	%edx, %rdx
	addq	%rdx, %rcx
	addl	(%r10,%rcx,4), %eax
.L6:
	movl	%eax, (%r14,%rbp,4)
.L8:
	addl	$1, %edi
	addq	$400, %r8
	cmpl	%r11d, %edi
	jne	.L3
	popq	%rbx
	.cfi_remember_state
	.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
.L10:
	.cfi_restore_state
	movl	%ebx, %edx
	jmp	.L4
.L9:
	popq	%rbx
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	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
.LFE23:
	.size	getpsum, .-getpsum
	.p2align 4
	.globl	getpsumu
	.type	getpsumu, @function
getpsumu:
.LFB24:
	.cfi_startproc
	endbr64
	movslq	%esi, %r10
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movslq	%edx, %r9
	movslq	%ecx, %r13
	imulq	$10000, %r10, %rcx
	leaq	(%r9,%r9,4), %rdx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	(%rdx,%rdx,4), %rdx
	leaq	psum(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	(%rcx,%rdx,4), %rdx
	addq	%r13, %rdx
	movl	(%r12,%rdx,4), %r8d
	cmpl	%r13d, %esi
	jg	.L15
	movl	%r13d, %edx
	movslq	%edi, %rax
	movq	%r13, %rdi
	subl	%esi, %edx
	leal	-1(%rax), %r11d
	leal	1(%rdx), %ebp
	cmpl	$2, %edx
	jbe	.L20
	leaq	(%rax,%rax,4), %rax
	leaq	a(%rip), %rbx
	pxor	%xmm0, %xmm0
	leaq	(%rax,%rax,4), %rax
	leaq	(%r10,%rax,4), %rax
	leaq	-400(%rbx,%rax,4), %rdx
	movl	%ebp, %eax
	shrl	$2, %eax
	leal	-1(%rax), %ecx
	leaq	16(%rdx), %rax
	salq	$4, %rcx
	addq	%rax, %rcx
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L24:
	addq	$16, %rax
.L18:
	movdqu	(%rdx), %xmm1
	movq	%rax, %rdx
	psubd	%xmm1, %xmm0
	cmpq	%rax, %rcx
	jne	.L24
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%eax, %r8d
	movl	%ebp, %eax
	andl	$-4, %eax
	addl	%eax, %esi
	cmpl	%eax, %ebp
	je	.L19
.L17:
	movslq	%r11d, %r11
	movslq	%esi, %rdx
	leaq	(%r11,%r11,4), %rax
	leaq	(%rax,%rax,4), %rax
	salq	$2, %rax
	addq	%rax, %rdx
	subl	(%rbx,%rdx,4), %r8d
	leal	1(%rsi), %edx
	cmpl	%edx, %edi
	jl	.L19
	movslq	%edx, %rdx
	addl	$2, %esi
	addq	%rax, %rdx
	subl	(%rbx,%rdx,4), %r8d
	cmpl	%esi, %edi
	jl	.L19
	movslq	%esi, %rsi
	addq	%rsi, %rax
	subl	(%rbx,%rax,4), %r8d
.L19:
	imulq	$10000, %r10, %r10
	leaq	(%r9,%r9,4), %rax
	leaq	(%rax,%rax,4), %rax
	leaq	(%r10,%rax,4), %rax
	addq	%r13, %rax
	movl	%r8d, (%r12,%rax,4)
.L15:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	movl	%r8d, %eax
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L20:
	.cfi_restore_state
	leaq	a(%rip), %rbx
	jmp	.L17
	.cfi_endproc
.LFE24:
	.size	getpsumu, .-getpsumu
	.p2align 4
	.globl	getpsuml
	.type	getpsuml, @function
getpsuml:
.LFB25:
	.cfi_startproc
	endbr64
	leal	-1(%rsi), %r11d
	movslq	%edx, %r9
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%esi, %ebp
	movslq	%r11d, %r11
	movslq	%ecx, %rsi
	leaq	(%r9,%r9,4), %rcx
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	imulq	$10000, %r11, %rax
	leaq	(%rcx,%rcx,4), %rbx
	movslq	%ebp, %rcx
	salq	$2, %rbx
	leaq	psum(%rip), %r10
	addq	%rbx, %rax
	addq	%rsi, %rax
	movl	(%r10,%rax,4), %r8d
	imulq	$10000, %rcx, %rax
	addq	%rbx, %rax
	addq	%rsi, %rax
	movl	%r8d, (%r10,%rax,4)
	cmpl	%edi, %edx
	jl	.L25
	movslq	%edi, %rbx
	subl	%edi, %edx
	addq	%rbx, %rdx
	leaq	(%rbx,%rbx,4), %rax
	leaq	(%rdx,%rdx,4), %rdx
	leaq	(%rax,%rax,4), %rax
	leaq	(%rdx,%rdx,4), %rdx
	leaq	(%r11,%rax,4), %rbp
	leaq	(%r11,%rdx,4), %rdi
	leaq	a(%rip), %rax
	leaq	400+a(%rip), %rdx
	leaq	(%rax,%rbp,4), %rax
	leaq	(%rdx,%rdi,4), %rdx
	.p2align 4,,10
	.p2align 3
.L27:
	subl	(%rax), %r8d
	addq	$400, %rax
	cmpq	%rdx, %rax
	jne	.L27
	imulq	$10000, %rcx, %rcx
	leaq	(%r9,%r9,4), %rax
	leaq	(%rax,%rax,4), %rax
	leaq	(%rcx,%rax,4), %rax
	addq	%rsi, %rax
	movl	%r8d, (%r10,%rax,4)
.L25:
	movl	%r8d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE25:
	.size	getpsuml, .-getpsuml
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	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	$152, %rsp
	.cfi_def_cfa_offset 208
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L32
	xorl	%ebp, %ebp
	xorl	%ebx, %ebx
	leaq	a(%rip), %r15
.L35:
	leaq	(%r15,%rbp,4), %r13
	xorl	%r12d, %r12d
.L33:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movslq	n(%rip), %rax
	addq	$4, %r13
	cmpl	%r12d, %eax
	jg	.L33
	addl	$1, %ebx
	cmpl	%ebx, %eax
	jle	.L79
	addq	$100, %rbp
	testl	%eax, %eax
	jg	.L35
.L32:
	movl	$-100000000, %r14d
.L56:
	movl	%r14d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$152, %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
.L79:
	.cfi_restore_state
	movl	%eax, 24(%rsp)
	testl	%eax, %eax
	jle	.L32
	movq	%rax, 112(%rsp)
	leaq	-4(%r15), %rax
	leaq	psum(%rip), %rdi
	movl	$-100000000, %r14d
	movq	%rax, 136(%rsp)
	leaq	400(%r15), %rax
	movq	%rdi, 104(%rsp)
	movq	$0, 16(%rsp)
	movq	%rax, 88(%rsp)
.L36:
	movq	$0, 72(%rsp)
	movq	16(%rsp), %rbx
	movl	%ebx, %eax
	leaq	(%rbx,%rbx,4), %rdx
	movq	104(%rsp), %rbx
	leaq	(%rdx,%rdx,4), %rdx
	movq	%rbx, 96(%rsp)
	leal	1(%rax), %ebx
	subl	$1, %eax
	salq	$4, %rdx
	cltq
	leaq	-400(%r15,%rdx), %rdi
	movl	%ebx, 132(%rsp)
	leaq	(%rax,%rax,4), %rax
	movq	%rdi, 120(%rsp)
	leaq	(%rax,%rax,4), %rax
	salq	$2, %rax
	movq	%rax, 80(%rsp)
.L57:
	movq	72(%rsp), %rbx
	movq	120(%rsp), %rdi
	movl	132(%rsp), %r12d
	leaq	0(,%rbx,4), %rax
	movl	%ebx, 128(%rsp)
	addq	%rax, %rdi
	addq	136(%rsp), %rax
	movl	%ebx, 28(%rsp)
	movq	%rdi, 56(%rsp)
	imulq	$-40000, %rbx, %rdi
	movq	$-40000, %rbx
	movq	%rax, 48(%rsp)
	movq	96(%rsp), %rax
	subq	%rdi, %rbx
	movq	%rdi, 32(%rsp)
	movq	%rbx, 40(%rsp)
	movq	%rax, 64(%rsp)
.L55:
	movl	28(%rsp), %edi
	cmpl	%edi, 24(%rsp)
	jle	.L53
	leal	-1(%r12), %eax
	movq	72(%rsp), %rbx
	movq	88(%rsp), %rdi
	movl	$1, 12(%rsp)
	leaq	(%rax,%rax,4), %rax
	movq	64(%rsp), %rbp
	movl	128(%rsp), %r9d
	leaq	(%rax,%rax,4), %rax
	leaq	-1(%rbx,%rax,4), %rax
	leaq	(%rdi,%rax,4), %r13
	.p2align 4,,10
	.p2align 3
.L50:
	cmpq	$0, 16(%rsp)
	jne	.L80
	movl	28(%rsp), %edx
	movq	32(%rsp), %rax
	testl	%edx, %edx
	jne	.L43
	leal	1(%r9), %r10d
	movl	$0, 0(%rbp,%rax)
	movq	%r15, %rdi
	xorl	%r8d, %r8d
	movl	%r10d, %eax
	movl	%r10d, %r11d
	shrl	$2, %eax
	andl	$-4, %r11d
	leal	-1(%rax), %ebx
	xorl	%eax, %eax
	addq	$1, %rbx
	salq	$4, %rbx
	.p2align 4,,10
	.p2align 3
.L47:
	cmpl	$2, %r9d
	jbe	.L62
	leaq	(%rbx,%rdi), %rcx
	movq	%rdi, %rdx
	pxor	%xmm0, %xmm0
	.p2align 4,,10
	.p2align 3
.L45:
	paddd	(%rdx), %xmm0
	addq	$16, %rdx
	cmpq	%rcx, %rdx
	jne	.L45
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	addl	%edx, %eax
	movl	%r11d, %edx
	cmpl	%r11d, %r10d
	je	.L48
.L44:
	movslq	%r8d, %rcx
	movslq	%edx, %rsi
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	salq	$2, %rcx
	addq	%rcx, %rsi
	addl	(%r15,%rsi,4), %eax
	leal	1(%rdx), %esi
	cmpl	%r9d, %esi
	jg	.L48
	movslq	%esi, %rsi
	addl	$2, %edx
	addq	%rcx, %rsi
	addl	(%r15,%rsi,4), %eax
	cmpl	%r9d, %edx
	jg	.L48
	movslq	%edx, %rdx
	addq	%rdx, %rcx
	addl	(%r15,%rcx,4), %eax
.L48:
	addl	$1, %r8d
	addq	$400, %rdi
	cmpl	%r12d, %r8d
	jne	.L47
	movq	32(%rsp), %rbx
	cmpl	%eax, %r14d
	cmovl	%eax, %r14d
	movl	%eax, 0(%rbp,%rbx)
.L41:
	addl	$1, 12(%rsp)
	movl	%r10d, %r9d
	addq	$4, %rbp
	cmpl	%r10d, 24(%rsp)
	jne	.L50
.L53:
	addq	$400, 64(%rsp)
	leal	1(%r12), %eax
	cmpl	%r12d, 24(%rsp)
	jle	.L51
	movl	%eax, %r12d
	jmp	.L55
	.p2align 4,,10
	.p2align 3
.L43:
	movq	40(%rsp), %rbx
	addq	%rbp, %rax
	movl	(%rax,%rbx), %edx
	movq	48(%rsp), %rax
	.p2align 4,,10
	.p2align 3
.L49:
	subl	(%rax), %edx
	addq	$400, %rax
	cmpq	%r13, %rax
	jne	.L49
.L78:
	cmpl	%edx, %r14d
	movl	%edx, 0(%rbp)
	leal	1(%r9), %r10d
	cmovl	%edx, %r14d
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L62:
	xorl	%edx, %edx
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L80:
	movl	12(%rsp), %eax
	cmpl	%r9d, 128(%rsp)
	movl	$1, %ecx
	movl	0(%rbp), %edx
	cmovle	%eax, %ecx
	subl	$1, %eax
	cmpl	$2, %eax
	jbe	.L61
	cmpl	28(%rsp), %r9d
	jl	.L61
	movl	%ecx, %eax
	movq	56(%rsp), %rbx
	pxor	%xmm0, %xmm0
	shrl	$2, %eax
	subl	$1, %eax
	salq	$4, %rax
	leaq	16(%rbx,%rax), %rsi
	movq	%rbx, %rax
	.p2align 4,,10
	.p2align 3
.L39:
	movdqu	(%rax), %xmm2
	addq	$16, %rax
	psubd	%xmm2, %xmm0
	cmpq	%rsi, %rax
	jne	.L39
	movdqa	%xmm0, %xmm1
	movl	%ecx, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%eax, %edx
	movl	128(%rsp), %eax
	addl	%esi, %eax
	cmpl	%ecx, %esi
	je	.L78
.L38:
	movq	80(%rsp), %rbx
	movslq	%eax, %rcx
	addq	%rbx, %rcx
	subl	(%r15,%rcx,4), %edx
	leal	1(%rax), %ecx
	cmpl	%r9d, %ecx
	jg	.L78
	movslq	%ecx, %rcx
	addl	$2, %eax
	addq	%rbx, %rcx
	subl	(%r15,%rcx,4), %edx
	cmpl	%eax, %r9d
	jl	.L78
	cltq
	leal	1(%r9), %r10d
	addq	%rbx, %rax
	subl	(%r15,%rax,4), %edx
	cmpl	%edx, %r14d
	movl	%edx, 0(%rbp)
	cmovl	%edx, %r14d
	jmp	.L41
.L61:
	movl	128(%rsp), %eax
	jmp	.L38
.L51:
	addq	$1, 72(%rsp)
	movq	72(%rsp), %rax
	addq	$40004, 96(%rsp)
	cmpq	112(%rsp), %rax
	jne	.L57
	addq	$1, 16(%rsp)
	movq	16(%rsp), %rax
	addq	$400, 104(%rsp)
	cmpq	112(%rsp), %rax
	jne	.L36
	jmp	.L56
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.globl	psum
	.bss
	.align 32
	.type	psum, @object
	.size	psum, 4000000
psum:
	.zero	4000000
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 40000
a:
	.zero	40000
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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>
#define max(a,b) (a)>(b) ? (a):(b);
int n;
int a[100][100];
int psum[100][100][100];
int getpsum(int uly,int ulx,int lry,int lrx){
	psum[ulx][lry][lrx]=0;
	int i,j;

	for(i=uly;i<=lry;i++)
		for(j=ulx;j<=lrx;j++)
			psum[ulx][lry][lrx]+=a[i][j];
	return psum[ulx][lry][lrx];
}
int getpsumu(int uly,int ulx,int lry,int lrx){
	int i;

	for(i=ulx;i<=lrx;i++)
		psum[ulx][lry][lrx]-=a[uly-1][i];

	return psum[ulx][lry][lrx];
}
int getpsuml(int uly,int ulx,int lry,int lrx){
	int i;
	psum[ulx][lry][lrx]=psum[ulx-1][lry][lrx];

	for(i=uly;i<=lry;i++)
		psum[ulx][lry][lrx]-=a[i][ulx-1];

	return psum[ulx][lry][lrx];
}
main(){
	int i,j,k,l;
	int  maxsum=-100000000LL;
	int tmp;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		for(j=0;j<n;j++)
			scanf("%d",&a[i][j]);
	/*
	for(i=0;i<n;i++)
		for(j=0;j<n;j++)
			for(k=i;k<n;k++)
				for(l=j;l<n;l++)
					maxsum=max(maxsum,getpsum(i,j,k,l));
	*/
	for(i=0;i<n;i++)
		for(j=0;j<n;j++)
			for(k=i;k<n;k++)
				for(l=j;l<n;l++){
					if(i==0){
						if(j==0){
							tmp=getpsum(i,j,k,l);
							maxsum=max(maxsum,tmp);
						}else{
							tmp=getpsuml(i,j,k,l);
							maxsum=max(maxsum,tmp);
						}
					}else{
						tmp=getpsumu(i,j,k,l);
						maxsum=max(maxsum,tmp);
					}
				}

	printf("%d\n",maxsum);
	return 0;
}
3
1 -2 3
-1 5 6
7 8 -9
 4
1 3 -9 2
2 7 -1 5
-8 3 2 -1
5 -1 -3 1
 3
1 -2 3
-1 5 6
6 8 -15
 4
1 3 -9 0
2 7 -1 5
-8 3 2 -2
3 -1 -3 1
 3
1 -2 5
-1 3 1
6 8 -25
 4
1 3 -9 0
2 7 -1 5
-8 3 0 -2
3 0 -5 1
 3
2 -4 5
-1 3 1
4 11 -43
 3
3 -4 5
-1 3 1
8 11 -69
 3
3 -4 5
-2 3 1
8 11 -42
 3
3 -4 5
-2 3 1
16 11 -42

19
 15
 18
 14
 16
 13
 17
 21
 20
 28

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>
#define max(a,b) (a)>(b) ? (a):(b);
int n;
int a[100][100];
int psum[100][100][100];
int getpsum(int uly,int ulx,int lry,int lrx){
	psum[ulx][lry][lrx]=0;
	int i,j;

	for(i=uly;i<=lry;i++)
		for(j=ulx;j<=lrx;j++)
			psum[ulx][lry][lrx]+=a[i][j];
	return psum[ulx][lry][lrx];
}
int getpsumu(int uly,int ulx,int lry,int lrx){
	int i;

	for(i=ulx;i<=lrx;i++)
		psum[ulx][lry][lrx]-=a[uly-1][i];

	return psum[ulx][lry][lrx];
}
int getpsuml(int uly,int ulx,int lry,int lrx){
	int i;
	psum[ulx][lry][lrx]=psum[ulx-1][lry][lrx];

	for(i=uly;i<=lry;i++)
		psum[ulx][lry][lrx]-=a[i][ulx-1];

	return psum[ulx][lry][lrx];
}
main(){
	int i,j,k,l;
	int  maxsum=-100000000LL;
	int tmp;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		for(j=0;j<n;j++)
			scanf("%d",&a[i][j]);
	/*
	for(i=0;i<n;i++)
		for(j=0;j<n;j++)
			for(k=i;k<n;k++)
				for(l=j;l<n;l++)
					maxsum=max(maxsum,getpsum(i,j,k,l));
	*/
	for(i=0;i<n;i++)
		for(j=0;j<n;j++)
			for(k=i;k<n;k++)
				for(l=j;l<n;l++){
					if(i==0){
						if(j==0){
							tmp=getpsum(i,j,k,l);
							maxsum=max(maxsum,tmp);
						}else{
							tmp=getpsuml(i,j,k,l);
							maxsum=max(maxsum,tmp);
						}
					}else{
						tmp=getpsumu(i,j,k,l);
						maxsum=max(maxsum,tmp);
					}
				}

	printf("%d\n",maxsum);
	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	a
	.align 32
	.type	a, @object
	.size	a, 40000
a:
	.zero	40000
	.globl	psum
	.align 32
	.type	psum, @object
	.size	psum, 4000000
psum:
	.zero	4000000
	.text
	.globl	getpsum
	.type	getpsum, @function
getpsum:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-20(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L2
.L5:
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L3
.L4:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rdi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L3:
	movl	-4(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L4
	addl	$1, -8(%rbp)
.L2:
	movl	-8(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L5
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	(%rdx,%rax), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	getpsum, .-getpsum
	.globl	getpsumu
	.type	getpsumu, @function
getpsumu:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L8
.L9:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	%eax, %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rdi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L8:
	movl	-4(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L9
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	(%rdx,%rax), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	getpsumu, .-getpsumu
	.globl	getpsuml
	.type	getpsuml, @function
getpsuml:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	$10000, %rax, %rdi
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rcx
	leaq	psum(%rip), %rax
	movl	%edx, (%rcx,%rax)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L12
.L13:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rsi
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	%eax, %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rdi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L12:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L13
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	(%rdx,%rax), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	getpsuml, .-getpsuml
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	$-100000000, -8(%rbp)
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -24(%rbp)
	jmp	.L16
.L19:
	movl	$0, -20(%rbp)
	jmp	.L17
.L18:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20(%rbp)
.L17:
	movl	n(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L18
	addl	$1, -24(%rbp)
.L16:
	movl	n(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L19
	movl	$0, -24(%rbp)
	jmp	.L20
.L30:
	movl	$0, -20(%rbp)
	jmp	.L21
.L29:
	movl	-24(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L22
.L28:
	movl	-20(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L23
.L27:
	cmpl	$0, -24(%rbp)
	jne	.L24
	cmpl	$0, -20(%rbp)
	jne	.L25
	movl	-12(%rbp), %ecx
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	getpsum
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -8(%rbp)
	jmp	.L26
.L25:
	movl	-12(%rbp), %ecx
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	getpsuml
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -8(%rbp)
	jmp	.L26
.L24:
	movl	-12(%rbp), %ecx
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	getpsumu
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -8(%rbp)
.L26:
	addl	$1, -12(%rbp)
.L23:
	movl	n(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L27
	addl	$1, -16(%rbp)
.L22:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L28
	addl	$1, -20(%rbp)
.L21:
	movl	n(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L29
	addl	$1, -24(%rbp)
.L20:
	movl	n(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L30
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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.
train
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 40000
a:
	.zero	40000
	.globl	psum
	.align 32
	.type	psum, @object
	.size	psum, 4000000
psum:
	.zero	4000000
	.text
	.globl	getpsum
	.type	getpsum, @function
getpsum:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-20(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L2
.L5:
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L3
.L4:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rdi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L3:
	movl	-4(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L4
	addl	$1, -8(%rbp)
.L2:
	movl	-8(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L5
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	(%rdx,%rax), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	getpsum, .-getpsum
	.globl	getpsumu
	.type	getpsumu, @function
getpsumu:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L8
.L9:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	%eax, %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rdi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L8:
	movl	-4(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L9
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	(%rdx,%rax), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	getpsumu, .-getpsumu
	.globl	getpsuml
	.type	getpsuml, @function
getpsuml:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %ecx
	movslq	%ecx, %rcx
	imulq	$10000, %rax, %rdi
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rcx
	leaq	psum(%rip), %rax
	movl	%edx, (%rcx,%rax)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L12
.L13:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rsi
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	%eax, %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rdi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L12:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L13
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10000, %rax, %rsi
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	psum(%rip), %rax
	movl	(%rdx,%rax), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	getpsuml, .-getpsuml
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	$-100000000, -8(%rbp)
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -24(%rbp)
	jmp	.L16
.L19:
	movl	$0, -20(%rbp)
	jmp	.L17
.L18:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20(%rbp)
.L17:
	movl	n(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L18
	addl	$1, -24(%rbp)
.L16:
	movl	n(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L19
	movl	$0, -24(%rbp)
	jmp	.L20
.L30:
	movl	$0, -20(%rbp)
	jmp	.L21
.L29:
	movl	-24(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L22
.L28:
	movl	-20(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L23
.L27:
	cmpl	$0, -24(%rbp)
	jne	.L24
	cmpl	$0, -20(%rbp)
	jne	.L25
	movl	-12(%rbp), %ecx
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	getpsum
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -8(%rbp)
	jmp	.L26
.L25:
	movl	-12(%rbp), %ecx
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	getpsuml
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -8(%rbp)
	jmp	.L26
.L24:
	movl	-12(%rbp), %ecx
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %esi
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	getpsumu
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -8(%rbp)
.L26:
	addl	$1, -12(%rbp)
.L23:
	movl	n(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L27
	addl	$1, -16(%rbp)
.L22:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L28
	addl	$1, -20(%rbp)
.L21:
	movl	n(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L29
	addl	$1, -24(%rbp)
.L20:
	movl	n(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L30
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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:
