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 mintwo(int kouyaku1,int kouyaku2);
int minthree(int kouyaku1,int kouyaku2,int kouyaku3);
void kouyakutwo();
void kouyakuthree();

int main(void){
    int n=0;
    
    scanf("%d",&n);
    if(n==2){
        kouyakutwo();
    }else{
        kouyakuthree();
    }


}

void kouyakutwo(){
	int kouyaku1=0,kouyaku2=0,i=1;
	int minvalue;
	scanf("%d %d",&kouyaku1,&kouyaku2);//数値を入力

	minvalue=mintwo(kouyaku1,kouyaku2);


	while(i <= minvalue)
	    {
		if(kouyaku1%i==0&&kouyaku2%i==0){
			printf("%d\n",i);
		}
		
		i=i+1;
	}
    
}

void kouyakuthree(){
	int kouyaku1=0,kouyaku2=0,kouyaku3=0;
	int i=1;
	int minvalue;

	scanf("%d %d %d",&kouyaku1,&kouyaku2,&kouyaku3);

	minvalue=minthree(kouyaku1,kouyaku2,kouyaku3);


	while(i <= minvalue)
		{
			if(kouyaku1%i==0&&kouyaku2%i==0&&kouyaku3%i==0){
				printf("%d\n",i);
			}
			
			i=i+1;
		}
    
}

int mintwo(int kouyaku1,int kouyaku2){
	int minvalu;

	if(kouyaku1<kouyaku2){
	    
		minvalu=kouyaku1;
	}else{
	    
		minvalu=kouyaku2;
	}

	return minvalu;


}

int minthree(int kouyaku1,int kouyaku2,int kouyaku3){
    
	int minvalu;
	
	minvalu=kouyaku1;
	
	if(minvalu>kouyaku2){
	    
		minvalu=kouyaku2;
		
	}
	if(minvalu>kouyaku3){
	    
		minvalu=kouyaku3;
		
	}

	return minvalu;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -12(%rbp)
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	cmpl	$2, %eax
	jne	.L2
	movl	$0, %eax
	call	kouyakutwo
	jmp	.L3
.L2:
	movl	$0, %eax
	call	kouyakuthree
.L3:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	kouyakutwo
	.type	kouyakutwo, @function
kouyakutwo:
.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
	movl	$0, -24(%rbp)
	movl	$0, -20(%rbp)
	movl	$1, -16(%rbp)
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mintwo
	movl	%eax, -12(%rbp)
	jmp	.L7
.L9:
	movl	-24(%rbp), %eax
	cltd
	idivl	-16(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L8
	movl	-20(%rbp), %eax
	cltd
	idivl	-16(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L8
	movl	-16(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	addl	$1, -16(%rbp)
.L7:
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jle	.L9
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	kouyakutwo, .-kouyakutwo
	.section	.rodata
.LC3:
	.string	"%d %d %d"
	.text
	.globl	kouyakuthree
	.type	kouyakuthree, @function
kouyakuthree:
.LFB2:
	.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
	movl	$0, -28(%rbp)
	movl	$0, -24(%rbp)
	movl	$0, -20(%rbp)
	movl	$1, -16(%rbp)
	leaq	-20(%rbp), %rcx
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	minthree
	movl	%eax, -12(%rbp)
	jmp	.L12
.L14:
	movl	-28(%rbp), %eax
	cltd
	idivl	-16(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L13
	movl	-24(%rbp), %eax
	cltd
	idivl	-16(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L13
	movl	-20(%rbp), %eax
	cltd
	idivl	-16(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L13
	movl	-16(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L13:
	addl	$1, -16(%rbp)
.L12:
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jle	.L14
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	kouyakuthree, .-kouyakuthree
	.globl	mintwo
	.type	mintwo, @function
mintwo:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jge	.L17
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L18
.L17:
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
.L18:
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	mintwo, .-mintwo
	.globl	minthree
	.type	minthree, @function
minthree:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L21
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
.L21:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L22
	movl	-28(%rbp), %eax
	movl	%eax, -4(%rbp)
.L22:
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	minthree, .-minthree
	.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	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	kouyakutwo
	.type	kouyakutwo, @function
kouyakutwo:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	movl	$0, (%rsp)
	movl	$0, 4(%rsp)
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	movl	4(%rsp), %ebp
	cmpl	%ebp, %eax
	cmovle	%eax, %ebp
	testl	%ebp, %ebp
	jle	.L1
	movl	$1, %ebx
	leaq	.LC1(%rip), %r12
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	addl	$1, %ebx
	cmpl	%ebp, %ebx
	jg	.L1
.L8:
	movl	(%rsp), %eax
.L4:
	cltd
	idivl	%ebx
	testl	%edx, %edx
	jne	.L3
	movl	4(%rsp), %eax
	cltd
	idivl	%ebx
	testl	%edx, %edx
	jne	.L3
	movl	%ebx, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addl	$1, %ebx
	cmpl	%ebp, %ebx
	jle	.L8
	.p2align 4,,10
	.p2align 3
.L1:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L9
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	kouyakutwo, .-kouyakutwo
	.section	.rodata.str1.1
.LC2:
	.string	"%d %d %d"
	.text
	.p2align 4
	.globl	kouyakuthree
	.type	kouyakuthree, @function
kouyakuthree:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC2(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	20(%rsp), %rcx
	movl	$0, 12(%rsp)
	leaq	12(%rsp), %rsi
	movl	$0, 16(%rsp)
	movl	$0, 20(%rsp)
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %ebp
	movl	16(%rsp), %edx
	movl	12(%rsp), %eax
	cmpl	%edx, %ebp
	cmovg	%edx, %ebp
	cmpl	%eax, %ebp
	cmovg	%eax, %ebp
	testl	%ebp, %ebp
	jle	.L10
	movl	$1, %ebx
	leaq	.LC1(%rip), %r12
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L17:
	movl	12(%rsp), %eax
.L13:
	cltd
	idivl	%ebx
	testl	%edx, %edx
	jne	.L12
	movl	16(%rsp), %eax
	cltd
	idivl	%ebx
	testl	%edx, %edx
	jne	.L12
	movl	20(%rsp), %eax
	cltd
	idivl	%ebx
	testl	%edx, %edx
	je	.L16
	.p2align 4,,10
	.p2align 3
.L12:
	addl	$1, %ebx
	cmpl	%ebp, %ebx
	jle	.L17
.L10:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	movl	%ebx, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L12
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	kouyakuthree, .-kouyakuthree
	.section	.rodata.str1.1
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC3(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	movl	$0, 4(%rsp)
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	cmpl	$2, 4(%rsp)
	je	.L24
	call	kouyakuthree
.L21:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L24:
	.cfi_restore_state
	call	kouyakutwo
	jmp	.L21
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	mintwo
	.type	mintwo, @function
mintwo:
.LFB26:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE26:
	.size	mintwo, .-mintwo
	.p2align 4
	.globl	minthree
	.type	minthree, @function
minthree:
.LFB27:
	.cfi_startproc
	endbr64
	cmpl	%edx, %esi
	movl	%edi, %eax
	cmovg	%edx, %esi
	cmpl	%edi, %esi
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE27:
	.size	minthree, .-minthree
	.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	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	kouyakutwo
	.type	kouyakutwo, @function
kouyakutwo:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	movl	$0, (%rsp)
	movl	$0, 4(%rsp)
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	movl	4(%rsp), %ebp
	cmpl	%ebp, %eax
	cmovle	%eax, %ebp
	testl	%ebp, %ebp
	jle	.L1
	movl	$1, %ebx
	leaq	.LC1(%rip), %r12
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	addl	$1, %ebx
	cmpl	%ebp, %ebx
	jg	.L1
.L8:
	movl	(%rsp), %eax
.L4:
	cltd
	idivl	%ebx
	testl	%edx, %edx
	jne	.L3
	movl	4(%rsp), %eax
	cltd
	idivl	%ebx
	testl	%edx, %edx
	jne	.L3
	movl	%ebx, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addl	$1, %ebx
	cmpl	%ebp, %ebx
	jle	.L8
	.p2align 4,,10
	.p2align 3
.L1:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L9
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	kouyakutwo, .-kouyakutwo
	.section	.rodata.str1.1
.LC2:
	.string	"%d %d %d"
	.text
	.p2align 4
	.globl	kouyakuthree
	.type	kouyakuthree, @function
kouyakuthree:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC2(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	20(%rsp), %rcx
	movl	$0, 12(%rsp)
	leaq	12(%rsp), %rsi
	movl	$0, 16(%rsp)
	movl	$0, 20(%rsp)
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %ebp
	movl	16(%rsp), %edx
	movl	12(%rsp), %eax
	cmpl	%edx, %ebp
	cmovg	%edx, %ebp
	cmpl	%eax, %ebp
	cmovg	%eax, %ebp
	testl	%ebp, %ebp
	jle	.L10
	movl	$1, %ebx
	leaq	.LC1(%rip), %r12
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L17:
	movl	12(%rsp), %eax
.L13:
	cltd
	idivl	%ebx
	testl	%edx, %edx
	jne	.L12
	movl	16(%rsp), %eax
	cltd
	idivl	%ebx
	testl	%edx, %edx
	jne	.L12
	movl	20(%rsp), %eax
	cltd
	idivl	%ebx
	testl	%edx, %edx
	je	.L16
	.p2align 4,,10
	.p2align 3
.L12:
	addl	$1, %ebx
	cmpl	%ebp, %ebx
	jle	.L17
.L10:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	movl	%ebx, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L12
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	kouyakuthree, .-kouyakuthree
	.section	.rodata.str1.1
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC3(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	movl	$0, 4(%rsp)
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	cmpl	$2, 4(%rsp)
	je	.L24
	call	kouyakuthree
.L21:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L24:
	.cfi_restore_state
	call	kouyakutwo
	jmp	.L21
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	mintwo
	.type	mintwo, @function
mintwo:
.LFB26:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE26:
	.size	mintwo, .-mintwo
	.p2align 4
	.globl	minthree
	.type	minthree, @function
minthree:
.LFB27:
	.cfi_startproc
	endbr64
	cmpl	%edx, %esi
	movl	%edi, %eax
	cmovg	%edx, %esi
	cmpl	%edi, %esi
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE27:
	.size	minthree, .-minthree
	.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 mintwo(int kouyaku1,int kouyaku2);
int minthree(int kouyaku1,int kouyaku2,int kouyaku3);
void kouyakutwo();
void kouyakuthree();

int main(void){
    int n=0;
    
    scanf("%d",&n);
    if(n==2){
        kouyakutwo();
    }else{
        kouyakuthree();
    }


}

void kouyakutwo(){
	int kouyaku1=0,kouyaku2=0,i=1;
	int minvalue;
	scanf("%d %d",&kouyaku1,&kouyaku2);//数値を入力

	minvalue=mintwo(kouyaku1,kouyaku2);


	while(i <= minvalue)
	    {
		if(kouyaku1%i==0&&kouyaku2%i==0){
			printf("%d\n",i);
		}
		
		i=i+1;
	}
    
}

void kouyakuthree(){
	int kouyaku1=0,kouyaku2=0,kouyaku3=0;
	int i=1;
	int minvalue;

	scanf("%d %d %d",&kouyaku1,&kouyaku2,&kouyaku3);

	minvalue=minthree(kouyaku1,kouyaku2,kouyaku3);


	while(i <= minvalue)
		{
			if(kouyaku1%i==0&&kouyaku2%i==0&&kouyaku3%i==0){
				printf("%d\n",i);
			}
			
			i=i+1;
		}
    
}

int mintwo(int kouyaku1,int kouyaku2){
	int minvalu;

	if(kouyaku1<kouyaku2){
	    
		minvalu=kouyaku1;
	}else{
	    
		minvalu=kouyaku2;
	}

	return minvalu;


}

int minthree(int kouyaku1,int kouyaku2,int kouyaku3){
    
	int minvalu;
	
	minvalu=kouyaku1;
	
	if(minvalu>kouyaku2){
	    
		minvalu=kouyaku2;
		
	}
	if(minvalu>kouyaku3){
	    
		minvalu=kouyaku3;
		
	}

	return minvalu;
}


2
75 125

1
5
25

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 mintwo(int kouyaku1,int kouyaku2);
int minthree(int kouyaku1,int kouyaku2,int kouyaku3);
void kouyakutwo();
void kouyakuthree();

int main(void){
    int n=0;
    
    scanf("%d",&n);
    if(n==2){
        kouyakutwo();
    }else{
        kouyakuthree();
    }


}

void kouyakutwo(){
	int kouyaku1=0,kouyaku2=0,i=1;
	int minvalue;
	scanf("%d %d",&kouyaku1,&kouyaku2);//数値を入力

	minvalue=mintwo(kouyaku1,kouyaku2);


	while(i <= minvalue)
	    {
		if(kouyaku1%i==0&&kouyaku2%i==0){
			printf("%d\n",i);
		}
		
		i=i+1;
	}
    
}

void kouyakuthree(){
	int kouyaku1=0,kouyaku2=0,kouyaku3=0;
	int i=1;
	int minvalue;

	scanf("%d %d %d",&kouyaku1,&kouyaku2,&kouyaku3);

	minvalue=minthree(kouyaku1,kouyaku2,kouyaku3);


	while(i <= minvalue)
		{
			if(kouyaku1%i==0&&kouyaku2%i==0&&kouyaku3%i==0){
				printf("%d\n",i);
			}
			
			i=i+1;
		}
    
}

int mintwo(int kouyaku1,int kouyaku2){
	int minvalu;

	if(kouyaku1<kouyaku2){
	    
		minvalu=kouyaku1;
	}else{
	    
		minvalu=kouyaku2;
	}

	return minvalu;


}

int minthree(int kouyaku1,int kouyaku2,int kouyaku3){
    
	int minvalu;
	
	minvalu=kouyaku1;
	
	if(minvalu>kouyaku2){
	    
		minvalu=kouyaku2;
		
	}
	if(minvalu>kouyaku3){
	    
		minvalu=kouyaku3;
		
	}

	return minvalu;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -12(%rbp)
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	cmpl	$2, %eax
	jne	.L2
	movl	$0, %eax
	call	kouyakutwo
	jmp	.L3
.L2:
	movl	$0, %eax
	call	kouyakuthree
.L3:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	kouyakutwo
	.type	kouyakutwo, @function
kouyakutwo:
.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
	movl	$0, -24(%rbp)
	movl	$0, -20(%rbp)
	movl	$1, -16(%rbp)
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mintwo
	movl	%eax, -12(%rbp)
	jmp	.L7
.L9:
	movl	-24(%rbp), %eax
	cltd
	idivl	-16(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L8
	movl	-20(%rbp), %eax
	cltd
	idivl	-16(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L8
	movl	-16(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	addl	$1, -16(%rbp)
.L7:
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jle	.L9
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	kouyakutwo, .-kouyakutwo
	.section	.rodata
.LC3:
	.string	"%d %d %d"
	.text
	.globl	kouyakuthree
	.type	kouyakuthree, @function
kouyakuthree:
.LFB2:
	.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
	movl	$0, -28(%rbp)
	movl	$0, -24(%rbp)
	movl	$0, -20(%rbp)
	movl	$1, -16(%rbp)
	leaq	-20(%rbp), %rcx
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	minthree
	movl	%eax, -12(%rbp)
	jmp	.L12
.L14:
	movl	-28(%rbp), %eax
	cltd
	idivl	-16(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L13
	movl	-24(%rbp), %eax
	cltd
	idivl	-16(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L13
	movl	-20(%rbp), %eax
	cltd
	idivl	-16(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L13
	movl	-16(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L13:
	addl	$1, -16(%rbp)
.L12:
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jle	.L14
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	kouyakuthree, .-kouyakuthree
	.globl	mintwo
	.type	mintwo, @function
mintwo:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jge	.L17
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L18
.L17:
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
.L18:
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	mintwo, .-mintwo
	.globl	minthree
	.type	minthree, @function
minthree:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L21
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
.L21:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L22
	movl	-28(%rbp), %eax
	movl	%eax, -4(%rbp)
.L22:
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	minthree, .-minthree
	.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
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -12(%rbp)
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	cmpl	$2, %eax
	jne	.L2
	movl	$0, %eax
	call	kouyakutwo
	jmp	.L3
.L2:
	movl	$0, %eax
	call	kouyakuthree
.L3:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	kouyakutwo
	.type	kouyakutwo, @function
kouyakutwo:
.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
	movl	$0, -24(%rbp)
	movl	$0, -20(%rbp)
	movl	$1, -16(%rbp)
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mintwo
	movl	%eax, -12(%rbp)
	jmp	.L7
.L9:
	movl	-24(%rbp), %eax
	cltd
	idivl	-16(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L8
	movl	-20(%rbp), %eax
	cltd
	idivl	-16(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L8
	movl	-16(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	addl	$1, -16(%rbp)
.L7:
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jle	.L9
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	kouyakutwo, .-kouyakutwo
	.section	.rodata
.LC3:
	.string	"%d %d %d"
	.text
	.globl	kouyakuthree
	.type	kouyakuthree, @function
kouyakuthree:
.LFB2:
	.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
	movl	$0, -28(%rbp)
	movl	$0, -24(%rbp)
	movl	$0, -20(%rbp)
	movl	$1, -16(%rbp)
	leaq	-20(%rbp), %rcx
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	minthree
	movl	%eax, -12(%rbp)
	jmp	.L12
.L14:
	movl	-28(%rbp), %eax
	cltd
	idivl	-16(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L13
	movl	-24(%rbp), %eax
	cltd
	idivl	-16(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L13
	movl	-20(%rbp), %eax
	cltd
	idivl	-16(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L13
	movl	-16(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L13:
	addl	$1, -16(%rbp)
.L12:
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jle	.L14
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	kouyakuthree, .-kouyakuthree
	.globl	mintwo
	.type	mintwo, @function
mintwo:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jge	.L17
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L18
.L17:
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
.L18:
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	mintwo, .-mintwo
	.globl	minthree
	.type	minthree, @function
minthree:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L21
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
.L21:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L22
	movl	-28(%rbp), %eax
	movl	%eax, -4(%rbp)
.L22:
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	minthree, .-minthree
	.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:
