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 main()
{
    long long n, k;
    long long graph[105][105];
    long long maxv;
    long long edge = 0;

    scanf("%d %d", &n, &k);

    maxv = (n - 1) * (n - 2) / 2;

    if (maxv < k) {
        printf("-1\n");
        return 0;
    }

    for (long long i = 2; i <= n; i++) {
        graph[1][i] = 1;
        edge++;
    }

    long long i = 2;
    while (maxv > k) {
        for (long long j = i + 1; j <= n && maxv > k; j++) {
            graph[i][j] = 1;
            edge++;
            maxv--;
        }
        i++;
    }

    printf("%d\n", edge);
    for (long long i = 1; i <= n; i++) {
        for (long long j = 1; j <= n; j++) {
            if (graph[i][j]) {
                printf("%d %d\n", i, j);
            }
        }
    }

    return 0;
}
```

Assembly Code:

```assembly
	.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	-86016(%rsp), %r11
	.cfi_def_cfa 11, 86056
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2216, %rsp
	.cfi_def_cfa_offset 88272
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 88216(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	8(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r8
	movq	8(%rsp), %rdi
	leaq	-1(%r8), %rsi
	leaq	-2(%r8), %rax
	imulq	%rsi, %rax
	movq	%rax, %rcx
	shrq	$63, %rcx
	addq	%rax, %rcx
	sarq	%rcx
	cmpq	%rcx, %rdi
	jg	.L2
	movq	%rcx, %rax
	cmpq	$1, %r8
	jle	.L42
	cmpq	$2, %r8
	je	.L24
	movq	%rsi, %r9
	leaq	872(%rsp), %rdx
	movdqa	.LC2(%rip), %xmm0
	shrq	%r9
	salq	$4, %r9
	addq	%rdx, %r9
	.p2align 4,,10
	.p2align 3
.L7:
	movups	%xmm0, (%rdx)
	addq	$16, %rdx
	cmpq	%r9, %rdx
	jne	.L7
	movq	%rsi, %r9
	andq	$-2, %r9
	leaq	2(%r9), %rdx
	cmpq	%rsi, %r9
	je	.L4
.L6:
	movq	$1, 856(%rsp,%rdx,8)
.L4:
	cmpq	%rcx, %rdi
	jge	.L10
	leaq	1696(%rsp), %rcx
	movl	$2, %r10d
	.p2align 4,,10
	.p2align 3
.L14:
	addq	$1, %r10
	cmpq	%rax, %rdi
	jge	.L11
	cmpq	%r10, %r8
	jl	.L11
	movq	%r10, %rdx
	leaq	1(%rax,%rsi), %r9
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L43:
	cmpq	%rdx, %r8
	jl	.L11
.L12:
	movq	%r9, %rsi
	movq	$1, (%rcx,%rdx,8)
	addq	$1, %rdx
	subq	%rax, %rsi
	subq	$1, %rax
	cmpq	%rax, %rdi
	jl	.L43
.L11:
	addq	$840, %rcx
	cmpq	%rax, %rdi
	jl	.L14
.L10:
	movq	%rsi, %rdx
	movl	$1, %edi
	xorl	%eax, %eax
	movl	$1, %r12d
	leaq	.LC3(%rip), %rsi
	leaq	856(%rsp), %rbp
	movl	$1, %ebx
	call	__printf_chk@PLT
	movq	(%rsp), %rax
	leaq	.LC4(%rip), %r13
	testq	%rax, %rax
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	cmpq	$0, 0(%rbp,%rbx,8)
	jne	.L44
.L17:
	addq	$1, %rbx
	cmpq	%rbx, %rax
	jge	.L21
	addq	$1, %r12
	cmpq	%r12, %rax
	jl	.L5
.L22:
	addq	$840, %rbp
	movl	$1, %ebx
	cmpq	$0, 0(%rbp,%rbx,8)
	je	.L17
	.p2align 4,,10
	.p2align 3
.L44:
	movq	%rbx, %rcx
	movq	%r12, %rdx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	movq	(%rsp), %rax
	cmpq	%rax, %rbx
	jle	.L21
	addq	$1, %r12
	cmpq	%r12, %rax
	jge	.L22
.L5:
	movq	88216(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$88232, %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
.L2:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L5
.L42:
	xorl	%esi, %esi
	jmp	.L4
.L24:
	movl	$2, %edx
	jmp	.L6
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.quad	1
	.quad	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:
```

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 %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	-86016(%rsp), %r11
	.cfi_def_cfa 11, 86056
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2216, %rsp
	.cfi_def_cfa_offset 88272
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 88216(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	8(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r8
	movq	8(%rsp), %rdi
	leaq	-1(%r8), %rsi
	leaq	-2(%r8), %rax
	imulq	%rsi, %rax
	movq	%rax, %rcx
	shrq	$63, %rcx
	addq	%rax, %rcx
	sarq	%rcx
	cmpq	%rcx, %rdi
	jg	.L2
	movq	%rcx, %rax
	cmpq	$1, %r8
	jle	.L42
	cmpq	$2, %r8
	je	.L24
	movq	%rsi, %r9
	leaq	872(%rsp), %rdx
	movdqa	.LC2(%rip), %xmm0
	shrq	%r9
	salq	$4, %r9
	addq	%rdx, %r9
	.p2align 4,,10
	.p2align 3
.L7:
	movups	%xmm0, (%rdx)
	addq	$16, %rdx
	cmpq	%r9, %rdx
	jne	.L7
	movq	%rsi, %r9
	andq	$-2, %r9
	leaq	2(%r9), %rdx
	cmpq	%rsi, %r9
	je	.L4
.L6:
	movq	$1, 856(%rsp,%rdx,8)
.L4:
	cmpq	%rcx, %rdi
	jge	.L10
	leaq	1696(%rsp), %rcx
	movl	$2, %r10d
	.p2align 4,,10
	.p2align 3
.L14:
	addq	$1, %r10
	cmpq	%rax, %rdi
	jge	.L11
	cmpq	%r10, %r8
	jl	.L11
	movq	%r10, %rdx
	leaq	1(%rax,%rsi), %r9
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L43:
	cmpq	%rdx, %r8
	jl	.L11
.L12:
	movq	%r9, %rsi
	movq	$1, (%rcx,%rdx,8)
	addq	$1, %rdx
	subq	%rax, %rsi
	subq	$1, %rax
	cmpq	%rax, %rdi
	jl	.L43
.L11:
	addq	$840, %rcx
	cmpq	%rax, %rdi
	jl	.L14
.L10:
	movq	%rsi, %rdx
	movl	$1, %edi
	xorl	%eax, %eax
	movl	$1, %r12d
	leaq	.LC3(%rip), %rsi
	leaq	856(%rsp), %rbp
	movl	$1, %ebx
	call	__printf_chk@PLT
	movq	(%rsp), %rax
	leaq	.LC4(%rip), %r13
	testq	%rax, %rax
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	cmpq	$0, 0(%rbp,%rbx,8)
	jne	.L44
.L17:
	addq	$1, %rbx
	cmpq	%rbx, %rax
	jge	.L21
	addq	$1, %r12
	cmpq	%r12, %rax
	jl	.L5
.L22:
	addq	$840, %rbp
	movl	$1, %ebx
	cmpq	$0, 0(%rbp,%rbx,8)
	je	.L17
	.p2align 4,,10
	.p2align 3
.L44:
	movq	%rbx, %rcx
	movq	%r12, %rdx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	movq	(%rsp), %rax
	cmpq	%rax, %rbx
	jle	.L21
	addq	$1, %r12
	cmpq	%r12, %rax
	jge	.L22
.L5:
	movq	88216(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$88232, %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
.L2:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L5
.L42:
	xorl	%esi, %esi
	jmp	.L4
.L24:
	movl	$2, %edx
	jmp	.L6
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.quad	1
	.quad	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
```assembly
	.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	-86016(%rsp), %r11
	.cfi_def_cfa 11, 86056
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2216, %rsp
	.cfi_def_cfa_offset 88272
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 88216(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	8(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r8
	movq	8(%rsp), %rdi
	leaq	-1(%r8), %rsi
	leaq	-2(%r8), %rax
	imulq	%rsi, %rax
	movq	%rax, %rcx
	shrq	$63, %rcx
	addq	%rax, %rcx
	sarq	%rcx
	cmpq	%rcx, %rdi
	jg	.L2
	movq	%rcx, %rax
	cmpq	$1, %r8
	jle	.L42
	cmpq	$2, %r8
	je	.L24
	movq	%rsi, %r9
	leaq	872(%rsp), %rdx
	movdqa	.LC2(%rip), %xmm0
	shrq	%r9
	salq	$4, %r9
	addq	%rdx, %r9
	.p2align 4,,10
	.p2align 3
.L7:
	movups	%xmm0, (%rdx)
	addq	$16, %rdx
	cmpq	%r9, %rdx
	jne	.L7
	movq	%rsi, %r9
	andq	$-2, %r9
	leaq	2(%r9), %rdx
	cmpq	%rsi, %r9
	je	.L4
.L6:
	movq	$1, 856(%rsp,%rdx,8)
.L4:
	cmpq	%rcx, %rdi
	jge	.L10
	leaq	1696(%rsp), %rcx
	movl	$2, %r10d
	.p2align 4,,10
	.p2align 3
.L14:
	addq	$1, %r10
	cmpq	%rax, %rdi
	jge	.L11
	cmpq	%r10, %r8
	jl	.L11
	movq	%r10, %rdx
	leaq	1(%rax,%rsi), %r9
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L43:
	cmpq	%rdx, %r8
	jl	.L11
.L12:
	movq	%r9, %rsi
	movq	$1, (%rcx,%rdx,8)
	addq	$1, %rdx
	subq	%rax, %rsi
	subq	$1, %rax
	cmpq	%rax, %rdi
	jl	.L43
.L11:
	addq	$840, %rcx
	cmpq	%rax, %rdi
	jl	.L14
.L10:
	movq	%rsi, %rdx
	movl	$1, %edi
	xorl	%eax, %eax
	movl	$1, %r12d
	leaq	.LC3(%rip), %rsi
	leaq	856(%rsp), %rbp
	movl	$1, %ebx
	call	__printf_chk@PLT
	movq	(%rsp), %rax
	leaq	.LC4(%rip), %r13
	testq	%rax, %rax
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	cmpq	$0, 0(%rbp,%rbx,8)
	jne	.L44
.L17:
	addq	$1, %rbx
	cmpq	%rbx, %rax
	jge	.L21
	addq	$1, %r12
	cmpq	%r12, %rax
	jl	.L5
.L22:
	addq	$840, %rbp
	movl	$1, %ebx
	cmpq	$0, 0(%rbp,%rbx,8)
	je	.L17
	.p2align 4,,10
	.p2align 3
.L44:
	movq	%rbx, %rcx
	movq	%r12, %rdx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	movq	(%rsp), %rax
	cmpq	%rax, %rbx
	jle	.L21
	addq	$1, %r12
	cmpq	%r12, %rax
	jge	.L22
.L5:
	movq	88216(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$88232, %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
.L2:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L5
.L42:
	xorl	%esi, %esi
	jmp	.L4
.L24:
	movl	$2, %edx
	jmp	.L6
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.quad	1
	.quad	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:
```
```c
#include <stdio.h>

int main()
{
    long long n, k;
    long long graph[105][105];
    long long maxv;
    long long edge = 0;

    scanf("%d %d", &n, &k);

    maxv = (n - 1) * (n - 2) / 2;

    if (maxv < k) {
        printf("-1\n");
        return 0;
    }

    for (long long i = 2; i <= n; i++) {
        graph[1][i] = 1;
        edge++;
    }

    long long i = 2;
    while (maxv > k) {
        for (long long j = i + 1; j <= n && maxv > k; j++) {
            graph[i][j] = 1;
            edge++;
            maxv--;
        }
        i++;
    }

    printf("%d\n", edge);
    for (long long i = 1; i <= n; i++) {
        for (long long j = 1; j <= n; j++) {
            if (graph[i][j]) {
                printf("%d %d\n", i, j);
            }
        }
    }

    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 main()
{
    long long n, k;
    long long graph[105][105];
    long long maxv;
    long long edge = 0;

    scanf("%d %d", &n, &k);

    maxv = (n - 1) * (n - 2) / 2;

    if (maxv < k) {
        printf("-1\n");
        return 0;
    }

    for (long long i = 2; i <= n; i++) {
        graph[1][i] = 1;
        edge++;
    }

    long long i = 2;
    while (maxv > k) {
        for (long long j = i + 1; j <= n && maxv > k; j++) {
            graph[i][j] = 1;
            edge++;
            maxv--;
        }
        i++;
    }

    printf("%d\n", edge);
    for (long long i = 1; i <= n; i++) {
        for (long long j = 1; j <= n; j++) {
            if (graph[i][j]) {
                printf("%d %d\n", i, j);
            }
        }
    }

    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:

5 3

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

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 main()
{
    long long n, k;
    long long graph[105][105];
    long long maxv;
    long long edge = 0;

    scanf("%d %d", &n, &k);

    maxv = (n - 1) * (n - 2) / 2;

    if (maxv < k) {
        printf("-1\n");
        return 0;
    }

    for (long long i = 2; i <= n; i++) {
        graph[1][i] = 1;
        edge++;
    }

    long long i = 2;
    while (maxv > k) {
        for (long long j = i + 1; j <= n && maxv > k; j++) {
            graph[i][j] = 1;
            edge++;
            maxv--;
        }
        i++;
    }

    printf("%d\n", edge);
    for (long long i = 1; i <= n; i++) {
        for (long long j = 1; j <= n; j++) {
            if (graph[i][j]) {
                printf("%d %d\n", i, j);
            }
        }
    }

    return 0;
}
```

Assembly Code:

```assembly
	.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	-86016(%rsp), %r11
	.cfi_def_cfa 11, 86056
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2216, %rsp
	.cfi_def_cfa_offset 88272
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 88216(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	8(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r8
	movq	8(%rsp), %rdi
	leaq	-1(%r8), %rsi
	leaq	-2(%r8), %rax
	imulq	%rsi, %rax
	movq	%rax, %rcx
	shrq	$63, %rcx
	addq	%rax, %rcx
	sarq	%rcx
	cmpq	%rcx, %rdi
	jg	.L2
	movq	%rcx, %rax
	cmpq	$1, %r8
	jle	.L42
	cmpq	$2, %r8
	je	.L24
	movq	%rsi, %r9
	leaq	872(%rsp), %rdx
	movdqa	.LC2(%rip), %xmm0
	shrq	%r9
	salq	$4, %r9
	addq	%rdx, %r9
	.p2align 4,,10
	.p2align 3
.L7:
	movups	%xmm0, (%rdx)
	addq	$16, %rdx
	cmpq	%r9, %rdx
	jne	.L7
	movq	%rsi, %r9
	andq	$-2, %r9
	leaq	2(%r9), %rdx
	cmpq	%rsi, %r9
	je	.L4
.L6:
	movq	$1, 856(%rsp,%rdx,8)
.L4:
	cmpq	%rcx, %rdi
	jge	.L10
	leaq	1696(%rsp), %rcx
	movl	$2, %r10d
	.p2align 4,,10
	.p2align 3
.L14:
	addq	$1, %r10
	cmpq	%rax, %rdi
	jge	.L11
	cmpq	%r10, %r8
	jl	.L11
	movq	%r10, %rdx
	leaq	1(%rax,%rsi), %r9
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L43:
	cmpq	%rdx, %r8
	jl	.L11
.L12:
	movq	%r9, %rsi
	movq	$1, (%rcx,%rdx,8)
	addq	$1, %rdx
	subq	%rax, %rsi
	subq	$1, %rax
	cmpq	%rax, %rdi
	jl	.L43
.L11:
	addq	$840, %rcx
	cmpq	%rax, %rdi
	jl	.L14
.L10:
	movq	%rsi, %rdx
	movl	$1, %edi
	xorl	%eax, %eax
	movl	$1, %r12d
	leaq	.LC3(%rip), %rsi
	leaq	856(%rsp), %rbp
	movl	$1, %ebx
	call	__printf_chk@PLT
	movq	(%rsp), %rax
	leaq	.LC4(%rip), %r13
	testq	%rax, %rax
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	cmpq	$0, 0(%rbp,%rbx,8)
	jne	.L44
.L17:
	addq	$1, %rbx
	cmpq	%rbx, %rax
	jge	.L21
	addq	$1, %r12
	cmpq	%r12, %rax
	jl	.L5
.L22:
	addq	$840, %rbp
	movl	$1, %ebx
	cmpq	$0, 0(%rbp,%rbx,8)
	je	.L17
	.p2align 4,,10
	.p2align 3
.L44:
	movq	%rbx, %rcx
	movq	%r12, %rdx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	movq	(%rsp), %rax
	cmpq	%rax, %rbx
	jle	.L21
	addq	$1, %r12
	cmpq	%r12, %rax
	jge	.L22
.L5:
	movq	88216(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$88232, %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
.L2:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L5
.L42:
	xorl	%esi, %esi
	jmp	.L4
.L24:
	movl	$2, %edx
	jmp	.L6
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.quad	1
	.quad	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:
```

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 %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	-86016(%rsp), %r11
	.cfi_def_cfa 11, 86056
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2216, %rsp
	.cfi_def_cfa_offset 88272
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 88216(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	8(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r8
	movq	8(%rsp), %rdi
	leaq	-1(%r8), %rsi
	leaq	-2(%r8), %rax
	imulq	%rsi, %rax
	movq	%rax, %rcx
	shrq	$63, %rcx
	addq	%rax, %rcx
	sarq	%rcx
	cmpq	%rcx, %rdi
	jg	.L2
	movq	%rcx, %rax
	cmpq	$1, %r8
	jle	.L42
	cmpq	$2, %r8
	je	.L24
	movq	%rsi, %r9
	leaq	872(%rsp), %rdx
	movdqa	.LC2(%rip), %xmm0
	shrq	%r9
	salq	$4, %r9
	addq	%rdx, %r9
	.p2align 4,,10
	.p2align 3
.L7:
	movups	%xmm0, (%rdx)
	addq	$16, %rdx
	cmpq	%r9, %rdx
	jne	.L7
	movq	%rsi, %r9
	andq	$-2, %r9
	leaq	2(%r9), %rdx
	cmpq	%rsi, %r9
	je	.L4
.L6:
	movq	$1, 856(%rsp,%rdx,8)
.L4:
	cmpq	%rcx, %rdi
	jge	.L10
	leaq	1696(%rsp), %rcx
	movl	$2, %r10d
	.p2align 4,,10
	.p2align 3
.L14:
	addq	$1, %r10
	cmpq	%rax, %rdi
	jge	.L11
	cmpq	%r10, %r8
	jl	.L11
	movq	%r10, %rdx
	leaq	1(%rax,%rsi), %r9
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L43:
	cmpq	%rdx, %r8
	jl	.L11
.L12:
	movq	%r9, %rsi
	movq	$1, (%rcx,%rdx,8)
	addq	$1, %rdx
	subq	%rax, %rsi
	subq	$1, %rax
	cmpq	%rax, %rdi
	jl	.L43
.L11:
	addq	$840, %rcx
	cmpq	%rax, %rdi
	jl	.L14
.L10:
	movq	%rsi, %rdx
	movl	$1, %edi
	xorl	%eax, %eax
	movl	$1, %r12d
	leaq	.LC3(%rip), %rsi
	leaq	856(%rsp), %rbp
	movl	$1, %ebx
	call	__printf_chk@PLT
	movq	(%rsp), %rax
	leaq	.LC4(%rip), %r13
	testq	%rax, %rax
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	cmpq	$0, 0(%rbp,%rbx,8)
	jne	.L44
.L17:
	addq	$1, %rbx
	cmpq	%rbx, %rax
	jge	.L21
	addq	$1, %r12
	cmpq	%r12, %rax
	jl	.L5
.L22:
	addq	$840, %rbp
	movl	$1, %ebx
	cmpq	$0, 0(%rbp,%rbx,8)
	je	.L17
	.p2align 4,,10
	.p2align 3
.L44:
	movq	%rbx, %rcx
	movq	%r12, %rdx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	movq	(%rsp), %rax
	cmpq	%rax, %rbx
	jle	.L21
	addq	$1, %r12
	cmpq	%r12, %rax
	jge	.L22
.L5:
	movq	88216(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$88232, %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
.L2:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L5
.L42:
	xorl	%esi, %esi
	jmp	.L4
.L24:
	movl	$2, %edx
	jmp	.L6
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.quad	1
	.quad	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:
```