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

```c
#include<stdio.h>
#include<math.h>
int main(void)
{
	long long int a[200000],x,y=0,dim;
	int n,i,t;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%lld",&a[i]);
	}
	x=a[1];
	for(i=2;i<=n;i++)
	{
		y+=a[i];
	}
	dim=llabs(x-y);
	for(t=2;t<n;t++)
	{
		x+=a[t];
	    y-=a[t];
        if(llabs(x-y)<=dim)
        {
        	dim=llabs(x-y);
		}
	}
	printf("%lld",dim);
    return 0;
}```

Assembly Code:

```assembly
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-1597440(%rsp), %r11
	.cfi_def_cfa 11, 1597472
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2592, %rsp
	.cfi_def_cfa_offset 1600064
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1600024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	24(%rsp), %r12
	movl	$1, %ebx
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	addq	$8, %r12
	cmpl	%ebx, %ecx
	jge	.L3
	movq	24(%rsp), %r8
	cmpl	$1, %ecx
	jle	.L11
	leal	-1(%rcx), %edi
	cmpl	$2, %ecx
	je	.L13
	movl	%edi, %edx
	leaq	32(%rsp), %rsi
	pxor	%xmm0, %xmm0
	shrl	%edx
	movq	%rsi, %rax
	subl	$1, %edx
	salq	$4, %rdx
	leaq	48(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	paddq	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L7
	movdqa	%xmm0, %xmm1
	movl	%edi, %r9d
	psrldq	$8, %xmm1
	andl	$-2, %r9d
	paddq	%xmm1, %xmm0
	leal	2(%r9), %edx
	movq	%xmm0, %rax
	cmpl	%edi, %r9d
	je	.L20
.L6:
	movslq	%edx, %rdx
	movq	%r8, %rsi
	addq	16(%rsp,%rdx,8), %rax
	subq	%rax, %rsi
	movq	%rsi, %rdx
	negq	%rdx
	cmovs	%rsi, %rdx
	cmpl	$2, %ecx
	jle	.L5
	leaq	32(%rsp), %rsi
.L10:
	subl	$3, %ecx
	leaq	40(%rsp,%rcx,8), %r9
	.p2align 4,,10
	.p2align 3
.L9:
	addq	(%rsi), %r8
	subq	(%rsi), %rax
	movq	%r8, %rdi
	subq	%rax, %rdi
	movq	%rdi, %rcx
	negq	%rcx
	cmovs	%rdi, %rcx
	cmpq	%rcx, %rdx
	cmovg	%rcx, %rdx
	addq	$8, %rsi
	cmpq	%rsi, %r9
	jne	.L9
.L5:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1600024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$1600032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L20:
	.cfi_restore_state
	movq	%r8, %rdi
	subq	%rax, %rdi
	movq	%rdi, %rdx
	negq	%rdx
	cmovs	%rdi, %rdx
	jmp	.L10
.L2:
	movq	24(%rsp), %r8
	leaq	.LC1(%rip), %rbp
.L11:
	movq	%r8, %rdx
	negq	%rdx
	cmovs	%r8, %rdx
	jmp	.L5
.L13:
	movl	$2, %edx
	xorl	%eax, %eax
	jmp	.L6
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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.
Optimized Assembly Code:

user
```assembly
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-1597440(%rsp), %r11
	.cfi_def_cfa 11, 1597472
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2592, %rsp
	.cfi_def_cfa_offset 1600064
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1600024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	24(%rsp), %r12
	movl	$1, %ebx
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	addq	$8, %r12
	cmpl	%ebx, %ecx
	jge	.L3
	movq	24(%rsp), %r8
	cmpl	$1, %ecx
	jle	.L11
	leal	-1(%rcx), %edi
	cmpl	$2, %ecx
	je	.L13
	movl	%edi, %edx
	leaq	32(%rsp), %rsi
	pxor	%xmm0, %xmm0
	shrl	%edx
	movq	%rsi, %rax
	subl	$1, %edx
	salq	$4, %rdx
	leaq	48(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	paddq	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L7
	movdqa	%xmm0, %xmm1
	movl	%edi, %r9d
	psrldq	$8, %xmm1
	andl	$-2, %r9d
	paddq	%xmm1, %xmm0
	leal	2(%r9), %edx
	movq	%xmm0, %rax
	cmpl	%edi, %r9d
	je	.L20
.L6:
	movslq	%edx, %rdx
	movq	%r8, %rsi
	addq	16(%rsp,%rdx,8), %rax
	subq	%rax, %rsi
	movq	%rsi, %rdx
	negq	%rdx
	cmovs	%rsi, %rdx
	cmpl	$2, %ecx
	jle	.L5
	leaq	32(%rsp), %rsi
.L10:
	subl	$3, %ecx
	leaq	40(%rsp,%rcx,8), %r9
	.p2align 4,,10
	.p2align 3
.L9:
	addq	(%rsi), %r8
	subq	(%rsi), %rax
	movq	%r8, %rdi
	subq	%rax, %rdi
	movq	%rdi, %rcx
	negq	%rcx
	cmovs	%rdi, %rcx
	cmpq	%rcx, %rdx
	cmovg	%rcx, %rdx
	addq	$8, %rsi
	cmpq	%rsi, %r9
	jne	.L9
.L5:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1600024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$1600032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L20:
	.cfi_restore_state
	movq	%r8, %rdi
	subq	%rax, %rdi
	movq	%rdi, %rdx
	negq	%rdx
	cmovs	%rdi, %rdx
	jmp	.L10
.L2:
	movq	24(%rsp), %r8
	leaq	.LC1(%rip), %rbp
.L11:
	movq	%r8, %rdx
	negq	%rdx
	cmovs	%r8, %rdx
	jmp	.L5
.L13:
	movl	$2, %edx
	xorl	%eax, %eax
	jmp	.L6
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```
rule
```assembly
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-1597440(%rsp), %r11
	.cfi_def_cfa 11, 1597472
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2592, %rsp
	.cfi_def_cfa_offset 1600064
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1600024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	24(%rsp), %r12
	movl	$1, %ebx
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	addq	$8, %r12
	cmpl	%ebx, %ecx
	jge	.L3
	movq	24(%rsp), %r8
	cmpl	$1, %ecx
	jle	.L11
	leal	-1(%rcx), %edi
	cmpl	$2, %ecx
	je	.L13
	movl	%edi, %edx
	leaq	32(%rsp), %rsi
	pxor	%xmm0, %xmm0
	shrl	%edx
	movq	%rsi, %rax
	subl	$1, %edx
	salq	$4, %rdx
	leaq	48(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	paddq	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L7
	movdqa	%xmm0, %xmm1
	movl	%edi, %r9d
	psrldq	$8, %xmm1
	andl	$-2, %r9d
	paddq	%xmm1, %xmm0
	leal	2(%r9), %edx
	movq	%xmm0, %rax
	cmpl	%edi, %r9d
	je	.L20
.L6:
	movslq	%edx, %rdx
	movq	%r8, %rsi
	addq	16(%rsp,%rdx,8), %rax
	subq	%rax, %rsi
	movq	%rsi, %rdx
	negq	%rdx
	cmovs	%rsi, %rdx
	cmpl	$2, %ecx
	jle	.L5
	leaq	32(%rsp), %rsi
.L10:
	subl	$3, %ecx
	leaq	40(%rsp,%rcx,8), %r9
	.p2align 4,,10
	.p2align 3
.L9:
	addq	(%rsi), %r8
	subq	(%rsi), %rax
	movq	%r8, %rdi
	subq	%rax, %rdi
	movq	%rdi, %rcx
	negq	%rcx
	cmovs	%rdi, %rcx
	cmpq	%rcx, %rdx
	cmovg	%rcx, %rdx
	addq	$8, %rsi
	cmpq	%rsi, %r9
	jne	.L9
.L5:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1600024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$1600032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L20:
	.cfi_restore_state
	movq	%r8, %rdi
	subq	%rax, %rdi
	movq	%rdi, %rdx
	negq	%rdx
	cmovs	%rdi, %rdx
	jmp	.L10
.L2:
	movq	24(%rsp), %r8
	leaq	.LC1(%rip), %rbp
.L11:
	movq	%r8, %rdx
	negq	%rdx
	cmovs	%r8, %rdx
	jmp	.L5
.L13:
	movl	$2, %edx
	xorl	%eax, %eax
	jmp	.L6
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```
```c
#include<stdio.h>
#include<math.h>
int main(void)
{
	long long int a[200000],x,y=0,dim;
	int n,i,t;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%lld",&a[i]);
	}
	x=a[1];
	for(i=2;i<=n;i++)
	{
		y+=a[i];
	}
	dim=llabs(x-y);
	for(t=2;t<n;t++)
	{
		x+=a[t];
	    y-=a[t];
        if(llabs(x-y)<=dim)
        {
        	dim=llabs(x-y);
		}
	}
	printf("%lld",dim);
    return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#include<math.h>
int main(void)
{
	long long int a[200000],x,y=0,dim;
	int n,i,t;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%lld",&a[i]);
	}
	x=a[1];
	for(i=2;i<=n;i++)
	{
		y+=a[i];
	}
	dim=llabs(x-y);
	for(t=2;t<n;t++)
	{
		x+=a[t];
	    y-=a[t];
        if(llabs(x-y)<=dim)
        {
        	dim=llabs(x-y);
		}
	}
	printf("%lld",dim);
    return 0;
}```

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.
Optimized Assembly Code:

6
1 2 3 4 5 6

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

```c
#include<stdio.h>
#include<math.h>
int main(void)
{
	long long int a[200000],x,y=0,dim;
	int n,i,t;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%lld",&a[i]);
	}
	x=a[1];
	for(i=2;i<=n;i++)
	{
		y+=a[i];
	}
	dim=llabs(x-y);
	for(t=2;t<n;t++)
	{
		x+=a[t];
	    y-=a[t];
        if(llabs(x-y)<=dim)
        {
        	dim=llabs(x-y);
		}
	}
	printf("%lld",dim);
    return 0;
}```

Assembly Code:

```assembly
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-1597440(%rsp), %r11
	.cfi_def_cfa 11, 1597472
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2592, %rsp
	.cfi_def_cfa_offset 1600064
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1600024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	24(%rsp), %r12
	movl	$1, %ebx
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	addq	$8, %r12
	cmpl	%ebx, %ecx
	jge	.L3
	movq	24(%rsp), %r8
	cmpl	$1, %ecx
	jle	.L11
	leal	-1(%rcx), %edi
	cmpl	$2, %ecx
	je	.L13
	movl	%edi, %edx
	leaq	32(%rsp), %rsi
	pxor	%xmm0, %xmm0
	shrl	%edx
	movq	%rsi, %rax
	subl	$1, %edx
	salq	$4, %rdx
	leaq	48(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	paddq	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L7
	movdqa	%xmm0, %xmm1
	movl	%edi, %r9d
	psrldq	$8, %xmm1
	andl	$-2, %r9d
	paddq	%xmm1, %xmm0
	leal	2(%r9), %edx
	movq	%xmm0, %rax
	cmpl	%edi, %r9d
	je	.L20
.L6:
	movslq	%edx, %rdx
	movq	%r8, %rsi
	addq	16(%rsp,%rdx,8), %rax
	subq	%rax, %rsi
	movq	%rsi, %rdx
	negq	%rdx
	cmovs	%rsi, %rdx
	cmpl	$2, %ecx
	jle	.L5
	leaq	32(%rsp), %rsi
.L10:
	subl	$3, %ecx
	leaq	40(%rsp,%rcx,8), %r9
	.p2align 4,,10
	.p2align 3
.L9:
	addq	(%rsi), %r8
	subq	(%rsi), %rax
	movq	%r8, %rdi
	subq	%rax, %rdi
	movq	%rdi, %rcx
	negq	%rcx
	cmovs	%rdi, %rcx
	cmpq	%rcx, %rdx
	cmovg	%rcx, %rdx
	addq	$8, %rsi
	cmpq	%rsi, %r9
	jne	.L9
.L5:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1600024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$1600032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L20:
	.cfi_restore_state
	movq	%r8, %rdi
	subq	%rax, %rdi
	movq	%rdi, %rdx
	negq	%rdx
	cmovs	%rdi, %rdx
	jmp	.L10
.L2:
	movq	24(%rsp), %r8
	leaq	.LC1(%rip), %rbp
.L11:
	movq	%r8, %rdx
	negq	%rdx
	cmovs	%r8, %rdx
	jmp	.L5
.L13:
	movl	$2, %edx
	xorl	%eax, %eax
	jmp	.L6
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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.
Optimized Assembly Code:

train
```assembly
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-1597440(%rsp), %r11
	.cfi_def_cfa 11, 1597472
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2592, %rsp
	.cfi_def_cfa_offset 1600064
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1600024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	24(%rsp), %r12
	movl	$1, %ebx
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	addq	$8, %r12
	cmpl	%ebx, %ecx
	jge	.L3
	movq	24(%rsp), %r8
	cmpl	$1, %ecx
	jle	.L11
	leal	-1(%rcx), %edi
	cmpl	$2, %ecx
	je	.L13
	movl	%edi, %edx
	leaq	32(%rsp), %rsi
	pxor	%xmm0, %xmm0
	shrl	%edx
	movq	%rsi, %rax
	subl	$1, %edx
	salq	$4, %rdx
	leaq	48(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	paddq	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L7
	movdqa	%xmm0, %xmm1
	movl	%edi, %r9d
	psrldq	$8, %xmm1
	andl	$-2, %r9d
	paddq	%xmm1, %xmm0
	leal	2(%r9), %edx
	movq	%xmm0, %rax
	cmpl	%edi, %r9d
	je	.L20
.L6:
	movslq	%edx, %rdx
	movq	%r8, %rsi
	addq	16(%rsp,%rdx,8), %rax
	subq	%rax, %rsi
	movq	%rsi, %rdx
	negq	%rdx
	cmovs	%rsi, %rdx
	cmpl	$2, %ecx
	jle	.L5
	leaq	32(%rsp), %rsi
.L10:
	subl	$3, %ecx
	leaq	40(%rsp,%rcx,8), %r9
	.p2align 4,,10
	.p2align 3
.L9:
	addq	(%rsi), %r8
	subq	(%rsi), %rax
	movq	%r8, %rdi
	subq	%rax, %rdi
	movq	%rdi, %rcx
	negq	%rcx
	cmovs	%rdi, %rcx
	cmpq	%rcx, %rdx
	cmovg	%rcx, %rdx
	addq	$8, %rsi
	cmpq	%rsi, %r9
	jne	.L9
.L5:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1600024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$1600032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L20:
	.cfi_restore_state
	movq	%r8, %rdi
	subq	%rax, %rdi
	movq	%rdi, %rdx
	negq	%rdx
	cmovs	%rdi, %rdx
	jmp	.L10
.L2:
	movq	24(%rsp), %r8
	leaq	.LC1(%rip), %rbp
.L11:
	movq	%r8, %rdx
	negq	%rdx
	cmovs	%r8, %rdx
	jmp	.L5
.L13:
	movl	$2, %edx
	xorl	%eax, %eax
	jmp	.L6
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```