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 <string.h>

int max(int a, int b)
{
    return (a > b ? a : b);
}

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

int main(void)
{
    char saki[12000], moto[12000], t[12000];
    int slen, mlen;
    int i, j, k, temp, res;
    
    while (scanf("%s", saki) != EOF){
        scanf("%s", moto);
        
        strcpy(t, moto);
        memset(moto, '\0', sizeof(moto));
        strcpy(&moto[3999], t);
        
        res = 0;
        for (i = 0; i <= 8000; i++){
            temp = k = 0;
            for (j = i; j <= i + 4000; j++){
                if (saki[k] != '\0' && moto[j] != '\0' && saki[k] == moto[j]){
                    temp++;
                }
                else {
                    res = max(temp, res);
                    temp = 0;
                }
                k++;
            }
            res = max(temp, res);
        }
        
        printf("%d\n", res);
    }
    
    return (0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	max
	.type	max, @function
max:
.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
	cmovge	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	max, .-max
	.globl	min
	.type	min, @function
min:
.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	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	min, .-min
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.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
	leaq	-32768(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3280, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L6
.L13:
	leaq	-24016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-24016(%rbp), %rdx
	leaq	-12016(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcpy@PLT
	leaq	-24016(%rbp), %rax
	movl	$12000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-12016(%rbp), %rax
	leaq	-24016(%rbp), %rdx
	addq	$3999, %rdx
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	$0, -36020(%rbp)
	movl	$0, -36036(%rbp)
	jmp	.L7
.L12:
	movl	$0, -36028(%rbp)
	movl	-36028(%rbp), %eax
	movl	%eax, -36024(%rbp)
	movl	-36036(%rbp), %eax
	movl	%eax, -36032(%rbp)
	jmp	.L8
.L11:
	movl	-36028(%rbp), %eax
	cltq
	movzbl	-36016(%rbp,%rax), %eax
	testb	%al, %al
	je	.L9
	movl	-36032(%rbp), %eax
	cltq
	movzbl	-24016(%rbp,%rax), %eax
	testb	%al, %al
	je	.L9
	movl	-36028(%rbp), %eax
	cltq
	movzbl	-36016(%rbp,%rax), %edx
	movl	-36032(%rbp), %eax
	cltq
	movzbl	-24016(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L9
	addl	$1, -36024(%rbp)
	jmp	.L10
.L9:
	movl	-36020(%rbp), %edx
	movl	-36024(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	max
	movl	%eax, -36020(%rbp)
	movl	$0, -36024(%rbp)
.L10:
	addl	$1, -36028(%rbp)
	addl	$1, -36032(%rbp)
.L8:
	movl	-36036(%rbp), %eax
	addl	$4000, %eax
	cmpl	%eax, -36032(%rbp)
	jle	.L11
	movl	-36020(%rbp), %edx
	movl	-36024(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	max
	movl	%eax, -36020(%rbp)
	addl	$1, -36036(%rbp)
.L7:
	cmpl	$8000, -36036(%rbp)
	jle	.L12
	movl	-36020(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L6:
	leaq	-36016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L13
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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	max
	.type	max, @function
max:
.LFB35:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovge	%esi, %eax
	ret
	.cfi_endproc
.LFE35:
	.size	max, .-max
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB36:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE36:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB37:
	.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	-32768(%rsp), %r11
	.cfi_def_cfa 11, 32824
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3256, %rsp
	.cfi_def_cfa_offset 36080
	leaq	.LC0(%rip), %rbx
	leaq	.LC1(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 36008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r12
.L5:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L24
	leaq	12000(%rsp), %r13
	leaq	24000(%rsp), %r15
	movq	%rbx, %rdi
	xorl	%eax, %eax
	movq	%r13, %rsi
	call	__isoc99_scanf@PLT
	movl	$12000, %edx
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	__stpcpy_chk@PLT
	movl	$12000, %edx
	xorl	%esi, %esi
	movq	%r13, %rdi
	movq	%rax, %r14
	call	memset@PLT
	movq	%r14, %rdx
	movl	$8001, %ecx
	movq	%r15, %rsi
	subq	%r15, %rdx
	leaq	15999(%rsp), %rdi
	addq	$1, %rdx
	call	__memcpy_chk@PLT
	movq	%r13, %rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
.L6:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	cmpl	%edx, %r8d
	cmovl	%edx, %r8d
	addq	$1, %rax
	xorl	%edx, %edx
	cmpq	$4001, %rax
	je	.L25
.L9:
	movzbl	(%r12,%rax), %ecx
	testb	%cl, %cl
	je	.L7
	movzbl	(%rdi,%rax), %esi
	cmpb	%sil, %cl
	jne	.L7
	testb	%sil, %sil
	je	.L7
	addq	$1, %rax
	addl	$1, %edx
	cmpq	$4001, %rax
	jne	.L9
.L25:
	cmpl	%edx, %r8d
	cmovl	%edx, %r8d
	addl	$1, %r9d
	addq	$1, %rdi
	cmpl	$8001, %r9d
	jne	.L6
	movl	%r8d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
.L24:
	movq	36008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$36024, %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
.L26:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE37:
	.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
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB35:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovge	%esi, %eax
	ret
	.cfi_endproc
.LFE35:
	.size	max, .-max
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB36:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE36:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB37:
	.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	-32768(%rsp), %r11
	.cfi_def_cfa 11, 32824
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3256, %rsp
	.cfi_def_cfa_offset 36080
	leaq	.LC0(%rip), %rbx
	leaq	.LC1(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 36008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r12
.L5:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L24
	leaq	12000(%rsp), %r13
	leaq	24000(%rsp), %r15
	movq	%rbx, %rdi
	xorl	%eax, %eax
	movq	%r13, %rsi
	call	__isoc99_scanf@PLT
	movl	$12000, %edx
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	__stpcpy_chk@PLT
	movl	$12000, %edx
	xorl	%esi, %esi
	movq	%r13, %rdi
	movq	%rax, %r14
	call	memset@PLT
	movq	%r14, %rdx
	movl	$8001, %ecx
	movq	%r15, %rsi
	subq	%r15, %rdx
	leaq	15999(%rsp), %rdi
	addq	$1, %rdx
	call	__memcpy_chk@PLT
	movq	%r13, %rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
.L6:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	cmpl	%edx, %r8d
	cmovl	%edx, %r8d
	addq	$1, %rax
	xorl	%edx, %edx
	cmpq	$4001, %rax
	je	.L25
.L9:
	movzbl	(%r12,%rax), %ecx
	testb	%cl, %cl
	je	.L7
	movzbl	(%rdi,%rax), %esi
	cmpb	%sil, %cl
	jne	.L7
	testb	%sil, %sil
	je	.L7
	addq	$1, %rax
	addl	$1, %edx
	cmpq	$4001, %rax
	jne	.L9
.L25:
	cmpl	%edx, %r8d
	cmovl	%edx, %r8d
	addl	$1, %r9d
	addq	$1, %rdi
	cmpl	$8001, %r9d
	jne	.L6
	movl	%r8d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
.L24:
	movq	36008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$36024, %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
.L26:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE37:
	.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 <string.h>

int max(int a, int b)
{
    return (a > b ? a : b);
}

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

int main(void)
{
    char saki[12000], moto[12000], t[12000];
    int slen, mlen;
    int i, j, k, temp, res;
    
    while (scanf("%s", saki) != EOF){
        scanf("%s", moto);
        
        strcpy(t, moto);
        memset(moto, '\0', sizeof(moto));
        strcpy(&moto[3999], t);
        
        res = 0;
        for (i = 0; i <= 8000; i++){
            temp = k = 0;
            for (j = i; j <= i + 4000; j++){
                if (saki[k] != '\0' && moto[j] != '\0' && saki[k] == moto[j]){
                    temp++;
                }
                else {
                    res = max(temp, res);
                    temp = 0;
                }
                k++;
            }
            res = max(temp, res);
        }
        
        printf("%d\n", res);
    }
    
    return (0);
}
Nnne
 ABRACADAARA
ECADADABRBCRDARA
UPWJCIRUCAXIIRGL
SBQNYBSBZDFNEV
 DBRACAAAARA
ECADADBBRBCRDARA
LCRIIXACURIGJWPU
SBQNYBSBZDFOEV
 DBRACAAAARA
ECADADBBRBBRDARA
LCRIIXACURIGJWPU
SBQNYBSBFDZOEU
 DBRACAAA@RA
ECADADBBRBBRDARA
LCRIIXACURIGJWPU
SBQNYBSBFDZOEU
 CARBR@AA?CB
ABRDRBSBAACADACD
LDRTIXAWURIHKCOI
BBDDYRTBDNZOUQ
 AD?BB>ARCBQ
CBBDQARCBEB@ADRA
OVKRMDAESKVVHKXI
ZBARNTWBBCYCOQ
 A>?BR@BQ@BD
BSDACBFQERB@CBBA
IVXVOCJHEAJURKMR
BA@CQXAYNSYTBP
 Nnnd
 ABRACADAARA
ECADADABRBCRDARA
LGRIIXACURICJWPU
SBQNYBSBZDFNEV

0
 4
0
 3
0
 3
1
 2
1
 2
2
 4
1
 1
1
 0
 4
0

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 <string.h>

int max(int a, int b)
{
    return (a > b ? a : b);
}

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

int main(void)
{
    char saki[12000], moto[12000], t[12000];
    int slen, mlen;
    int i, j, k, temp, res;
    
    while (scanf("%s", saki) != EOF){
        scanf("%s", moto);
        
        strcpy(t, moto);
        memset(moto, '\0', sizeof(moto));
        strcpy(&moto[3999], t);
        
        res = 0;
        for (i = 0; i <= 8000; i++){
            temp = k = 0;
            for (j = i; j <= i + 4000; j++){
                if (saki[k] != '\0' && moto[j] != '\0' && saki[k] == moto[j]){
                    temp++;
                }
                else {
                    res = max(temp, res);
                    temp = 0;
                }
                k++;
            }
            res = max(temp, res);
        }
        
        printf("%d\n", res);
    }
    
    return (0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	max
	.type	max, @function
max:
.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
	cmovge	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	max, .-max
	.globl	min
	.type	min, @function
min:
.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	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	min, .-min
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.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
	leaq	-32768(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3280, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L6
.L13:
	leaq	-24016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-24016(%rbp), %rdx
	leaq	-12016(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcpy@PLT
	leaq	-24016(%rbp), %rax
	movl	$12000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-12016(%rbp), %rax
	leaq	-24016(%rbp), %rdx
	addq	$3999, %rdx
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	$0, -36020(%rbp)
	movl	$0, -36036(%rbp)
	jmp	.L7
.L12:
	movl	$0, -36028(%rbp)
	movl	-36028(%rbp), %eax
	movl	%eax, -36024(%rbp)
	movl	-36036(%rbp), %eax
	movl	%eax, -36032(%rbp)
	jmp	.L8
.L11:
	movl	-36028(%rbp), %eax
	cltq
	movzbl	-36016(%rbp,%rax), %eax
	testb	%al, %al
	je	.L9
	movl	-36032(%rbp), %eax
	cltq
	movzbl	-24016(%rbp,%rax), %eax
	testb	%al, %al
	je	.L9
	movl	-36028(%rbp), %eax
	cltq
	movzbl	-36016(%rbp,%rax), %edx
	movl	-36032(%rbp), %eax
	cltq
	movzbl	-24016(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L9
	addl	$1, -36024(%rbp)
	jmp	.L10
.L9:
	movl	-36020(%rbp), %edx
	movl	-36024(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	max
	movl	%eax, -36020(%rbp)
	movl	$0, -36024(%rbp)
.L10:
	addl	$1, -36028(%rbp)
	addl	$1, -36032(%rbp)
.L8:
	movl	-36036(%rbp), %eax
	addl	$4000, %eax
	cmpl	%eax, -36032(%rbp)
	jle	.L11
	movl	-36020(%rbp), %edx
	movl	-36024(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	max
	movl	%eax, -36020(%rbp)
	addl	$1, -36036(%rbp)
.L7:
	cmpl	$8000, -36036(%rbp)
	jle	.L12
	movl	-36020(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L6:
	leaq	-36016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L13
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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	max
	.type	max, @function
max:
.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
	cmovge	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	max, .-max
	.globl	min
	.type	min, @function
min:
.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	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	min, .-min
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.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
	leaq	-32768(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3280, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L6
.L13:
	leaq	-24016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-24016(%rbp), %rdx
	leaq	-12016(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcpy@PLT
	leaq	-24016(%rbp), %rax
	movl	$12000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-12016(%rbp), %rax
	leaq	-24016(%rbp), %rdx
	addq	$3999, %rdx
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	$0, -36020(%rbp)
	movl	$0, -36036(%rbp)
	jmp	.L7
.L12:
	movl	$0, -36028(%rbp)
	movl	-36028(%rbp), %eax
	movl	%eax, -36024(%rbp)
	movl	-36036(%rbp), %eax
	movl	%eax, -36032(%rbp)
	jmp	.L8
.L11:
	movl	-36028(%rbp), %eax
	cltq
	movzbl	-36016(%rbp,%rax), %eax
	testb	%al, %al
	je	.L9
	movl	-36032(%rbp), %eax
	cltq
	movzbl	-24016(%rbp,%rax), %eax
	testb	%al, %al
	je	.L9
	movl	-36028(%rbp), %eax
	cltq
	movzbl	-36016(%rbp,%rax), %edx
	movl	-36032(%rbp), %eax
	cltq
	movzbl	-24016(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L9
	addl	$1, -36024(%rbp)
	jmp	.L10
.L9:
	movl	-36020(%rbp), %edx
	movl	-36024(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	max
	movl	%eax, -36020(%rbp)
	movl	$0, -36024(%rbp)
.L10:
	addl	$1, -36028(%rbp)
	addl	$1, -36032(%rbp)
.L8:
	movl	-36036(%rbp), %eax
	addl	$4000, %eax
	cmpl	%eax, -36032(%rbp)
	jle	.L11
	movl	-36020(%rbp), %edx
	movl	-36024(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	max
	movl	%eax, -36020(%rbp)
	addl	$1, -36036(%rbp)
.L7:
	cmpl	$8000, -36036(%rbp)
	jle	.L12
	movl	-36020(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L6:
	leaq	-36016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L13
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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:
