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>
#define int long long
#define inv_num_valtype int

//比較関数
int compare(inv_num_valtype a, inv_num_valtype b){
	return a - b;
}

//昇順
int inv_num_sub(inv_num_valtype *origin, int left, int right, inv_num_valtype *tmp){
	int ans = 0;
	if(right - left > 1){
		int i, j, k, half = (left + right) / 2;
		ans += inv_num_sub(origin, left, half, tmp);
		ans += inv_num_sub(origin, half, right, tmp);
		for(i = left; i < right; i++){
			tmp[i] = origin[i];
		}
		for(i = left, j = left, k = half; i < right; i++){
			if(k == right){
				origin[i] = tmp[j];
				j++;
			}
			else if(compare(tmp[j], tmp[k]) <= 0 && j < half){
				origin[i] = tmp[j];
				j++;
			}
			else{
				origin[i] = tmp[k];
				ans += k - i;
				k++;
			}
		}
	}
	return ans;
}

//i < j && a[i] > a[j] となる組(i, j)の数
//effect: sortされる
int inv_num(inv_num_valtype *origin, int N){
	inv_num_valtype *tmp = (inv_num_valtype *)malloc(sizeof(inv_num_valtype) * N);
	return inv_num_sub(origin, 0, N, tmp);
}

int main(){
	int N, i;
	scanf("%lld", &N);
	int *p = (int *)malloc(sizeof(int) * N);
	int N1 = (N + 1) / 2, N2 = N / 2;
	int *p_even = (int *)malloc(sizeof(int) * N1);
	int *p_odd = (int *)malloc(sizeof(int) * N2);
	for(i = 0; i < N; i++){
		scanf("%lld", &p[i]);
		p[i]--;
		if(i % 2 == 0){
			p_even[i / 2] = p[i];
		}
		else{
			p_odd[i / 2] = p[i];
		}
	}
	for(i = 0; i < N; i++){
		if(i % 2 != p[i] % 2){
			printf("No\n");
			return 0;
		}
	}
	int p_inv_num = inv_num(p, N);
	if(p_inv_num % 3 != 0){
		printf("No\n");
		return 0;
	}
	if(p_inv_num / 3 != inv_num(p_even, N1) + inv_num(p_odd, N2)){
		printf("No\n");
		return 0;
	}
	printf("Yes\n");
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	compare
	.type	compare, @function
compare:
.LFB6:
	.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
	subq	-16(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare, .-compare
	.globl	inv_num_sub
	.type	inv_num_sub, @function
inv_num_sub:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$80, %rsp
	movq	%rdi, -56(%rbp)
	movq	%rsi, -64(%rbp)
	movq	%rdx, -72(%rbp)
	movq	%rcx, -80(%rbp)
	movq	$0, -40(%rbp)
	movq	-72(%rbp), %rax
	subq	-64(%rbp), %rax
	cmpq	$1, %rax
	jle	.L4
	movq	-64(%rbp), %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -8(%rbp)
	movq	-80(%rbp), %rcx
	movq	-8(%rbp), %rdx
	movq	-64(%rbp), %rsi
	movq	-56(%rbp), %rax
	movq	%rax, %rdi
	call	inv_num_sub
	addq	%rax, -40(%rbp)
	movq	-80(%rbp), %rcx
	movq	-72(%rbp), %rdx
	movq	-8(%rbp), %rsi
	movq	-56(%rbp), %rax
	movq	%rax, %rdi
	call	inv_num_sub
	addq	%rax, -40(%rbp)
	movq	-64(%rbp), %rax
	movq	%rax, -32(%rbp)
	jmp	.L5
.L6:
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movq	-32(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-80(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	addq	$1, -32(%rbp)
.L5:
	movq	-32(%rbp), %rax
	cmpq	-72(%rbp), %rax
	jl	.L6
	movq	-64(%rbp), %rax
	movq	%rax, -32(%rbp)
	movq	-64(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, -16(%rbp)
	jmp	.L7
.L11:
	movq	-16(%rbp), %rax
	cmpq	-72(%rbp), %rax
	jne	.L8
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	-32(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-56(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	addq	$1, -24(%rbp)
	jmp	.L9
.L8:
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-80(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	compare
	testq	%rax, %rax
	jg	.L10
	movq	-24(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jge	.L10
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	-32(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-56(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	addq	$1, -24(%rbp)
	jmp	.L9
.L10:
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	-32(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-56(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	movq	-16(%rbp), %rax
	subq	-32(%rbp), %rax
	addq	%rax, -40(%rbp)
	addq	$1, -16(%rbp)
.L9:
	addq	$1, -32(%rbp)
.L7:
	movq	-32(%rbp), %rax
	cmpq	-72(%rbp), %rax
	jl	.L11
.L4:
	movq	-40(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	inv_num_sub, .-inv_num_sub
	.globl	inv_num
	.type	inv_num, @function
inv_num:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-32(%rbp), %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rcx
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	inv_num_sub
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	inv_num, .-inv_num
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"No"
.LC2:
	.string	"Yes"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$80, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-88(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-88(%rbp), %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -72(%rbp)
	movq	-88(%rbp), %rax
	addq	$1, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -64(%rbp)
	movq	-88(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -56(%rbp)
	movq	-64(%rbp), %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -48(%rbp)
	movq	-56(%rbp), %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -40(%rbp)
	movq	$0, -80(%rbp)
	jmp	.L16
.L19:
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	subq	$1, %rdx
	movq	%rdx, (%rax)
	movq	-80(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	jne	.L17
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movq	-80(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	leaq	0(,%rax,8), %rdx
	movq	-48(%rbp), %rax
	addq	%rax, %rdx
	movq	(%rcx), %rax
	movq	%rax, (%rdx)
	jmp	.L18
.L17:
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movq	-80(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movq	(%rcx), %rax
	movq	%rax, (%rdx)
.L18:
	addq	$1, -80(%rbp)
.L16:
	movq	-88(%rbp), %rax
	cmpq	%rax, -80(%rbp)
	jl	.L19
	movq	$0, -80(%rbp)
	jmp	.L20
.L23:
	movq	-80(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	cmpq	%rax, %rcx
	je	.L21
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L26
.L21:
	addq	$1, -80(%rbp)
.L20:
	movq	-88(%rbp), %rax
	cmpq	%rax, -80(%rbp)
	jl	.L23
	movq	-88(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	inv_num
	movq	%rax, -32(%rbp)
	movq	-32(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rsi
	sarq	$63, %rsi
	movq	%rdx, %rax
	subq	%rsi, %rax
	movq	%rax, %rdx
	addq	%rdx, %rdx
	addq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	testq	%rax, %rax
	je	.L24
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L26
.L24:
	movq	-32(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	movq	%rdx, %rbx
	subq	%rax, %rbx
	movq	-64(%rbp), %rdx
	movq	-48(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	inv_num
	movq	%rax, %r12
	movq	-56(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	inv_num
	addq	%r12, %rax
	cmpq	%rax, %rbx
	je	.L25
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L26
.L25:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L26:
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	addq	$80, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	.text.unlikely,"ax",@progbits
.LCOLDB0:
	.text
.LHOTB0:
	.p2align 4
	.type	inv_num_sub.part.0, @function
inv_num_sub.part.0:
.LFB43:
	.cfi_startproc
	leaq	(%rdx,%rsi), %rax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rax, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	shrq	$63, %r15
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdi, %r13
	addq	%rax, %r15
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rcx, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	sarq	%r15
	movq	%rdx, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%r15, %rax
	movq	%rsi, %rbx
	subq	%rsi, %rax
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	cmpq	$1, %rax
	jle	.L2
	movq	%r15, %rdx
	call	inv_num_sub.part.0
	movq	%rax, %r14
.L2:
	movq	%rbp, %rax
	subq	%r15, %rax
	cmpq	$1, %rax
	jle	.L3
	movq	%r12, %rcx
	movq	%rbp, %rdx
	movq	%r15, %rsi
	movq	%r13, %rdi
	call	inv_num_sub.part.0
	addq	%rax, %r14
.L3:
	cmpq	%rbx, %rbp
	jle	.L1
	leaq	0(,%rbx,8), %rdx
	movq	%rbp, %rdi
	leaq	(%r12,%rdx), %rsi
	leaq	8(%r13,%rdx), %rax
	subq	%rbx, %rdi
	cmpq	%rax, %rsi
	je	.L21
	leaq	-1(%rdi), %rax
	cmpq	$2, %rax
	jbe	.L21
	movq	%rdi, %rcx
	addq	%r13, %rdx
	xorl	%eax, %eax
	shrq	%rcx
	salq	$4, %rcx
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%rdx,%rax), %xmm0
	movups	%xmm0, (%rsi,%rax)
	addq	$16, %rax
	cmpq	%rcx, %rax
	jne	.L6
	movq	%rdi, %rdx
	andq	$-2, %rdx
	leaq	(%rdx,%rbx), %rax
	cmpq	%rdx, %rdi
	je	.L8
	movq	0(%r13,%rax,8), %rdx
	movq	%rdx, (%r12,%rax,8)
.L8:
	movq	%rbx, %rax
	movq	%r15, %rdx
	.p2align 4,,10
	.p2align 3
.L19:
	movq	(%r12,%rbx,8), %rcx
	cmpq	%rdx, %rbp
	je	.L48
	movq	(%r12,%rdx,8), %rsi
	cmpq	%rsi, %rcx
	jg	.L12
	cmpq	%rbx, %r15
	jg	.L49
.L12:
	movq	%rdx, %rcx
	addq	$1, %rdx
	subq	%rax, %rcx
	addq	%rcx, %r14
.L13:
	movq	%rsi, 0(%r13,%rax,8)
	addq	$1, %rax
	cmpq	%rax, %rbp
	jne	.L19
.L1:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r14, %rax
	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
	movq	%rcx, 0(%r13,%rax,8)
	addq	$1, %rax
	leaq	1(%rbx), %rdx
	cmpq	%rax, %rbp
	jne	.L10
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L49:
	addq	$1, %rbx
	movq	%rcx, %rsi
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%rbx, %rax
	.p2align 4,,10
	.p2align 3
.L5:
	movq	0(%r13,%rax,8), %rdx
	movq	%rdx, (%r12,%rax,8)
	addq	$1, %rax
	cmpq	%rax, %rbp
	jne	.L5
	jmp	.L8
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	inv_num_sub.part.0.cold, @function
inv_num_sub.part.0.cold:
.LFSB43:
.L10:
	.cfi_def_cfa_offset 64
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	movq	%rbp, %rcx
	leaq	0(,%rax,8), %rdi
	leaq	16(,%rbx,8), %rsi
	subq	%rax, %rcx
	leaq	0(%r13,%rdi), %r8
	leaq	-1(%rcx), %r9
	cmpq	$2, %r9
	jbe	.L14
	leaq	(%r12,%rsi), %r9
	cmpq	%r9, %r8
	je	.L14
	cmpq	%rax, %rbp
	movl	$1, %edi
	leaq	-8(%r12,%rsi), %r9
	cmovle	%rdi, %rcx
	xorl	%esi, %esi
	movq	%rcx, %rdi
	shrq	%rdi
	salq	$4, %rdi
.L15:
	movdqu	(%r9,%rsi), %xmm1
	movups	%xmm1, (%r8,%rsi)
	addq	$16, %rsi
	cmpq	%rsi, %rdi
	jne	.L15
	movq	%rcx, %rsi
	andq	$-2, %rsi
	addq	%rsi, %rdx
	addq	%rsi, %rax
	cmpq	%rsi, %rcx
	je	.L1
	movq	(%r12,%rdx,8), %rdx
	movq	%rdx, 0(%r13,%rax,8)
	jmp	.L1
.L14:
	subq	%rdi, %r12
	leaq	-8(%r12,%rsi), %rdx
.L17:
	movq	(%rdx,%rax,8), %rcx
	movq	%rcx, 0(%r13,%rax,8)
	addq	$1, %rax
	cmpq	%rax, %rbp
	jg	.L17
	jmp	.L1
	.cfi_endproc
.LFE43:
	.text
	.size	inv_num_sub.part.0, .-inv_num_sub.part.0
	.section	.text.unlikely
	.size	inv_num_sub.part.0.cold, .-inv_num_sub.part.0.cold
.LCOLDE0:
	.text
.LHOTE0:
	.p2align 4
	.globl	compare
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	subq	%rsi, %rax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.p2align 4
	.globl	inv_num_sub
	.type	inv_num_sub, @function
inv_num_sub:
.LFB40:
	.cfi_startproc
	endbr64
	movq	%rdx, %rax
	subq	%rsi, %rax
	cmpq	$1, %rax
	jg	.L53
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L53:
	jmp	inv_num_sub.part.0
	.cfi_endproc
.LFE40:
	.size	inv_num_sub, .-inv_num_sub
	.p2align 4
	.globl	inv_num
	.type	inv_num, @function
inv_num:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	leaq	0(,%rsi,8), %rdi
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	call	malloc@PLT
	cmpq	$1, %r12
	jg	.L57
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L57:
	.cfi_restore_state
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	movq	%r12, %rdx
	movq	%rbp, %rdi
	movq	%rax, %rcx
	popq	%rbp
	.cfi_def_cfa_offset 16
	xorl	%esi, %esi
	popq	%r12
	.cfi_def_cfa_offset 8
	jmp	inv_num_sub.part.0
	.cfi_endproc
.LFE41:
	.size	inv_num, .-inv_num
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%lld"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB42:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	leaq	.LC1(%rip), %rbx
	movq	%rbx, %rdi
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %r15
	leaq	0(,%r15,8), %rdi
	movq	%r15, %r13
	call	malloc@PLT
	shrq	$63, %r13
	movq	%rax, %rbp
	leaq	1(%r15), %rax
	addq	%r15, %r13
	movq	%rax, %r14
	sarq	%r13
	shrq	$63, %r14
	movq	%r13, 8(%rsp)
	addq	%rax, %r14
	sarq	%r14
	leaq	0(,%r14,8), %rdi
	call	malloc@PLT
	leaq	0(,%r13,8), %rdi
	movq	%rax, %r12
	call	malloc@PLT
	movq	%rax, (%rsp)
	testq	%r15, %r15
	jle	.L59
	movq	%rbp, %r15
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L63:
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	(%r15), %rax
	movq	%r13, %rcx
	sarq	%rcx
	subq	$1, %rax
	movq	%rax, (%r15)
	testb	$1, %r13b
	jne	.L60
	movq	%rax, (%r12,%rcx,8)
	movq	16(%rsp), %rcx
	addq	$1, %r13
	addq	$8, %r15
	cmpq	%rcx, %r13
	jl	.L63
.L62:
	testq	%rcx, %rcx
	jle	.L69
	xorl	%r15d, %r15d
	jmp	.L66
	.p2align 4,,10
	.p2align 3
.L64:
	addq	$1, %r15
	cmpq	%r15, %rcx
	je	.L59
.L66:
	movq	0(%rbp,%r15,8), %rax
	movq	%r15, %rsi
	andl	$1, %esi
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	cmpq	%rax, %rsi
	je	.L64
.L67:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L65:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L72
	addq	$40, %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
.L60:
	.cfi_restore_state
	movq	(%rsp), %rdi
	addq	$1, %r13
	addq	$8, %r15
	movq	%rax, (%rdi,%rcx,8)
	movq	16(%rsp), %rcx
	cmpq	%r13, %rcx
	jg	.L63
	jmp	.L62
.L69:
	movq	%rcx, %r15
.L59:
	movq	%r15, %rsi
	movq	%rbp, %rdi
	call	inv_num
	movl	$3, %ecx
	cqto
	idivq	%rcx
	movq	%rax, %rbx
	testq	%rdx, %rdx
	jne	.L67
	movq	%r12, %rdi
	movq	%r14, %rsi
	call	inv_num
	movq	8(%rsp), %rsi
	movq	(%rsp), %rdi
	movq	%rax, %r12
	call	inv_num
	addq	%rax, %r12
	cmpq	%r12, %rbx
	jne	.L67
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L65
.L72:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE42:
	.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:

rule
	.file	"temp.c"
	.text
	.section	.text.unlikely,"ax",@progbits
.LCOLDB0:
	.text
.LHOTB0:
	.p2align 4
	.type	inv_num_sub.part.0, @function
inv_num_sub.part.0:
.LFB43:
	.cfi_startproc
	leaq	(%rdx,%rsi), %rax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rax, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	shrq	$63, %r15
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdi, %r13
	addq	%rax, %r15
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rcx, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	sarq	%r15
	movq	%rdx, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%r15, %rax
	movq	%rsi, %rbx
	subq	%rsi, %rax
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	cmpq	$1, %rax
	jle	.L2
	movq	%r15, %rdx
	call	inv_num_sub.part.0
	movq	%rax, %r14
.L2:
	movq	%rbp, %rax
	subq	%r15, %rax
	cmpq	$1, %rax
	jle	.L3
	movq	%r12, %rcx
	movq	%rbp, %rdx
	movq	%r15, %rsi
	movq	%r13, %rdi
	call	inv_num_sub.part.0
	addq	%rax, %r14
.L3:
	cmpq	%rbx, %rbp
	jle	.L1
	leaq	0(,%rbx,8), %rdx
	movq	%rbp, %rdi
	leaq	(%r12,%rdx), %rsi
	leaq	8(%r13,%rdx), %rax
	subq	%rbx, %rdi
	cmpq	%rax, %rsi
	je	.L21
	leaq	-1(%rdi), %rax
	cmpq	$2, %rax
	jbe	.L21
	movq	%rdi, %rcx
	addq	%r13, %rdx
	xorl	%eax, %eax
	shrq	%rcx
	salq	$4, %rcx
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%rdx,%rax), %xmm0
	movups	%xmm0, (%rsi,%rax)
	addq	$16, %rax
	cmpq	%rcx, %rax
	jne	.L6
	movq	%rdi, %rdx
	andq	$-2, %rdx
	leaq	(%rdx,%rbx), %rax
	cmpq	%rdx, %rdi
	je	.L8
	movq	0(%r13,%rax,8), %rdx
	movq	%rdx, (%r12,%rax,8)
.L8:
	movq	%rbx, %rax
	movq	%r15, %rdx
	.p2align 4,,10
	.p2align 3
.L19:
	movq	(%r12,%rbx,8), %rcx
	cmpq	%rdx, %rbp
	je	.L48
	movq	(%r12,%rdx,8), %rsi
	cmpq	%rsi, %rcx
	jg	.L12
	cmpq	%rbx, %r15
	jg	.L49
.L12:
	movq	%rdx, %rcx
	addq	$1, %rdx
	subq	%rax, %rcx
	addq	%rcx, %r14
.L13:
	movq	%rsi, 0(%r13,%rax,8)
	addq	$1, %rax
	cmpq	%rax, %rbp
	jne	.L19
.L1:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r14, %rax
	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
	movq	%rcx, 0(%r13,%rax,8)
	addq	$1, %rax
	leaq	1(%rbx), %rdx
	cmpq	%rax, %rbp
	jne	.L10
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L49:
	addq	$1, %rbx
	movq	%rcx, %rsi
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%rbx, %rax
	.p2align 4,,10
	.p2align 3
.L5:
	movq	0(%r13,%rax,8), %rdx
	movq	%rdx, (%r12,%rax,8)
	addq	$1, %rax
	cmpq	%rax, %rbp
	jne	.L5
	jmp	.L8
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	inv_num_sub.part.0.cold, @function
inv_num_sub.part.0.cold:
.LFSB43:
.L10:
	.cfi_def_cfa_offset 64
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	movq	%rbp, %rcx
	leaq	0(,%rax,8), %rdi
	leaq	16(,%rbx,8), %rsi
	subq	%rax, %rcx
	leaq	0(%r13,%rdi), %r8
	leaq	-1(%rcx), %r9
	cmpq	$2, %r9
	jbe	.L14
	leaq	(%r12,%rsi), %r9
	cmpq	%r9, %r8
	je	.L14
	cmpq	%rax, %rbp
	movl	$1, %edi
	leaq	-8(%r12,%rsi), %r9
	cmovle	%rdi, %rcx
	xorl	%esi, %esi
	movq	%rcx, %rdi
	shrq	%rdi
	salq	$4, %rdi
.L15:
	movdqu	(%r9,%rsi), %xmm1
	movups	%xmm1, (%r8,%rsi)
	addq	$16, %rsi
	cmpq	%rsi, %rdi
	jne	.L15
	movq	%rcx, %rsi
	andq	$-2, %rsi
	addq	%rsi, %rdx
	addq	%rsi, %rax
	cmpq	%rsi, %rcx
	je	.L1
	movq	(%r12,%rdx,8), %rdx
	movq	%rdx, 0(%r13,%rax,8)
	jmp	.L1
.L14:
	subq	%rdi, %r12
	leaq	-8(%r12,%rsi), %rdx
.L17:
	movq	(%rdx,%rax,8), %rcx
	movq	%rcx, 0(%r13,%rax,8)
	addq	$1, %rax
	cmpq	%rax, %rbp
	jg	.L17
	jmp	.L1
	.cfi_endproc
.LFE43:
	.text
	.size	inv_num_sub.part.0, .-inv_num_sub.part.0
	.section	.text.unlikely
	.size	inv_num_sub.part.0.cold, .-inv_num_sub.part.0.cold
.LCOLDE0:
	.text
.LHOTE0:
	.p2align 4
	.globl	compare
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	subq	%rsi, %rax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.p2align 4
	.globl	inv_num_sub
	.type	inv_num_sub, @function
inv_num_sub:
.LFB40:
	.cfi_startproc
	endbr64
	movq	%rdx, %rax
	subq	%rsi, %rax
	cmpq	$1, %rax
	jg	.L53
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L53:
	jmp	inv_num_sub.part.0
	.cfi_endproc
.LFE40:
	.size	inv_num_sub, .-inv_num_sub
	.p2align 4
	.globl	inv_num
	.type	inv_num, @function
inv_num:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	leaq	0(,%rsi,8), %rdi
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	call	malloc@PLT
	cmpq	$1, %r12
	jg	.L57
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L57:
	.cfi_restore_state
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	movq	%r12, %rdx
	movq	%rbp, %rdi
	movq	%rax, %rcx
	popq	%rbp
	.cfi_def_cfa_offset 16
	xorl	%esi, %esi
	popq	%r12
	.cfi_def_cfa_offset 8
	jmp	inv_num_sub.part.0
	.cfi_endproc
.LFE41:
	.size	inv_num, .-inv_num
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%lld"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB42:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	leaq	.LC1(%rip), %rbx
	movq	%rbx, %rdi
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %r15
	leaq	0(,%r15,8), %rdi
	movq	%r15, %r13
	call	malloc@PLT
	shrq	$63, %r13
	movq	%rax, %rbp
	leaq	1(%r15), %rax
	addq	%r15, %r13
	movq	%rax, %r14
	sarq	%r13
	shrq	$63, %r14
	movq	%r13, 8(%rsp)
	addq	%rax, %r14
	sarq	%r14
	leaq	0(,%r14,8), %rdi
	call	malloc@PLT
	leaq	0(,%r13,8), %rdi
	movq	%rax, %r12
	call	malloc@PLT
	movq	%rax, (%rsp)
	testq	%r15, %r15
	jle	.L59
	movq	%rbp, %r15
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L63:
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	(%r15), %rax
	movq	%r13, %rcx
	sarq	%rcx
	subq	$1, %rax
	movq	%rax, (%r15)
	testb	$1, %r13b
	jne	.L60
	movq	%rax, (%r12,%rcx,8)
	movq	16(%rsp), %rcx
	addq	$1, %r13
	addq	$8, %r15
	cmpq	%rcx, %r13
	jl	.L63
.L62:
	testq	%rcx, %rcx
	jle	.L69
	xorl	%r15d, %r15d
	jmp	.L66
	.p2align 4,,10
	.p2align 3
.L64:
	addq	$1, %r15
	cmpq	%r15, %rcx
	je	.L59
.L66:
	movq	0(%rbp,%r15,8), %rax
	movq	%r15, %rsi
	andl	$1, %esi
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	cmpq	%rax, %rsi
	je	.L64
.L67:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L65:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L72
	addq	$40, %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
.L60:
	.cfi_restore_state
	movq	(%rsp), %rdi
	addq	$1, %r13
	addq	$8, %r15
	movq	%rax, (%rdi,%rcx,8)
	movq	16(%rsp), %rcx
	cmpq	%r13, %rcx
	jg	.L63
	jmp	.L62
.L69:
	movq	%rcx, %r15
.L59:
	movq	%r15, %rsi
	movq	%rbp, %rdi
	call	inv_num
	movl	$3, %ecx
	cqto
	idivq	%rcx
	movq	%rax, %rbx
	testq	%rdx, %rdx
	jne	.L67
	movq	%r12, %rdi
	movq	%r14, %rsi
	call	inv_num
	movq	8(%rsp), %rsi
	movq	(%rsp), %rdi
	movq	%rax, %r12
	call	inv_num
	addq	%rax, %r12
	cmpq	%r12, %rbx
	jne	.L67
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L65
.L72:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE42:
	.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:

#include <stdio.h>
#include <stdlib.h>
#define int long long
#define inv_num_valtype int

//比較関数
int compare(inv_num_valtype a, inv_num_valtype b){
	return a - b;
}

//昇順
int inv_num_sub(inv_num_valtype *origin, int left, int right, inv_num_valtype *tmp){
	int ans = 0;
	if(right - left > 1){
		int i, j, k, half = (left + right) / 2;
		ans += inv_num_sub(origin, left, half, tmp);
		ans += inv_num_sub(origin, half, right, tmp);
		for(i = left; i < right; i++){
			tmp[i] = origin[i];
		}
		for(i = left, j = left, k = half; i < right; i++){
			if(k == right){
				origin[i] = tmp[j];
				j++;
			}
			else if(compare(tmp[j], tmp[k]) <= 0 && j < half){
				origin[i] = tmp[j];
				j++;
			}
			else{
				origin[i] = tmp[k];
				ans += k - i;
				k++;
			}
		}
	}
	return ans;
}

//i < j && a[i] > a[j] となる組(i, j)の数
//effect: sortされる
int inv_num(inv_num_valtype *origin, int N){
	inv_num_valtype *tmp = (inv_num_valtype *)malloc(sizeof(inv_num_valtype) * N);
	return inv_num_sub(origin, 0, N, tmp);
}

int main(){
	int N, i;
	scanf("%lld", &N);
	int *p = (int *)malloc(sizeof(int) * N);
	int N1 = (N + 1) / 2, N2 = N / 2;
	int *p_even = (int *)malloc(sizeof(int) * N1);
	int *p_odd = (int *)malloc(sizeof(int) * N2);
	for(i = 0; i < N; i++){
		scanf("%lld", &p[i]);
		p[i]--;
		if(i % 2 == 0){
			p_even[i / 2] = p[i];
		}
		else{
			p_odd[i / 2] = p[i];
		}
	}
	for(i = 0; i < N; i++){
		if(i % 2 != p[i] % 2){
			printf("No\n");
			return 0;
		}
	}
	int p_inv_num = inv_num(p, N);
	if(p_inv_num % 3 != 0){
		printf("No\n");
		return 0;
	}
	if(p_inv_num / 3 != inv_num(p_even, N1) + inv_num(p_odd, N2)){
		printf("No\n");
		return 0;
	}
	printf("Yes\n");
	return 0;
}
6
5
3
8
1
2
6
 4
3
2
3
1
 6
5
3
8
1
2
3
 4
3
2
2
1
 6
4
3
8
1
2
3
 4
3
1
2
1
 4
6
1
2
1
 4
10
1
2
1
 4
10
1
2
2
 4
10
1
2
4

No
 No
 No
 No
 No
 No
 No
 No
 No
 No

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>
#define int long long
#define inv_num_valtype int

//比較関数
int compare(inv_num_valtype a, inv_num_valtype b){
	return a - b;
}

//昇順
int inv_num_sub(inv_num_valtype *origin, int left, int right, inv_num_valtype *tmp){
	int ans = 0;
	if(right - left > 1){
		int i, j, k, half = (left + right) / 2;
		ans += inv_num_sub(origin, left, half, tmp);
		ans += inv_num_sub(origin, half, right, tmp);
		for(i = left; i < right; i++){
			tmp[i] = origin[i];
		}
		for(i = left, j = left, k = half; i < right; i++){
			if(k == right){
				origin[i] = tmp[j];
				j++;
			}
			else if(compare(tmp[j], tmp[k]) <= 0 && j < half){
				origin[i] = tmp[j];
				j++;
			}
			else{
				origin[i] = tmp[k];
				ans += k - i;
				k++;
			}
		}
	}
	return ans;
}

//i < j && a[i] > a[j] となる組(i, j)の数
//effect: sortされる
int inv_num(inv_num_valtype *origin, int N){
	inv_num_valtype *tmp = (inv_num_valtype *)malloc(sizeof(inv_num_valtype) * N);
	return inv_num_sub(origin, 0, N, tmp);
}

int main(){
	int N, i;
	scanf("%lld", &N);
	int *p = (int *)malloc(sizeof(int) * N);
	int N1 = (N + 1) / 2, N2 = N / 2;
	int *p_even = (int *)malloc(sizeof(int) * N1);
	int *p_odd = (int *)malloc(sizeof(int) * N2);
	for(i = 0; i < N; i++){
		scanf("%lld", &p[i]);
		p[i]--;
		if(i % 2 == 0){
			p_even[i / 2] = p[i];
		}
		else{
			p_odd[i / 2] = p[i];
		}
	}
	for(i = 0; i < N; i++){
		if(i % 2 != p[i] % 2){
			printf("No\n");
			return 0;
		}
	}
	int p_inv_num = inv_num(p, N);
	if(p_inv_num % 3 != 0){
		printf("No\n");
		return 0;
	}
	if(p_inv_num / 3 != inv_num(p_even, N1) + inv_num(p_odd, N2)){
		printf("No\n");
		return 0;
	}
	printf("Yes\n");
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	compare
	.type	compare, @function
compare:
.LFB6:
	.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
	subq	-16(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare, .-compare
	.globl	inv_num_sub
	.type	inv_num_sub, @function
inv_num_sub:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$80, %rsp
	movq	%rdi, -56(%rbp)
	movq	%rsi, -64(%rbp)
	movq	%rdx, -72(%rbp)
	movq	%rcx, -80(%rbp)
	movq	$0, -40(%rbp)
	movq	-72(%rbp), %rax
	subq	-64(%rbp), %rax
	cmpq	$1, %rax
	jle	.L4
	movq	-64(%rbp), %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -8(%rbp)
	movq	-80(%rbp), %rcx
	movq	-8(%rbp), %rdx
	movq	-64(%rbp), %rsi
	movq	-56(%rbp), %rax
	movq	%rax, %rdi
	call	inv_num_sub
	addq	%rax, -40(%rbp)
	movq	-80(%rbp), %rcx
	movq	-72(%rbp), %rdx
	movq	-8(%rbp), %rsi
	movq	-56(%rbp), %rax
	movq	%rax, %rdi
	call	inv_num_sub
	addq	%rax, -40(%rbp)
	movq	-64(%rbp), %rax
	movq	%rax, -32(%rbp)
	jmp	.L5
.L6:
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movq	-32(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-80(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	addq	$1, -32(%rbp)
.L5:
	movq	-32(%rbp), %rax
	cmpq	-72(%rbp), %rax
	jl	.L6
	movq	-64(%rbp), %rax
	movq	%rax, -32(%rbp)
	movq	-64(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, -16(%rbp)
	jmp	.L7
.L11:
	movq	-16(%rbp), %rax
	cmpq	-72(%rbp), %rax
	jne	.L8
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	-32(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-56(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	addq	$1, -24(%rbp)
	jmp	.L9
.L8:
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-80(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	compare
	testq	%rax, %rax
	jg	.L10
	movq	-24(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jge	.L10
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	-32(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-56(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	addq	$1, -24(%rbp)
	jmp	.L9
.L10:
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	-32(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-56(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	movq	-16(%rbp), %rax
	subq	-32(%rbp), %rax
	addq	%rax, -40(%rbp)
	addq	$1, -16(%rbp)
.L9:
	addq	$1, -32(%rbp)
.L7:
	movq	-32(%rbp), %rax
	cmpq	-72(%rbp), %rax
	jl	.L11
.L4:
	movq	-40(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	inv_num_sub, .-inv_num_sub
	.globl	inv_num
	.type	inv_num, @function
inv_num:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-32(%rbp), %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rcx
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	inv_num_sub
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	inv_num, .-inv_num
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"No"
.LC2:
	.string	"Yes"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$80, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-88(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-88(%rbp), %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -72(%rbp)
	movq	-88(%rbp), %rax
	addq	$1, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -64(%rbp)
	movq	-88(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -56(%rbp)
	movq	-64(%rbp), %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -48(%rbp)
	movq	-56(%rbp), %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -40(%rbp)
	movq	$0, -80(%rbp)
	jmp	.L16
.L19:
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	subq	$1, %rdx
	movq	%rdx, (%rax)
	movq	-80(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	jne	.L17
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movq	-80(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	leaq	0(,%rax,8), %rdx
	movq	-48(%rbp), %rax
	addq	%rax, %rdx
	movq	(%rcx), %rax
	movq	%rax, (%rdx)
	jmp	.L18
.L17:
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movq	-80(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movq	(%rcx), %rax
	movq	%rax, (%rdx)
.L18:
	addq	$1, -80(%rbp)
.L16:
	movq	-88(%rbp), %rax
	cmpq	%rax, -80(%rbp)
	jl	.L19
	movq	$0, -80(%rbp)
	jmp	.L20
.L23:
	movq	-80(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	cmpq	%rax, %rcx
	je	.L21
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L26
.L21:
	addq	$1, -80(%rbp)
.L20:
	movq	-88(%rbp), %rax
	cmpq	%rax, -80(%rbp)
	jl	.L23
	movq	-88(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	inv_num
	movq	%rax, -32(%rbp)
	movq	-32(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rsi
	sarq	$63, %rsi
	movq	%rdx, %rax
	subq	%rsi, %rax
	movq	%rax, %rdx
	addq	%rdx, %rdx
	addq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	testq	%rax, %rax
	je	.L24
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L26
.L24:
	movq	-32(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	movq	%rdx, %rbx
	subq	%rax, %rbx
	movq	-64(%rbp), %rdx
	movq	-48(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	inv_num
	movq	%rax, %r12
	movq	-56(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	inv_num
	addq	%r12, %rax
	cmpq	%rax, %rbx
	je	.L25
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L26
.L25:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L26:
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	addq	$80, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	compare
	.type	compare, @function
compare:
.LFB6:
	.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
	subq	-16(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare, .-compare
	.globl	inv_num_sub
	.type	inv_num_sub, @function
inv_num_sub:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$80, %rsp
	movq	%rdi, -56(%rbp)
	movq	%rsi, -64(%rbp)
	movq	%rdx, -72(%rbp)
	movq	%rcx, -80(%rbp)
	movq	$0, -40(%rbp)
	movq	-72(%rbp), %rax
	subq	-64(%rbp), %rax
	cmpq	$1, %rax
	jle	.L4
	movq	-64(%rbp), %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -8(%rbp)
	movq	-80(%rbp), %rcx
	movq	-8(%rbp), %rdx
	movq	-64(%rbp), %rsi
	movq	-56(%rbp), %rax
	movq	%rax, %rdi
	call	inv_num_sub
	addq	%rax, -40(%rbp)
	movq	-80(%rbp), %rcx
	movq	-72(%rbp), %rdx
	movq	-8(%rbp), %rsi
	movq	-56(%rbp), %rax
	movq	%rax, %rdi
	call	inv_num_sub
	addq	%rax, -40(%rbp)
	movq	-64(%rbp), %rax
	movq	%rax, -32(%rbp)
	jmp	.L5
.L6:
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movq	-32(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-80(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	addq	$1, -32(%rbp)
.L5:
	movq	-32(%rbp), %rax
	cmpq	-72(%rbp), %rax
	jl	.L6
	movq	-64(%rbp), %rax
	movq	%rax, -32(%rbp)
	movq	-64(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, -16(%rbp)
	jmp	.L7
.L11:
	movq	-16(%rbp), %rax
	cmpq	-72(%rbp), %rax
	jne	.L8
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	-32(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-56(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	addq	$1, -24(%rbp)
	jmp	.L9
.L8:
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-80(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	compare
	testq	%rax, %rax
	jg	.L10
	movq	-24(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jge	.L10
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	-32(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-56(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	addq	$1, -24(%rbp)
	jmp	.L9
.L10:
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	-32(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-56(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	movq	-16(%rbp), %rax
	subq	-32(%rbp), %rax
	addq	%rax, -40(%rbp)
	addq	$1, -16(%rbp)
.L9:
	addq	$1, -32(%rbp)
.L7:
	movq	-32(%rbp), %rax
	cmpq	-72(%rbp), %rax
	jl	.L11
.L4:
	movq	-40(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	inv_num_sub, .-inv_num_sub
	.globl	inv_num
	.type	inv_num, @function
inv_num:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-32(%rbp), %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rcx
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	inv_num_sub
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	inv_num, .-inv_num
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"No"
.LC2:
	.string	"Yes"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$80, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-88(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-88(%rbp), %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -72(%rbp)
	movq	-88(%rbp), %rax
	addq	$1, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -64(%rbp)
	movq	-88(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -56(%rbp)
	movq	-64(%rbp), %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -48(%rbp)
	movq	-56(%rbp), %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -40(%rbp)
	movq	$0, -80(%rbp)
	jmp	.L16
.L19:
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	subq	$1, %rdx
	movq	%rdx, (%rax)
	movq	-80(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	jne	.L17
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movq	-80(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	leaq	0(,%rax,8), %rdx
	movq	-48(%rbp), %rax
	addq	%rax, %rdx
	movq	(%rcx), %rax
	movq	%rax, (%rdx)
	jmp	.L18
.L17:
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movq	-80(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movq	(%rcx), %rax
	movq	%rax, (%rdx)
.L18:
	addq	$1, -80(%rbp)
.L16:
	movq	-88(%rbp), %rax
	cmpq	%rax, -80(%rbp)
	jl	.L19
	movq	$0, -80(%rbp)
	jmp	.L20
.L23:
	movq	-80(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-80(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	cmpq	%rax, %rcx
	je	.L21
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L26
.L21:
	addq	$1, -80(%rbp)
.L20:
	movq	-88(%rbp), %rax
	cmpq	%rax, -80(%rbp)
	jl	.L23
	movq	-88(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	inv_num
	movq	%rax, -32(%rbp)
	movq	-32(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rsi
	sarq	$63, %rsi
	movq	%rdx, %rax
	subq	%rsi, %rax
	movq	%rax, %rdx
	addq	%rdx, %rdx
	addq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	testq	%rax, %rax
	je	.L24
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L26
.L24:
	movq	-32(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	movq	%rdx, %rbx
	subq	%rax, %rbx
	movq	-64(%rbp), %rdx
	movq	-48(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	inv_num
	movq	%rax, %r12
	movq	-56(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	inv_num
	addq	%r12, %rax
	cmpq	%rax, %rbx
	je	.L25
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L26
.L25:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L26:
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	addq	$80, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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:
