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 mex(int a,int b){
	int s=0;
	while(((1<<a|1<<b)>>s)&1)s++;
	return s;
}

int main(){
	int k;
	scanf("%d",&k);
	int ans=0;
	while(k--){
		long long a,r;
		scanf("%lld%lld",&a,&r);
		int g[2]={r%2,1^r%2};
		while(!(r/2<a&&a<=r)){
			long long nr=r/2;
			int ng[2];
			ng[nr%2]=mex(g[0],g[(nr+1)%2]);
			ng[(nr%2)^1]=mex(g[0],ng[nr%2]);
			r=nr;
			g[0]=ng[0];
			g[1]=ng[1];
		}
		ans^=g[a%2];
	}
	puts(ans?"mo3tthi":"tubuann");
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	mex
	.type	mex, @function
mex:
.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, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L3:
	addl	$1, -4(%rbp)
.L2:
	movl	-20(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	-24(%rbp), %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	orl	%eax, %edx
	movl	-4(%rbp), %eax
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L3
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	mex, .-mex
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld%lld"
.LC2:
	.string	"mo3tthi"
.LC3:
	.string	"tubuann"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-72(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -68(%rbp)
	jmp	.L6
.L9:
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-56(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	movl	%eax, -40(%rbp)
	movq	-56(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	xorl	$1, %eax
	movl	%eax, -36(%rbp)
	jmp	.L7
.L8:
	movq	-56(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -48(%rbp)
	movq	-48(%rbp), %rax
	addq	$1, %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	movl	-40(%rbp,%rax,4), %ecx
	movl	-40(%rbp), %edx
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	sarq	$63, %rsi
	shrq	$63, %rsi
	addq	%rsi, %rax
	andl	$1, %eax
	subq	%rsi, %rax
	movq	%rax, %rbx
	movl	%ecx, %esi
	movl	%edx, %edi
	call	mex
	movl	%eax, -32(%rbp,%rbx,4)
	movq	-48(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	movl	-32(%rbp,%rax,4), %ecx
	movl	-40(%rbp), %edx
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	sarq	$63, %rsi
	shrq	$63, %rsi
	addq	%rsi, %rax
	andl	$1, %eax
	subq	%rsi, %rax
	xorq	$1, %rax
	movq	%rax, %rbx
	movl	%ecx, %esi
	movl	%edx, %edi
	call	mex
	movl	%eax, -32(%rbp,%rbx,4)
	movq	-48(%rbp), %rax
	movq	%rax, -56(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -40(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -36(%rbp)
.L7:
	movq	-56(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	cmpq	%rax, %rdx
	jge	.L8
	movq	-64(%rbp), %rdx
	movq	-56(%rbp), %rax
	cmpq	%rax, %rdx
	jg	.L8
	movq	-64(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	movl	-40(%rbp,%rax,4), %eax
	xorl	%eax, -68(%rbp)
.L6:
	movl	-72(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -72(%rbp)
	testl	%eax, %eax
	jne	.L9
	cmpl	$0, -68(%rbp)
	je	.L10
	leaq	.LC2(%rip), %rax
	jmp	.L11
.L10:
	leaq	.LC3(%rip), %rax
.L11:
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	mex
	.type	mex, @function
mex:
.LFB23:
	.cfi_startproc
	endbr64
	movl	$1, %eax
	movl	%edi, %ecx
	movl	%eax, %edx
	sall	%cl, %edx
	movl	%esi, %ecx
	sall	%cl, %eax
	orl	%eax, %edx
	movl	%edx, %eax
	andl	$1, %eax
	je	.L1
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L3:
	addl	$1, %eax
	btl	%eax, %edx
	jc	.L3
.L1:
	ret
	.cfi_endproc
.LFE23:
	.size	mex, .-mex
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"mo3tthi"
.LC1:
	.string	"tubuann"
.LC2:
	.string	"%d"
.LC3:
	.string	"%lld%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC2(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$48, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 4(%rsp)
	testl	%eax, %eax
	je	.L19
	xorl	%ebx, %ebx
	leaq	16(%rsp), %r13
	leaq	8(%rsp), %r12
	movl	$1, %r14d
	leaq	.LC3(%rip), %rbp
.L10:
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rdx
	movq	8(%rsp), %r8
	movq	%rdx, %rcx
	movq	%rdx, %rdi
	shrq	$63, %rcx
	shrq	$63, %rdi
	leaq	(%rdx,%rcx), %rax
	addq	%rdx, %rdi
	andl	$1, %eax
	sarq	%rdi
	subq	%rcx, %rax
	movl	%eax, %esi
	movd	%eax, %xmm0
	movl	%eax, %ecx
	xorl	$1, %esi
	movd	%esi, %xmm1
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, 24(%rsp)
	cmpq	%r8, %rdx
	jl	.L30
	cmpq	%r8, %rdi
	jl	.L18
	.p2align 4,,10
	.p2align 3
.L30:
	movq	%rdi, %rax
	movl	%r14d, %edx
	shrq	$63, %rax
	sall	%cl, %edx
	leaq	(%rdi,%rax), %rsi
	andl	$1, %esi
	subq	%rax, %rsi
	leaq	1(%rdi), %rax
	movq	%rax, %rcx
	shrq	$63, %rcx
	addq	%rcx, %rax
	andl	$1, %eax
	subq	%rcx, %rax
	movl	24(%rsp,%rax,4), %ecx
	movl	%edx, %eax
	btsl	%ecx, %eax
	movl	%eax, %ecx
	andl	$1, %ecx
	je	.L23
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L15:
	addl	$1, %ecx
	btl	%ecx, %eax
	jc	.L15
	movl	%r14d, %eax
	sall	%cl, %eax
.L14:
	orl	%eax, %edx
	movl	%ecx, 32(%rsp,%rsi,4)
	xorq	$1, %rsi
	movl	%edx, %eax
	andl	$1, %eax
	je	.L16
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L17:
	addl	$1, %eax
	btl	%eax, %edx
	jc	.L17
.L16:
	movl	%eax, 32(%rsp,%rsi,4)
	movq	32(%rsp), %rax
	movq	%rdi, 16(%rsp)
	movl	32(%rsp), %ecx
	movq	%rax, 24(%rsp)
	movq	%rdi, %rax
	shrq	$63, %rax
	addq	%rdi, %rax
	sarq	%rax
	cmpq	%r8, %rax
	jge	.L24
	cmpq	%rdi, %r8
	jle	.L18
.L24:
	movq	%rax, %rdi
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L23:
	movl	$1, %eax
	jmp	.L14
.L18:
	movq	%r8, %rdx
	shrq	$63, %rdx
	leaq	(%r8,%rdx), %rax
	andl	$1, %eax
	subq	%rdx, %rax
	movl	24(%rsp,%rax,4), %edx
	movl	4(%rsp), %eax
	movl	%edx, %esi
	leal	-1(%rax), %ecx
	movl	%ecx, 4(%rsp)
	xorl	%ebx, %esi
	testl	%eax, %eax
	je	.L33
	movl	%esi, %ebx
	jmp	.L10
.L33:
	cmpl	%ebx, %edx
	je	.L19
	leaq	.LC0(%rip), %rdi
.L11:
	call	puts@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L34
	addq	$48, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L19:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	jmp	.L11
.L34:
	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
	.file	"temp.c"
	.text
	.p2align 4
	.globl	mex
	.type	mex, @function
mex:
.LFB23:
	.cfi_startproc
	endbr64
	movl	$1, %eax
	movl	%edi, %ecx
	movl	%eax, %edx
	sall	%cl, %edx
	movl	%esi, %ecx
	sall	%cl, %eax
	orl	%eax, %edx
	movl	%edx, %eax
	andl	$1, %eax
	je	.L1
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L3:
	addl	$1, %eax
	btl	%eax, %edx
	jc	.L3
.L1:
	ret
	.cfi_endproc
.LFE23:
	.size	mex, .-mex
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"mo3tthi"
.LC1:
	.string	"tubuann"
.LC2:
	.string	"%d"
.LC3:
	.string	"%lld%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC2(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$48, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 4(%rsp)
	testl	%eax, %eax
	je	.L19
	xorl	%ebx, %ebx
	leaq	16(%rsp), %r13
	leaq	8(%rsp), %r12
	movl	$1, %r14d
	leaq	.LC3(%rip), %rbp
.L10:
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rdx
	movq	8(%rsp), %r8
	movq	%rdx, %rcx
	movq	%rdx, %rdi
	shrq	$63, %rcx
	shrq	$63, %rdi
	leaq	(%rdx,%rcx), %rax
	addq	%rdx, %rdi
	andl	$1, %eax
	sarq	%rdi
	subq	%rcx, %rax
	movl	%eax, %esi
	movd	%eax, %xmm0
	movl	%eax, %ecx
	xorl	$1, %esi
	movd	%esi, %xmm1
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, 24(%rsp)
	cmpq	%r8, %rdx
	jl	.L30
	cmpq	%r8, %rdi
	jl	.L18
	.p2align 4,,10
	.p2align 3
.L30:
	movq	%rdi, %rax
	movl	%r14d, %edx
	shrq	$63, %rax
	sall	%cl, %edx
	leaq	(%rdi,%rax), %rsi
	andl	$1, %esi
	subq	%rax, %rsi
	leaq	1(%rdi), %rax
	movq	%rax, %rcx
	shrq	$63, %rcx
	addq	%rcx, %rax
	andl	$1, %eax
	subq	%rcx, %rax
	movl	24(%rsp,%rax,4), %ecx
	movl	%edx, %eax
	btsl	%ecx, %eax
	movl	%eax, %ecx
	andl	$1, %ecx
	je	.L23
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L15:
	addl	$1, %ecx
	btl	%ecx, %eax
	jc	.L15
	movl	%r14d, %eax
	sall	%cl, %eax
.L14:
	orl	%eax, %edx
	movl	%ecx, 32(%rsp,%rsi,4)
	xorq	$1, %rsi
	movl	%edx, %eax
	andl	$1, %eax
	je	.L16
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L17:
	addl	$1, %eax
	btl	%eax, %edx
	jc	.L17
.L16:
	movl	%eax, 32(%rsp,%rsi,4)
	movq	32(%rsp), %rax
	movq	%rdi, 16(%rsp)
	movl	32(%rsp), %ecx
	movq	%rax, 24(%rsp)
	movq	%rdi, %rax
	shrq	$63, %rax
	addq	%rdi, %rax
	sarq	%rax
	cmpq	%r8, %rax
	jge	.L24
	cmpq	%rdi, %r8
	jle	.L18
.L24:
	movq	%rax, %rdi
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L23:
	movl	$1, %eax
	jmp	.L14
.L18:
	movq	%r8, %rdx
	shrq	$63, %rdx
	leaq	(%r8,%rdx), %rax
	andl	$1, %eax
	subq	%rdx, %rax
	movl	24(%rsp,%rax,4), %edx
	movl	4(%rsp), %eax
	movl	%edx, %esi
	leal	-1(%rax), %ecx
	movl	%ecx, 4(%rsp)
	xorl	%ebx, %esi
	testl	%eax, %eax
	je	.L33
	movl	%esi, %ebx
	jmp	.L10
.L33:
	cmpl	%ebx, %edx
	je	.L19
	leaq	.LC0(%rip), %rdi
.L11:
	call	puts@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L34
	addq	$48, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L19:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	jmp	.L11
.L34:
	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:

#include <stdio.h>

int mex(int a,int b){
	int s=0;
	while(((1<<a|1<<b)>>s)&1)s++;
	return s;
}

int main(){
	int k;
	scanf("%d",&k);
	int ans=0;
	while(k--){
		long long a,r;
		scanf("%lld%lld",&a,&r);
		int g[2]={r%2,1^r%2};
		while(!(r/2<a&&a<=r)){
			long long nr=r/2;
			int ng[2];
			ng[nr%2]=mex(g[0],g[(nr+1)%2]);
			ng[(nr%2)^1]=mex(g[0],ng[nr%2]);
			r=nr;
			g[0]=ng[0];
			g[1]=ng[1];
		}
		ans^=g[a%2];
	}
	puts(ans?"mo3tthi":"tubuann");
}

1
2 5
 2
1 3
3 9
 2
1 3
3 8
 10
2 8
5 9
7 20
8 41
23 48
112 112
4 5
7 7
2344 8923
1 29
 1
2 6
 10
2 14
5 9
7 20
8 41
23 48
112 112
4 5
7 7
2344 8923
1 29
 1
2 7
 10
2 14
5 9
7 20
12 41
23 48
112 112
4 5
7 7
2344 8923
1 29
 1
1 6
 10
2 14
5 9
7 20
12 41
23 48
112 112
4 5
7 8
2344 8923
1 29

mo3tthi
 tubuann
 mo3tthi
 mo3tthi
 mo3tthi
 mo3tthi
 mo3tthi
 tubuann
 tubuann
 mo3tthi

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 mex(int a,int b){
	int s=0;
	while(((1<<a|1<<b)>>s)&1)s++;
	return s;
}

int main(){
	int k;
	scanf("%d",&k);
	int ans=0;
	while(k--){
		long long a,r;
		scanf("%lld%lld",&a,&r);
		int g[2]={r%2,1^r%2};
		while(!(r/2<a&&a<=r)){
			long long nr=r/2;
			int ng[2];
			ng[nr%2]=mex(g[0],g[(nr+1)%2]);
			ng[(nr%2)^1]=mex(g[0],ng[nr%2]);
			r=nr;
			g[0]=ng[0];
			g[1]=ng[1];
		}
		ans^=g[a%2];
	}
	puts(ans?"mo3tthi":"tubuann");
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	mex
	.type	mex, @function
mex:
.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, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L3:
	addl	$1, -4(%rbp)
.L2:
	movl	-20(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	-24(%rbp), %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	orl	%eax, %edx
	movl	-4(%rbp), %eax
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L3
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	mex, .-mex
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld%lld"
.LC2:
	.string	"mo3tthi"
.LC3:
	.string	"tubuann"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-72(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -68(%rbp)
	jmp	.L6
.L9:
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-56(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	movl	%eax, -40(%rbp)
	movq	-56(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	xorl	$1, %eax
	movl	%eax, -36(%rbp)
	jmp	.L7
.L8:
	movq	-56(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -48(%rbp)
	movq	-48(%rbp), %rax
	addq	$1, %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	movl	-40(%rbp,%rax,4), %ecx
	movl	-40(%rbp), %edx
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	sarq	$63, %rsi
	shrq	$63, %rsi
	addq	%rsi, %rax
	andl	$1, %eax
	subq	%rsi, %rax
	movq	%rax, %rbx
	movl	%ecx, %esi
	movl	%edx, %edi
	call	mex
	movl	%eax, -32(%rbp,%rbx,4)
	movq	-48(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	movl	-32(%rbp,%rax,4), %ecx
	movl	-40(%rbp), %edx
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	sarq	$63, %rsi
	shrq	$63, %rsi
	addq	%rsi, %rax
	andl	$1, %eax
	subq	%rsi, %rax
	xorq	$1, %rax
	movq	%rax, %rbx
	movl	%ecx, %esi
	movl	%edx, %edi
	call	mex
	movl	%eax, -32(%rbp,%rbx,4)
	movq	-48(%rbp), %rax
	movq	%rax, -56(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -40(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -36(%rbp)
.L7:
	movq	-56(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	cmpq	%rax, %rdx
	jge	.L8
	movq	-64(%rbp), %rdx
	movq	-56(%rbp), %rax
	cmpq	%rax, %rdx
	jg	.L8
	movq	-64(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	movl	-40(%rbp,%rax,4), %eax
	xorl	%eax, -68(%rbp)
.L6:
	movl	-72(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -72(%rbp)
	testl	%eax, %eax
	jne	.L9
	cmpl	$0, -68(%rbp)
	je	.L10
	leaq	.LC2(%rip), %rax
	jmp	.L11
.L10:
	leaq	.LC3(%rip), %rax
.L11:
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	mex
	.type	mex, @function
mex:
.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, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L3:
	addl	$1, -4(%rbp)
.L2:
	movl	-20(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	-24(%rbp), %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	orl	%eax, %edx
	movl	-4(%rbp), %eax
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L3
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	mex, .-mex
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld%lld"
.LC2:
	.string	"mo3tthi"
.LC3:
	.string	"tubuann"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-72(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -68(%rbp)
	jmp	.L6
.L9:
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-56(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	movl	%eax, -40(%rbp)
	movq	-56(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	xorl	$1, %eax
	movl	%eax, -36(%rbp)
	jmp	.L7
.L8:
	movq	-56(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -48(%rbp)
	movq	-48(%rbp), %rax
	addq	$1, %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	movl	-40(%rbp,%rax,4), %ecx
	movl	-40(%rbp), %edx
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	sarq	$63, %rsi
	shrq	$63, %rsi
	addq	%rsi, %rax
	andl	$1, %eax
	subq	%rsi, %rax
	movq	%rax, %rbx
	movl	%ecx, %esi
	movl	%edx, %edi
	call	mex
	movl	%eax, -32(%rbp,%rbx,4)
	movq	-48(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	movl	-32(%rbp,%rax,4), %ecx
	movl	-40(%rbp), %edx
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	sarq	$63, %rsi
	shrq	$63, %rsi
	addq	%rsi, %rax
	andl	$1, %eax
	subq	%rsi, %rax
	xorq	$1, %rax
	movq	%rax, %rbx
	movl	%ecx, %esi
	movl	%edx, %edi
	call	mex
	movl	%eax, -32(%rbp,%rbx,4)
	movq	-48(%rbp), %rax
	movq	%rax, -56(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -40(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -36(%rbp)
.L7:
	movq	-56(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	cmpq	%rax, %rdx
	jge	.L8
	movq	-64(%rbp), %rdx
	movq	-56(%rbp), %rax
	cmpq	%rax, %rdx
	jg	.L8
	movq	-64(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	movl	-40(%rbp,%rax,4), %eax
	xorl	%eax, -68(%rbp)
.L6:
	movl	-72(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -72(%rbp)
	testl	%eax, %eax
	jne	.L9
	cmpl	$0, -68(%rbp)
	je	.L10
	leaq	.LC2(%rip), %rax
	jmp	.L11
.L10:
	leaq	.LC3(%rip), %rax
.L11:
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
