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>
int num[200001];
long long ZZ(long long a, long long b)
{
    return a > b ? a - b : b - a;
}
int main()
{
    long long sum = 0;
    int n, i;
    scanf("%d", &n);
    for (i = 0; i < n; i++)
    {
        scanf("%d", &num[i]);
        sum += num[i];
    }
    if(n == 2)printf("%lld", ZZ(num[0], num[1]));
    else
    {
        long long ans = 1e+16;

        long long summ = 0;
        for (i = 0; i < n - 1; i++)
        {
            summ += num[i];
            ans = ans < ZZ(sum - summ, summ) ? ans : ZZ(sum - summ, summ);
        }
        printf("%lld",ans);
    }
    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	ZZ
	.type	ZZ, @function
ZZ:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdi, %rdx
	movq	%rsi, %rax
	subq	%rsi, %rdx
	subq	%rdi, %rax
	cmpq	%rsi, %rdi
	cmovg	%rdx, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	ZZ, .-ZZ
	.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:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L18
	leaq	num(%rip), %rbx
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	(%rbx), %rax
	addq	$4, %rbx
	addq	%rax, %r12
	movl	4(%rsp), %eax
	cmpl	%ebp, %eax
	jg	.L7
	cmpl	$2, %eax
	je	.L22
.L6:
	movabsq	$10000000000000000, %r8
	cmpl	$1, %eax
	jle	.L10
	leaq	num(%rip), %rcx
	leal	-2(%rax), %edx
	movabsq	$10000000000000000, %r8
	leaq	4(%rcx), %rax
	leaq	(%rax,%rdx,4), %r9
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	(%rcx), %rdx
	movq	%r12, %rsi
	addq	%rdx, %rax
	subq	%rax, %rsi
	movq	%rax, %rdx
	movq	%rsi, %rdi
	subq	%rsi, %rdx
	subq	%rax, %rdi
	cmpq	%rax, %rsi
	cmovg	%rdi, %rdx
	cmpq	%rdx, %r8
	cmovg	%rdx, %r8
	addq	$4, %rcx
	cmpq	%rcx, %r9
	jne	.L16
.L10:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	movslq	4+num(%rip), %rax
	movslq	num(%rip), %rdx
	movq	%rax, %r8
	subq	%rdx, %r8
	cmpq	%rdx, %rax
	jge	.L10
	subq	%rax, %rdx
	movq	%rdx, %r8
	jmp	.L10
.L18:
	xorl	%r12d, %r12d
	jmp	.L6
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	num
	.bss
	.align 32
	.type	num, @object
	.size	num, 800004
num:
	.zero	800004
	.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
	.p2align 4
	.globl	ZZ
	.type	ZZ, @function
ZZ:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdi, %rdx
	movq	%rsi, %rax
	subq	%rsi, %rdx
	subq	%rdi, %rax
	cmpq	%rsi, %rdi
	cmovg	%rdx, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	ZZ, .-ZZ
	.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:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L18
	leaq	num(%rip), %rbx
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	(%rbx), %rax
	addq	$4, %rbx
	addq	%rax, %r12
	movl	4(%rsp), %eax
	cmpl	%ebp, %eax
	jg	.L7
	cmpl	$2, %eax
	je	.L22
.L6:
	movabsq	$10000000000000000, %r8
	cmpl	$1, %eax
	jle	.L10
	leaq	num(%rip), %rcx
	leal	-2(%rax), %edx
	movabsq	$10000000000000000, %r8
	leaq	4(%rcx), %rax
	leaq	(%rax,%rdx,4), %r9
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	(%rcx), %rdx
	movq	%r12, %rsi
	addq	%rdx, %rax
	subq	%rax, %rsi
	movq	%rax, %rdx
	movq	%rsi, %rdi
	subq	%rsi, %rdx
	subq	%rax, %rdi
	cmpq	%rax, %rsi
	cmovg	%rdi, %rdx
	cmpq	%rdx, %r8
	cmovg	%rdx, %r8
	addq	$4, %rcx
	cmpq	%rcx, %r9
	jne	.L16
.L10:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	movslq	4+num(%rip), %rax
	movslq	num(%rip), %rdx
	movq	%rax, %r8
	subq	%rdx, %r8
	cmpq	%rdx, %rax
	jge	.L10
	subq	%rax, %rdx
	movq	%rdx, %r8
	jmp	.L10
.L18:
	xorl	%r12d, %r12d
	jmp	.L6
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	num
	.bss
	.align 32
	.type	num, @object
	.size	num, 800004
num:
	.zero	800004
	.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
	.p2align 4
	.globl	ZZ
	.type	ZZ, @function
ZZ:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdi, %rdx
	movq	%rsi, %rax
	subq	%rsi, %rdx
	subq	%rdi, %rax
	cmpq	%rsi, %rdi
	cmovg	%rdx, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	ZZ, .-ZZ
	.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:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L18
	leaq	num(%rip), %rbx
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	(%rbx), %rax
	addq	$4, %rbx
	addq	%rax, %r12
	movl	4(%rsp), %eax
	cmpl	%ebp, %eax
	jg	.L7
	cmpl	$2, %eax
	je	.L22
.L6:
	movabsq	$10000000000000000, %r8
	cmpl	$1, %eax
	jle	.L10
	leaq	num(%rip), %rcx
	leal	-2(%rax), %edx
	movabsq	$10000000000000000, %r8
	leaq	4(%rcx), %rax
	leaq	(%rax,%rdx,4), %r9
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	(%rcx), %rdx
	movq	%r12, %rsi
	addq	%rdx, %rax
	subq	%rax, %rsi
	movq	%rax, %rdx
	movq	%rsi, %rdi
	subq	%rsi, %rdx
	subq	%rax, %rdi
	cmpq	%rax, %rsi
	cmovg	%rdi, %rdx
	cmpq	%rdx, %r8
	cmovg	%rdx, %r8
	addq	$4, %rcx
	cmpq	%rcx, %r9
	jne	.L16
.L10:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	movslq	4+num(%rip), %rax
	movslq	num(%rip), %rdx
	movq	%rax, %r8
	subq	%rdx, %r8
	cmpq	%rdx, %rax
	jge	.L10
	subq	%rax, %rdx
	movq	%rdx, %r8
	jmp	.L10
.L18:
	xorl	%r12d, %r12d
	jmp	.L6
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	num
	.bss
	.align 32
	.type	num, @object
	.size	num, 800004
num:
	.zero	800004
	.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>
int num[200001];
long long ZZ(long long a, long long b)
{
    return a > b ? a - b : b - a;
}
int main()
{
    long long sum = 0;
    int n, i;
    scanf("%d", &n);
    for (i = 0; i < n; i++)
    {
        scanf("%d", &num[i]);
        sum += num[i];
    }
    if(n == 2)printf("%lld", ZZ(num[0], num[1]));
    else
    {
        long long ans = 1e+16;

        long long summ = 0;
        for (i = 0; i < n - 1; i++)
        {
            summ += num[i];
            ans = ans < ZZ(sum - summ, summ) ? ans : ZZ(sum - summ, summ);
        }
        printf("%lld",ans);
    }
    return 0;
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int num[200001];
long long ZZ(long long a, long long b)
{
    return a > b ? a - b : b - a;
}
int main()
{
    long long sum = 0;
    int n, i;
    scanf("%d", &n);
    for (i = 0; i < n; i++)
    {
        scanf("%d", &num[i]);
        sum += num[i];
    }
    if(n == 2)printf("%lld", ZZ(num[0], num[1]));
    else
    {
        long long ans = 1e+16;

        long long summ = 0;
        for (i = 0; i < n - 1; i++)
        {
            summ += num[i];
            ans = ans < ZZ(sum - summ, summ) ? ans : ZZ(sum - summ, summ);
        }
        printf("%lld",ans);
    }
    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>
int num[200001];
long long ZZ(long long a, long long b)
{
    return a > b ? a - b : b - a;
}
int main()
{
    long long sum = 0;
    int n, i;
    scanf("%d", &n);
    for (i = 0; i < n; i++)
    {
        scanf("%d", &num[i]);
        sum += num[i];
    }
    if(n == 2)printf("%lld", ZZ(num[0], num[1]));
    else
    {
        long long ans = 1e+16;

        long long summ = 0;
        for (i = 0; i < n - 1; i++)
        {
            summ += num[i];
            ans = ans < ZZ(sum - summ, summ) ? ans : ZZ(sum - summ, summ);
        }
        printf("%lld",ans);
    }
    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	ZZ
	.type	ZZ, @function
ZZ:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdi, %rdx
	movq	%rsi, %rax
	subq	%rsi, %rdx
	subq	%rdi, %rax
	cmpq	%rsi, %rdi
	cmovg	%rdx, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	ZZ, .-ZZ
	.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:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L18
	leaq	num(%rip), %rbx
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	(%rbx), %rax
	addq	$4, %rbx
	addq	%rax, %r12
	movl	4(%rsp), %eax
	cmpl	%ebp, %eax
	jg	.L7
	cmpl	$2, %eax
	je	.L22
.L6:
	movabsq	$10000000000000000, %r8
	cmpl	$1, %eax
	jle	.L10
	leaq	num(%rip), %rcx
	leal	-2(%rax), %edx
	movabsq	$10000000000000000, %r8
	leaq	4(%rcx), %rax
	leaq	(%rax,%rdx,4), %r9
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	(%rcx), %rdx
	movq	%r12, %rsi
	addq	%rdx, %rax
	subq	%rax, %rsi
	movq	%rax, %rdx
	movq	%rsi, %rdi
	subq	%rsi, %rdx
	subq	%rax, %rdi
	cmpq	%rax, %rsi
	cmovg	%rdi, %rdx
	cmpq	%rdx, %r8
	cmovg	%rdx, %r8
	addq	$4, %rcx
	cmpq	%rcx, %r9
	jne	.L16
.L10:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	movslq	4+num(%rip), %rax
	movslq	num(%rip), %rdx
	movq	%rax, %r8
	subq	%rdx, %r8
	cmpq	%rdx, %rax
	jge	.L10
	subq	%rax, %rdx
	movq	%rdx, %r8
	jmp	.L10
.L18:
	xorl	%r12d, %r12d
	jmp	.L6
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	num
	.bss
	.align 32
	.type	num, @object
	.size	num, 800004
num:
	.zero	800004
	.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
	.p2align 4
	.globl	ZZ
	.type	ZZ, @function
ZZ:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdi, %rdx
	movq	%rsi, %rax
	subq	%rsi, %rdx
	subq	%rdi, %rax
	cmpq	%rsi, %rdi
	cmovg	%rdx, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	ZZ, .-ZZ
	.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:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L18
	leaq	num(%rip), %rbx
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	(%rbx), %rax
	addq	$4, %rbx
	addq	%rax, %r12
	movl	4(%rsp), %eax
	cmpl	%ebp, %eax
	jg	.L7
	cmpl	$2, %eax
	je	.L22
.L6:
	movabsq	$10000000000000000, %r8
	cmpl	$1, %eax
	jle	.L10
	leaq	num(%rip), %rcx
	leal	-2(%rax), %edx
	movabsq	$10000000000000000, %r8
	leaq	4(%rcx), %rax
	leaq	(%rax,%rdx,4), %r9
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	(%rcx), %rdx
	movq	%r12, %rsi
	addq	%rdx, %rax
	subq	%rax, %rsi
	movq	%rax, %rdx
	movq	%rsi, %rdi
	subq	%rsi, %rdx
	subq	%rax, %rdi
	cmpq	%rax, %rsi
	cmovg	%rdi, %rdx
	cmpq	%rdx, %r8
	cmovg	%rdx, %r8
	addq	$4, %rcx
	cmpq	%rcx, %r9
	jne	.L16
.L10:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	movslq	4+num(%rip), %rax
	movslq	num(%rip), %rdx
	movq	%rax, %r8
	subq	%rdx, %r8
	cmpq	%rdx, %rax
	jge	.L10
	subq	%rax, %rdx
	movq	%rdx, %r8
	jmp	.L10
.L18:
	xorl	%r12d, %r12d
	jmp	.L6
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	num
	.bss
	.align 32
	.type	num, @object
	.size	num, 800004
num:
	.zero	800004
	.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:
```