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

```c
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include<stdio.h>
#include<stdlib.h>
//#define lli long long int
int gcd(int, int);
void Exgcd(int, int,int*,int*,int);
int main() {
	int a, b, c, i, j, x=1, y=0;
	scanf("%d%d", &a,&b);
	c = gcd(a, b);
	Exgcd(a, b, &x, &y, c);
	printf("%d %d\n", x, y);
	return 0;
}

int gcd(int x, int y) {
	int tmp;
	if (x < y) { tmp = x; x = y; y = tmp; }
	if (x%y == 0) return y;
	gcd(x%y, y);
}

void Exgcd(int a, int b,int *x,int *y,int c){
	int tmp,x2=0,y2=1,q;
	while (c!=b) {
		q = a / b;
		tmp = x2; x2 = *x - q*x2; *x = tmp;
		tmp = y2; y2 = *y - q*y2; *y = tmp;
		tmp = b; b = a - q*b; a = tmp;
	}
	*x = x2;
	*y = y2;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	4(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	movl	(%rsp), %esi
	movl	%r8d, %edi
	movl	%esi, %ecx
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	%ecx, %edi
	jle	.L2
	movl	%ecx, %eax
	movl	%edi, %ecx
	movl	%eax, %edi
.L2:
	movl	%ecx, %eax
	cltd
	idivl	%edi
	movl	%edx, %ecx
	testl	%edx, %edx
	jne	.L3
	cmpl	%edi, %r8d
	je	.L8
	xorl	%r10d, %r10d
	movl	$1, %r11d
	movl	$1, %r9d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%r13d, %r9d
	movl	%r12d, %r10d
.L5:
	movl	%esi, %eax
	cltd
	idivl	%r8d
	movl	%eax, %esi
	imull	%r9d, %eax
	imull	%r10d, %esi
	subl	%eax, %ecx
	subl	%esi, %r11d
	movl	%ecx, %r13d
	movl	%r8d, %esi
	movl	%r9d, %ecx
	movl	%r11d, %r12d
	movl	%edx, %r8d
	movl	%r10d, %r11d
	cmpl	%edx, %edi
	jne	.L9
.L4:
	xorl	%eax, %eax
	movl	%r13d, %ecx
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L13
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	xorl	%r12d, %r12d
	movl	$1, %r13d
	jmp	.L4
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.text
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB40:
	.cfi_startproc
	endbr64
	movl	%esi, %r8d
	.p2align 4,,10
	.p2align 3
.L16:
	cmpl	%edi, %r8d
	jle	.L15
	movl	%edi, %eax
	movl	%r8d, %edi
	movl	%eax, %r8d
.L15:
	movl	%edi, %eax
	cltd
	idivl	%r8d
	movl	%edx, %edi
	testl	%edx, %edx
	jne	.L16
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE40:
	.size	gcd, .-gcd
	.p2align 4
	.globl	Exgcd
	.type	Exgcd, @function
Exgcd:
.LFB41:
	.cfi_startproc
	endbr64
	movq	%rdx, %r10
	movq	%rcx, %r9
	cmpl	%r8d, %esi
	je	.L22
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	%edi, %eax
	movl	$1, %ecx
	movl	%esi, %edi
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L21:
	cltd
	movl	%esi, %r11d
	idivl	%edi
	movl	%eax, %ebx
	imull	%ecx, %eax
	imull	%esi, %ebx
	movl	(%r10), %esi
	movl	%r11d, (%r10)
	movl	%ecx, %r11d
	movl	(%r9), %ecx
	movl	%r11d, (%r9)
	subl	%eax, %ecx
	subl	%ebx, %esi
	movl	%edi, %eax
	movl	%edx, %edi
	cmpl	%r8d, %edx
	jne	.L21
	movl	%esi, (%r10)
	popq	%rbx
	.cfi_def_cfa_offset 8
	movl	%ecx, (%r9)
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore 3
	movl	$1, %ecx
	xorl	%esi, %esi
	movl	%esi, (%rdx)
	movl	%ecx, (%r9)
	ret
	.cfi_endproc
.LFE41:
	.size	Exgcd, .-Exgcd
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	4(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	movl	(%rsp), %esi
	movl	%r8d, %edi
	movl	%esi, %ecx
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	%ecx, %edi
	jle	.L2
	movl	%ecx, %eax
	movl	%edi, %ecx
	movl	%eax, %edi
.L2:
	movl	%ecx, %eax
	cltd
	idivl	%edi
	movl	%edx, %ecx
	testl	%edx, %edx
	jne	.L3
	cmpl	%edi, %r8d
	je	.L8
	xorl	%r10d, %r10d
	movl	$1, %r11d
	movl	$1, %r9d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%r13d, %r9d
	movl	%r12d, %r10d
.L5:
	movl	%esi, %eax
	cltd
	idivl	%r8d
	movl	%eax, %esi
	imull	%r9d, %eax
	imull	%r10d, %esi
	subl	%eax, %ecx
	subl	%esi, %r11d
	movl	%ecx, %r13d
	movl	%r8d, %esi
	movl	%r9d, %ecx
	movl	%r11d, %r12d
	movl	%edx, %r8d
	movl	%r10d, %r11d
	cmpl	%edx, %edi
	jne	.L9
.L4:
	xorl	%eax, %eax
	movl	%r13d, %ecx
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L13
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	xorl	%r12d, %r12d
	movl	$1, %r13d
	jmp	.L4
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.text
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB40:
	.cfi_startproc
	endbr64
	movl	%esi, %r8d
	.p2align 4,,10
	.p2align 3
.L16:
	cmpl	%edi, %r8d
	jle	.L15
	movl	%edi, %eax
	movl	%r8d, %edi
	movl	%eax, %r8d
.L15:
	movl	%edi, %eax
	cltd
	idivl	%r8d
	movl	%edx, %edi
	testl	%edx, %edx
	jne	.L16
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE40:
	.size	gcd, .-gcd
	.p2align 4
	.globl	Exgcd
	.type	Exgcd, @function
Exgcd:
.LFB41:
	.cfi_startproc
	endbr64
	movq	%rdx, %r10
	movq	%rcx, %r9
	cmpl	%r8d, %esi
	je	.L22
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	%edi, %eax
	movl	$1, %ecx
	movl	%esi, %edi
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L21:
	cltd
	movl	%esi, %r11d
	idivl	%edi
	movl	%eax, %ebx
	imull	%ecx, %eax
	imull	%esi, %ebx
	movl	(%r10), %esi
	movl	%r11d, (%r10)
	movl	%ecx, %r11d
	movl	(%r9), %ecx
	movl	%r11d, (%r9)
	subl	%eax, %ecx
	subl	%ebx, %esi
	movl	%edi, %eax
	movl	%edx, %edi
	cmpl	%r8d, %edx
	jne	.L21
	movl	%esi, (%r10)
	popq	%rbx
	.cfi_def_cfa_offset 8
	movl	%ecx, (%r9)
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore 3
	movl	$1, %ecx
	xorl	%esi, %esi
	movl	%esi, (%rdx)
	movl	%ecx, (%r9)
	ret
	.cfi_endproc
.LFE41:
	.size	Exgcd, .-Exgcd
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	4(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	movl	(%rsp), %esi
	movl	%r8d, %edi
	movl	%esi, %ecx
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	%ecx, %edi
	jle	.L2
	movl	%ecx, %eax
	movl	%edi, %ecx
	movl	%eax, %edi
.L2:
	movl	%ecx, %eax
	cltd
	idivl	%edi
	movl	%edx, %ecx
	testl	%edx, %edx
	jne	.L3
	cmpl	%edi, %r8d
	je	.L8
	xorl	%r10d, %r10d
	movl	$1, %r11d
	movl	$1, %r9d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%r13d, %r9d
	movl	%r12d, %r10d
.L5:
	movl	%esi, %eax
	cltd
	idivl	%r8d
	movl	%eax, %esi
	imull	%r9d, %eax
	imull	%r10d, %esi
	subl	%eax, %ecx
	subl	%esi, %r11d
	movl	%ecx, %r13d
	movl	%r8d, %esi
	movl	%r9d, %ecx
	movl	%r11d, %r12d
	movl	%edx, %r8d
	movl	%r10d, %r11d
	cmpl	%edx, %edi
	jne	.L9
.L4:
	xorl	%eax, %eax
	movl	%r13d, %ecx
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L13
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	xorl	%r12d, %r12d
	movl	$1, %r13d
	jmp	.L4
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.text
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB40:
	.cfi_startproc
	endbr64
	movl	%esi, %r8d
	.p2align 4,,10
	.p2align 3
.L16:
	cmpl	%edi, %r8d
	jle	.L15
	movl	%edi, %eax
	movl	%r8d, %edi
	movl	%eax, %r8d
.L15:
	movl	%edi, %eax
	cltd
	idivl	%r8d
	movl	%edx, %edi
	testl	%edx, %edx
	jne	.L16
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE40:
	.size	gcd, .-gcd
	.p2align 4
	.globl	Exgcd
	.type	Exgcd, @function
Exgcd:
.LFB41:
	.cfi_startproc
	endbr64
	movq	%rdx, %r10
	movq	%rcx, %r9
	cmpl	%r8d, %esi
	je	.L22
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	%edi, %eax
	movl	$1, %ecx
	movl	%esi, %edi
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L21:
	cltd
	movl	%esi, %r11d
	idivl	%edi
	movl	%eax, %ebx
	imull	%ecx, %eax
	imull	%esi, %ebx
	movl	(%r10), %esi
	movl	%r11d, (%r10)
	movl	%ecx, %r11d
	movl	(%r9), %ecx
	movl	%r11d, (%r9)
	subl	%eax, %ecx
	subl	%ebx, %esi
	movl	%edi, %eax
	movl	%edx, %edi
	cmpl	%r8d, %edx
	jne	.L21
	movl	%esi, (%r10)
	popq	%rbx
	.cfi_def_cfa_offset 8
	movl	%ecx, (%r9)
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore 3
	movl	$1, %ecx
	xorl	%esi, %esi
	movl	%esi, (%rdx)
	movl	%ecx, (%r9)
	ret
	.cfi_endproc
.LFE41:
	.size	Exgcd, .-Exgcd
	.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
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include<stdio.h>
#include<stdlib.h>
//#define lli long long int
int gcd(int, int);
void Exgcd(int, int,int*,int*,int);
int main() {
	int a, b, c, i, j, x=1, y=0;
	scanf("%d%d", &a,&b);
	c = gcd(a, b);
	Exgcd(a, b, &x, &y, c);
	printf("%d %d\n", x, y);
	return 0;
}

int gcd(int x, int y) {
	int tmp;
	if (x < y) { tmp = x; x = y; y = tmp; }
	if (x%y == 0) return y;
	gcd(x%y, y);
}

void Exgcd(int a, int b,int *x,int *y,int c){
	int tmp,x2=0,y2=1,q;
	while (c!=b) {
		q = a / b;
		tmp = x2; x2 = *x - q*x2; *x = tmp;
		tmp = y2; y2 = *y - q*y2; *y = tmp;
		tmp = b; b = a - q*b; a = tmp;
	}
	*x = x2;
	*y = y2;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include<stdio.h>
#include<stdlib.h>
//#define lli long long int
int gcd(int, int);
void Exgcd(int, int,int*,int*,int);
int main() {
	int a, b, c, i, j, x=1, y=0;
	scanf("%d%d", &a,&b);
	c = gcd(a, b);
	Exgcd(a, b, &x, &y, c);
	printf("%d %d\n", x, y);
	return 0;
}

int gcd(int x, int y) {
	int tmp;
	if (x < y) { tmp = x; x = y; y = tmp; }
	if (x%y == 0) return y;
	gcd(x%y, y);
}

void Exgcd(int a, int b,int *x,int *y,int c){
	int tmp,x2=0,y2=1,q;
	while (c!=b) {
		q = a / b;
		tmp = x2; x2 = *x - q*x2; *x = tmp;
		tmp = y2; y2 = *y - q*y2; *y = tmp;
		tmp = b; b = a - q*b; a = tmp;
	}
	*x = x2;
	*y = y2;
}```

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:

5 8
 5 15
 5 1
 5 2
 15 2
 55 2
 61 2
 47 2
 11 2
 6 8

-3 2
 1 0
 0 1
 1 -2
 1 -7
 1 -27
 1 -30
 1 -23
 1 -5
 -1 1

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

```c
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include<stdio.h>
#include<stdlib.h>
//#define lli long long int
int gcd(int, int);
void Exgcd(int, int,int*,int*,int);
int main() {
	int a, b, c, i, j, x=1, y=0;
	scanf("%d%d", &a,&b);
	c = gcd(a, b);
	Exgcd(a, b, &x, &y, c);
	printf("%d %d\n", x, y);
	return 0;
}

int gcd(int x, int y) {
	int tmp;
	if (x < y) { tmp = x; x = y; y = tmp; }
	if (x%y == 0) return y;
	gcd(x%y, y);
}

void Exgcd(int a, int b,int *x,int *y,int c){
	int tmp,x2=0,y2=1,q;
	while (c!=b) {
		q = a / b;
		tmp = x2; x2 = *x - q*x2; *x = tmp;
		tmp = y2; y2 = *y - q*y2; *y = tmp;
		tmp = b; b = a - q*b; a = tmp;
	}
	*x = x2;
	*y = y2;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	4(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	movl	(%rsp), %esi
	movl	%r8d, %edi
	movl	%esi, %ecx
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	%ecx, %edi
	jle	.L2
	movl	%ecx, %eax
	movl	%edi, %ecx
	movl	%eax, %edi
.L2:
	movl	%ecx, %eax
	cltd
	idivl	%edi
	movl	%edx, %ecx
	testl	%edx, %edx
	jne	.L3
	cmpl	%edi, %r8d
	je	.L8
	xorl	%r10d, %r10d
	movl	$1, %r11d
	movl	$1, %r9d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%r13d, %r9d
	movl	%r12d, %r10d
.L5:
	movl	%esi, %eax
	cltd
	idivl	%r8d
	movl	%eax, %esi
	imull	%r9d, %eax
	imull	%r10d, %esi
	subl	%eax, %ecx
	subl	%esi, %r11d
	movl	%ecx, %r13d
	movl	%r8d, %esi
	movl	%r9d, %ecx
	movl	%r11d, %r12d
	movl	%edx, %r8d
	movl	%r10d, %r11d
	cmpl	%edx, %edi
	jne	.L9
.L4:
	xorl	%eax, %eax
	movl	%r13d, %ecx
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L13
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	xorl	%r12d, %r12d
	movl	$1, %r13d
	jmp	.L4
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.text
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB40:
	.cfi_startproc
	endbr64
	movl	%esi, %r8d
	.p2align 4,,10
	.p2align 3
.L16:
	cmpl	%edi, %r8d
	jle	.L15
	movl	%edi, %eax
	movl	%r8d, %edi
	movl	%eax, %r8d
.L15:
	movl	%edi, %eax
	cltd
	idivl	%r8d
	movl	%edx, %edi
	testl	%edx, %edx
	jne	.L16
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE40:
	.size	gcd, .-gcd
	.p2align 4
	.globl	Exgcd
	.type	Exgcd, @function
Exgcd:
.LFB41:
	.cfi_startproc
	endbr64
	movq	%rdx, %r10
	movq	%rcx, %r9
	cmpl	%r8d, %esi
	je	.L22
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	%edi, %eax
	movl	$1, %ecx
	movl	%esi, %edi
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L21:
	cltd
	movl	%esi, %r11d
	idivl	%edi
	movl	%eax, %ebx
	imull	%ecx, %eax
	imull	%esi, %ebx
	movl	(%r10), %esi
	movl	%r11d, (%r10)
	movl	%ecx, %r11d
	movl	(%r9), %ecx
	movl	%r11d, (%r9)
	subl	%eax, %ecx
	subl	%ebx, %esi
	movl	%edi, %eax
	movl	%edx, %edi
	cmpl	%r8d, %edx
	jne	.L21
	movl	%esi, (%r10)
	popq	%rbx
	.cfi_def_cfa_offset 8
	movl	%ecx, (%r9)
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore 3
	movl	$1, %ecx
	xorl	%esi, %esi
	movl	%esi, (%rdx)
	movl	%ecx, (%r9)
	ret
	.cfi_endproc
.LFE41:
	.size	Exgcd, .-Exgcd
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	4(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	movl	(%rsp), %esi
	movl	%r8d, %edi
	movl	%esi, %ecx
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	%ecx, %edi
	jle	.L2
	movl	%ecx, %eax
	movl	%edi, %ecx
	movl	%eax, %edi
.L2:
	movl	%ecx, %eax
	cltd
	idivl	%edi
	movl	%edx, %ecx
	testl	%edx, %edx
	jne	.L3
	cmpl	%edi, %r8d
	je	.L8
	xorl	%r10d, %r10d
	movl	$1, %r11d
	movl	$1, %r9d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%r13d, %r9d
	movl	%r12d, %r10d
.L5:
	movl	%esi, %eax
	cltd
	idivl	%r8d
	movl	%eax, %esi
	imull	%r9d, %eax
	imull	%r10d, %esi
	subl	%eax, %ecx
	subl	%esi, %r11d
	movl	%ecx, %r13d
	movl	%r8d, %esi
	movl	%r9d, %ecx
	movl	%r11d, %r12d
	movl	%edx, %r8d
	movl	%r10d, %r11d
	cmpl	%edx, %edi
	jne	.L9
.L4:
	xorl	%eax, %eax
	movl	%r13d, %ecx
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L13
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	xorl	%r12d, %r12d
	movl	$1, %r13d
	jmp	.L4
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.text
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB40:
	.cfi_startproc
	endbr64
	movl	%esi, %r8d
	.p2align 4,,10
	.p2align 3
.L16:
	cmpl	%edi, %r8d
	jle	.L15
	movl	%edi, %eax
	movl	%r8d, %edi
	movl	%eax, %r8d
.L15:
	movl	%edi, %eax
	cltd
	idivl	%r8d
	movl	%edx, %edi
	testl	%edx, %edx
	jne	.L16
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE40:
	.size	gcd, .-gcd
	.p2align 4
	.globl	Exgcd
	.type	Exgcd, @function
Exgcd:
.LFB41:
	.cfi_startproc
	endbr64
	movq	%rdx, %r10
	movq	%rcx, %r9
	cmpl	%r8d, %esi
	je	.L22
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	%edi, %eax
	movl	$1, %ecx
	movl	%esi, %edi
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L21:
	cltd
	movl	%esi, %r11d
	idivl	%edi
	movl	%eax, %ebx
	imull	%ecx, %eax
	imull	%esi, %ebx
	movl	(%r10), %esi
	movl	%r11d, (%r10)
	movl	%ecx, %r11d
	movl	(%r9), %ecx
	movl	%r11d, (%r9)
	subl	%eax, %ecx
	subl	%ebx, %esi
	movl	%edi, %eax
	movl	%edx, %edi
	cmpl	%r8d, %edx
	jne	.L21
	movl	%esi, (%r10)
	popq	%rbx
	.cfi_def_cfa_offset 8
	movl	%ecx, (%r9)
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore 3
	movl	$1, %ecx
	xorl	%esi, %esi
	movl	%esi, (%rdx)
	movl	%ecx, (%r9)
	ret
	.cfi_endproc
.LFE41:
	.size	Exgcd, .-Exgcd
	.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:
```