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>
#include <stdlib.h>

int a[300002], g[300002];

#define gc() getchar()
int in()
{
	int n = 0, c = gc();
	do n = 10 * n + (c & 0xf), c = gc(); while (c >= '0');
	return n;
}

int cmp(const void *a, const void *b)
{
	return *(int *)a - *(int *)b;
}

int main()
{
	int i, N, Q, x, y, t, xx, yy;
	int cnt;

	N = in();
	for (i = 1; i <= N; i++) g[i] = a[i] = in();
	qsort(g+1, N, sizeof(int), cmp);
	for (cnt = 0, i = 1; i <= N; i++) {
		if (g[i] != a[i]) cnt++;
	}
	if (cnt == 0) {
		puts("0");
		return 0;
	}
	Q = in();
	for (i = 1; i <= Q; i++) {
		x = in(), y = in();
		xx = a[x], yy = a[y];
		t = a[x], a[x] = a[y], a[y] = t;
		if (xx == g[x] && a[x] != g[x]) cnt++;
		else if (xx != g[x] && a[x] == g[x]) cnt--;
		if (yy == g[y] && a[y] != g[y]) cnt++;
		else if (yy != g[y] && a[y] == g[y]) cnt--;
		if (cnt == 0) {
			printf("%d\n", i);
			break;
		}
	}
	if (cnt) puts("-1");
	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 1200008
a:
	.zero	1200008
	.globl	g
	.align 32
	.type	g, @object
	.size	g, 1200008
g:
	.zero	1200008
	.text
	.globl	in
	.type	in, @function
in:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	call	getchar@PLT
	movl	%eax, -4(%rbp)
.L2:
	movl	-8(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	andl	$15, %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
	call	getchar@PLT
	movl	%eax, -4(%rbp)
	cmpl	$47, -4(%rbp)
	jg	.L2
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	in, .-in
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB7:
	.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"0"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"-1"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.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
	movl	$0, %eax
	call	in
	movl	%eax, -28(%rbp)
	movl	$1, -36(%rbp)
	jmp	.L7
.L8:
	movl	$0, %eax
	call	in
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	g(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -36(%rbp)
.L7:
	movl	-36(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L8
	movl	-28(%rbp), %eax
	cltq
	leaq	4+g(%rip), %rdi
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	call	qsort@PLT
	movl	$0, -32(%rbp)
	movl	$1, -36(%rbp)
	jmp	.L9
.L11:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	je	.L10
	addl	$1, -32(%rbp)
.L10:
	addl	$1, -36(%rbp)
.L9:
	movl	-36(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L11
	cmpl	$0, -32(%rbp)
	jne	.L12
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L13
.L12:
	movl	$0, %eax
	call	in
	movl	%eax, -24(%rbp)
	movl	$1, -36(%rbp)
	jmp	.L14
.L21:
	movl	$0, %eax
	call	in
	movl	%eax, -20(%rbp)
	movl	$0, %eax
	call	in
	movl	%eax, -16(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	jne	.L15
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	g(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	je	.L15
	addl	$1, -32(%rbp)
	jmp	.L16
.L15:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	je	.L16
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	g(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L16
	subl	$1, -32(%rbp)
.L16:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L17
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	g(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	je	.L17
	addl	$1, -32(%rbp)
	jmp	.L18
.L17:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	je	.L18
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	g(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L18
	subl	$1, -32(%rbp)
.L18:
	cmpl	$0, -32(%rbp)
	jne	.L19
	movl	-36(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L20
.L19:
	addl	$1, -36(%rbp)
.L14:
	movl	-36(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L21
.L20:
	cmpl	$0, -32(%rbp)
	je	.L22
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L22:
	movl	$0, %eax
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	cmp
	.type	cmp, @function
cmp:
.LFB40:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE40:
	.size	cmp, .-cmp
	.p2align 4
	.globl	in
	.type	in, @function
in:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	stdin(%rip), %rdi
	xorl	%r12d, %r12d
	call	getc@PLT
	.p2align 4,,10
	.p2align 3
.L4:
	movq	stdin(%rip), %rdi
	andl	$15, %eax
	leal	(%r12,%r12,4), %edx
	leal	(%rax,%rdx,2), %r12d
	call	getc@PLT
	cmpl	$47, %eax
	jg	.L4
	movl	%r12d, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE39:
	.size	in, .-in
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"0"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"-1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	in
	movl	%eax, %r13d
	testl	%eax, %eax
	jle	.L8
	movl	$1, %ebp
	leaq	a(%rip), %rbx
	leaq	g(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L10:
	movq	stdin(%rip), %rdi
	xorl	%r14d, %r14d
	call	getc@PLT
	.p2align 4,,10
	.p2align 3
.L9:
	movq	stdin(%rip), %rdi
	andl	$15, %eax
	leal	(%r14,%r14,4), %edx
	leal	(%rax,%rdx,2), %r14d
	call	getc@PLT
	cmpl	$47, %eax
	jg	.L9
	movl	%r14d, (%rbx,%rbp,4)
	movl	%r14d, (%r12,%rbp,4)
	addq	$1, %rbp
	cmpl	%ebp, %r13d
	jge	.L10
	movslq	%r13d, %rsi
	leaq	cmp(%rip), %rcx
	movl	$4, %edx
	leaq	4+g(%rip), %rdi
	call	qsort@PLT
	leal	-1(%r13), %eax
	cmpl	$2, %eax
	jbe	.L47
	movl	%r13d, %eax
	pxor	%xmm1, %xmm1
	shrl	$2, %eax
	movdqa	%xmm1, %xmm2
	leal	-1(%rax), %edx
	movl	$4, %eax
	salq	$4, %rdx
	addq	$20, %rdx
	.p2align 4,,10
	.p2align 3
.L20:
	movdqu	(%r12,%rax), %xmm0
	movdqu	(%rbx,%rax), %xmm3
	addq	$16, %rax
	pcmpeqd	%xmm3, %xmm0
	pcmpeqd	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %rdx
	jne	.L20
	movdqa	%xmm1, %xmm0
	movl	%r13d, %edx
	psrldq	$8, %xmm0
	andl	$-4, %edx
	paddd	%xmm0, %xmm1
	leal	1(%rdx), %eax
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %r14d
	cmpl	%edx, %r13d
	je	.L12
.L32:
	movslq	%eax, %rdx
	movl	(%r12,%rdx,4), %esi
	cmpl	%esi, (%rbx,%rdx,4)
	je	.L13
	addl	$1, %eax
	addl	$1, %r14d
	cmpl	%eax, %r13d
	jl	.L15
.L14:
	movslq	%eax, %rdx
	movl	(%rbx,%rdx,4), %esi
	cmpl	%esi, (%r12,%rdx,4)
	je	.L16
	addl	$1, %eax
	addl	$1, %r14d
	cmpl	%eax, %r13d
	jl	.L15
.L17:
	cltq
	movl	(%rbx,%rax,4), %ecx
	cmpl	%ecx, (%r12,%rax,4)
	je	.L12
	addl	$1, %r14d
.L12:
	testl	%r14d, %r14d
	je	.L34
.L15:
	xorl	%eax, %eax
	call	in
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L23
	movl	$1, %r13d
	.p2align 4,,10
	.p2align 3
.L31:
	movq	stdin(%rip), %rdi
	xorl	%ebp, %ebp
	call	getc@PLT
	.p2align 4,,10
	.p2align 3
.L24:
	movq	stdin(%rip), %rdi
	andl	$15, %eax
	leal	0(%rbp,%rbp,4), %edx
	leal	(%rax,%rdx,2), %ebp
	call	getc@PLT
	cmpl	$47, %eax
	jg	.L24
	movq	stdin(%rip), %rdi
	xorl	%r15d, %r15d
	call	getc@PLT
	.p2align 4,,10
	.p2align 3
.L25:
	movq	stdin(%rip), %rdi
	andl	$15, %eax
	leal	(%r15,%r15,4), %edx
	leal	(%rax,%rdx,2), %r15d
	call	getc@PLT
	cmpl	$47, %eax
	jg	.L25
	movslq	%ebp, %rbp
	movslq	%r15d, %rdx
	movl	(%rbx,%rbp,4), %eax
	movl	(%rbx,%rdx,4), %ecx
	movl	(%r12,%rbp,4), %esi
	movl	%ecx, (%rbx,%rbp,4)
	movl	%eax, (%rbx,%rdx,4)
	cmpl	%eax, %esi
	je	.L48
	cmpl	(%rbx,%rbp,4), %esi
	jne	.L27
	subl	$1, %r14d
.L27:
	movl	(%r12,%rdx,4), %edx
	cmpl	%ecx, %edx
	je	.L49
.L28:
	cmpl	%eax, %edx
	sete	%al
	movzbl	%al, %eax
	subl	%eax, %r14d
	testl	%r14d, %r14d
	je	.L50
.L30:
	addl	$1, %r13d
	cmpl	%r13d, 12(%rsp)
	jge	.L31
.L23:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L44:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L48:
	.cfi_restore_state
	cmpl	(%rbx,%rbp,4), %eax
	je	.L27
	movl	(%r12,%rdx,4), %edx
	addl	$1, %r14d
	cmpl	%ecx, %edx
	jne	.L28
.L49:
	cmpl	%eax, %ecx
	setne	%al
	movzbl	%al, %eax
	addl	%eax, %r14d
	testl	%r14d, %r14d
	jne	.L30
.L50:
	movl	%r13d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L44
.L13:
	addl	$1, %eax
	cmpl	%r13d, %eax
	jle	.L14
	jmp	.L12
.L8:
	movslq	%eax, %rsi
	leaq	cmp(%rip), %rcx
	movl	$4, %edx
	leaq	4+g(%rip), %rdi
	call	qsort@PLT
.L34:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L44
.L16:
	addl	$1, %eax
	cmpl	%eax, %r13d
	jge	.L17
	jmp	.L12
.L47:
	xorl	%r14d, %r14d
	movl	$1, %eax
	jmp	.L32
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	g
	.bss
	.align 32
	.type	g, @object
	.size	g, 1200008
g:
	.zero	1200008
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1200008
a:
	.zero	1200008
	.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	cmp
	.type	cmp, @function
cmp:
.LFB40:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE40:
	.size	cmp, .-cmp
	.p2align 4
	.globl	in
	.type	in, @function
in:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	stdin(%rip), %rdi
	xorl	%r12d, %r12d
	call	getc@PLT
	.p2align 4,,10
	.p2align 3
.L4:
	movq	stdin(%rip), %rdi
	andl	$15, %eax
	leal	(%r12,%r12,4), %edx
	leal	(%rax,%rdx,2), %r12d
	call	getc@PLT
	cmpl	$47, %eax
	jg	.L4
	movl	%r12d, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE39:
	.size	in, .-in
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"0"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"-1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	in
	movl	%eax, %r13d
	testl	%eax, %eax
	jle	.L8
	movl	$1, %ebp
	leaq	a(%rip), %rbx
	leaq	g(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L10:
	movq	stdin(%rip), %rdi
	xorl	%r14d, %r14d
	call	getc@PLT
	.p2align 4,,10
	.p2align 3
.L9:
	movq	stdin(%rip), %rdi
	andl	$15, %eax
	leal	(%r14,%r14,4), %edx
	leal	(%rax,%rdx,2), %r14d
	call	getc@PLT
	cmpl	$47, %eax
	jg	.L9
	movl	%r14d, (%rbx,%rbp,4)
	movl	%r14d, (%r12,%rbp,4)
	addq	$1, %rbp
	cmpl	%ebp, %r13d
	jge	.L10
	movslq	%r13d, %rsi
	leaq	cmp(%rip), %rcx
	movl	$4, %edx
	leaq	4+g(%rip), %rdi
	call	qsort@PLT
	leal	-1(%r13), %eax
	cmpl	$2, %eax
	jbe	.L47
	movl	%r13d, %eax
	pxor	%xmm1, %xmm1
	shrl	$2, %eax
	movdqa	%xmm1, %xmm2
	leal	-1(%rax), %edx
	movl	$4, %eax
	salq	$4, %rdx
	addq	$20, %rdx
	.p2align 4,,10
	.p2align 3
.L20:
	movdqu	(%r12,%rax), %xmm0
	movdqu	(%rbx,%rax), %xmm3
	addq	$16, %rax
	pcmpeqd	%xmm3, %xmm0
	pcmpeqd	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rax, %rdx
	jne	.L20
	movdqa	%xmm1, %xmm0
	movl	%r13d, %edx
	psrldq	$8, %xmm0
	andl	$-4, %edx
	paddd	%xmm0, %xmm1
	leal	1(%rdx), %eax
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %r14d
	cmpl	%edx, %r13d
	je	.L12
.L32:
	movslq	%eax, %rdx
	movl	(%r12,%rdx,4), %esi
	cmpl	%esi, (%rbx,%rdx,4)
	je	.L13
	addl	$1, %eax
	addl	$1, %r14d
	cmpl	%eax, %r13d
	jl	.L15
.L14:
	movslq	%eax, %rdx
	movl	(%rbx,%rdx,4), %esi
	cmpl	%esi, (%r12,%rdx,4)
	je	.L16
	addl	$1, %eax
	addl	$1, %r14d
	cmpl	%eax, %r13d
	jl	.L15
.L17:
	cltq
	movl	(%rbx,%rax,4), %ecx
	cmpl	%ecx, (%r12,%rax,4)
	je	.L12
	addl	$1, %r14d
.L12:
	testl	%r14d, %r14d
	je	.L34
.L15:
	xorl	%eax, %eax
	call	in
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L23
	movl	$1, %r13d
	.p2align 4,,10
	.p2align 3
.L31:
	movq	stdin(%rip), %rdi
	xorl	%ebp, %ebp
	call	getc@PLT
	.p2align 4,,10
	.p2align 3
.L24:
	movq	stdin(%rip), %rdi
	andl	$15, %eax
	leal	0(%rbp,%rbp,4), %edx
	leal	(%rax,%rdx,2), %ebp
	call	getc@PLT
	cmpl	$47, %eax
	jg	.L24
	movq	stdin(%rip), %rdi
	xorl	%r15d, %r15d
	call	getc@PLT
	.p2align 4,,10
	.p2align 3
.L25:
	movq	stdin(%rip), %rdi
	andl	$15, %eax
	leal	(%r15,%r15,4), %edx
	leal	(%rax,%rdx,2), %r15d
	call	getc@PLT
	cmpl	$47, %eax
	jg	.L25
	movslq	%ebp, %rbp
	movslq	%r15d, %rdx
	movl	(%rbx,%rbp,4), %eax
	movl	(%rbx,%rdx,4), %ecx
	movl	(%r12,%rbp,4), %esi
	movl	%ecx, (%rbx,%rbp,4)
	movl	%eax, (%rbx,%rdx,4)
	cmpl	%eax, %esi
	je	.L48
	cmpl	(%rbx,%rbp,4), %esi
	jne	.L27
	subl	$1, %r14d
.L27:
	movl	(%r12,%rdx,4), %edx
	cmpl	%ecx, %edx
	je	.L49
.L28:
	cmpl	%eax, %edx
	sete	%al
	movzbl	%al, %eax
	subl	%eax, %r14d
	testl	%r14d, %r14d
	je	.L50
.L30:
	addl	$1, %r13d
	cmpl	%r13d, 12(%rsp)
	jge	.L31
.L23:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L44:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L48:
	.cfi_restore_state
	cmpl	(%rbx,%rbp,4), %eax
	je	.L27
	movl	(%r12,%rdx,4), %edx
	addl	$1, %r14d
	cmpl	%ecx, %edx
	jne	.L28
.L49:
	cmpl	%eax, %ecx
	setne	%al
	movzbl	%al, %eax
	addl	%eax, %r14d
	testl	%r14d, %r14d
	jne	.L30
.L50:
	movl	%r13d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L44
.L13:
	addl	$1, %eax
	cmpl	%r13d, %eax
	jle	.L14
	jmp	.L12
.L8:
	movslq	%eax, %rsi
	leaq	cmp(%rip), %rcx
	movl	$4, %edx
	leaq	4+g(%rip), %rdi
	call	qsort@PLT
.L34:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L44
.L16:
	addl	$1, %eax
	cmpl	%eax, %r13d
	jge	.L17
	jmp	.L12
.L47:
	xorl	%r14d, %r14d
	movl	$1, %eax
	jmp	.L32
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	g
	.bss
	.align 32
	.type	g, @object
	.size	g, 1200008
g:
	.zero	1200008
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1200008
a:
	.zero	1200008
	.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>
#include <stdlib.h>

int a[300002], g[300002];

#define gc() getchar()
int in()
{
	int n = 0, c = gc();
	do n = 10 * n + (c & 0xf), c = gc(); while (c >= '0');
	return n;
}

int cmp(const void *a, const void *b)
{
	return *(int *)a - *(int *)b;
}

int main()
{
	int i, N, Q, x, y, t, xx, yy;
	int cnt;

	N = in();
	for (i = 1; i <= N; i++) g[i] = a[i] = in();
	qsort(g+1, N, sizeof(int), cmp);
	for (cnt = 0, i = 1; i <= N; i++) {
		if (g[i] != a[i]) cnt++;
	}
	if (cnt == 0) {
		puts("0");
		return 0;
	}
	Q = in();
	for (i = 1; i <= Q; i++) {
		x = in(), y = in();
		xx = a[x], yy = a[y];
		t = a[x], a[x] = a[y], a[y] = t;
		if (xx == g[x] && a[x] != g[x]) cnt++;
		else if (xx != g[x] && a[x] == g[x]) cnt--;
		if (yy == g[y] && a[y] != g[y]) cnt++;
		else if (yy != g[y] && a[y] == g[y]) cnt--;
		if (cnt == 0) {
			printf("%d\n", i);
			break;
		}
	}
	if (cnt) puts("-1");
	return 0;
}


6
9 7 5 6 3 1
3
1 6
2 5
3 4

2

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>
#include <stdlib.h>

int a[300002], g[300002];

#define gc() getchar()
int in()
{
	int n = 0, c = gc();
	do n = 10 * n + (c & 0xf), c = gc(); while (c >= '0');
	return n;
}

int cmp(const void *a, const void *b)
{
	return *(int *)a - *(int *)b;
}

int main()
{
	int i, N, Q, x, y, t, xx, yy;
	int cnt;

	N = in();
	for (i = 1; i <= N; i++) g[i] = a[i] = in();
	qsort(g+1, N, sizeof(int), cmp);
	for (cnt = 0, i = 1; i <= N; i++) {
		if (g[i] != a[i]) cnt++;
	}
	if (cnt == 0) {
		puts("0");
		return 0;
	}
	Q = in();
	for (i = 1; i <= Q; i++) {
		x = in(), y = in();
		xx = a[x], yy = a[y];
		t = a[x], a[x] = a[y], a[y] = t;
		if (xx == g[x] && a[x] != g[x]) cnt++;
		else if (xx != g[x] && a[x] == g[x]) cnt--;
		if (yy == g[y] && a[y] != g[y]) cnt++;
		else if (yy != g[y] && a[y] == g[y]) cnt--;
		if (cnt == 0) {
			printf("%d\n", i);
			break;
		}
	}
	if (cnt) puts("-1");
	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 1200008
a:
	.zero	1200008
	.globl	g
	.align 32
	.type	g, @object
	.size	g, 1200008
g:
	.zero	1200008
	.text
	.globl	in
	.type	in, @function
in:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	call	getchar@PLT
	movl	%eax, -4(%rbp)
.L2:
	movl	-8(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	andl	$15, %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
	call	getchar@PLT
	movl	%eax, -4(%rbp)
	cmpl	$47, -4(%rbp)
	jg	.L2
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	in, .-in
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB7:
	.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"0"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"-1"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.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
	movl	$0, %eax
	call	in
	movl	%eax, -28(%rbp)
	movl	$1, -36(%rbp)
	jmp	.L7
.L8:
	movl	$0, %eax
	call	in
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	g(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -36(%rbp)
.L7:
	movl	-36(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L8
	movl	-28(%rbp), %eax
	cltq
	leaq	4+g(%rip), %rdi
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	call	qsort@PLT
	movl	$0, -32(%rbp)
	movl	$1, -36(%rbp)
	jmp	.L9
.L11:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	je	.L10
	addl	$1, -32(%rbp)
.L10:
	addl	$1, -36(%rbp)
.L9:
	movl	-36(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L11
	cmpl	$0, -32(%rbp)
	jne	.L12
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L13
.L12:
	movl	$0, %eax
	call	in
	movl	%eax, -24(%rbp)
	movl	$1, -36(%rbp)
	jmp	.L14
.L21:
	movl	$0, %eax
	call	in
	movl	%eax, -20(%rbp)
	movl	$0, %eax
	call	in
	movl	%eax, -16(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	jne	.L15
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	g(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	je	.L15
	addl	$1, -32(%rbp)
	jmp	.L16
.L15:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	je	.L16
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	g(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L16
	subl	$1, -32(%rbp)
.L16:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L17
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	g(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	je	.L17
	addl	$1, -32(%rbp)
	jmp	.L18
.L17:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	je	.L18
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	g(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L18
	subl	$1, -32(%rbp)
.L18:
	cmpl	$0, -32(%rbp)
	jne	.L19
	movl	-36(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L20
.L19:
	addl	$1, -36(%rbp)
.L14:
	movl	-36(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L21
.L20:
	cmpl	$0, -32(%rbp)
	je	.L22
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L22:
	movl	$0, %eax
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 1200008
a:
	.zero	1200008
	.globl	g
	.align 32
	.type	g, @object
	.size	g, 1200008
g:
	.zero	1200008
	.text
	.globl	in
	.type	in, @function
in:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	call	getchar@PLT
	movl	%eax, -4(%rbp)
.L2:
	movl	-8(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	andl	$15, %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
	call	getchar@PLT
	movl	%eax, -4(%rbp)
	cmpl	$47, -4(%rbp)
	jg	.L2
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	in, .-in
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB7:
	.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"0"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"-1"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.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
	movl	$0, %eax
	call	in
	movl	%eax, -28(%rbp)
	movl	$1, -36(%rbp)
	jmp	.L7
.L8:
	movl	$0, %eax
	call	in
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	g(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -36(%rbp)
.L7:
	movl	-36(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L8
	movl	-28(%rbp), %eax
	cltq
	leaq	4+g(%rip), %rdi
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	call	qsort@PLT
	movl	$0, -32(%rbp)
	movl	$1, -36(%rbp)
	jmp	.L9
.L11:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	je	.L10
	addl	$1, -32(%rbp)
.L10:
	addl	$1, -36(%rbp)
.L9:
	movl	-36(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L11
	cmpl	$0, -32(%rbp)
	jne	.L12
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L13
.L12:
	movl	$0, %eax
	call	in
	movl	%eax, -24(%rbp)
	movl	$1, -36(%rbp)
	jmp	.L14
.L21:
	movl	$0, %eax
	call	in
	movl	%eax, -20(%rbp)
	movl	$0, %eax
	call	in
	movl	%eax, -16(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	jne	.L15
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	g(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	je	.L15
	addl	$1, -32(%rbp)
	jmp	.L16
.L15:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	je	.L16
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	g(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L16
	subl	$1, -32(%rbp)
.L16:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L17
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	g(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	je	.L17
	addl	$1, -32(%rbp)
	jmp	.L18
.L17:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	g(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	je	.L18
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	g(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L18
	subl	$1, -32(%rbp)
.L18:
	cmpl	$0, -32(%rbp)
	jne	.L19
	movl	-36(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L20
.L19:
	addl	$1, -36(%rbp)
.L14:
	movl	-36(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L21
.L20:
	cmpl	$0, -32(%rbp)
	je	.L22
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L22:
	movl	$0, %eax
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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:
