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

```c
// Aizu Vol-1 0197: Greatest Common Divisor: Euclidean Algor...
// 2017.8.2

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

char *gets(char *);
char buf[100], *p;

int getInt(void)
{
	int n = 0;
	while (isspace(*p)) p++;
	while (isdigit(*p)) n = 10 * n + (*p++ - '0');
	return n;
}

int main()
{
	int a, x, y, k;

	while (1) {
		gets(p = buf); x = getInt(), y = getInt();
		if (!x) break;
		if (x < y) a = x, x = y, y = a;
		k = 0;
		while (y) {
			x = x % y;
			a = x, x = y, y = a;
			k++;
		}
		printf("%d %d\n", x, k);
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	getInt
	.type	getInt, @function
getInt:
.LFB41:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	__ctype_b_loc@PLT
	movq	(%rax), %rsi
	movq	p(%rip), %rax
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %ecx
	testb	$32, %ch
	je	.L2
	leaq	1(%rax), %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rdx, p(%rip)
	movsbq	(%rdx), %rcx
	movq	%rdx, %rax
	addq	$1, %rdx
	movzwl	(%rsi,%rcx,2), %ecx
	testb	$32, %ch
	jne	.L3
.L2:
	andb	$8, %ch
	je	.L6
	addq	$1, %rax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rax, %rdx
	movq	%rax, p(%rip)
	movsbl	-1(%rax), %ecx
	leal	(%r8,%r8,4), %edi
	movsbq	(%rdx), %rdx
	addq	$1, %rax
	leal	-48(%rcx,%rdi,2), %r8d
	testb	$8, 1(%rsi,%rdx,2)
	jne	.L5
	movl	%r8d, %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	xorl	%r8d, %r8d
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE41:
	.size	getInt, .-getInt
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB42:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	buf(%rip), %rbx
	call	__ctype_b_loc@PLT
	movq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L26:
	movq	%rbx, %rdi
	movq	%rbx, p(%rip)
	call	gets@PLT
	movq	p(%rip), %rax
	movq	0(%rbp), %rsi
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %edx
	testb	$32, %dh
	je	.L15
	.p2align 4,,10
	.p2align 3
.L16:
	addq	$1, %rax
	movq	%rax, p(%rip)
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %edx
	testb	$32, %dh
	jne	.L16
.L15:
	andb	$8, %dh
	je	.L17
	addq	$1, %rax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L18:
	movq	%rax, p(%rip)
	leal	(%rdx,%rdx,4), %edi
	movsbl	-1(%rax), %edx
	addq	$1, %rax
	leal	-48(%rdx,%rdi,2), %edx
	movsbq	-1(%rax), %rdi
	movzwl	(%rsi,%rdi,2), %edi
	testw	$2048, %di
	jne	.L18
	testw	$8192, %di
	je	.L19
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%rax, p(%rip)
	movsbq	(%rax), %rdi
	addq	$1, %rax
	movzwl	(%rsi,%rdi,2), %edi
	testw	$8192, %di
	jne	.L20
	testw	$2048, %di
	je	.L19
	movq	%rax, %rcx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%rcx, %rdi
	movq	%rcx, p(%rip)
	leal	(%rax,%rax,4), %r8d
	movsbl	-1(%rcx), %eax
	movsbq	(%rdi), %rdi
	addq	$1, %rcx
	leal	-48(%rax,%r8,2), %eax
	testb	$8, 1(%rsi,%rdi,2)
	jne	.L21
	testl	%edx, %edx
	je	.L17
	cmpl	%edx, %eax
	jg	.L24
	testl	%eax, %eax
	je	.L27
	movl	%eax, %ecx
	movl	%edx, %eax
	movl	%ecx, %edx
.L24:
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L25:
	movl	%edx, %r8d
	cltd
	addl	$1, %ecx
	idivl	%r8d
	movl	%r8d, %eax
	testl	%edx, %edx
	jne	.L25
.L23:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L17:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	testl	%edx, %edx
	je	.L17
	movl	%edx, %ecx
	movl	%edx, %r8d
	shrl	$31, %ecx
	jmp	.L23
.L27:
	xorl	%ecx, %ecx
	movl	%edx, %r8d
	jmp	.L23
	.cfi_endproc
.LFE42:
	.size	main, .-main
	.globl	p
	.bss
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 100
buf:
	.zero	100
	.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	getInt
	.type	getInt, @function
getInt:
.LFB41:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	__ctype_b_loc@PLT
	movq	(%rax), %rsi
	movq	p(%rip), %rax
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %ecx
	testb	$32, %ch
	je	.L2
	leaq	1(%rax), %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rdx, p(%rip)
	movsbq	(%rdx), %rcx
	movq	%rdx, %rax
	addq	$1, %rdx
	movzwl	(%rsi,%rcx,2), %ecx
	testb	$32, %ch
	jne	.L3
.L2:
	andb	$8, %ch
	je	.L6
	addq	$1, %rax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rax, %rdx
	movq	%rax, p(%rip)
	movsbl	-1(%rax), %ecx
	leal	(%r8,%r8,4), %edi
	movsbq	(%rdx), %rdx
	addq	$1, %rax
	leal	-48(%rcx,%rdi,2), %r8d
	testb	$8, 1(%rsi,%rdx,2)
	jne	.L5
	movl	%r8d, %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	xorl	%r8d, %r8d
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE41:
	.size	getInt, .-getInt
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB42:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	buf(%rip), %rbx
	call	__ctype_b_loc@PLT
	movq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L26:
	movq	%rbx, %rdi
	movq	%rbx, p(%rip)
	call	gets@PLT
	movq	p(%rip), %rax
	movq	0(%rbp), %rsi
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %edx
	testb	$32, %dh
	je	.L15
	.p2align 4,,10
	.p2align 3
.L16:
	addq	$1, %rax
	movq	%rax, p(%rip)
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %edx
	testb	$32, %dh
	jne	.L16
.L15:
	andb	$8, %dh
	je	.L17
	addq	$1, %rax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L18:
	movq	%rax, p(%rip)
	leal	(%rdx,%rdx,4), %edi
	movsbl	-1(%rax), %edx
	addq	$1, %rax
	leal	-48(%rdx,%rdi,2), %edx
	movsbq	-1(%rax), %rdi
	movzwl	(%rsi,%rdi,2), %edi
	testw	$2048, %di
	jne	.L18
	testw	$8192, %di
	je	.L19
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%rax, p(%rip)
	movsbq	(%rax), %rdi
	addq	$1, %rax
	movzwl	(%rsi,%rdi,2), %edi
	testw	$8192, %di
	jne	.L20
	testw	$2048, %di
	je	.L19
	movq	%rax, %rcx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%rcx, %rdi
	movq	%rcx, p(%rip)
	leal	(%rax,%rax,4), %r8d
	movsbl	-1(%rcx), %eax
	movsbq	(%rdi), %rdi
	addq	$1, %rcx
	leal	-48(%rax,%r8,2), %eax
	testb	$8, 1(%rsi,%rdi,2)
	jne	.L21
	testl	%edx, %edx
	je	.L17
	cmpl	%edx, %eax
	jg	.L24
	testl	%eax, %eax
	je	.L27
	movl	%eax, %ecx
	movl	%edx, %eax
	movl	%ecx, %edx
.L24:
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L25:
	movl	%edx, %r8d
	cltd
	addl	$1, %ecx
	idivl	%r8d
	movl	%r8d, %eax
	testl	%edx, %edx
	jne	.L25
.L23:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L17:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	testl	%edx, %edx
	je	.L17
	movl	%edx, %ecx
	movl	%edx, %r8d
	shrl	$31, %ecx
	jmp	.L23
.L27:
	xorl	%ecx, %ecx
	movl	%edx, %r8d
	jmp	.L23
	.cfi_endproc
.LFE42:
	.size	main, .-main
	.globl	p
	.bss
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 100
buf:
	.zero	100
	.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	getInt
	.type	getInt, @function
getInt:
.LFB41:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	__ctype_b_loc@PLT
	movq	(%rax), %rsi
	movq	p(%rip), %rax
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %ecx
	testb	$32, %ch
	je	.L2
	leaq	1(%rax), %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rdx, p(%rip)
	movsbq	(%rdx), %rcx
	movq	%rdx, %rax
	addq	$1, %rdx
	movzwl	(%rsi,%rcx,2), %ecx
	testb	$32, %ch
	jne	.L3
.L2:
	andb	$8, %ch
	je	.L6
	addq	$1, %rax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rax, %rdx
	movq	%rax, p(%rip)
	movsbl	-1(%rax), %ecx
	leal	(%r8,%r8,4), %edi
	movsbq	(%rdx), %rdx
	addq	$1, %rax
	leal	-48(%rcx,%rdi,2), %r8d
	testb	$8, 1(%rsi,%rdx,2)
	jne	.L5
	movl	%r8d, %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	xorl	%r8d, %r8d
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE41:
	.size	getInt, .-getInt
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB42:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	buf(%rip), %rbx
	call	__ctype_b_loc@PLT
	movq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L26:
	movq	%rbx, %rdi
	movq	%rbx, p(%rip)
	call	gets@PLT
	movq	p(%rip), %rax
	movq	0(%rbp), %rsi
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %edx
	testb	$32, %dh
	je	.L15
	.p2align 4,,10
	.p2align 3
.L16:
	addq	$1, %rax
	movq	%rax, p(%rip)
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %edx
	testb	$32, %dh
	jne	.L16
.L15:
	andb	$8, %dh
	je	.L17
	addq	$1, %rax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L18:
	movq	%rax, p(%rip)
	leal	(%rdx,%rdx,4), %edi
	movsbl	-1(%rax), %edx
	addq	$1, %rax
	leal	-48(%rdx,%rdi,2), %edx
	movsbq	-1(%rax), %rdi
	movzwl	(%rsi,%rdi,2), %edi
	testw	$2048, %di
	jne	.L18
	testw	$8192, %di
	je	.L19
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%rax, p(%rip)
	movsbq	(%rax), %rdi
	addq	$1, %rax
	movzwl	(%rsi,%rdi,2), %edi
	testw	$8192, %di
	jne	.L20
	testw	$2048, %di
	je	.L19
	movq	%rax, %rcx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%rcx, %rdi
	movq	%rcx, p(%rip)
	leal	(%rax,%rax,4), %r8d
	movsbl	-1(%rcx), %eax
	movsbq	(%rdi), %rdi
	addq	$1, %rcx
	leal	-48(%rax,%r8,2), %eax
	testb	$8, 1(%rsi,%rdi,2)
	jne	.L21
	testl	%edx, %edx
	je	.L17
	cmpl	%edx, %eax
	jg	.L24
	testl	%eax, %eax
	je	.L27
	movl	%eax, %ecx
	movl	%edx, %eax
	movl	%ecx, %edx
.L24:
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L25:
	movl	%edx, %r8d
	cltd
	addl	$1, %ecx
	idivl	%r8d
	movl	%r8d, %eax
	testl	%edx, %edx
	jne	.L25
.L23:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L17:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	testl	%edx, %edx
	je	.L17
	movl	%edx, %ecx
	movl	%edx, %r8d
	shrl	$31, %ecx
	jmp	.L23
.L27:
	xorl	%ecx, %ecx
	movl	%edx, %r8d
	jmp	.L23
	.cfi_endproc
.LFE42:
	.size	main, .-main
	.globl	p
	.bss
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 100
buf:
	.zero	100
	.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
// Aizu Vol-1 0197: Greatest Common Divisor: Euclidean Algor...
// 2017.8.2

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

char *gets(char *);
char buf[100], *p;

int getInt(void)
{
	int n = 0;
	while (isspace(*p)) p++;
	while (isdigit(*p)) n = 10 * n + (*p++ - '0');
	return n;
}

int main()
{
	int a, x, y, k;

	while (1) {
		gets(p = buf); x = getInt(), y = getInt();
		if (!x) break;
		if (x < y) a = x, x = y, y = a;
		k = 0;
		while (y) {
			x = x % y;
			a = x, x = y, y = a;
			k++;
		}
		printf("%d %d\n", x, k);
	}
	return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
// Aizu Vol-1 0197: Greatest Common Divisor: Euclidean Algor...
// 2017.8.2

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

char *gets(char *);
char buf[100], *p;

int getInt(void)
{
	int n = 0;
	while (isspace(*p)) p++;
	while (isdigit(*p)) n = 10 * n + (*p++ - '0');
	return n;
}

int main()
{
	int a, x, y, k;

	while (1) {
		gets(p = buf); x = getInt(), y = getInt();
		if (!x) break;
		if (x < y) a = x, x = y, y = a;
		k = 0;
		while (y) {
			x = x % y;
			a = x, x = y, y = a;
			k++;
		}
		printf("%d %d\n", x, k);
	}
	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:

1071 1029
5 3
0 0
 1251 1029
5 3
0 0
 1251 1802
5 3
0 0
 1071 446
5 3
0 0
 1071 2
5 3
0 0
 1071 1029
2 3
0 0
 1251 3458
5 3
0 0
 826 2
5 3
0 0
 1251 3458
10 3
0 0
 1164 1029
4 3
0 0

21 3
1 3
 3 8
1 3
 1 9
1 3
 1 5
1 3
 1 2
1 3
 21 3
1 2
 1 7
1 3
 2 1
1 3
 1 7
1 2
 3 8
1 2

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

```c
// Aizu Vol-1 0197: Greatest Common Divisor: Euclidean Algor...
// 2017.8.2

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

char *gets(char *);
char buf[100], *p;

int getInt(void)
{
	int n = 0;
	while (isspace(*p)) p++;
	while (isdigit(*p)) n = 10 * n + (*p++ - '0');
	return n;
}

int main()
{
	int a, x, y, k;

	while (1) {
		gets(p = buf); x = getInt(), y = getInt();
		if (!x) break;
		if (x < y) a = x, x = y, y = a;
		k = 0;
		while (y) {
			x = x % y;
			a = x, x = y, y = a;
			k++;
		}
		printf("%d %d\n", x, k);
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	getInt
	.type	getInt, @function
getInt:
.LFB41:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	__ctype_b_loc@PLT
	movq	(%rax), %rsi
	movq	p(%rip), %rax
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %ecx
	testb	$32, %ch
	je	.L2
	leaq	1(%rax), %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rdx, p(%rip)
	movsbq	(%rdx), %rcx
	movq	%rdx, %rax
	addq	$1, %rdx
	movzwl	(%rsi,%rcx,2), %ecx
	testb	$32, %ch
	jne	.L3
.L2:
	andb	$8, %ch
	je	.L6
	addq	$1, %rax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rax, %rdx
	movq	%rax, p(%rip)
	movsbl	-1(%rax), %ecx
	leal	(%r8,%r8,4), %edi
	movsbq	(%rdx), %rdx
	addq	$1, %rax
	leal	-48(%rcx,%rdi,2), %r8d
	testb	$8, 1(%rsi,%rdx,2)
	jne	.L5
	movl	%r8d, %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	xorl	%r8d, %r8d
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE41:
	.size	getInt, .-getInt
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB42:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	buf(%rip), %rbx
	call	__ctype_b_loc@PLT
	movq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L26:
	movq	%rbx, %rdi
	movq	%rbx, p(%rip)
	call	gets@PLT
	movq	p(%rip), %rax
	movq	0(%rbp), %rsi
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %edx
	testb	$32, %dh
	je	.L15
	.p2align 4,,10
	.p2align 3
.L16:
	addq	$1, %rax
	movq	%rax, p(%rip)
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %edx
	testb	$32, %dh
	jne	.L16
.L15:
	andb	$8, %dh
	je	.L17
	addq	$1, %rax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L18:
	movq	%rax, p(%rip)
	leal	(%rdx,%rdx,4), %edi
	movsbl	-1(%rax), %edx
	addq	$1, %rax
	leal	-48(%rdx,%rdi,2), %edx
	movsbq	-1(%rax), %rdi
	movzwl	(%rsi,%rdi,2), %edi
	testw	$2048, %di
	jne	.L18
	testw	$8192, %di
	je	.L19
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%rax, p(%rip)
	movsbq	(%rax), %rdi
	addq	$1, %rax
	movzwl	(%rsi,%rdi,2), %edi
	testw	$8192, %di
	jne	.L20
	testw	$2048, %di
	je	.L19
	movq	%rax, %rcx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%rcx, %rdi
	movq	%rcx, p(%rip)
	leal	(%rax,%rax,4), %r8d
	movsbl	-1(%rcx), %eax
	movsbq	(%rdi), %rdi
	addq	$1, %rcx
	leal	-48(%rax,%r8,2), %eax
	testb	$8, 1(%rsi,%rdi,2)
	jne	.L21
	testl	%edx, %edx
	je	.L17
	cmpl	%edx, %eax
	jg	.L24
	testl	%eax, %eax
	je	.L27
	movl	%eax, %ecx
	movl	%edx, %eax
	movl	%ecx, %edx
.L24:
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L25:
	movl	%edx, %r8d
	cltd
	addl	$1, %ecx
	idivl	%r8d
	movl	%r8d, %eax
	testl	%edx, %edx
	jne	.L25
.L23:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L17:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	testl	%edx, %edx
	je	.L17
	movl	%edx, %ecx
	movl	%edx, %r8d
	shrl	$31, %ecx
	jmp	.L23
.L27:
	xorl	%ecx, %ecx
	movl	%edx, %r8d
	jmp	.L23
	.cfi_endproc
.LFE42:
	.size	main, .-main
	.globl	p
	.bss
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 100
buf:
	.zero	100
	.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	getInt
	.type	getInt, @function
getInt:
.LFB41:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	__ctype_b_loc@PLT
	movq	(%rax), %rsi
	movq	p(%rip), %rax
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %ecx
	testb	$32, %ch
	je	.L2
	leaq	1(%rax), %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rdx, p(%rip)
	movsbq	(%rdx), %rcx
	movq	%rdx, %rax
	addq	$1, %rdx
	movzwl	(%rsi,%rcx,2), %ecx
	testb	$32, %ch
	jne	.L3
.L2:
	andb	$8, %ch
	je	.L6
	addq	$1, %rax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rax, %rdx
	movq	%rax, p(%rip)
	movsbl	-1(%rax), %ecx
	leal	(%r8,%r8,4), %edi
	movsbq	(%rdx), %rdx
	addq	$1, %rax
	leal	-48(%rcx,%rdi,2), %r8d
	testb	$8, 1(%rsi,%rdx,2)
	jne	.L5
	movl	%r8d, %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	xorl	%r8d, %r8d
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE41:
	.size	getInt, .-getInt
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB42:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	buf(%rip), %rbx
	call	__ctype_b_loc@PLT
	movq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L26:
	movq	%rbx, %rdi
	movq	%rbx, p(%rip)
	call	gets@PLT
	movq	p(%rip), %rax
	movq	0(%rbp), %rsi
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %edx
	testb	$32, %dh
	je	.L15
	.p2align 4,,10
	.p2align 3
.L16:
	addq	$1, %rax
	movq	%rax, p(%rip)
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %edx
	testb	$32, %dh
	jne	.L16
.L15:
	andb	$8, %dh
	je	.L17
	addq	$1, %rax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L18:
	movq	%rax, p(%rip)
	leal	(%rdx,%rdx,4), %edi
	movsbl	-1(%rax), %edx
	addq	$1, %rax
	leal	-48(%rdx,%rdi,2), %edx
	movsbq	-1(%rax), %rdi
	movzwl	(%rsi,%rdi,2), %edi
	testw	$2048, %di
	jne	.L18
	testw	$8192, %di
	je	.L19
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%rax, p(%rip)
	movsbq	(%rax), %rdi
	addq	$1, %rax
	movzwl	(%rsi,%rdi,2), %edi
	testw	$8192, %di
	jne	.L20
	testw	$2048, %di
	je	.L19
	movq	%rax, %rcx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%rcx, %rdi
	movq	%rcx, p(%rip)
	leal	(%rax,%rax,4), %r8d
	movsbl	-1(%rcx), %eax
	movsbq	(%rdi), %rdi
	addq	$1, %rcx
	leal	-48(%rax,%r8,2), %eax
	testb	$8, 1(%rsi,%rdi,2)
	jne	.L21
	testl	%edx, %edx
	je	.L17
	cmpl	%edx, %eax
	jg	.L24
	testl	%eax, %eax
	je	.L27
	movl	%eax, %ecx
	movl	%edx, %eax
	movl	%ecx, %edx
.L24:
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L25:
	movl	%edx, %r8d
	cltd
	addl	$1, %ecx
	idivl	%r8d
	movl	%r8d, %eax
	testl	%edx, %edx
	jne	.L25
.L23:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L17:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	testl	%edx, %edx
	je	.L17
	movl	%edx, %ecx
	movl	%edx, %r8d
	shrl	$31, %ecx
	jmp	.L23
.L27:
	xorl	%ecx, %ecx
	movl	%edx, %r8d
	jmp	.L23
	.cfi_endproc
.LFE42:
	.size	main, .-main
	.globl	p
	.bss
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 100
buf:
	.zero	100
	.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:
```