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>

#define N	300000

int min(int a, int b) { return a < b ? a : b; }

int main() {
	static int ii[N];
	static char safe[N];
	int n, i, a, b, c;

	scanf("%d", &n);
	for (i = 0; i < n; i++) {
		scanf("%d", &a), a--;
		ii[a] = i;
	}
	for (b = n - 1; b >= 0; b = a - 1) {
		i = ii[b], a = b;
		while (i < a)
			i = min(i, ii[--a]);
		for (c = b - 1; c >= a; c -= 2)
			if (ii[c] != c) {
				printf("No\n");
				return 0;
			}
		i = -1;
		for (c = a + (a + b) % 2; c <= b; c += 2)
			if (i < ii[c])
				i = ii[c], safe[c] = 1;
		i = n;
		for (c = b; c >= a; c -= 2) {
			if (!safe[c] && i < ii[c]) {
				printf("No\n");
				return 0;
			}
			i = min(i, ii[c]);
		}
	}
	printf("Yes\n");
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	min
	.type	min, @function
min:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	min, .-min
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"No"
.LC2:
	.string	"Yes"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L4
.L5:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	ii.1(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L4:
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L5
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	.L6
.L19:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.1(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -24(%rbp)
	jmp	.L7
.L8:
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.1(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movl	%eax, -20(%rbp)
.L7:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L8
	movl	-16(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L9
.L12:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.1(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	je	.L10
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L20
.L10:
	subl	$2, -12(%rbp)
.L9:
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L12
	movl	$-1, -20(%rbp)
	movl	-24(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	jmp	.L13
.L15:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.1(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L14
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.1(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	safe.0(%rip), %rdx
	movb	$1, (%rax,%rdx)
.L14:
	addl	$2, -12(%rbp)
.L13:
	movl	-12(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jle	.L15
	movl	-28(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L16
.L18:
	movl	-12(%rbp), %eax
	cltq
	leaq	safe.0(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L17
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.1(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L17
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L20
.L17:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.1(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movl	%eax, -20(%rbp)
	subl	$2, -12(%rbp)
.L16:
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L18
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -16(%rbp)
.L6:
	cmpl	$0, -16(%rbp)
	jns	.L19
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L20:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.local	ii.1
	.comm	ii.1,1200000,32
	.local	safe.0
	.comm	safe.0,300000,32
	.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	min
	.type	min, @function
min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"No"
.LC2:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r9d
	testl	%r9d, %r9d
	jle	.L4
	xorl	%ebp, %ebp
	leaq	4(%rsp), %r13
	leaq	ii.1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	movl	(%rsp), %r9d
	subl	$1, %eax
	movl	%eax, 4(%rsp)
	cltq
	movl	%ebp, (%rbx,%rax,4)
	addl	$1, %ebp
	cmpl	%ebp, %r9d
	jg	.L5
.L4:
	movl	%r9d, %r11d
	subl	$1, %r11d
	js	.L6
	leaq	ii.1(%rip), %rbx
	leaq	safe.0(%rip), %r10
.L21:
	movslq	%r11d, %rsi
	movl	(%rbx,%rsi,4), %ecx
	cmpl	%r11d, %ecx
	jge	.L23
	leal	-1(%r11), %eax
	movslq	%eax, %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%rbx,%rdx,4), %r8d
	movl	%edx, %edi
	cmpl	%r8d, %ecx
	cmovg	%r8d, %ecx
	subq	$1, %rdx
	leal	1(%rdx), %r8d
	cmpl	%r8d, %ecx
	jl	.L8
.L7:
	cmpl	%edi, %eax
	jl	.L9
	cltq
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	subq	$2, %rax
	cmpl	%eax, %edi
	jg	.L9
.L12:
	cmpl	%eax, (%rbx,%rax,4)
	je	.L10
.L33:
	movl	%edi, 4(%rsp)
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L11:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L34
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	leal	(%rdi,%r11), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	leal	(%rax,%rcx), %edx
	andl	$1, %edx
	subl	%ecx, %edx
	movl	$-1, %ecx
	addl	%edi, %edx
	movslq	%edx, %rax
	cmpl	%r11d, %edx
	jg	.L18
	.p2align 4,,10
	.p2align 3
.L17:
	movl	(%rbx,%rax,4), %edx
	cmpl	%ecx, %edx
	jle	.L16
	movb	$1, (%r10,%rax)
	movl	%edx, %ecx
.L16:
	addq	$2, %rax
	cmpl	%eax, %r11d
	jge	.L17
.L18:
	movq	%rsi, %rax
	movl	%r9d, %edx
	cmpl	%r11d, %edi
	jg	.L15
	.p2align 4,,10
	.p2align 3
.L20:
	cmpb	$0, (%r10,%rax)
	jne	.L19
	cmpl	%edx, (%rbx,%rax,4)
	jg	.L33
.L19:
	movl	(%rbx,%rax,4), %ecx
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	subq	$2, %rax
	cmpl	%eax, %edi
	jle	.L20
.L15:
	movl	%edi, %r11d
	subl	$1, %r11d
	jns	.L21
	movl	%edi, 4(%rsp)
.L6:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L11
.L23:
	movl	%r11d, %edi
	leal	-1(%r11), %eax
	jmp	.L7
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.local	safe.0
	.comm	safe.0,300000,32
	.local	ii.1
	.comm	ii.1,1200000,32
	.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	min
	.type	min, @function
min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"No"
.LC2:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r9d
	testl	%r9d, %r9d
	jle	.L4
	xorl	%ebp, %ebp
	leaq	4(%rsp), %r13
	leaq	ii.1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	movl	(%rsp), %r9d
	subl	$1, %eax
	movl	%eax, 4(%rsp)
	cltq
	movl	%ebp, (%rbx,%rax,4)
	addl	$1, %ebp
	cmpl	%ebp, %r9d
	jg	.L5
.L4:
	movl	%r9d, %r11d
	subl	$1, %r11d
	js	.L6
	leaq	ii.1(%rip), %rbx
	leaq	safe.0(%rip), %r10
.L21:
	movslq	%r11d, %rsi
	movl	(%rbx,%rsi,4), %ecx
	cmpl	%r11d, %ecx
	jge	.L23
	leal	-1(%r11), %eax
	movslq	%eax, %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%rbx,%rdx,4), %r8d
	movl	%edx, %edi
	cmpl	%r8d, %ecx
	cmovg	%r8d, %ecx
	subq	$1, %rdx
	leal	1(%rdx), %r8d
	cmpl	%r8d, %ecx
	jl	.L8
.L7:
	cmpl	%edi, %eax
	jl	.L9
	cltq
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	subq	$2, %rax
	cmpl	%eax, %edi
	jg	.L9
.L12:
	cmpl	%eax, (%rbx,%rax,4)
	je	.L10
.L33:
	movl	%edi, 4(%rsp)
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L11:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L34
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	leal	(%rdi,%r11), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	leal	(%rax,%rcx), %edx
	andl	$1, %edx
	subl	%ecx, %edx
	movl	$-1, %ecx
	addl	%edi, %edx
	movslq	%edx, %rax
	cmpl	%r11d, %edx
	jg	.L18
	.p2align 4,,10
	.p2align 3
.L17:
	movl	(%rbx,%rax,4), %edx
	cmpl	%ecx, %edx
	jle	.L16
	movb	$1, (%r10,%rax)
	movl	%edx, %ecx
.L16:
	addq	$2, %rax
	cmpl	%eax, %r11d
	jge	.L17
.L18:
	movq	%rsi, %rax
	movl	%r9d, %edx
	cmpl	%r11d, %edi
	jg	.L15
	.p2align 4,,10
	.p2align 3
.L20:
	cmpb	$0, (%r10,%rax)
	jne	.L19
	cmpl	%edx, (%rbx,%rax,4)
	jg	.L33
.L19:
	movl	(%rbx,%rax,4), %ecx
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	subq	$2, %rax
	cmpl	%eax, %edi
	jle	.L20
.L15:
	movl	%edi, %r11d
	subl	$1, %r11d
	jns	.L21
	movl	%edi, 4(%rsp)
.L6:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L11
.L23:
	movl	%r11d, %edi
	leal	-1(%r11), %eax
	jmp	.L7
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.local	safe.0
	.comm	safe.0,300000,32
	.local	ii.1
	.comm	ii.1,1200000,32
	.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>

#define N	300000

int min(int a, int b) { return a < b ? a : b; }

int main() {
	static int ii[N];
	static char safe[N];
	int n, i, a, b, c;

	scanf("%d", &n);
	for (i = 0; i < n; i++) {
		scanf("%d", &a), a--;
		ii[a] = i;
	}
	for (b = n - 1; b >= 0; b = a - 1) {
		i = ii[b], a = b;
		while (i < a)
			i = min(i, ii[--a]);
		for (c = b - 1; c >= a; c -= 2)
			if (ii[c] != c) {
				printf("No\n");
				return 0;
			}
		i = -1;
		for (c = a + (a + b) % 2; c <= b; c += 2)
			if (i < ii[c])
				i = ii[c], safe[c] = 1;
		i = n;
		for (c = b; c >= a; c -= 2) {
			if (!safe[c] && i < ii[c]) {
				printf("No\n");
				return 0;
			}
			i = min(i, ii[c]);
		}
	}
	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>

#define N	300000

int min(int a, int b) { return a < b ? a : b; }

int main() {
	static int ii[N];
	static char safe[N];
	int n, i, a, b, c;

	scanf("%d", &n);
	for (i = 0; i < n; i++) {
		scanf("%d", &a), a--;
		ii[a] = i;
	}
	for (b = n - 1; b >= 0; b = a - 1) {
		i = ii[b], a = b;
		while (i < a)
			i = min(i, ii[--a]);
		for (c = b - 1; c >= a; c -= 2)
			if (ii[c] != c) {
				printf("No\n");
				return 0;
			}
		i = -1;
		for (c = a + (a + b) % 2; c <= b; c += 2)
			if (i < ii[c])
				i = ii[c], safe[c] = 1;
		i = n;
		for (c = b; c >= a; c -= 2) {
			if (!safe[c] && i < ii[c]) {
				printf("No\n");
				return 0;
			}
			i = min(i, ii[c]);
		}
	}
	printf("Yes\n");
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	min
	.type	min, @function
min:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	min, .-min
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"No"
.LC2:
	.string	"Yes"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L4
.L5:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	ii.1(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L4:
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L5
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	.L6
.L19:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.1(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -24(%rbp)
	jmp	.L7
.L8:
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.1(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movl	%eax, -20(%rbp)
.L7:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L8
	movl	-16(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L9
.L12:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.1(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	je	.L10
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L20
.L10:
	subl	$2, -12(%rbp)
.L9:
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L12
	movl	$-1, -20(%rbp)
	movl	-24(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	jmp	.L13
.L15:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.1(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L14
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.1(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	safe.0(%rip), %rdx
	movb	$1, (%rax,%rdx)
.L14:
	addl	$2, -12(%rbp)
.L13:
	movl	-12(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jle	.L15
	movl	-28(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L16
.L18:
	movl	-12(%rbp), %eax
	cltq
	leaq	safe.0(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L17
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.1(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L17
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L20
.L17:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.1(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movl	%eax, -20(%rbp)
	subl	$2, -12(%rbp)
.L16:
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L18
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -16(%rbp)
.L6:
	cmpl	$0, -16(%rbp)
	jns	.L19
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L20:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.local	ii.1
	.comm	ii.1,1200000,32
	.local	safe.0
	.comm	safe.0,300000,32
	.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	min
	.type	min, @function
min:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	min, .-min
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"No"
.LC2:
	.string	"Yes"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L4
.L5:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	ii.1(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L4:
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L5
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	.L6
.L19:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.1(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -24(%rbp)
	jmp	.L7
.L8:
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.1(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movl	%eax, -20(%rbp)
.L7:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L8
	movl	-16(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L9
.L12:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.1(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	je	.L10
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L20
.L10:
	subl	$2, -12(%rbp)
.L9:
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L12
	movl	$-1, -20(%rbp)
	movl	-24(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	jmp	.L13
.L15:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.1(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L14
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.1(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	safe.0(%rip), %rdx
	movb	$1, (%rax,%rdx)
.L14:
	addl	$2, -12(%rbp)
.L13:
	movl	-12(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jle	.L15
	movl	-28(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L16
.L18:
	movl	-12(%rbp), %eax
	cltq
	leaq	safe.0(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L17
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.1(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L17
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L20
.L17:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ii.1(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movl	%eax, -20(%rbp)
	subl	$2, -12(%rbp)
.L16:
	movl	-24(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L18
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -16(%rbp)
.L6:
	cmpl	$0, -16(%rbp)
	jns	.L19
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L20:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.local	ii.1
	.comm	ii.1,1200000,32
	.local	safe.0
	.comm	safe.0,300000,32
	.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:
