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>
void Men(int,int,int);
int MAX;
int main(void)
{
	int i,Q,c,a,n;
	scanf("%d",&Q);
	for(i=0;i<Q;i++){
		MAX = 0;
		scanf("%d %d %d",&c,&a,&n);
		Men(c,a,n);
		printf("%d\n",MAX);
	}
	return 0;
}

void Men(int c,int a,int n)
{
	int min;
	if(c <= a && c <= n)
		min = c;
	else if(a <= c && a<= n)
		min = a;
	else
		min = n;
	if(c > 0 && a > 0 && n > 0){
		c = c - min; a = a - min; n = n - min;
		MAX = MAX + min;
	}
	if(c > 0 && a > 0){
		if(c/2 <= a)
			min = c/2;
		else 
			min = a;
		c = c - min*2; a = a - min;
		MAX = MAX + min;
	}
	if(c > 0){
		MAX = MAX + c/3;
	}
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	MAX
	.bss
	.align 4
	.type	MAX, @object
	.size	MAX, 4
MAX:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%d\n"
	.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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L2
.L3:
	movl	$0, MAX(%rip)
	leaq	-16(%rbp), %rcx
	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	-16(%rbp), %edx
	movl	-20(%rbp), %ecx
	movl	-24(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	Men
	movl	MAX(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -12(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.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
	.globl	Men
	.type	Men, @function
Men:
.LFB1:
	.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
	cmpl	-24(%rbp), %eax
	jg	.L7
	movl	-20(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jg	.L7
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L8
.L7:
	movl	-24(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L9
	movl	-24(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jg	.L9
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L8
.L9:
	movl	-28(%rbp), %eax
	movl	%eax, -4(%rbp)
.L8:
	cmpl	$0, -20(%rbp)
	jle	.L10
	cmpl	$0, -24(%rbp)
	jle	.L10
	cmpl	$0, -28(%rbp)
	jle	.L10
	movl	-4(%rbp), %eax
	subl	%eax, -20(%rbp)
	movl	-4(%rbp), %eax
	subl	%eax, -24(%rbp)
	movl	-4(%rbp), %eax
	subl	%eax, -28(%rbp)
	movl	MAX(%rip), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, MAX(%rip)
.L10:
	cmpl	$0, -20(%rbp)
	jle	.L11
	cmpl	$0, -24(%rbp)
	jle	.L11
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -24(%rbp)
	jl	.L12
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	jmp	.L13
.L12:
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
.L13:
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	subl	%eax, -20(%rbp)
	movl	-4(%rbp), %eax
	subl	%eax, -24(%rbp)
	movl	MAX(%rip), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, MAX(%rip)
.L11:
	cmpl	$0, -20(%rbp)
	jle	.L15
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	subl	%eax, %edx
	movl	MAX(%rip), %eax
	addl	%edx, %eax
	movl	%eax, MAX(%rip)
.L15:
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	Men, .-Men
	.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"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	xorl	%ebx, %ebx
	leaq	20(%rsp), %r14
	leaq	16(%rsp), %r13
	leaq	12(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	leaq	.LC2(%rip), %r15
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L30:
	testl	%edx, %edx
	jle	.L4
	testl	%ecx, %ecx
	jle	.L5
	addl	%esi, %r8d
	subl	%esi, %eax
	subl	%esi, %edx
	movl	%r8d, MAX(%rip)
	testl	%eax, %eax
	jle	.L6
	testl	%edx, %edx
	jle	.L4
.L5:
	movl	%eax, %ecx
	sarl	%ecx
	cmpl	%edx, %ecx
	cmovle	%ecx, %edx
	addl	%edx, %r8d
	leal	(%rdx,%rdx), %ecx
	movl	%r8d, MAX(%rip)
	subl	%ecx, %eax
.L4:
	testl	%eax, %eax
	jle	.L6
	movslq	%eax, %rdx
	sarl	$31, %eax
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	subl	%eax, %edx
	addl	%r8d, %edx
	movl	%edx, MAX(%rip)
.L28:
	movq	%r15, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jle	.L8
.L2:
	movq	%r14, %rcx
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	movl	$0, MAX(%rip)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %ecx
	movl	16(%rsp), %edx
	movl	12(%rsp), %eax
	cmpl	%edx, %ecx
	movl	%edx, %edi
	cmovle	%ecx, %edi
	movl	%eax, %esi
	cmpl	%edi, %eax
	jle	.L3
	cmpl	%eax, %ecx
	cmovle	%ecx, %esi
	cmpl	%esi, %edx
	movl	%ecx, %esi
	cmovle	%edx, %esi
.L3:
	movl	MAX(%rip), %r8d
	testl	%eax, %eax
	jg	.L30
.L6:
	movl	%r8d, %edx
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L8:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L31:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	Men
	.type	Men, @function
Men:
.LFB24:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	cmpl	%edx, %esi
	movl	%edx, %edi
	cmovle	%esi, %edi
	movl	%eax, %ecx
	cmpl	%edi, %eax
	jle	.L33
	cmpl	%edx, %eax
	movl	%edx, %ecx
	cmovle	%eax, %ecx
	cmpl	%ecx, %esi
	movl	%edx, %ecx
	cmovle	%esi, %ecx
.L33:
	testl	%eax, %eax
	jle	.L32
	testl	%esi, %esi
	jle	.L34
	movl	MAX(%rip), %edi
	testl	%edx, %edx
	jle	.L35
	addl	%ecx, %edi
	subl	%ecx, %eax
	subl	%ecx, %esi
	movl	%edi, MAX(%rip)
	testl	%eax, %eax
	jle	.L32
	testl	%esi, %esi
	jle	.L34
.L35:
	movl	%eax, %edx
	sarl	%edx
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	leal	(%rdx,%rdx), %ecx
	addl	%edi, %edx
	movl	%edx, MAX(%rip)
	subl	%ecx, %eax
.L34:
	testl	%eax, %eax
	jle	.L32
	movslq	%eax, %rdx
	sarl	$31, %eax
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	subl	%eax, %edx
	addl	%edx, MAX(%rip)
.L32:
	ret
	.cfi_endproc
.LFE24:
	.size	Men, .-Men
	.globl	MAX
	.bss
	.align 4
	.type	MAX, @object
	.size	MAX, 4
MAX:
	.zero	4
	.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"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	xorl	%ebx, %ebx
	leaq	20(%rsp), %r14
	leaq	16(%rsp), %r13
	leaq	12(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	leaq	.LC2(%rip), %r15
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L30:
	testl	%edx, %edx
	jle	.L4
	testl	%ecx, %ecx
	jle	.L5
	addl	%esi, %r8d
	subl	%esi, %eax
	subl	%esi, %edx
	movl	%r8d, MAX(%rip)
	testl	%eax, %eax
	jle	.L6
	testl	%edx, %edx
	jle	.L4
.L5:
	movl	%eax, %ecx
	sarl	%ecx
	cmpl	%edx, %ecx
	cmovle	%ecx, %edx
	addl	%edx, %r8d
	leal	(%rdx,%rdx), %ecx
	movl	%r8d, MAX(%rip)
	subl	%ecx, %eax
.L4:
	testl	%eax, %eax
	jle	.L6
	movslq	%eax, %rdx
	sarl	$31, %eax
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	subl	%eax, %edx
	addl	%r8d, %edx
	movl	%edx, MAX(%rip)
.L28:
	movq	%r15, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jle	.L8
.L2:
	movq	%r14, %rcx
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	movl	$0, MAX(%rip)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %ecx
	movl	16(%rsp), %edx
	movl	12(%rsp), %eax
	cmpl	%edx, %ecx
	movl	%edx, %edi
	cmovle	%ecx, %edi
	movl	%eax, %esi
	cmpl	%edi, %eax
	jle	.L3
	cmpl	%eax, %ecx
	cmovle	%ecx, %esi
	cmpl	%esi, %edx
	movl	%ecx, %esi
	cmovle	%edx, %esi
.L3:
	movl	MAX(%rip), %r8d
	testl	%eax, %eax
	jg	.L30
.L6:
	movl	%r8d, %edx
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L8:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L31:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	Men
	.type	Men, @function
Men:
.LFB24:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	cmpl	%edx, %esi
	movl	%edx, %edi
	cmovle	%esi, %edi
	movl	%eax, %ecx
	cmpl	%edi, %eax
	jle	.L33
	cmpl	%edx, %eax
	movl	%edx, %ecx
	cmovle	%eax, %ecx
	cmpl	%ecx, %esi
	movl	%edx, %ecx
	cmovle	%esi, %ecx
.L33:
	testl	%eax, %eax
	jle	.L32
	testl	%esi, %esi
	jle	.L34
	movl	MAX(%rip), %edi
	testl	%edx, %edx
	jle	.L35
	addl	%ecx, %edi
	subl	%ecx, %eax
	subl	%ecx, %esi
	movl	%edi, MAX(%rip)
	testl	%eax, %eax
	jle	.L32
	testl	%esi, %esi
	jle	.L34
.L35:
	movl	%eax, %edx
	sarl	%edx
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	leal	(%rdx,%rdx), %ecx
	addl	%edi, %edx
	movl	%edx, MAX(%rip)
	subl	%ecx, %eax
.L34:
	testl	%eax, %eax
	jle	.L32
	movslq	%eax, %rdx
	sarl	$31, %eax
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	subl	%eax, %edx
	addl	%edx, MAX(%rip)
.L32:
	ret
	.cfi_endproc
.LFE24:
	.size	Men, .-Men
	.globl	MAX
	.bss
	.align 4
	.type	MAX, @object
	.size	MAX, 4
MAX:
	.zero	4
	.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>
void Men(int,int,int);
int MAX;
int main(void)
{
	int i,Q,c,a,n;
	scanf("%d",&Q);
	for(i=0;i<Q;i++){
		MAX = 0;
		scanf("%d %d %d",&c,&a,&n);
		Men(c,a,n);
		printf("%d\n",MAX);
	}
	return 0;
}

void Men(int c,int a,int n)
{
	int min;
	if(c <= a && c <= n)
		min = c;
	else if(a <= c && a<= n)
		min = a;
	else
		min = n;
	if(c > 0 && a > 0 && n > 0){
		c = c - min; a = a - min; n = n - min;
		MAX = MAX + min;
	}
	if(c > 0 && a > 0){
		if(c/2 <= a)
			min = c/2;
		else 
			min = a;
		c = c - min*2; a = a - min;
		MAX = MAX + min;
	}
	if(c > 0){
		MAX = MAX + c/3;
	}
}
4
3 0 0
1 1 1
9 4 2
0 1 2
 4
2 0 0
1 1 1
9 4 2
0 1 2
 4
3 0 1
1 1 1
9 4 1
0 1 2
 4
3 0 0
1 2 1
0 4 2
0 1 2
 4
0 0 0
1 2 1
0 4 2
0 1 3
 4
2 1 0
2 2 2
9 8 2
0 1 3
 4
0 1 2
3 0 2
9 19 0
0 2 3
 4
0 1 2
3 0 2
9 0 0
0 2 3
 4
3 0 0
1 2 1
12 4 2
0 1 2
 4
0 0 0
1 2 1
1 4 2
0 0 3

1
1
5
0
 0
1
5
0
 1
1
4
0
 1
1
0
0
 0
1
0
0
 1
2
5
0
 0
1
4
0
 0
1
3
0
 1
1
6
0
 0
1
1
0

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>
void Men(int,int,int);
int MAX;
int main(void)
{
	int i,Q,c,a,n;
	scanf("%d",&Q);
	for(i=0;i<Q;i++){
		MAX = 0;
		scanf("%d %d %d",&c,&a,&n);
		Men(c,a,n);
		printf("%d\n",MAX);
	}
	return 0;
}

void Men(int c,int a,int n)
{
	int min;
	if(c <= a && c <= n)
		min = c;
	else if(a <= c && a<= n)
		min = a;
	else
		min = n;
	if(c > 0 && a > 0 && n > 0){
		c = c - min; a = a - min; n = n - min;
		MAX = MAX + min;
	}
	if(c > 0 && a > 0){
		if(c/2 <= a)
			min = c/2;
		else 
			min = a;
		c = c - min*2; a = a - min;
		MAX = MAX + min;
	}
	if(c > 0){
		MAX = MAX + c/3;
	}
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	MAX
	.bss
	.align 4
	.type	MAX, @object
	.size	MAX, 4
MAX:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%d\n"
	.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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L2
.L3:
	movl	$0, MAX(%rip)
	leaq	-16(%rbp), %rcx
	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	-16(%rbp), %edx
	movl	-20(%rbp), %ecx
	movl	-24(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	Men
	movl	MAX(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -12(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.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
	.globl	Men
	.type	Men, @function
Men:
.LFB1:
	.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
	cmpl	-24(%rbp), %eax
	jg	.L7
	movl	-20(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jg	.L7
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L8
.L7:
	movl	-24(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L9
	movl	-24(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jg	.L9
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L8
.L9:
	movl	-28(%rbp), %eax
	movl	%eax, -4(%rbp)
.L8:
	cmpl	$0, -20(%rbp)
	jle	.L10
	cmpl	$0, -24(%rbp)
	jle	.L10
	cmpl	$0, -28(%rbp)
	jle	.L10
	movl	-4(%rbp), %eax
	subl	%eax, -20(%rbp)
	movl	-4(%rbp), %eax
	subl	%eax, -24(%rbp)
	movl	-4(%rbp), %eax
	subl	%eax, -28(%rbp)
	movl	MAX(%rip), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, MAX(%rip)
.L10:
	cmpl	$0, -20(%rbp)
	jle	.L11
	cmpl	$0, -24(%rbp)
	jle	.L11
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -24(%rbp)
	jl	.L12
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	jmp	.L13
.L12:
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
.L13:
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	subl	%eax, -20(%rbp)
	movl	-4(%rbp), %eax
	subl	%eax, -24(%rbp)
	movl	MAX(%rip), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, MAX(%rip)
.L11:
	cmpl	$0, -20(%rbp)
	jle	.L15
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	subl	%eax, %edx
	movl	MAX(%rip), %eax
	addl	%edx, %eax
	movl	%eax, MAX(%rip)
.L15:
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	Men, .-Men
	.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	MAX
	.bss
	.align 4
	.type	MAX, @object
	.size	MAX, 4
MAX:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%d\n"
	.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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L2
.L3:
	movl	$0, MAX(%rip)
	leaq	-16(%rbp), %rcx
	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	-16(%rbp), %edx
	movl	-20(%rbp), %ecx
	movl	-24(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	Men
	movl	MAX(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -12(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.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
	.globl	Men
	.type	Men, @function
Men:
.LFB1:
	.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
	cmpl	-24(%rbp), %eax
	jg	.L7
	movl	-20(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jg	.L7
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L8
.L7:
	movl	-24(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L9
	movl	-24(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jg	.L9
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L8
.L9:
	movl	-28(%rbp), %eax
	movl	%eax, -4(%rbp)
.L8:
	cmpl	$0, -20(%rbp)
	jle	.L10
	cmpl	$0, -24(%rbp)
	jle	.L10
	cmpl	$0, -28(%rbp)
	jle	.L10
	movl	-4(%rbp), %eax
	subl	%eax, -20(%rbp)
	movl	-4(%rbp), %eax
	subl	%eax, -24(%rbp)
	movl	-4(%rbp), %eax
	subl	%eax, -28(%rbp)
	movl	MAX(%rip), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, MAX(%rip)
.L10:
	cmpl	$0, -20(%rbp)
	jle	.L11
	cmpl	$0, -24(%rbp)
	jle	.L11
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -24(%rbp)
	jl	.L12
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	jmp	.L13
.L12:
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
.L13:
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	subl	%eax, -20(%rbp)
	movl	-4(%rbp), %eax
	subl	%eax, -24(%rbp)
	movl	MAX(%rip), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, MAX(%rip)
.L11:
	cmpl	$0, -20(%rbp)
	jle	.L15
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	subl	%eax, %edx
	movl	MAX(%rip), %eax
	addl	%edx, %eax
	movl	%eax, MAX(%rip)
.L15:
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	Men, .-Men
	.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:
