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 main()
    {
        int n, k;
        int graph[105][105] = {};
        int maxv;
        int edge = 0;
     
        scanf("%d %d", &n, &k);
     
        maxv = (n - 1) * (n - 2) / 2;
     
        if (maxv < k) {
            printf("-1\n");
            return 0;
        }
     
        for (int i = 2; i <= n; i++) {
            graph[1][i] = 1;
            edge++;
        }
     
        int i = 2;
        while (maxv > k) {
            for (int j = i + 1; j <= n && maxv > k; j++) {
                graph[i][j] = 1;
                edge++;
                maxv--;
            }
            i++;
        }
     
        printf("%d\n", edge);
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= n; j++) {
                if (graph[i][j]) {
                    printf("%d %d\n", i, j);
                }
            }
        }
     
        return 0;
    }```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"-1"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-40960(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3200, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-44112(%rbp), %rax
	movl	$44100, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -44136(%rbp)
	leaq	-44144(%rbp), %rdx
	leaq	-44148(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-44148(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-44148(%rbp), %eax
	subl	$2, %eax
	imull	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -44140(%rbp)
	movl	-44144(%rbp), %eax
	cmpl	%eax, -44140(%rbp)
	jge	.L2
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L16
.L2:
	movl	$2, -44132(%rbp)
	jmp	.L4
.L5:
	movl	-44132(%rbp), %eax
	cltq
	addq	$105, %rax
	movl	$1, -44112(%rbp,%rax,4)
	addl	$1, -44136(%rbp)
	addl	$1, -44132(%rbp)
.L4:
	movl	-44148(%rbp), %eax
	cmpl	%eax, -44132(%rbp)
	jle	.L5
	movl	$2, -44128(%rbp)
	jmp	.L6
.L10:
	movl	-44128(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -44124(%rbp)
	jmp	.L7
.L9:
	movl	-44124(%rbp), %eax
	movslq	%eax, %rcx
	movl	-44128(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$1, -44112(%rbp,%rax,4)
	addl	$1, -44136(%rbp)
	subl	$1, -44140(%rbp)
	addl	$1, -44124(%rbp)
.L7:
	movl	-44148(%rbp), %eax
	cmpl	%eax, -44124(%rbp)
	jg	.L8
	movl	-44144(%rbp), %eax
	cmpl	%eax, -44140(%rbp)
	jg	.L9
.L8:
	addl	$1, -44128(%rbp)
.L6:
	movl	-44144(%rbp), %eax
	cmpl	%eax, -44140(%rbp)
	jg	.L10
	movl	-44136(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$1, -44120(%rbp)
	jmp	.L11
.L15:
	movl	$1, -44116(%rbp)
	jmp	.L12
.L14:
	movl	-44116(%rbp), %eax
	movslq	%eax, %rcx
	movl	-44120(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-44112(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L13
	movl	-44116(%rbp), %edx
	movl	-44120(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L13:
	addl	$1, -44116(%rbp)
.L12:
	movl	-44148(%rbp), %eax
	cmpl	%eax, -44116(%rbp)
	jle	.L14
	addl	$1, -44120(%rbp)
.L11:
	movl	-44148(%rbp), %eax
	cmpl	%eax, -44120(%rbp)
	jle	.L15
	movl	$0, %eax
.L16:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"-1"
.LC3:
	.string	"%d\n"
.LC4:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-40960(%rsp), %r11
	.cfi_def_cfa 11, 41000
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3176, %rsp
	.cfi_def_cfa_offset 44176
	movl	$44100, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 44120(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	call	memset@PLT
	leaq	8(%rsp), %rsi
	leaq	12(%rsp), %rdx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r10d
	movl	12(%rsp), %r9d
	leal	-2(%r10), %esi
	leal	-1(%r10), %r8d
	movl	%esi, %eax
	imull	%r8d, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	%ecx, %r9d
	jg	.L2
	movl	%ecx, %edx
	cmpl	$1, %r10d
	jle	.L37
	cmpl	$2, %esi
	jbe	.L23
	movl	%r8d, %esi
	movdqa	.LC2(%rip), %xmm0
	leaq	444(%rsp), %rax
	shrl	$2, %esi
	subl	$1, %esi
	salq	$4, %rsi
	leaq	460(%rsp,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L7:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rsi, %rax
	jne	.L7
	movl	%r8d, %esi
	andl	$-4, %esi
	leal	2(%rsi), %eax
	cmpl	%r8d, %esi
	je	.L4
.L6:
	movslq	%eax, %rsi
	movl	$1, 436(%rsp,%rsi,4)
	leal	1(%rax), %esi
	cmpl	%esi, %r10d
	jl	.L4
	movslq	%esi, %rsi
	addl	$2, %eax
	movl	$1, 436(%rsp,%rsi,4)
	cmpl	%eax, %r10d
	jl	.L4
	cltq
	movl	$1, 436(%rsp,%rax,4)
.L4:
	cmpl	%ecx, %r9d
	jge	.L10
	leaq	856(%rsp), %rdi
	movl	$2, %ebx
	.p2align 4,,10
	.p2align 3
.L13:
	movl	%ebx, %eax
	addl	$1, %ebx
	cmpl	%edx, %r9d
	jge	.L11
	cmpl	%ebx, %r10d
	jl	.L11
	addl	$2, %eax
	leal	1(%rdx,%r8), %r11d
	cltq
	.p2align 4,,10
	.p2align 3
.L12:
	movl	%r11d, %r8d
	movl	$1, -4(%rdi,%rax,4)
	subl	%edx, %r8d
	subl	$1, %edx
	cmpl	%edx, %r9d
	setl	%sil
	cmpl	%eax, %r10d
	setge	%cl
	addq	$1, %rax
	testb	%cl, %sil
	jne	.L12
.L11:
	addq	$420, %rdi
	cmpl	%edx, %r9d
	jl	.L13
.L10:
	movl	%r8d, %edx
	movl	$1, %edi
	xorl	%eax, %eax
	movl	$1, %r12d
	leaq	.LC3(%rip), %rsi
	leaq	436(%rsp), %rbp
	movl	$1, %ebx
	call	__printf_chk@PLT
	movl	8(%rsp), %eax
	leaq	.LC4(%rip), %r13
	testl	%eax, %eax
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L20:
	movl	0(%rbp,%rbx,4), %edx
	movl	%ebx, %ecx
	testl	%edx, %edx
	jne	.L38
.L16:
	addq	$1, %rbx
	cmpl	%ebx, %eax
	jge	.L20
.L18:
	addl	$1, %r12d
	cmpl	%r12d, %eax
	jl	.L5
	movl	$1, %ebx
	addq	$420, %rbp
	movl	0(%rbp,%rbx,4), %edx
	movl	%ebx, %ecx
	testl	%edx, %edx
	je	.L16
	.p2align 4,,10
	.p2align 3
.L38:
	movl	%r12d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	8(%rsp), %eax
	addq	$1, %rbx
	cmpl	%ebx, %eax
	jge	.L20
	jmp	.L18
.L2:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L5:
	movq	44120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L39
	addq	$44136, %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
.L37:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L4
.L23:
	movl	$2, %eax
	jmp	.L6
.L39:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	1
	.long	1
	.long	1
	.long	1
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"-1"
.LC3:
	.string	"%d\n"
.LC4:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-40960(%rsp), %r11
	.cfi_def_cfa 11, 41000
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3176, %rsp
	.cfi_def_cfa_offset 44176
	movl	$44100, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 44120(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	call	memset@PLT
	leaq	8(%rsp), %rsi
	leaq	12(%rsp), %rdx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r10d
	movl	12(%rsp), %r9d
	leal	-2(%r10), %esi
	leal	-1(%r10), %r8d
	movl	%esi, %eax
	imull	%r8d, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	%ecx, %r9d
	jg	.L2
	movl	%ecx, %edx
	cmpl	$1, %r10d
	jle	.L37
	cmpl	$2, %esi
	jbe	.L23
	movl	%r8d, %esi
	movdqa	.LC2(%rip), %xmm0
	leaq	444(%rsp), %rax
	shrl	$2, %esi
	subl	$1, %esi
	salq	$4, %rsi
	leaq	460(%rsp,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L7:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rsi, %rax
	jne	.L7
	movl	%r8d, %esi
	andl	$-4, %esi
	leal	2(%rsi), %eax
	cmpl	%r8d, %esi
	je	.L4
.L6:
	movslq	%eax, %rsi
	movl	$1, 436(%rsp,%rsi,4)
	leal	1(%rax), %esi
	cmpl	%esi, %r10d
	jl	.L4
	movslq	%esi, %rsi
	addl	$2, %eax
	movl	$1, 436(%rsp,%rsi,4)
	cmpl	%eax, %r10d
	jl	.L4
	cltq
	movl	$1, 436(%rsp,%rax,4)
.L4:
	cmpl	%ecx, %r9d
	jge	.L10
	leaq	856(%rsp), %rdi
	movl	$2, %ebx
	.p2align 4,,10
	.p2align 3
.L13:
	movl	%ebx, %eax
	addl	$1, %ebx
	cmpl	%edx, %r9d
	jge	.L11
	cmpl	%ebx, %r10d
	jl	.L11
	addl	$2, %eax
	leal	1(%rdx,%r8), %r11d
	cltq
	.p2align 4,,10
	.p2align 3
.L12:
	movl	%r11d, %r8d
	movl	$1, -4(%rdi,%rax,4)
	subl	%edx, %r8d
	subl	$1, %edx
	cmpl	%edx, %r9d
	setl	%sil
	cmpl	%eax, %r10d
	setge	%cl
	addq	$1, %rax
	testb	%cl, %sil
	jne	.L12
.L11:
	addq	$420, %rdi
	cmpl	%edx, %r9d
	jl	.L13
.L10:
	movl	%r8d, %edx
	movl	$1, %edi
	xorl	%eax, %eax
	movl	$1, %r12d
	leaq	.LC3(%rip), %rsi
	leaq	436(%rsp), %rbp
	movl	$1, %ebx
	call	__printf_chk@PLT
	movl	8(%rsp), %eax
	leaq	.LC4(%rip), %r13
	testl	%eax, %eax
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L20:
	movl	0(%rbp,%rbx,4), %edx
	movl	%ebx, %ecx
	testl	%edx, %edx
	jne	.L38
.L16:
	addq	$1, %rbx
	cmpl	%ebx, %eax
	jge	.L20
.L18:
	addl	$1, %r12d
	cmpl	%r12d, %eax
	jl	.L5
	movl	$1, %ebx
	addq	$420, %rbp
	movl	0(%rbp,%rbx,4), %edx
	movl	%ebx, %ecx
	testl	%edx, %edx
	je	.L16
	.p2align 4,,10
	.p2align 3
.L38:
	movl	%r12d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	8(%rsp), %eax
	addq	$1, %rbx
	cmpl	%ebx, %eax
	jge	.L20
	jmp	.L18
.L2:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L5:
	movq	44120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L39
	addq	$44136, %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
.L37:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L4
.L23:
	movl	$2, %eax
	jmp	.L6
.L39:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	1
	.long	1
	.long	1
	.long	1
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

    #include <stdio.h>
     
    int main()
    {
        int n, k;
        int graph[105][105] = {};
        int maxv;
        int edge = 0;
     
        scanf("%d %d", &n, &k);
     
        maxv = (n - 1) * (n - 2) / 2;
     
        if (maxv < k) {
            printf("-1\n");
            return 0;
        }
     
        for (int i = 2; i <= n; i++) {
            graph[1][i] = 1;
            edge++;
        }
     
        int i = 2;
        while (maxv > k) {
            for (int j = i + 1; j <= n && maxv > k; j++) {
                graph[i][j] = 1;
                edge++;
                maxv--;
            }
            i++;
        }
     
        printf("%d\n", edge);
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= n; j++) {
                if (graph[i][j]) {
                    printf("%d %d\n", i, j);
                }
            }
        }
     
        return 0;
    }
5 3

7
1 2
1 3
1 4
1 5
2 3
2 4
2 5

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 main()
    {
        int n, k;
        int graph[105][105] = {};
        int maxv;
        int edge = 0;
     
        scanf("%d %d", &n, &k);
     
        maxv = (n - 1) * (n - 2) / 2;
     
        if (maxv < k) {
            printf("-1\n");
            return 0;
        }
     
        for (int i = 2; i <= n; i++) {
            graph[1][i] = 1;
            edge++;
        }
     
        int i = 2;
        while (maxv > k) {
            for (int j = i + 1; j <= n && maxv > k; j++) {
                graph[i][j] = 1;
                edge++;
                maxv--;
            }
            i++;
        }
     
        printf("%d\n", edge);
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= n; j++) {
                if (graph[i][j]) {
                    printf("%d %d\n", i, j);
                }
            }
        }
     
        return 0;
    }```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"-1"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-40960(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3200, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-44112(%rbp), %rax
	movl	$44100, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -44136(%rbp)
	leaq	-44144(%rbp), %rdx
	leaq	-44148(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-44148(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-44148(%rbp), %eax
	subl	$2, %eax
	imull	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -44140(%rbp)
	movl	-44144(%rbp), %eax
	cmpl	%eax, -44140(%rbp)
	jge	.L2
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L16
.L2:
	movl	$2, -44132(%rbp)
	jmp	.L4
.L5:
	movl	-44132(%rbp), %eax
	cltq
	addq	$105, %rax
	movl	$1, -44112(%rbp,%rax,4)
	addl	$1, -44136(%rbp)
	addl	$1, -44132(%rbp)
.L4:
	movl	-44148(%rbp), %eax
	cmpl	%eax, -44132(%rbp)
	jle	.L5
	movl	$2, -44128(%rbp)
	jmp	.L6
.L10:
	movl	-44128(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -44124(%rbp)
	jmp	.L7
.L9:
	movl	-44124(%rbp), %eax
	movslq	%eax, %rcx
	movl	-44128(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$1, -44112(%rbp,%rax,4)
	addl	$1, -44136(%rbp)
	subl	$1, -44140(%rbp)
	addl	$1, -44124(%rbp)
.L7:
	movl	-44148(%rbp), %eax
	cmpl	%eax, -44124(%rbp)
	jg	.L8
	movl	-44144(%rbp), %eax
	cmpl	%eax, -44140(%rbp)
	jg	.L9
.L8:
	addl	$1, -44128(%rbp)
.L6:
	movl	-44144(%rbp), %eax
	cmpl	%eax, -44140(%rbp)
	jg	.L10
	movl	-44136(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$1, -44120(%rbp)
	jmp	.L11
.L15:
	movl	$1, -44116(%rbp)
	jmp	.L12
.L14:
	movl	-44116(%rbp), %eax
	movslq	%eax, %rcx
	movl	-44120(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-44112(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L13
	movl	-44116(%rbp), %edx
	movl	-44120(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L13:
	addl	$1, -44116(%rbp)
.L12:
	movl	-44148(%rbp), %eax
	cmpl	%eax, -44116(%rbp)
	jle	.L14
	addl	$1, -44120(%rbp)
.L11:
	movl	-44148(%rbp), %eax
	cmpl	%eax, -44120(%rbp)
	jle	.L15
	movl	$0, %eax
.L16:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"-1"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-40960(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3200, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-44112(%rbp), %rax
	movl	$44100, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -44136(%rbp)
	leaq	-44144(%rbp), %rdx
	leaq	-44148(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-44148(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-44148(%rbp), %eax
	subl	$2, %eax
	imull	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -44140(%rbp)
	movl	-44144(%rbp), %eax
	cmpl	%eax, -44140(%rbp)
	jge	.L2
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L16
.L2:
	movl	$2, -44132(%rbp)
	jmp	.L4
.L5:
	movl	-44132(%rbp), %eax
	cltq
	addq	$105, %rax
	movl	$1, -44112(%rbp,%rax,4)
	addl	$1, -44136(%rbp)
	addl	$1, -44132(%rbp)
.L4:
	movl	-44148(%rbp), %eax
	cmpl	%eax, -44132(%rbp)
	jle	.L5
	movl	$2, -44128(%rbp)
	jmp	.L6
.L10:
	movl	-44128(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -44124(%rbp)
	jmp	.L7
.L9:
	movl	-44124(%rbp), %eax
	movslq	%eax, %rcx
	movl	-44128(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$1, -44112(%rbp,%rax,4)
	addl	$1, -44136(%rbp)
	subl	$1, -44140(%rbp)
	addl	$1, -44124(%rbp)
.L7:
	movl	-44148(%rbp), %eax
	cmpl	%eax, -44124(%rbp)
	jg	.L8
	movl	-44144(%rbp), %eax
	cmpl	%eax, -44140(%rbp)
	jg	.L9
.L8:
	addl	$1, -44128(%rbp)
.L6:
	movl	-44144(%rbp), %eax
	cmpl	%eax, -44140(%rbp)
	jg	.L10
	movl	-44136(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$1, -44120(%rbp)
	jmp	.L11
.L15:
	movl	$1, -44116(%rbp)
	jmp	.L12
.L14:
	movl	-44116(%rbp), %eax
	movslq	%eax, %rcx
	movl	-44120(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-44112(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L13
	movl	-44116(%rbp), %edx
	movl	-44120(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L13:
	addl	$1, -44116(%rbp)
.L12:
	movl	-44148(%rbp), %eax
	cmpl	%eax, -44116(%rbp)
	jle	.L14
	addl	$1, -44120(%rbp)
.L11:
	movl	-44148(%rbp), %eax
	cmpl	%eax, -44120(%rbp)
	jle	.L15
	movl	$0, %eax
.L16:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
