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

```c
main(a,b,c,d,e,f){for(;scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f),a|b|c|d|e|f;printf("%d\n",d+f+(a>e?a:e))){a+=d,b+=e,c+=f,d=(a-1)/3,a-=d*3,e=(b-1)/3,b-=e*3,d+=e,f=(c-1)/3,c-=f*3;e=(a==3)+(b==3)+(c==3);if(a>b)a=b;if(a>c)a=c;}}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d%d%d%d%d%d"
	.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
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	movl	%r9d, -24(%rbp)
	jmp	.L2
.L5:
	movl	-4(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
	movl	-12(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, %edx
	sall	$2, %eax
	subl	%eax, %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	sall	$2, %eax
	subl	%eax, %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -16(%rbp)
	movl	-12(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, %edx
	sall	$2, %eax
	subl	%eax, %edx
	movl	-12(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-4(%rbp), %eax
	cmpl	$3, %eax
	sete	%al
	movzbl	%al, %edx
	movl	-8(%rbp), %eax
	cmpl	$3, %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %edx
	movl	-12(%rbp), %eax
	cmpl	$3, %eax
	sete	%al
	movzbl	%al, %eax
	addl	%edx, %eax
	movl	%eax, -20(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L3
	movl	-8(%rbp), %eax
	movl	%eax, -4(%rbp)
.L3:
	movl	-4(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L4
	movl	-12(%rbp), %eax
	movl	%eax, -4(%rbp)
.L4:
	movl	-16(%rbp), %edx
	movl	-24(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-20(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	addl	%ecx, %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-20(%rbp), %r8
	leaq	-16(%rbp), %rdi
	leaq	-12(%rbp), %rcx
	leaq	-8(%rbp), %rdx
	leaq	-4(%rbp), %rax
	subq	$8, %rsp
	leaq	-24(%rbp), %rsi
	pushq	%rsi
	movq	%r8, %r9
	movq	%rdi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	addq	$16, %rsp
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	orl	%eax, %edx
	movl	-12(%rbp), %eax
	orl	%eax, %edx
	movl	-16(%rbp), %eax
	orl	%eax, %edx
	movl	-20(%rbp), %eax
	orl	%eax, %edx
	movl	-24(%rbp), %eax
	orl	%edx, %eax
	testl	%eax, %eax
	jne	.L5
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d%d%d%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	leaq	.LC1(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	leaq	8(%rsp), %rax
	movl	%edi, 28(%rsp)
	leaq	12(%rsp), %r15
	movl	%esi, 24(%rsp)
	leaq	16(%rsp), %r14
	leaq	20(%rsp), %r13
	movl	%edx, 20(%rsp)
	leaq	24(%rsp), %r12
	leaq	28(%rsp), %rbp
	movl	%ecx, 16(%rsp)
	movl	%r8d, 12(%rsp)
	movl	%r9d, 8(%rsp)
	movq	%rax, (%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	leal	(%r9,%rsi), %eax
	addl	%edi, %edx
	addl	%r8d, %ecx
	leal	-1(%rax), %edi
	movslq	%edi, %rsi
	sarl	$31, %edi
	imulq	$1431655766, %rsi, %rsi
	shrq	$32, %rsi
	subl	%edi, %esi
	leal	0(,%rsi,4), %edi
	movl	%esi, %r8d
	subl	%edi, %r8d
	leal	-1(%rcx), %edi
	addl	%eax, %r8d
	movslq	%edi, %rax
	sarl	$31, %edi
	imulq	$1431655766, %rax, %rax
	movl	%r8d, 28(%rsp)
	shrq	$32, %rax
	subl	%edi, %eax
	leal	0(,%rax,4), %r9d
	movl	%eax, %edi
	addl	%eax, %esi
	subl	%r9d, %edi
	movl	%esi, 16(%rsp)
	addl	%edi, %ecx
	leal	-1(%rdx), %edi
	movslq	%edi, %rax
	sarl	$31, %edi
	movl	%ecx, 24(%rsp)
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	subl	%edi, %eax
	leal	0(,%rax,4), %r9d
	movl	%eax, %edi
	movl	%eax, 8(%rsp)
	subl	%r9d, %edi
	addl	%edi, %edx
	xorl	%edi, %edi
	cmpl	$3, %r8d
	sete	%dil
	xorl	%r9d, %r9d
	cmpl	$3, %ecx
	movl	%edx, 20(%rsp)
	sete	%r9b
	addl	%r9d, %edi
	xorl	%r9d, %r9d
	cmpl	$3, %edx
	sete	%r9b
	addl	%r9d, %edi
	movl	%edi, 12(%rsp)
	cmpl	%ecx, %r8d
	jle	.L3
	movl	%ecx, 28(%rsp)
	movl	%ecx, %r8d
.L3:
	cmpl	%r8d, %edx
	jge	.L4
	movl	%edx, 28(%rsp)
	movl	%edx, %r8d
.L4:
	addl	%eax, %esi
	cmpl	%r8d, %edi
	cmovl	%r8d, %edi
	xorl	%eax, %eax
	addl	%edi, %esi
	leaq	.LC0(%rip), %rdi
	call	printf@PLT
.L2:
	subq	$8, %rsp
	.cfi_def_cfa_offset 104
	movq	%r15, %r9
	movq	%r14, %r8
	movq	%r13, %rcx
	pushq	8(%rsp)
	.cfi_def_cfa_offset 112
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	44(%rsp), %r9d
	movl	40(%rsp), %r8d
	movl	36(%rsp), %edi
	movl	32(%rsp), %esi
	movl	%r9d, %eax
	movl	28(%rsp), %ecx
	movl	24(%rsp), %edx
	orl	%r8d, %eax
	popq	%r10
	.cfi_def_cfa_offset 104
	popq	%r11
	.cfi_def_cfa_offset 96
	orl	%edi, %eax
	orl	%esi, %eax
	orl	%ecx, %eax
	orl	%edx, %eax
	jne	.L5
	addq	$40, %rsp
	.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
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d%d%d%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	leaq	.LC1(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	leaq	8(%rsp), %rax
	movl	%edi, 28(%rsp)
	leaq	12(%rsp), %r15
	movl	%esi, 24(%rsp)
	leaq	16(%rsp), %r14
	leaq	20(%rsp), %r13
	movl	%edx, 20(%rsp)
	leaq	24(%rsp), %r12
	leaq	28(%rsp), %rbp
	movl	%ecx, 16(%rsp)
	movl	%r8d, 12(%rsp)
	movl	%r9d, 8(%rsp)
	movq	%rax, (%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	leal	(%r9,%rsi), %eax
	addl	%edi, %edx
	addl	%r8d, %ecx
	leal	-1(%rax), %edi
	movslq	%edi, %rsi
	sarl	$31, %edi
	imulq	$1431655766, %rsi, %rsi
	shrq	$32, %rsi
	subl	%edi, %esi
	leal	0(,%rsi,4), %edi
	movl	%esi, %r8d
	subl	%edi, %r8d
	leal	-1(%rcx), %edi
	addl	%eax, %r8d
	movslq	%edi, %rax
	sarl	$31, %edi
	imulq	$1431655766, %rax, %rax
	movl	%r8d, 28(%rsp)
	shrq	$32, %rax
	subl	%edi, %eax
	leal	0(,%rax,4), %r9d
	movl	%eax, %edi
	addl	%eax, %esi
	subl	%r9d, %edi
	movl	%esi, 16(%rsp)
	addl	%edi, %ecx
	leal	-1(%rdx), %edi
	movslq	%edi, %rax
	sarl	$31, %edi
	movl	%ecx, 24(%rsp)
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	subl	%edi, %eax
	leal	0(,%rax,4), %r9d
	movl	%eax, %edi
	movl	%eax, 8(%rsp)
	subl	%r9d, %edi
	addl	%edi, %edx
	xorl	%edi, %edi
	cmpl	$3, %r8d
	sete	%dil
	xorl	%r9d, %r9d
	cmpl	$3, %ecx
	movl	%edx, 20(%rsp)
	sete	%r9b
	addl	%r9d, %edi
	xorl	%r9d, %r9d
	cmpl	$3, %edx
	sete	%r9b
	addl	%r9d, %edi
	movl	%edi, 12(%rsp)
	cmpl	%ecx, %r8d
	jle	.L3
	movl	%ecx, 28(%rsp)
	movl	%ecx, %r8d
.L3:
	cmpl	%r8d, %edx
	jge	.L4
	movl	%edx, 28(%rsp)
	movl	%edx, %r8d
.L4:
	addl	%eax, %esi
	cmpl	%r8d, %edi
	cmovl	%r8d, %edi
	xorl	%eax, %eax
	addl	%edi, %esi
	leaq	.LC0(%rip), %rdi
	call	printf@PLT
.L2:
	subq	$8, %rsp
	.cfi_def_cfa_offset 104
	movq	%r15, %r9
	movq	%r14, %r8
	movq	%r13, %rcx
	pushq	8(%rsp)
	.cfi_def_cfa_offset 112
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	44(%rsp), %r9d
	movl	40(%rsp), %r8d
	movl	36(%rsp), %edi
	movl	32(%rsp), %esi
	movl	%r9d, %eax
	movl	28(%rsp), %ecx
	movl	24(%rsp), %edx
	orl	%r8d, %eax
	popq	%r10
	.cfi_def_cfa_offset 104
	popq	%r11
	.cfi_def_cfa_offset 96
	orl	%edi, %eax
	orl	%esi, %eax
	orl	%ecx, %eax
	orl	%edx, %eax
	jne	.L5
	addq	$40, %rsp
	.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
	.cfi_endproc
.LFE0:
	.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:

main(a,b,c,d,e,f){for(;scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f),a|b|c|d|e|f;printf("%d\n",d+f+(a>e?a:e))){a+=d,b+=e,c+=f,d=(a-1)/3,a-=d*3,e=(b-1)/3,b-=e*3,d+=e,f=(c-1)/3,c-=f*3;e=(a==3)+(b==3)+(c==3);if(a>b)a=b;if(a>c)a=c;}}
1 1 1 1 1 1
1 1 1 0 0 0
1 0 0 0 1 0
3 0 0 3 0 0
3 1 0 1 3 1
1 2 0 2 0 1
0 0 1 1 0 3
1 0 0 1 1 0
0 0 0 0 0 0
 1 1 1 1 1 1
1 1 1 0 0 0
1 0 0 0 1 0
3 0 0 0 0 0
3 1 0 1 3 1
1 2 0 2 0 1
0 0 1 1 0 3
1 0 0 1 1 0
0 0 0 0 0 0
 1 1 1 1 1 1
1 1 1 0 0 0
1 0 0 0 1 1
2 0 0 3 0 0
3 1 0 1 3 1
1 2 0 2 0 1
0 0 1 1 0 3
1 0 0 1 1 0
0 0 0 0 0 0
 0 1 1 1 1 1
1 1 1 0 0 0
1 0 0 0 1 0
3 0 0 3 0 0
3 1 0 1 3 1
1 2 0 2 0 1
0 0 1 1 0 3
1 0 0 1 1 0
0 0 0 0 0 0
 1 1 1 1 1 1
1 1 1 0 0 0
1 0 0 0 1 0
3 0 0 0 0 0
3 1 0 1 3 1
1 2 0 2 0 1
0 0 1 1 0 6
1 0 0 1 1 0
0 0 0 0 0 0
 1 1 1 1 1 1
1 1 1 0 0 0
1 0 0 0 1 1
2 0 0 3 0 0
3 1 0 1 3 1
1 4 0 2 0 1
0 0 1 1 0 3
1 0 0 1 1 0
0 0 0 0 0 0
 1 1 1 1 1 0
1 1 1 0 0 0
1 0 0 0 1 0
3 0 0 0 0 0
3 1 0 1 3 1
1 2 0 2 0 1
0 0 1 1 0 6
1 0 0 1 1 0
0 0 0 0 0 0
 1 1 1 1 1 0
1 2 1 0 0 0
1 0 0 0 1 0
3 0 0 0 0 0
3 1 0 1 3 1
1 2 0 2 0 1
0 0 1 1 0 6
2 0 0 1 1 0
0 0 0 0 0 0
 1 1 1 1 1 1
1 1 1 0 0 0
2 0 0 0 1 1
2 0 0 3 0 1
3 1 0 1 3 1
2 4 0 2 0 1
0 0 1 1 0 3
1 0 0 1 0 0
0 0 0 0 0 0
 1 1 1 1 1 0
1 2 1 0 0 0
1 0 0 0 1 1
3 0 0 0 1 0
3 1 0 1 3 1
1 2 0 2 -1 1
0 0 1 1 0 6
2 0 0 1 1 0
0 0 0 0 0 0

2
1
0
2
3
1
1
0
 2
1
0
1
3
1
1
0
 2
1
1
1
3
1
1
0
 1
1
0
2
3
1
1
0
 2
1
0
1
3
1
2
0
 2
1
1
1
3
2
1
0
 1
1
0
1
3
1
2
0
 1
1
0
1
3
1
2
1
 2
1
1
1
3
3
1
0
 1
1
1
1
3
1
2
1

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

```c
main(a,b,c,d,e,f){for(;scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f),a|b|c|d|e|f;printf("%d\n",d+f+(a>e?a:e))){a+=d,b+=e,c+=f,d=(a-1)/3,a-=d*3,e=(b-1)/3,b-=e*3,d+=e,f=(c-1)/3,c-=f*3;e=(a==3)+(b==3)+(c==3);if(a>b)a=b;if(a>c)a=c;}}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d%d%d%d%d%d"
	.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
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	movl	%r9d, -24(%rbp)
	jmp	.L2
.L5:
	movl	-4(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
	movl	-12(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, %edx
	sall	$2, %eax
	subl	%eax, %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	sall	$2, %eax
	subl	%eax, %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -16(%rbp)
	movl	-12(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, %edx
	sall	$2, %eax
	subl	%eax, %edx
	movl	-12(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-4(%rbp), %eax
	cmpl	$3, %eax
	sete	%al
	movzbl	%al, %edx
	movl	-8(%rbp), %eax
	cmpl	$3, %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %edx
	movl	-12(%rbp), %eax
	cmpl	$3, %eax
	sete	%al
	movzbl	%al, %eax
	addl	%edx, %eax
	movl	%eax, -20(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L3
	movl	-8(%rbp), %eax
	movl	%eax, -4(%rbp)
.L3:
	movl	-4(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L4
	movl	-12(%rbp), %eax
	movl	%eax, -4(%rbp)
.L4:
	movl	-16(%rbp), %edx
	movl	-24(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-20(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	addl	%ecx, %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-20(%rbp), %r8
	leaq	-16(%rbp), %rdi
	leaq	-12(%rbp), %rcx
	leaq	-8(%rbp), %rdx
	leaq	-4(%rbp), %rax
	subq	$8, %rsp
	leaq	-24(%rbp), %rsi
	pushq	%rsi
	movq	%r8, %r9
	movq	%rdi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	addq	$16, %rsp
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	orl	%eax, %edx
	movl	-12(%rbp), %eax
	orl	%eax, %edx
	movl	-16(%rbp), %eax
	orl	%eax, %edx
	movl	-20(%rbp), %eax
	orl	%eax, %edx
	movl	-24(%rbp), %eax
	orl	%edx, %eax
	testl	%eax, %eax
	jne	.L5
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d%d%d%d%d%d"
	.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
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	movl	%r9d, -24(%rbp)
	jmp	.L2
.L5:
	movl	-4(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
	movl	-12(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, %edx
	sall	$2, %eax
	subl	%eax, %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, %edx
	sall	$2, %eax
	subl	%eax, %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -16(%rbp)
	movl	-12(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, %edx
	sall	$2, %eax
	subl	%eax, %edx
	movl	-12(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-4(%rbp), %eax
	cmpl	$3, %eax
	sete	%al
	movzbl	%al, %edx
	movl	-8(%rbp), %eax
	cmpl	$3, %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %edx
	movl	-12(%rbp), %eax
	cmpl	$3, %eax
	sete	%al
	movzbl	%al, %eax
	addl	%edx, %eax
	movl	%eax, -20(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L3
	movl	-8(%rbp), %eax
	movl	%eax, -4(%rbp)
.L3:
	movl	-4(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L4
	movl	-12(%rbp), %eax
	movl	%eax, -4(%rbp)
.L4:
	movl	-16(%rbp), %edx
	movl	-24(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-20(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	addl	%ecx, %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-20(%rbp), %r8
	leaq	-16(%rbp), %rdi
	leaq	-12(%rbp), %rcx
	leaq	-8(%rbp), %rdx
	leaq	-4(%rbp), %rax
	subq	$8, %rsp
	leaq	-24(%rbp), %rsi
	pushq	%rsi
	movq	%r8, %r9
	movq	%rdi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	addq	$16, %rsp
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	orl	%eax, %edx
	movl	-12(%rbp), %eax
	orl	%eax, %edx
	movl	-16(%rbp), %eax
	orl	%eax, %edx
	movl	-20(%rbp), %eax
	orl	%eax, %edx
	movl	-24(%rbp), %eax
	orl	%edx, %eax
	testl	%eax, %eax
	jne	.L5
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
