Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int min(int a, int b) {
	if (a < b) { return a; }
	else { return b; }
}

int max(int a, int b) {
	if (a > b) { return a; }
	else { return b; }
}

int dp[5005][5005];

int main() {

	int N;

	char S[5005];

	scanf("%d",&N);

	scanf("%s",S);

	int i, j;

	for (i = N - 1; i >= 0; i--) {
		for (j = N - 1; j >= 0; j--) {
			if (S[i] == S[j]){
				dp[i][j] = dp[i + 1][j + 1] + 1;
			}
			else{
				dp[i][j] = 0;
			}
		}
	}

	int ans = 0;

	for (i = 0; i < N; i++) {
		for (j = 0; j < N; j++) {
			if (i < j) {
				int v = min(dp[i][j],j-i);
				ans = max(ans,v);
			}
		}
	}

	printf("%d\n",ans);

	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	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L2
	movl	-4(%rbp), %eax
	jmp	.L3
.L2:
	movl	-8(%rbp), %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	min, .-min
	.globl	max
	.type	max, @function
max:
.LFB1:
	.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	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L5
	movl	-4(%rbp), %eax
	jmp	.L6
.L5:
	movl	-8(%rbp), %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	max, .-max
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 100200100
dp:
	.zero	100200100
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$960, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-5044(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-5024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-5044(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -5040(%rbp)
	jmp	.L8
.L13:
	movl	-5044(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -5036(%rbp)
	jmp	.L9
.L12:
	movl	-5040(%rbp), %eax
	cltq
	movzbl	-5024(%rbp,%rax), %edx
	movl	-5036(%rbp), %eax
	cltq
	movzbl	-5024(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L10
	movl	-5040(%rbp), %eax
	leal	1(%rax), %edx
	movl	-5036(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$5005, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-5036(%rbp), %eax
	movslq	%eax, %rdx
	movl	-5040(%rbp), %eax
	cltq
	imulq	$5005, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L11
.L10:
	movl	-5036(%rbp), %eax
	movslq	%eax, %rdx
	movl	-5040(%rbp), %eax
	cltq
	imulq	$5005, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	$0, (%rdx,%rax)
.L11:
	subl	$1, -5036(%rbp)
.L9:
	cmpl	$0, -5036(%rbp)
	jns	.L12
	subl	$1, -5040(%rbp)
.L8:
	cmpl	$0, -5040(%rbp)
	jns	.L13
	movl	$0, -5032(%rbp)
	movl	$0, -5040(%rbp)
	jmp	.L14
.L18:
	movl	$0, -5036(%rbp)
	jmp	.L15
.L17:
	movl	-5040(%rbp), %eax
	cmpl	-5036(%rbp), %eax
	jge	.L16
	movl	-5036(%rbp), %eax
	subl	-5040(%rbp), %eax
	movl	%eax, %edx
	movl	-5036(%rbp), %eax
	movslq	%eax, %rcx
	movl	-5040(%rbp), %eax
	cltq
	imulq	$5005, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movl	%eax, -5028(%rbp)
	movl	-5028(%rbp), %edx
	movl	-5032(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	max
	movl	%eax, -5032(%rbp)
.L16:
	addl	$1, -5036(%rbp)
.L15:
	movl	-5044(%rbp), %eax
	cmpl	%eax, -5036(%rbp)
	jl	.L17
	addl	$1, -5040(%rbp)
.L14:
	movl	-5044(%rbp), %eax
	cmpl	%eax, -5040(%rbp)
	jl	.L18
	movl	-5032(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	min
	.type	min, @function
min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovge	%edi, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	max, .-max
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4120
	orq	$0, (%rsp)
	subq	$952, %rsp
	.cfi_def_cfa_offset 5072
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 5032(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %rbx
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r9d
	movl	%r9d, %ebp
	subl	$1, %ebp
	js	.L5
	movslq	%ebp, %rbp
	movslq	%r9d, %r10
	leaq	dp(%rip), %r11
	movl	%r9d, %r8d
	imulq	$20020, %rbp, %rcx
	addq	%rbx, %r10
	addq	%r11, %rcx
	.p2align 4,,10
	.p2align 3
.L6:
	movslq	%r8d, %rdi
	movzbl	-1(%r10), %esi
	movq	%rbp, %rax
	imulq	$5005, %rdi, %rdi
	.p2align 4,,10
	.p2align 3
.L10:
	cmpb	(%rbx,%rax), %sil
	je	.L27
	movl	$0, (%rcx,%rax,4)
	subq	$1, %rax
	testl	%eax, %eax
	jns	.L10
.L9:
	subq	$1, %r10
	subq	$20020, %rcx
	subl	$1, %r8d
	jne	.L6
.L5:
	testl	%r9d, %r9d
	jle	.L17
	movl	%r9d, %edi
	leaq	dp(%rip), %r10
	xorl	%r8d, %r8d
	xorl	%esi, %esi
	movl	$1, %r11d
	.p2align 4,,10
	.p2align 3
.L15:
	cmpl	$1, %r9d
	je	.L12
	movl	%r11d, %eax
	movl	$1, %edx
	subl	%esi, %eax
	.p2align 4,,10
	.p2align 3
.L14:
	cmpl	%edx, %esi
	jge	.L13
	movl	(%r10,%rdx,4), %ecx
	cmpl	%ecx, %eax
	cmovle	%eax, %ecx
	cmpl	%ecx, %r8d
	cmovl	%ecx, %r8d
.L13:
	addl	$1, %eax
	addq	$1, %rdx
	cmpl	%eax, %edi
	jne	.L14
.L12:
	addl	$1, %esi
	subl	$1, %edi
	addq	$20020, %r10
	cmpl	%esi, %r9d
	jne	.L15
.L11:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	5032(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$5048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	leal	1(%rax), %edx
	movslq	%edx, %rdx
	addq	%rdi, %rdx
	movl	(%r11,%rdx,4), %edx
	addl	$1, %edx
	movl	%edx, (%rcx,%rax,4)
	subq	$1, %rax
	testl	%eax, %eax
	jns	.L10
	jmp	.L9
.L17:
	xorl	%r8d, %r8d
	jmp	.L11
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 100200100
dp:
	.zero	100200100
	.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	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovge	%edi, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	max, .-max
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4120
	orq	$0, (%rsp)
	subq	$952, %rsp
	.cfi_def_cfa_offset 5072
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 5032(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %rbx
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r9d
	movl	%r9d, %ebp
	subl	$1, %ebp
	js	.L5
	movslq	%ebp, %rbp
	movslq	%r9d, %r10
	leaq	dp(%rip), %r11
	movl	%r9d, %r8d
	imulq	$20020, %rbp, %rcx
	addq	%rbx, %r10
	addq	%r11, %rcx
	.p2align 4,,10
	.p2align 3
.L6:
	movslq	%r8d, %rdi
	movzbl	-1(%r10), %esi
	movq	%rbp, %rax
	imulq	$5005, %rdi, %rdi
	.p2align 4,,10
	.p2align 3
.L10:
	cmpb	(%rbx,%rax), %sil
	je	.L27
	movl	$0, (%rcx,%rax,4)
	subq	$1, %rax
	testl	%eax, %eax
	jns	.L10
.L9:
	subq	$1, %r10
	subq	$20020, %rcx
	subl	$1, %r8d
	jne	.L6
.L5:
	testl	%r9d, %r9d
	jle	.L17
	movl	%r9d, %edi
	leaq	dp(%rip), %r10
	xorl	%r8d, %r8d
	xorl	%esi, %esi
	movl	$1, %r11d
	.p2align 4,,10
	.p2align 3
.L15:
	cmpl	$1, %r9d
	je	.L12
	movl	%r11d, %eax
	movl	$1, %edx
	subl	%esi, %eax
	.p2align 4,,10
	.p2align 3
.L14:
	cmpl	%edx, %esi
	jge	.L13
	movl	(%r10,%rdx,4), %ecx
	cmpl	%ecx, %eax
	cmovle	%eax, %ecx
	cmpl	%ecx, %r8d
	cmovl	%ecx, %r8d
.L13:
	addl	$1, %eax
	addq	$1, %rdx
	cmpl	%eax, %edi
	jne	.L14
.L12:
	addl	$1, %esi
	subl	$1, %edi
	addq	$20020, %r10
	cmpl	%esi, %r9d
	jne	.L15
.L11:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	5032(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$5048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	leal	1(%rax), %edx
	movslq	%edx, %rdx
	addq	%rdi, %rdx
	movl	(%r11,%rdx,4), %edx
	addl	$1, %edx
	movl	%edx, (%rcx,%rax,4)
	subq	$1, %rax
	testl	%eax, %eax
	jns	.L10
	jmp	.L9
.L17:
	xorl	%r8d, %r8d
	jmp	.L11
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 100200100
dp:
	.zero	100200100
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>

int min(int a, int b) {
	if (a < b) { return a; }
	else { return b; }
}

int max(int a, int b) {
	if (a > b) { return a; }
	else { return b; }
}

int dp[5005][5005];

int main() {

	int N;

	char S[5005];

	scanf("%d",&N);

	scanf("%s",S);

	int i, j;

	for (i = N - 1; i >= 0; i--) {
		for (j = N - 1; j >= 0; j--) {
			if (S[i] == S[j]){
				dp[i][j] = dp[i + 1][j + 1] + 1;
			}
			else{
				dp[i][j] = 0;
			}
		}
	}

	int ans = 0;

	for (i = 0; i < N; i++) {
		for (j = 0; j < N; j++) {
			if (i < j) {
				int v = min(dp[i][j],j-i);
				ans = max(ans,v);
			}
		}
	}

	printf("%d\n",ans);

	return 0;
}
13
strangeoranfe
 2
wy
 5
`baba
 5
abac`
 13
efnaroegnarts
 2
vy
 5
abab`
 13
efnarotgnares
 2
yx
 13
serangtoranfe

3
 0
 2
 1
 3
 0
 2
 3
 0
 3

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int min(int a, int b) {
	if (a < b) { return a; }
	else { return b; }
}

int max(int a, int b) {
	if (a > b) { return a; }
	else { return b; }
}

int dp[5005][5005];

int main() {

	int N;

	char S[5005];

	scanf("%d",&N);

	scanf("%s",S);

	int i, j;

	for (i = N - 1; i >= 0; i--) {
		for (j = N - 1; j >= 0; j--) {
			if (S[i] == S[j]){
				dp[i][j] = dp[i + 1][j + 1] + 1;
			}
			else{
				dp[i][j] = 0;
			}
		}
	}

	int ans = 0;

	for (i = 0; i < N; i++) {
		for (j = 0; j < N; j++) {
			if (i < j) {
				int v = min(dp[i][j],j-i);
				ans = max(ans,v);
			}
		}
	}

	printf("%d\n",ans);

	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	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L2
	movl	-4(%rbp), %eax
	jmp	.L3
.L2:
	movl	-8(%rbp), %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	min, .-min
	.globl	max
	.type	max, @function
max:
.LFB1:
	.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	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L5
	movl	-4(%rbp), %eax
	jmp	.L6
.L5:
	movl	-8(%rbp), %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	max, .-max
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 100200100
dp:
	.zero	100200100
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$960, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-5044(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-5024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-5044(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -5040(%rbp)
	jmp	.L8
.L13:
	movl	-5044(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -5036(%rbp)
	jmp	.L9
.L12:
	movl	-5040(%rbp), %eax
	cltq
	movzbl	-5024(%rbp,%rax), %edx
	movl	-5036(%rbp), %eax
	cltq
	movzbl	-5024(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L10
	movl	-5040(%rbp), %eax
	leal	1(%rax), %edx
	movl	-5036(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$5005, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-5036(%rbp), %eax
	movslq	%eax, %rdx
	movl	-5040(%rbp), %eax
	cltq
	imulq	$5005, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L11
.L10:
	movl	-5036(%rbp), %eax
	movslq	%eax, %rdx
	movl	-5040(%rbp), %eax
	cltq
	imulq	$5005, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	$0, (%rdx,%rax)
.L11:
	subl	$1, -5036(%rbp)
.L9:
	cmpl	$0, -5036(%rbp)
	jns	.L12
	subl	$1, -5040(%rbp)
.L8:
	cmpl	$0, -5040(%rbp)
	jns	.L13
	movl	$0, -5032(%rbp)
	movl	$0, -5040(%rbp)
	jmp	.L14
.L18:
	movl	$0, -5036(%rbp)
	jmp	.L15
.L17:
	movl	-5040(%rbp), %eax
	cmpl	-5036(%rbp), %eax
	jge	.L16
	movl	-5036(%rbp), %eax
	subl	-5040(%rbp), %eax
	movl	%eax, %edx
	movl	-5036(%rbp), %eax
	movslq	%eax, %rcx
	movl	-5040(%rbp), %eax
	cltq
	imulq	$5005, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movl	%eax, -5028(%rbp)
	movl	-5028(%rbp), %edx
	movl	-5032(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	max
	movl	%eax, -5032(%rbp)
.L16:
	addl	$1, -5036(%rbp)
.L15:
	movl	-5044(%rbp), %eax
	cmpl	%eax, -5036(%rbp)
	jl	.L17
	addl	$1, -5040(%rbp)
.L14:
	movl	-5044(%rbp), %eax
	cmpl	%eax, -5040(%rbp)
	jl	.L18
	movl	-5032(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	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	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L2
	movl	-4(%rbp), %eax
	jmp	.L3
.L2:
	movl	-8(%rbp), %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	min, .-min
	.globl	max
	.type	max, @function
max:
.LFB1:
	.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	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L5
	movl	-4(%rbp), %eax
	jmp	.L6
.L5:
	movl	-8(%rbp), %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	max, .-max
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 100200100
dp:
	.zero	100200100
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$960, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-5044(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-5024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-5044(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -5040(%rbp)
	jmp	.L8
.L13:
	movl	-5044(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -5036(%rbp)
	jmp	.L9
.L12:
	movl	-5040(%rbp), %eax
	cltq
	movzbl	-5024(%rbp,%rax), %edx
	movl	-5036(%rbp), %eax
	cltq
	movzbl	-5024(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L10
	movl	-5040(%rbp), %eax
	leal	1(%rax), %edx
	movl	-5036(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$5005, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-5036(%rbp), %eax
	movslq	%eax, %rdx
	movl	-5040(%rbp), %eax
	cltq
	imulq	$5005, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L11
.L10:
	movl	-5036(%rbp), %eax
	movslq	%eax, %rdx
	movl	-5040(%rbp), %eax
	cltq
	imulq	$5005, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	$0, (%rdx,%rax)
.L11:
	subl	$1, -5036(%rbp)
.L9:
	cmpl	$0, -5036(%rbp)
	jns	.L12
	subl	$1, -5040(%rbp)
.L8:
	cmpl	$0, -5040(%rbp)
	jns	.L13
	movl	$0, -5032(%rbp)
	movl	$0, -5040(%rbp)
	jmp	.L14
.L18:
	movl	$0, -5036(%rbp)
	jmp	.L15
.L17:
	movl	-5040(%rbp), %eax
	cmpl	-5036(%rbp), %eax
	jge	.L16
	movl	-5036(%rbp), %eax
	subl	-5040(%rbp), %eax
	movl	%eax, %edx
	movl	-5036(%rbp), %eax
	movslq	%eax, %rcx
	movl	-5040(%rbp), %eax
	cltq
	imulq	$5005, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movl	%eax, -5028(%rbp)
	movl	-5028(%rbp), %edx
	movl	-5032(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	max
	movl	%eax, -5032(%rbp)
.L16:
	addl	$1, -5036(%rbp)
.L15:
	movl	-5044(%rbp), %eax
	cmpl	%eax, -5036(%rbp)
	jl	.L17
	addl	$1, -5040(%rbp)
.L14:
	movl	-5044(%rbp), %eax
	cmpl	%eax, -5040(%rbp)
	jl	.L18
	movl	-5032(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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:
