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

```c
#include <stdio.h>

int gcd(int a, int b)
{
	if (a > b) {
		a += b;
		b = a - b;
		a -= b;
	}
	if (b % a == 0) return a;
	else return gcd(b % a, a);
}

int main()
{
	int A, B, C;
	scanf("%d %d %d", &A, &B, &C);
	
	int g = gcd(A, B);
	if (C % g == 0) printf("YES\n");
	else printf("NO\n");
	fflush(stdout);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%esi, %r8d
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	%edi, %r8d
	jl	.L2
	movl	%r8d, %eax
	movl	%edi, %r8d
	movl	%eax, %edi
.L2:
	movl	%edi, %eax
	cltd
	idivl	%r8d
	movl	%edx, %edi
	testl	%edx, %edx
	jne	.L3
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	gcd, .-gcd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %ecx
	movl	12(%rsp), %edx
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%edx, %ecx
	jl	.L7
	movl	%ecx, %eax
	movl	%edx, %ecx
	movl	%eax, %edx
.L7:
	movl	%edx, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	.L8
	movl	20(%rsp), %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	.L9
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L10:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%esi, %r8d
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	%edi, %r8d
	jl	.L2
	movl	%r8d, %eax
	movl	%edi, %r8d
	movl	%eax, %edi
.L2:
	movl	%edi, %eax
	cltd
	idivl	%r8d
	movl	%edx, %edi
	testl	%edx, %edx
	jne	.L3
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	gcd, .-gcd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %ecx
	movl	12(%rsp), %edx
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%edx, %ecx
	jl	.L7
	movl	%ecx, %eax
	movl	%edx, %ecx
	movl	%eax, %edx
.L7:
	movl	%edx, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	.L8
	movl	20(%rsp), %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	.L9
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L10:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%esi, %r8d
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	%edi, %r8d
	jl	.L2
	movl	%r8d, %eax
	movl	%edi, %r8d
	movl	%eax, %edi
.L2:
	movl	%edi, %eax
	cltd
	idivl	%r8d
	movl	%edx, %edi
	testl	%edx, %edx
	jne	.L3
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	gcd, .-gcd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %ecx
	movl	12(%rsp), %edx
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%edx, %ecx
	jl	.L7
	movl	%ecx, %eax
	movl	%edx, %ecx
	movl	%eax, %edx
.L7:
	movl	%edx, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	.L8
	movl	20(%rsp), %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	.L9
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L10:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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:
```
```c
#include <stdio.h>

int gcd(int a, int b)
{
	if (a > b) {
		a += b;
		b = a - b;
		a -= b;
	}
	if (b % a == 0) return a;
	else return gcd(b % a, a);
}

int main()
{
	int A, B, C;
	scanf("%d %d %d", &A, &B, &C);
	
	int g = gcd(A, B);
	if (C % g == 0) printf("YES\n");
	else printf("NO\n");
	fflush(stdout);
	return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int gcd(int a, int b)
{
	if (a > b) {
		a += b;
		b = a - b;
		a -= b;
	}
	if (b % a == 0) return a;
	else return gcd(b % a, a);
}

int main()
{
	int A, B, C;
	scanf("%d %d %d", &A, &B, &C);
	
	int g = gcd(A, B);
	if (C % g == 0) printf("YES\n");
	else printf("NO\n");
	fflush(stdout);
	return 0;
}```

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.
Optimized Assembly Code:

7 5 0
 77 42 5
 2 2 0
 80 98 58
 1 110 97
 11 5 0
 2 4 0
 77 42 2
 103 98 58

YES
 NO
 YES
 YES
 YES
 YES
 YES
 NO
 YES

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

```c
#include <stdio.h>

int gcd(int a, int b)
{
	if (a > b) {
		a += b;
		b = a - b;
		a -= b;
	}
	if (b % a == 0) return a;
	else return gcd(b % a, a);
}

int main()
{
	int A, B, C;
	scanf("%d %d %d", &A, &B, &C);
	
	int g = gcd(A, B);
	if (C % g == 0) printf("YES\n");
	else printf("NO\n");
	fflush(stdout);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%esi, %r8d
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	%edi, %r8d
	jl	.L2
	movl	%r8d, %eax
	movl	%edi, %r8d
	movl	%eax, %edi
.L2:
	movl	%edi, %eax
	cltd
	idivl	%r8d
	movl	%edx, %edi
	testl	%edx, %edx
	jne	.L3
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	gcd, .-gcd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %ecx
	movl	12(%rsp), %edx
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%edx, %ecx
	jl	.L7
	movl	%ecx, %eax
	movl	%edx, %ecx
	movl	%eax, %edx
.L7:
	movl	%edx, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	.L8
	movl	20(%rsp), %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	.L9
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L10:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%esi, %r8d
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	%edi, %r8d
	jl	.L2
	movl	%r8d, %eax
	movl	%edi, %r8d
	movl	%eax, %edi
.L2:
	movl	%edi, %eax
	cltd
	idivl	%r8d
	movl	%edx, %edi
	testl	%edx, %edx
	jne	.L3
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	gcd, .-gcd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %ecx
	movl	12(%rsp), %edx
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%edx, %ecx
	jl	.L7
	movl	%ecx, %eax
	movl	%edx, %ecx
	movl	%eax, %edx
.L7:
	movl	%edx, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	.L8
	movl	20(%rsp), %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	.L9
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L10:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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:
```