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

```c
#include<stdio.h>
int main()
{
	int i,N,c[1000],a[1000],n[1000],s[100]={0};
	scanf("%d",&N);
	for(i=0;i<	N;i++){
		scanf("%d %d %d",&c[i],&a[i],&n[i]);
		while(1){
			if(c[i]>0&&a[i]>0&&n[i]>0){
				s[i]++;
				c[i]--;
				a[i]--;
				n[i]--;
			}
			 else if(c[i]>1&&a[i]>0){
				 s[i]++;
				 c[i]-=2;
				 a[i]--;
			 }
			 else if(c[i]>2){
				 s[i]++;
				 c[i]-=3;
			 }
			 else break;
		}
	}
	for(i=0;i<N;i++){
	printf("%d\n",s[i]);
	}
	return 0;
}```

Assembly Code:

```assembly
	.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
	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	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 12344
	orq	$0, (%rsp)
	subq	$152, %rsp
	.cfi_def_cfa_offset 12496
	movl	$50, %ecx
	movq	%fs:40, %rax
	movq	%rax, 12424(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r12
	leaq	12(%rsp), %rsi
	movq	%r12, %rdi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L12
	leaq	416(%rsp), %rbp
	leaq	4416(%rsp), %r15
	movq	%r12, %rbx
	xorl	%r13d, %r13d
	leaq	8416(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r14, %rcx
	movq	%r15, %rdx
	movq	%rbp, %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	0(%rbp), %eax
	testl	%eax, %eax
	jle	.L3
	movl	(%r15), %edx
	.p2align 4,,10
	.p2align 3
.L4:
	testl	%edx, %edx
	jle	.L8
	movl	(%r14), %ecx
	testl	%ecx, %ecx
	jle	.L9
	subl	$1, %eax
	subl	$1, %edx
	subl	$1, %ecx
	addl	$1, (%rbx)
	movl	%eax, 0(%rbp)
	movl	%edx, (%r15)
	movl	%ecx, (%r14)
.L10:
	testl	%eax, %eax
	jne	.L4
.L3:
	movl	12(%rsp), %eax
	addl	$1, %r13d
	addq	$4, %rbp
	addq	$4, %r15
	addq	$4, %r14
	addq	$4, %rbx
	cmpl	%r13d, %eax
	jg	.L11
	testl	%eax, %eax
	jle	.L12
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L13
.L12:
	movq	12424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$12440, %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
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	cmpl	$2, %eax
	jle	.L3
	addl	$1, (%rbx)
	subl	$3, %eax
	movl	%eax, 0(%rbp)
	jne	.L8
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	$1, %eax
	je	.L3
	subl	$2, %eax
	subl	$1, %edx
	addl	$1, (%rbx)
	movl	%eax, 0(%rbp)
	movl	%edx, (%r15)
	jmp	.L10
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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.
Optimized Assembly Code:

user
```assembly
	.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
	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	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 12344
	orq	$0, (%rsp)
	subq	$152, %rsp
	.cfi_def_cfa_offset 12496
	movl	$50, %ecx
	movq	%fs:40, %rax
	movq	%rax, 12424(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r12
	leaq	12(%rsp), %rsi
	movq	%r12, %rdi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L12
	leaq	416(%rsp), %rbp
	leaq	4416(%rsp), %r15
	movq	%r12, %rbx
	xorl	%r13d, %r13d
	leaq	8416(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r14, %rcx
	movq	%r15, %rdx
	movq	%rbp, %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	0(%rbp), %eax
	testl	%eax, %eax
	jle	.L3
	movl	(%r15), %edx
	.p2align 4,,10
	.p2align 3
.L4:
	testl	%edx, %edx
	jle	.L8
	movl	(%r14), %ecx
	testl	%ecx, %ecx
	jle	.L9
	subl	$1, %eax
	subl	$1, %edx
	subl	$1, %ecx
	addl	$1, (%rbx)
	movl	%eax, 0(%rbp)
	movl	%edx, (%r15)
	movl	%ecx, (%r14)
.L10:
	testl	%eax, %eax
	jne	.L4
.L3:
	movl	12(%rsp), %eax
	addl	$1, %r13d
	addq	$4, %rbp
	addq	$4, %r15
	addq	$4, %r14
	addq	$4, %rbx
	cmpl	%r13d, %eax
	jg	.L11
	testl	%eax, %eax
	jle	.L12
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L13
.L12:
	movq	12424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$12440, %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
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	cmpl	$2, %eax
	jle	.L3
	addl	$1, (%rbx)
	subl	$3, %eax
	movl	%eax, 0(%rbp)
	jne	.L8
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	$1, %eax
	je	.L3
	subl	$2, %eax
	subl	$1, %edx
	addl	$1, (%rbx)
	movl	%eax, 0(%rbp)
	movl	%edx, (%r15)
	jmp	.L10
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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
```assembly
	.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
	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	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 12344
	orq	$0, (%rsp)
	subq	$152, %rsp
	.cfi_def_cfa_offset 12496
	movl	$50, %ecx
	movq	%fs:40, %rax
	movq	%rax, 12424(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r12
	leaq	12(%rsp), %rsi
	movq	%r12, %rdi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L12
	leaq	416(%rsp), %rbp
	leaq	4416(%rsp), %r15
	movq	%r12, %rbx
	xorl	%r13d, %r13d
	leaq	8416(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r14, %rcx
	movq	%r15, %rdx
	movq	%rbp, %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	0(%rbp), %eax
	testl	%eax, %eax
	jle	.L3
	movl	(%r15), %edx
	.p2align 4,,10
	.p2align 3
.L4:
	testl	%edx, %edx
	jle	.L8
	movl	(%r14), %ecx
	testl	%ecx, %ecx
	jle	.L9
	subl	$1, %eax
	subl	$1, %edx
	subl	$1, %ecx
	addl	$1, (%rbx)
	movl	%eax, 0(%rbp)
	movl	%edx, (%r15)
	movl	%ecx, (%r14)
.L10:
	testl	%eax, %eax
	jne	.L4
.L3:
	movl	12(%rsp), %eax
	addl	$1, %r13d
	addq	$4, %rbp
	addq	$4, %r15
	addq	$4, %r14
	addq	$4, %rbx
	cmpl	%r13d, %eax
	jg	.L11
	testl	%eax, %eax
	jle	.L12
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L13
.L12:
	movq	12424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$12440, %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
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	cmpl	$2, %eax
	jle	.L3
	addl	$1, (%rbx)
	subl	$3, %eax
	movl	%eax, 0(%rbp)
	jne	.L8
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	$1, %eax
	je	.L3
	subl	$2, %eax
	subl	$1, %edx
	addl	$1, (%rbx)
	movl	%eax, 0(%rbp)
	movl	%edx, (%r15)
	jmp	.L10
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```
```c
#include<stdio.h>
int main()
{
	int i,N,c[1000],a[1000],n[1000],s[100]={0};
	scanf("%d",&N);
	for(i=0;i<	N;i++){
		scanf("%d %d %d",&c[i],&a[i],&n[i]);
		while(1){
			if(c[i]>0&&a[i]>0&&n[i]>0){
				s[i]++;
				c[i]--;
				a[i]--;
				n[i]--;
			}
			 else if(c[i]>1&&a[i]>0){
				 s[i]++;
				 c[i]-=2;
				 a[i]--;
			 }
			 else if(c[i]>2){
				 s[i]++;
				 c[i]-=3;
			 }
			 else break;
		}
	}
	for(i=0;i<N;i++){
	printf("%d\n",s[i]);
	}
	return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int main()
{
	int i,N,c[1000],a[1000],n[1000],s[100]={0};
	scanf("%d",&N);
	for(i=0;i<	N;i++){
		scanf("%d %d %d",&c[i],&a[i],&n[i]);
		while(1){
			if(c[i]>0&&a[i]>0&&n[i]>0){
				s[i]++;
				c[i]--;
				a[i]--;
				n[i]--;
			}
			 else if(c[i]>1&&a[i]>0){
				 s[i]++;
				 c[i]-=2;
				 a[i]--;
			 }
			 else if(c[i]>2){
				 s[i]++;
				 c[i]-=3;
			 }
			 else break;
		}
	}
	for(i=0;i<N;i++){
	printf("%d\n",s[i]);
	}
	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:

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 assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int main()
{
	int i,N,c[1000],a[1000],n[1000],s[100]={0};
	scanf("%d",&N);
	for(i=0;i<	N;i++){
		scanf("%d %d %d",&c[i],&a[i],&n[i]);
		while(1){
			if(c[i]>0&&a[i]>0&&n[i]>0){
				s[i]++;
				c[i]--;
				a[i]--;
				n[i]--;
			}
			 else if(c[i]>1&&a[i]>0){
				 s[i]++;
				 c[i]-=2;
				 a[i]--;
			 }
			 else if(c[i]>2){
				 s[i]++;
				 c[i]-=3;
			 }
			 else break;
		}
	}
	for(i=0;i<N;i++){
	printf("%d\n",s[i]);
	}
	return 0;
}```

Assembly Code:

```assembly
	.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
	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	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 12344
	orq	$0, (%rsp)
	subq	$152, %rsp
	.cfi_def_cfa_offset 12496
	movl	$50, %ecx
	movq	%fs:40, %rax
	movq	%rax, 12424(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r12
	leaq	12(%rsp), %rsi
	movq	%r12, %rdi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L12
	leaq	416(%rsp), %rbp
	leaq	4416(%rsp), %r15
	movq	%r12, %rbx
	xorl	%r13d, %r13d
	leaq	8416(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r14, %rcx
	movq	%r15, %rdx
	movq	%rbp, %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	0(%rbp), %eax
	testl	%eax, %eax
	jle	.L3
	movl	(%r15), %edx
	.p2align 4,,10
	.p2align 3
.L4:
	testl	%edx, %edx
	jle	.L8
	movl	(%r14), %ecx
	testl	%ecx, %ecx
	jle	.L9
	subl	$1, %eax
	subl	$1, %edx
	subl	$1, %ecx
	addl	$1, (%rbx)
	movl	%eax, 0(%rbp)
	movl	%edx, (%r15)
	movl	%ecx, (%r14)
.L10:
	testl	%eax, %eax
	jne	.L4
.L3:
	movl	12(%rsp), %eax
	addl	$1, %r13d
	addq	$4, %rbp
	addq	$4, %r15
	addq	$4, %r14
	addq	$4, %rbx
	cmpl	%r13d, %eax
	jg	.L11
	testl	%eax, %eax
	jle	.L12
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L13
.L12:
	movq	12424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$12440, %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
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	cmpl	$2, %eax
	jle	.L3
	addl	$1, (%rbx)
	subl	$3, %eax
	movl	%eax, 0(%rbp)
	jne	.L8
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	$1, %eax
	je	.L3
	subl	$2, %eax
	subl	$1, %edx
	addl	$1, (%rbx)
	movl	%eax, 0(%rbp)
	movl	%edx, (%r15)
	jmp	.L10
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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.
Optimized Assembly Code:

train
```assembly
	.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
	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	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 12344
	orq	$0, (%rsp)
	subq	$152, %rsp
	.cfi_def_cfa_offset 12496
	movl	$50, %ecx
	movq	%fs:40, %rax
	movq	%rax, 12424(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r12
	leaq	12(%rsp), %rsi
	movq	%r12, %rdi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L12
	leaq	416(%rsp), %rbp
	leaq	4416(%rsp), %r15
	movq	%r12, %rbx
	xorl	%r13d, %r13d
	leaq	8416(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r14, %rcx
	movq	%r15, %rdx
	movq	%rbp, %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	0(%rbp), %eax
	testl	%eax, %eax
	jle	.L3
	movl	(%r15), %edx
	.p2align 4,,10
	.p2align 3
.L4:
	testl	%edx, %edx
	jle	.L8
	movl	(%r14), %ecx
	testl	%ecx, %ecx
	jle	.L9
	subl	$1, %eax
	subl	$1, %edx
	subl	$1, %ecx
	addl	$1, (%rbx)
	movl	%eax, 0(%rbp)
	movl	%edx, (%r15)
	movl	%ecx, (%r14)
.L10:
	testl	%eax, %eax
	jne	.L4
.L3:
	movl	12(%rsp), %eax
	addl	$1, %r13d
	addq	$4, %rbp
	addq	$4, %r15
	addq	$4, %r14
	addq	$4, %rbx
	cmpl	%r13d, %eax
	jg	.L11
	testl	%eax, %eax
	jle	.L12
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L13
.L12:
	movq	12424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$12440, %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
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	cmpl	$2, %eax
	jle	.L3
	addl	$1, (%rbx)
	subl	$3, %eax
	movl	%eax, 0(%rbp)
	jne	.L8
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	$1, %eax
	je	.L3
	subl	$2, %eax
	subl	$1, %edx
	addl	$1, (%rbx)
	movl	%eax, 0(%rbp)
	movl	%edx, (%r15)
	jmp	.L10
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```