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>
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;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	num
	.bss
	.align 32
	.type	num, @object
	.size	num, 800004
num:
	.zero	800004
	.text
	.globl	ZZ
	.type	ZZ, @function
ZZ:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jle	.L2
	movq	-8(%rbp), %rax
	subq	-16(%rbp), %rax
	jmp	.L4
.L2:
	movq	-16(%rbp), %rax
	subq	-8(%rbp), %rax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	ZZ, .-ZZ
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -32(%rbp)
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -36(%rbp)
	jmp	.L6
.L7:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	num(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	num(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	addq	%rax, -32(%rbp)
	addl	$1, -36(%rbp)
.L6:
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L7
	movl	-40(%rbp), %eax
	cmpl	$2, %eax
	jne	.L8
	movl	4+num(%rip), %eax
	movslq	%eax, %rdx
	movl	num(%rip), %eax
	cltq
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	ZZ
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L9
.L8:
	movabsq	$10000000000000000, %rax
	movq	%rax, -24(%rbp)
	movq	$0, -16(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L10
.L13:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	num(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	addq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	-16(%rbp), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	ZZ
	cmpq	%rax, -24(%rbp)
	jl	.L11
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	-16(%rbp), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	ZZ
	jmp	.L12
.L11:
	movq	-24(%rbp), %rax
.L12:
	movq	%rax, -24(%rbp)
	addl	$1, -36(%rbp)
.L10:
	movl	-40(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -36(%rbp)
	jl	.L13
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L9:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	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
	.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:

#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;
}

6
1 2 3 4 5 6

1
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>
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;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	num
	.bss
	.align 32
	.type	num, @object
	.size	num, 800004
num:
	.zero	800004
	.text
	.globl	ZZ
	.type	ZZ, @function
ZZ:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jle	.L2
	movq	-8(%rbp), %rax
	subq	-16(%rbp), %rax
	jmp	.L4
.L2:
	movq	-16(%rbp), %rax
	subq	-8(%rbp), %rax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	ZZ, .-ZZ
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -32(%rbp)
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -36(%rbp)
	jmp	.L6
.L7:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	num(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	num(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	addq	%rax, -32(%rbp)
	addl	$1, -36(%rbp)
.L6:
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L7
	movl	-40(%rbp), %eax
	cmpl	$2, %eax
	jne	.L8
	movl	4+num(%rip), %eax
	movslq	%eax, %rdx
	movl	num(%rip), %eax
	cltq
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	ZZ
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L9
.L8:
	movabsq	$10000000000000000, %rax
	movq	%rax, -24(%rbp)
	movq	$0, -16(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L10
.L13:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	num(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	addq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	-16(%rbp), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	ZZ
	cmpq	%rax, -24(%rbp)
	jl	.L11
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	-16(%rbp), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	ZZ
	jmp	.L12
.L11:
	movq	-24(%rbp), %rax
.L12:
	movq	%rax, -24(%rbp)
	addl	$1, -36(%rbp)
.L10:
	movl	-40(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -36(%rbp)
	jl	.L13
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L9:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	num
	.bss
	.align 32
	.type	num, @object
	.size	num, 800004
num:
	.zero	800004
	.text
	.globl	ZZ
	.type	ZZ, @function
ZZ:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jle	.L2
	movq	-8(%rbp), %rax
	subq	-16(%rbp), %rax
	jmp	.L4
.L2:
	movq	-16(%rbp), %rax
	subq	-8(%rbp), %rax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	ZZ, .-ZZ
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -32(%rbp)
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -36(%rbp)
	jmp	.L6
.L7:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	num(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	num(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	addq	%rax, -32(%rbp)
	addl	$1, -36(%rbp)
.L6:
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L7
	movl	-40(%rbp), %eax
	cmpl	$2, %eax
	jne	.L8
	movl	4+num(%rip), %eax
	movslq	%eax, %rdx
	movl	num(%rip), %eax
	cltq
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	ZZ
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L9
.L8:
	movabsq	$10000000000000000, %rax
	movq	%rax, -24(%rbp)
	movq	$0, -16(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L10
.L13:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	num(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	addq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	-16(%rbp), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	ZZ
	cmpq	%rax, -24(%rbp)
	jl	.L11
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	-16(%rbp), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	ZZ
	jmp	.L12
.L11:
	movq	-24(%rbp), %rax
.L12:
	movq	%rax, -24(%rbp)
	addl	$1, -36(%rbp)
.L10:
	movl	-40(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -36(%rbp)
	jl	.L13
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L9:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
