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>  
    main(){  
      int d,b,e=0;  
      int c,a,n;  
      scanf("%d",&d);  
      for(b=0;b<d;b++){  
        scanf("%d %d %d",&c,&a,&n);  
        while(1){  
          if((c>=1&&a>=1)&&n>=1){  
          e=e+1;  
          c=c-1;  
          a=a-1;  
          n=n-1;  
          }  
          else if(c>=2&&a>=1){  
        e=e+1;  
        c=c-2;  
        a=a-1;  
          }  
          else if(c>=3){  
        e=e+1;  
        c=c-3;  
          }  
          else{  
        break;  
          }  
        }  
        printf("%d\n",e);  
        e=0;  
      }  
      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
	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	.L16
	xorl	%ebx, %ebx
	leaq	20(%rsp), %r15
	leaq	16(%rsp), %r14
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r14, %rdx
	movq	%r15, %rcx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	xorl	%edx, %edx
	testl	%eax, %eax
	jle	.L3
	movl	16(%rsp), %esi
	movl	20(%rsp), %edi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	xorl	%r10d, %r10d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L58:
	testl	%edi, %edi
	jle	.L11
	movl	%ecx, %edx
	subl	$1, %eax
	subl	$1, %esi
	subl	$1, %edi
	movl	$1, %r8d
.L12:
	testl	%eax, %eax
	je	.L57
	addl	$1, %ecx
	movl	$1, %r9d
	movl	$1, %r10d
.L4:
	leal	-1(%rcx), %edx
	testl	%esi, %esi
	jg	.L58
	cmpl	$2, %eax
	jle	.L7
	movl	%ecx, %edx
	subl	$3, %eax
	je	.L9
.L8:
	cmpl	$2, %eax
	jle	.L29
	addl	$1, %edx
	subl	$3, %eax
	jne	.L8
.L9:
	testb	%r8b, %r8b
	movl	%r9d, %r8d
	je	.L5
.L23:
	movl	%edi, 20(%rsp)
.L5:
	testb	%r8b, %r8b
	je	.L6
.L24:
	movl	%esi, 16(%rsp)
.L6:
	movl	$0, 12(%rsp)
.L3:
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jg	.L2
.L16:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L59
	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
	.p2align 4,,10
	.p2align 3
.L57:
	.cfi_restore_state
	testb	%r8b, %r8b
	jne	.L23
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L11:
	cmpl	$1, %eax
	je	.L60
	movl	%ecx, %edx
	subl	$2, %eax
	subl	$1, %esi
	jmp	.L12
.L29:
	movl	$1, %r10d
.L7:
	testb	%r8b, %r8b
	je	.L13
	movl	%edi, 20(%rsp)
.L13:
	testb	%r9b, %r9b
	je	.L14
	movl	%esi, 16(%rsp)
.L14:
	testb	%r10b, %r10b
	je	.L3
	movl	%eax, 12(%rsp)
	jmp	.L3
.L60:
	testb	%r8b, %r8b
	je	.L18
	movl	%edi, 20(%rsp)
.L18:
	testb	%r9b, %r9b
	je	.L19
	movl	%esi, 16(%rsp)
.L19:
	testb	%r10b, %r10b
	je	.L3
	movl	$1, 12(%rsp)
	jmp	.L3
.L59:
	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
	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	.L16
	xorl	%ebx, %ebx
	leaq	20(%rsp), %r15
	leaq	16(%rsp), %r14
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r14, %rdx
	movq	%r15, %rcx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	xorl	%edx, %edx
	testl	%eax, %eax
	jle	.L3
	movl	16(%rsp), %esi
	movl	20(%rsp), %edi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	xorl	%r10d, %r10d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L58:
	testl	%edi, %edi
	jle	.L11
	movl	%ecx, %edx
	subl	$1, %eax
	subl	$1, %esi
	subl	$1, %edi
	movl	$1, %r8d
.L12:
	testl	%eax, %eax
	je	.L57
	addl	$1, %ecx
	movl	$1, %r9d
	movl	$1, %r10d
.L4:
	leal	-1(%rcx), %edx
	testl	%esi, %esi
	jg	.L58
	cmpl	$2, %eax
	jle	.L7
	movl	%ecx, %edx
	subl	$3, %eax
	je	.L9
.L8:
	cmpl	$2, %eax
	jle	.L29
	addl	$1, %edx
	subl	$3, %eax
	jne	.L8
.L9:
	testb	%r8b, %r8b
	movl	%r9d, %r8d
	je	.L5
.L23:
	movl	%edi, 20(%rsp)
.L5:
	testb	%r8b, %r8b
	je	.L6
.L24:
	movl	%esi, 16(%rsp)
.L6:
	movl	$0, 12(%rsp)
.L3:
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jg	.L2
.L16:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L59
	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
	.p2align 4,,10
	.p2align 3
.L57:
	.cfi_restore_state
	testb	%r8b, %r8b
	jne	.L23
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L11:
	cmpl	$1, %eax
	je	.L60
	movl	%ecx, %edx
	subl	$2, %eax
	subl	$1, %esi
	jmp	.L12
.L29:
	movl	$1, %r10d
.L7:
	testb	%r8b, %r8b
	je	.L13
	movl	%edi, 20(%rsp)
.L13:
	testb	%r9b, %r9b
	je	.L14
	movl	%esi, 16(%rsp)
.L14:
	testb	%r10b, %r10b
	je	.L3
	movl	%eax, 12(%rsp)
	jmp	.L3
.L60:
	testb	%r8b, %r8b
	je	.L18
	movl	%edi, 20(%rsp)
.L18:
	testb	%r9b, %r9b
	je	.L19
	movl	%esi, 16(%rsp)
.L19:
	testb	%r10b, %r10b
	je	.L3
	movl	$1, 12(%rsp)
	jmp	.L3
.L59:
	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
	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	.L16
	xorl	%ebx, %ebx
	leaq	20(%rsp), %r15
	leaq	16(%rsp), %r14
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r14, %rdx
	movq	%r15, %rcx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	xorl	%edx, %edx
	testl	%eax, %eax
	jle	.L3
	movl	16(%rsp), %esi
	movl	20(%rsp), %edi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	xorl	%r10d, %r10d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L58:
	testl	%edi, %edi
	jle	.L11
	movl	%ecx, %edx
	subl	$1, %eax
	subl	$1, %esi
	subl	$1, %edi
	movl	$1, %r8d
.L12:
	testl	%eax, %eax
	je	.L57
	addl	$1, %ecx
	movl	$1, %r9d
	movl	$1, %r10d
.L4:
	leal	-1(%rcx), %edx
	testl	%esi, %esi
	jg	.L58
	cmpl	$2, %eax
	jle	.L7
	movl	%ecx, %edx
	subl	$3, %eax
	je	.L9
.L8:
	cmpl	$2, %eax
	jle	.L29
	addl	$1, %edx
	subl	$3, %eax
	jne	.L8
.L9:
	testb	%r8b, %r8b
	movl	%r9d, %r8d
	je	.L5
.L23:
	movl	%edi, 20(%rsp)
.L5:
	testb	%r8b, %r8b
	je	.L6
.L24:
	movl	%esi, 16(%rsp)
.L6:
	movl	$0, 12(%rsp)
.L3:
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jg	.L2
.L16:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L59
	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
	.p2align 4,,10
	.p2align 3
.L57:
	.cfi_restore_state
	testb	%r8b, %r8b
	jne	.L23
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L11:
	cmpl	$1, %eax
	je	.L60
	movl	%ecx, %edx
	subl	$2, %eax
	subl	$1, %esi
	jmp	.L12
.L29:
	movl	$1, %r10d
.L7:
	testb	%r8b, %r8b
	je	.L13
	movl	%edi, 20(%rsp)
.L13:
	testb	%r9b, %r9b
	je	.L14
	movl	%esi, 16(%rsp)
.L14:
	testb	%r10b, %r10b
	je	.L3
	movl	%eax, 12(%rsp)
	jmp	.L3
.L60:
	testb	%r8b, %r8b
	je	.L18
	movl	%edi, 20(%rsp)
.L18:
	testb	%r9b, %r9b
	je	.L19
	movl	%esi, 16(%rsp)
.L19:
	testb	%r10b, %r10b
	je	.L3
	movl	$1, 12(%rsp)
	jmp	.L3
.L59:
	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>  
    main(){  
      int d,b,e=0;  
      int c,a,n;  
      scanf("%d",&d);  
      for(b=0;b<d;b++){  
        scanf("%d %d %d",&c,&a,&n);  
        while(1){  
          if((c>=1&&a>=1)&&n>=1){  
          e=e+1;  
          c=c-1;  
          a=a-1;  
          n=n-1;  
          }  
          else if(c>=2&&a>=1){  
        e=e+1;  
        c=c-2;  
        a=a-1;  
          }  
          else if(c>=3){  
        e=e+1;  
        c=c-3;  
          }  
          else{  
        break;  
          }  
        }  
        printf("%d\n",e);  
        e=0;  
      }  
      return 0;  
    }  ```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
    #include<stdio.h>  
    main(){  
      int d,b,e=0;  
      int c,a,n;  
      scanf("%d",&d);  
      for(b=0;b<d;b++){  
        scanf("%d %d %d",&c,&a,&n);  
        while(1){  
          if((c>=1&&a>=1)&&n>=1){  
          e=e+1;  
          c=c-1;  
          a=a-1;  
          n=n-1;  
          }  
          else if(c>=2&&a>=1){  
        e=e+1;  
        c=c-2;  
        a=a-1;  
          }  
          else if(c>=3){  
        e=e+1;  
        c=c-3;  
          }  
          else{  
        break;  
          }  
        }  
        printf("%d\n",e);  
        e=0;  
      }  
      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>  
    main(){  
      int d,b,e=0;  
      int c,a,n;  
      scanf("%d",&d);  
      for(b=0;b<d;b++){  
        scanf("%d %d %d",&c,&a,&n);  
        while(1){  
          if((c>=1&&a>=1)&&n>=1){  
          e=e+1;  
          c=c-1;  
          a=a-1;  
          n=n-1;  
          }  
          else if(c>=2&&a>=1){  
        e=e+1;  
        c=c-2;  
        a=a-1;  
          }  
          else if(c>=3){  
        e=e+1;  
        c=c-3;  
          }  
          else{  
        break;  
          }  
        }  
        printf("%d\n",e);  
        e=0;  
      }  
      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
	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	.L16
	xorl	%ebx, %ebx
	leaq	20(%rsp), %r15
	leaq	16(%rsp), %r14
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r14, %rdx
	movq	%r15, %rcx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	xorl	%edx, %edx
	testl	%eax, %eax
	jle	.L3
	movl	16(%rsp), %esi
	movl	20(%rsp), %edi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	xorl	%r10d, %r10d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L58:
	testl	%edi, %edi
	jle	.L11
	movl	%ecx, %edx
	subl	$1, %eax
	subl	$1, %esi
	subl	$1, %edi
	movl	$1, %r8d
.L12:
	testl	%eax, %eax
	je	.L57
	addl	$1, %ecx
	movl	$1, %r9d
	movl	$1, %r10d
.L4:
	leal	-1(%rcx), %edx
	testl	%esi, %esi
	jg	.L58
	cmpl	$2, %eax
	jle	.L7
	movl	%ecx, %edx
	subl	$3, %eax
	je	.L9
.L8:
	cmpl	$2, %eax
	jle	.L29
	addl	$1, %edx
	subl	$3, %eax
	jne	.L8
.L9:
	testb	%r8b, %r8b
	movl	%r9d, %r8d
	je	.L5
.L23:
	movl	%edi, 20(%rsp)
.L5:
	testb	%r8b, %r8b
	je	.L6
.L24:
	movl	%esi, 16(%rsp)
.L6:
	movl	$0, 12(%rsp)
.L3:
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jg	.L2
.L16:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L59
	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
	.p2align 4,,10
	.p2align 3
.L57:
	.cfi_restore_state
	testb	%r8b, %r8b
	jne	.L23
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L11:
	cmpl	$1, %eax
	je	.L60
	movl	%ecx, %edx
	subl	$2, %eax
	subl	$1, %esi
	jmp	.L12
.L29:
	movl	$1, %r10d
.L7:
	testb	%r8b, %r8b
	je	.L13
	movl	%edi, 20(%rsp)
.L13:
	testb	%r9b, %r9b
	je	.L14
	movl	%esi, 16(%rsp)
.L14:
	testb	%r10b, %r10b
	je	.L3
	movl	%eax, 12(%rsp)
	jmp	.L3
.L60:
	testb	%r8b, %r8b
	je	.L18
	movl	%edi, 20(%rsp)
.L18:
	testb	%r9b, %r9b
	je	.L19
	movl	%esi, 16(%rsp)
.L19:
	testb	%r10b, %r10b
	je	.L3
	movl	$1, 12(%rsp)
	jmp	.L3
.L59:
	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
	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	.L16
	xorl	%ebx, %ebx
	leaq	20(%rsp), %r15
	leaq	16(%rsp), %r14
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r14, %rdx
	movq	%r15, %rcx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	xorl	%edx, %edx
	testl	%eax, %eax
	jle	.L3
	movl	16(%rsp), %esi
	movl	20(%rsp), %edi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	xorl	%r10d, %r10d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L58:
	testl	%edi, %edi
	jle	.L11
	movl	%ecx, %edx
	subl	$1, %eax
	subl	$1, %esi
	subl	$1, %edi
	movl	$1, %r8d
.L12:
	testl	%eax, %eax
	je	.L57
	addl	$1, %ecx
	movl	$1, %r9d
	movl	$1, %r10d
.L4:
	leal	-1(%rcx), %edx
	testl	%esi, %esi
	jg	.L58
	cmpl	$2, %eax
	jle	.L7
	movl	%ecx, %edx
	subl	$3, %eax
	je	.L9
.L8:
	cmpl	$2, %eax
	jle	.L29
	addl	$1, %edx
	subl	$3, %eax
	jne	.L8
.L9:
	testb	%r8b, %r8b
	movl	%r9d, %r8d
	je	.L5
.L23:
	movl	%edi, 20(%rsp)
.L5:
	testb	%r8b, %r8b
	je	.L6
.L24:
	movl	%esi, 16(%rsp)
.L6:
	movl	$0, 12(%rsp)
.L3:
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jg	.L2
.L16:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L59
	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
	.p2align 4,,10
	.p2align 3
.L57:
	.cfi_restore_state
	testb	%r8b, %r8b
	jne	.L23
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L11:
	cmpl	$1, %eax
	je	.L60
	movl	%ecx, %edx
	subl	$2, %eax
	subl	$1, %esi
	jmp	.L12
.L29:
	movl	$1, %r10d
.L7:
	testb	%r8b, %r8b
	je	.L13
	movl	%edi, 20(%rsp)
.L13:
	testb	%r9b, %r9b
	je	.L14
	movl	%esi, 16(%rsp)
.L14:
	testb	%r10b, %r10b
	je	.L3
	movl	%eax, 12(%rsp)
	jmp	.L3
.L60:
	testb	%r8b, %r8b
	je	.L18
	movl	%edi, 20(%rsp)
.L18:
	testb	%r9b, %r9b
	je	.L19
	movl	%esi, 16(%rsp)
.L19:
	testb	%r10b, %r10b
	je	.L3
	movl	$1, 12(%rsp)
	jmp	.L3
.L59:
	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:
```