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 c,a,n,i,j,y,count = 0;
 
  scanf("%d",&y);
 
  for(i=0;i<y;i++) {
 
    scanf("%d %d %d",&c,&a,&n);
    count = 0;
    while(1) {
 
      if(c - 1 >= 0 && n - 1>=0 && a - 1>=0 ) {
    count++;
    c--;
    n--;
    a--;
      } else if(c -2 >= 0 && a-1 >= 0) {
    count++;
    c -= 2;
    a--;
      }else if(c-3 >= 0) {
    count++;
    c -= 3;
      } else break;
 
    }
 
    printf("%d\n",count);
 
  }
  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.unlikely,"ax",@progbits
.LCOLDB3:
	.section	.text.startup,"ax",@progbits
.LHOTB3:
	.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	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L32
	xorl	%ebx, %ebx
	leaq	16(%rsp), %r15
	leaq	12(%rsp), %r14
	xorl	%ebp, %ebp
	leaq	8(%rsp), %r13
	leaq	.LC1(%rip), %r12
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L82:
	testl	%ecx, %ecx
	jle	.L15
	movl	%edx, %r9d
	subl	$1, %esi
	subl	$1, %ecx
	subl	$1, %eax
	jne	.L16
	movl	$1, %r11d
.L17:
	movl	%ecx, 12(%rsp)
.L5:
	testb	%r11b, %r11b
	je	.L6
	movl	%esi, 16(%rsp)
.L6:
	movl	%ebp, 8(%rsp)
.L3:
	movl	%r9d, %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	addl	$1, %ebx
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	%ebx, 20(%rsp)
	jle	.L32
.L2:
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	xorl	%r9d, %r9d
	testl	%eax, %eax
	jle	.L3
	movl	16(%rsp), %esi
	movl	12(%rsp), %ecx
	movl	$1, %edx
	xorl	%edi, %edi
	xorl	%r11d, %r11d
	xorl	%r10d, %r10d
	.p2align 4,,10
	.p2align 3
.L4:
	leal	-1(%rdx), %r9d
	testl	%esi, %esi
	jg	.L82
	cmpl	$1, %eax
	je	.L76
	testl	%ecx, %ecx
	jle	.L22
	movl	%edx, %r9d
	subl	$1, %ecx
	subl	$2, %eax
	je	.L17
	movl	$1, %edi
.L23:
	leal	1(%r9), %edx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L15:
	cmpl	$1, %eax
	je	.L76
.L22:
	cmpl	$2, %eax
	jle	.L11
	movl	%edx, %r9d
	subl	$3, %eax
	jne	.L83
.L13:
	testb	%dil, %dil
	jne	.L17
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L83:
	addl	$1, %edx
	testl	%esi, %esi
	jle	.L23
.L7:
	movl	$1, %r10d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L16:
	addl	$1, %edx
	movl	$1, %edi
	movl	$1, %r11d
	jmp	.L7
.L32:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L84
	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
.L76:
	.cfi_restore_state
	testb	%dil, %dil
	je	.L29
	movl	%ecx, 12(%rsp)
.L29:
	testb	%r11b, %r11b
	je	.L30
	movl	%esi, 16(%rsp)
.L30:
	testb	%r10b, %r10b
	je	.L3
	movl	$1, 8(%rsp)
	jmp	.L3
.L84:
	call	__stack_chk_fail@PLT
.L11:
	testb	%dil, %dil
	je	.L25
	movl	%ecx, 12(%rsp)
.L25:
	testb	%r11b, %r11b
	je	.L26
	movl	%esi, 16(%rsp)
.L26:
	testb	%r10b, %r10b
	je	.L3
	movl	%eax, 8(%rsp)
	jmp	.L3
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB23:
.L87:
	.cfi_def_cfa_offset 96
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	testl	%ecx, %ecx
	jg	.L85
	cmpl	$2, %eax
	je	.L38
	movl	%edx, %r9d
	subl	$3, %eax
.L10:
	addl	$1, %edx
	testl	%eax, %eax
	je	.L86
.L12:
	leal	-1(%rdx), %r9d
	cmpl	$1, %eax
	jne	.L87
	movl	$1, %r10d
	jmp	.L76
.L85:
	movl	%edx, %r9d
	subl	$2, %eax
	subl	$1, %ecx
	movl	$1, %edi
	jmp	.L10
.L38:
	movl	$1, %r10d
	jmp	.L11
.L86:
	jmp	.L13
	.cfi_endproc
.LFE23:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE3:
	.section	.text.startup
.LHOTE3:
	.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.unlikely,"ax",@progbits
.LCOLDB3:
	.section	.text.startup,"ax",@progbits
.LHOTB3:
	.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	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L32
	xorl	%ebx, %ebx
	leaq	16(%rsp), %r15
	leaq	12(%rsp), %r14
	xorl	%ebp, %ebp
	leaq	8(%rsp), %r13
	leaq	.LC1(%rip), %r12
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L82:
	testl	%ecx, %ecx
	jle	.L15
	movl	%edx, %r9d
	subl	$1, %esi
	subl	$1, %ecx
	subl	$1, %eax
	jne	.L16
	movl	$1, %r11d
.L17:
	movl	%ecx, 12(%rsp)
.L5:
	testb	%r11b, %r11b
	je	.L6
	movl	%esi, 16(%rsp)
.L6:
	movl	%ebp, 8(%rsp)
.L3:
	movl	%r9d, %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	addl	$1, %ebx
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	%ebx, 20(%rsp)
	jle	.L32
.L2:
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	xorl	%r9d, %r9d
	testl	%eax, %eax
	jle	.L3
	movl	16(%rsp), %esi
	movl	12(%rsp), %ecx
	movl	$1, %edx
	xorl	%edi, %edi
	xorl	%r11d, %r11d
	xorl	%r10d, %r10d
	.p2align 4,,10
	.p2align 3
.L4:
	leal	-1(%rdx), %r9d
	testl	%esi, %esi
	jg	.L82
	cmpl	$1, %eax
	je	.L76
	testl	%ecx, %ecx
	jle	.L22
	movl	%edx, %r9d
	subl	$1, %ecx
	subl	$2, %eax
	je	.L17
	movl	$1, %edi
.L23:
	leal	1(%r9), %edx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L15:
	cmpl	$1, %eax
	je	.L76
.L22:
	cmpl	$2, %eax
	jle	.L11
	movl	%edx, %r9d
	subl	$3, %eax
	jne	.L83
.L13:
	testb	%dil, %dil
	jne	.L17
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L83:
	addl	$1, %edx
	testl	%esi, %esi
	jle	.L23
.L7:
	movl	$1, %r10d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L16:
	addl	$1, %edx
	movl	$1, %edi
	movl	$1, %r11d
	jmp	.L7
.L32:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L84
	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
.L76:
	.cfi_restore_state
	testb	%dil, %dil
	je	.L29
	movl	%ecx, 12(%rsp)
.L29:
	testb	%r11b, %r11b
	je	.L30
	movl	%esi, 16(%rsp)
.L30:
	testb	%r10b, %r10b
	je	.L3
	movl	$1, 8(%rsp)
	jmp	.L3
.L84:
	call	__stack_chk_fail@PLT
.L11:
	testb	%dil, %dil
	je	.L25
	movl	%ecx, 12(%rsp)
.L25:
	testb	%r11b, %r11b
	je	.L26
	movl	%esi, 16(%rsp)
.L26:
	testb	%r10b, %r10b
	je	.L3
	movl	%eax, 8(%rsp)
	jmp	.L3
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB23:
.L87:
	.cfi_def_cfa_offset 96
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	testl	%ecx, %ecx
	jg	.L85
	cmpl	$2, %eax
	je	.L38
	movl	%edx, %r9d
	subl	$3, %eax
.L10:
	addl	$1, %edx
	testl	%eax, %eax
	je	.L86
.L12:
	leal	-1(%rdx), %r9d
	cmpl	$1, %eax
	jne	.L87
	movl	$1, %r10d
	jmp	.L76
.L85:
	movl	%edx, %r9d
	subl	$2, %eax
	subl	$1, %ecx
	movl	$1, %edi
	jmp	.L10
.L38:
	movl	$1, %r10d
	jmp	.L11
.L86:
	jmp	.L13
	.cfi_endproc
.LFE23:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE3:
	.section	.text.startup
.LHOTE3:
	.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.unlikely,"ax",@progbits
.LCOLDB3:
	.section	.text.startup,"ax",@progbits
.LHOTB3:
	.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	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L32
	xorl	%ebx, %ebx
	leaq	16(%rsp), %r15
	leaq	12(%rsp), %r14
	xorl	%ebp, %ebp
	leaq	8(%rsp), %r13
	leaq	.LC1(%rip), %r12
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L82:
	testl	%ecx, %ecx
	jle	.L15
	movl	%edx, %r9d
	subl	$1, %esi
	subl	$1, %ecx
	subl	$1, %eax
	jne	.L16
	movl	$1, %r11d
.L17:
	movl	%ecx, 12(%rsp)
.L5:
	testb	%r11b, %r11b
	je	.L6
	movl	%esi, 16(%rsp)
.L6:
	movl	%ebp, 8(%rsp)
.L3:
	movl	%r9d, %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	addl	$1, %ebx
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	%ebx, 20(%rsp)
	jle	.L32
.L2:
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	xorl	%r9d, %r9d
	testl	%eax, %eax
	jle	.L3
	movl	16(%rsp), %esi
	movl	12(%rsp), %ecx
	movl	$1, %edx
	xorl	%edi, %edi
	xorl	%r11d, %r11d
	xorl	%r10d, %r10d
	.p2align 4,,10
	.p2align 3
.L4:
	leal	-1(%rdx), %r9d
	testl	%esi, %esi
	jg	.L82
	cmpl	$1, %eax
	je	.L76
	testl	%ecx, %ecx
	jle	.L22
	movl	%edx, %r9d
	subl	$1, %ecx
	subl	$2, %eax
	je	.L17
	movl	$1, %edi
.L23:
	leal	1(%r9), %edx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L15:
	cmpl	$1, %eax
	je	.L76
.L22:
	cmpl	$2, %eax
	jle	.L11
	movl	%edx, %r9d
	subl	$3, %eax
	jne	.L83
.L13:
	testb	%dil, %dil
	jne	.L17
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L83:
	addl	$1, %edx
	testl	%esi, %esi
	jle	.L23
.L7:
	movl	$1, %r10d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L16:
	addl	$1, %edx
	movl	$1, %edi
	movl	$1, %r11d
	jmp	.L7
.L32:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L84
	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
.L76:
	.cfi_restore_state
	testb	%dil, %dil
	je	.L29
	movl	%ecx, 12(%rsp)
.L29:
	testb	%r11b, %r11b
	je	.L30
	movl	%esi, 16(%rsp)
.L30:
	testb	%r10b, %r10b
	je	.L3
	movl	$1, 8(%rsp)
	jmp	.L3
.L84:
	call	__stack_chk_fail@PLT
.L11:
	testb	%dil, %dil
	je	.L25
	movl	%ecx, 12(%rsp)
.L25:
	testb	%r11b, %r11b
	je	.L26
	movl	%esi, 16(%rsp)
.L26:
	testb	%r10b, %r10b
	je	.L3
	movl	%eax, 8(%rsp)
	jmp	.L3
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB23:
.L87:
	.cfi_def_cfa_offset 96
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	testl	%ecx, %ecx
	jg	.L85
	cmpl	$2, %eax
	je	.L38
	movl	%edx, %r9d
	subl	$3, %eax
.L10:
	addl	$1, %edx
	testl	%eax, %eax
	je	.L86
.L12:
	leal	-1(%rdx), %r9d
	cmpl	$1, %eax
	jne	.L87
	movl	$1, %r10d
	jmp	.L76
.L85:
	movl	%edx, %r9d
	subl	$2, %eax
	subl	$1, %ecx
	movl	$1, %edi
	jmp	.L10
.L38:
	movl	$1, %r10d
	jmp	.L11
.L86:
	jmp	.L13
	.cfi_endproc
.LFE23:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE3:
	.section	.text.startup
.LHOTE3:
	.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 c,a,n,i,j,y,count = 0;
 
  scanf("%d",&y);
 
  for(i=0;i<y;i++) {
 
    scanf("%d %d %d",&c,&a,&n);
    count = 0;
    while(1) {
 
      if(c - 1 >= 0 && n - 1>=0 && a - 1>=0 ) {
    count++;
    c--;
    n--;
    a--;
      } else if(c -2 >= 0 && a-1 >= 0) {
    count++;
    c -= 2;
    a--;
      }else if(c-3 >= 0) {
    count++;
    c -= 3;
      } else break;
 
    }
 
    printf("%d\n",count);
 
  }
  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 c,a,n,i,j,y,count = 0;
 
  scanf("%d",&y);
 
  for(i=0;i<y;i++) {
 
    scanf("%d %d %d",&c,&a,&n);
    count = 0;
    while(1) {
 
      if(c - 1 >= 0 && n - 1>=0 && a - 1>=0 ) {
    count++;
    c--;
    n--;
    a--;
      } else if(c -2 >= 0 && a-1 >= 0) {
    count++;
    c -= 2;
    a--;
      }else if(c-3 >= 0) {
    count++;
    c -= 3;
      } else break;
 
    }
 
    printf("%d\n",count);
 
  }
  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 c,a,n,i,j,y,count = 0;
 
  scanf("%d",&y);
 
  for(i=0;i<y;i++) {
 
    scanf("%d %d %d",&c,&a,&n);
    count = 0;
    while(1) {
 
      if(c - 1 >= 0 && n - 1>=0 && a - 1>=0 ) {
    count++;
    c--;
    n--;
    a--;
      } else if(c -2 >= 0 && a-1 >= 0) {
    count++;
    c -= 2;
    a--;
      }else if(c-3 >= 0) {
    count++;
    c -= 3;
      } else break;
 
    }
 
    printf("%d\n",count);
 
  }
  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.unlikely,"ax",@progbits
.LCOLDB3:
	.section	.text.startup,"ax",@progbits
.LHOTB3:
	.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	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L32
	xorl	%ebx, %ebx
	leaq	16(%rsp), %r15
	leaq	12(%rsp), %r14
	xorl	%ebp, %ebp
	leaq	8(%rsp), %r13
	leaq	.LC1(%rip), %r12
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L82:
	testl	%ecx, %ecx
	jle	.L15
	movl	%edx, %r9d
	subl	$1, %esi
	subl	$1, %ecx
	subl	$1, %eax
	jne	.L16
	movl	$1, %r11d
.L17:
	movl	%ecx, 12(%rsp)
.L5:
	testb	%r11b, %r11b
	je	.L6
	movl	%esi, 16(%rsp)
.L6:
	movl	%ebp, 8(%rsp)
.L3:
	movl	%r9d, %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	addl	$1, %ebx
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	%ebx, 20(%rsp)
	jle	.L32
.L2:
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	xorl	%r9d, %r9d
	testl	%eax, %eax
	jle	.L3
	movl	16(%rsp), %esi
	movl	12(%rsp), %ecx
	movl	$1, %edx
	xorl	%edi, %edi
	xorl	%r11d, %r11d
	xorl	%r10d, %r10d
	.p2align 4,,10
	.p2align 3
.L4:
	leal	-1(%rdx), %r9d
	testl	%esi, %esi
	jg	.L82
	cmpl	$1, %eax
	je	.L76
	testl	%ecx, %ecx
	jle	.L22
	movl	%edx, %r9d
	subl	$1, %ecx
	subl	$2, %eax
	je	.L17
	movl	$1, %edi
.L23:
	leal	1(%r9), %edx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L15:
	cmpl	$1, %eax
	je	.L76
.L22:
	cmpl	$2, %eax
	jle	.L11
	movl	%edx, %r9d
	subl	$3, %eax
	jne	.L83
.L13:
	testb	%dil, %dil
	jne	.L17
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L83:
	addl	$1, %edx
	testl	%esi, %esi
	jle	.L23
.L7:
	movl	$1, %r10d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L16:
	addl	$1, %edx
	movl	$1, %edi
	movl	$1, %r11d
	jmp	.L7
.L32:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L84
	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
.L76:
	.cfi_restore_state
	testb	%dil, %dil
	je	.L29
	movl	%ecx, 12(%rsp)
.L29:
	testb	%r11b, %r11b
	je	.L30
	movl	%esi, 16(%rsp)
.L30:
	testb	%r10b, %r10b
	je	.L3
	movl	$1, 8(%rsp)
	jmp	.L3
.L84:
	call	__stack_chk_fail@PLT
.L11:
	testb	%dil, %dil
	je	.L25
	movl	%ecx, 12(%rsp)
.L25:
	testb	%r11b, %r11b
	je	.L26
	movl	%esi, 16(%rsp)
.L26:
	testb	%r10b, %r10b
	je	.L3
	movl	%eax, 8(%rsp)
	jmp	.L3
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB23:
.L87:
	.cfi_def_cfa_offset 96
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	testl	%ecx, %ecx
	jg	.L85
	cmpl	$2, %eax
	je	.L38
	movl	%edx, %r9d
	subl	$3, %eax
.L10:
	addl	$1, %edx
	testl	%eax, %eax
	je	.L86
.L12:
	leal	-1(%rdx), %r9d
	cmpl	$1, %eax
	jne	.L87
	movl	$1, %r10d
	jmp	.L76
.L85:
	movl	%edx, %r9d
	subl	$2, %eax
	subl	$1, %ecx
	movl	$1, %edi
	jmp	.L10
.L38:
	movl	$1, %r10d
	jmp	.L11
.L86:
	jmp	.L13
	.cfi_endproc
.LFE23:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE3:
	.section	.text.startup
.LHOTE3:
	.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.unlikely,"ax",@progbits
.LCOLDB3:
	.section	.text.startup,"ax",@progbits
.LHOTB3:
	.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	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L32
	xorl	%ebx, %ebx
	leaq	16(%rsp), %r15
	leaq	12(%rsp), %r14
	xorl	%ebp, %ebp
	leaq	8(%rsp), %r13
	leaq	.LC1(%rip), %r12
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L82:
	testl	%ecx, %ecx
	jle	.L15
	movl	%edx, %r9d
	subl	$1, %esi
	subl	$1, %ecx
	subl	$1, %eax
	jne	.L16
	movl	$1, %r11d
.L17:
	movl	%ecx, 12(%rsp)
.L5:
	testb	%r11b, %r11b
	je	.L6
	movl	%esi, 16(%rsp)
.L6:
	movl	%ebp, 8(%rsp)
.L3:
	movl	%r9d, %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	addl	$1, %ebx
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	%ebx, 20(%rsp)
	jle	.L32
.L2:
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	xorl	%r9d, %r9d
	testl	%eax, %eax
	jle	.L3
	movl	16(%rsp), %esi
	movl	12(%rsp), %ecx
	movl	$1, %edx
	xorl	%edi, %edi
	xorl	%r11d, %r11d
	xorl	%r10d, %r10d
	.p2align 4,,10
	.p2align 3
.L4:
	leal	-1(%rdx), %r9d
	testl	%esi, %esi
	jg	.L82
	cmpl	$1, %eax
	je	.L76
	testl	%ecx, %ecx
	jle	.L22
	movl	%edx, %r9d
	subl	$1, %ecx
	subl	$2, %eax
	je	.L17
	movl	$1, %edi
.L23:
	leal	1(%r9), %edx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L15:
	cmpl	$1, %eax
	je	.L76
.L22:
	cmpl	$2, %eax
	jle	.L11
	movl	%edx, %r9d
	subl	$3, %eax
	jne	.L83
.L13:
	testb	%dil, %dil
	jne	.L17
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L83:
	addl	$1, %edx
	testl	%esi, %esi
	jle	.L23
.L7:
	movl	$1, %r10d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L16:
	addl	$1, %edx
	movl	$1, %edi
	movl	$1, %r11d
	jmp	.L7
.L32:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L84
	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
.L76:
	.cfi_restore_state
	testb	%dil, %dil
	je	.L29
	movl	%ecx, 12(%rsp)
.L29:
	testb	%r11b, %r11b
	je	.L30
	movl	%esi, 16(%rsp)
.L30:
	testb	%r10b, %r10b
	je	.L3
	movl	$1, 8(%rsp)
	jmp	.L3
.L84:
	call	__stack_chk_fail@PLT
.L11:
	testb	%dil, %dil
	je	.L25
	movl	%ecx, 12(%rsp)
.L25:
	testb	%r11b, %r11b
	je	.L26
	movl	%esi, 16(%rsp)
.L26:
	testb	%r10b, %r10b
	je	.L3
	movl	%eax, 8(%rsp)
	jmp	.L3
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB23:
.L87:
	.cfi_def_cfa_offset 96
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	testl	%ecx, %ecx
	jg	.L85
	cmpl	$2, %eax
	je	.L38
	movl	%edx, %r9d
	subl	$3, %eax
.L10:
	addl	$1, %edx
	testl	%eax, %eax
	je	.L86
.L12:
	leal	-1(%rdx), %r9d
	cmpl	$1, %eax
	jne	.L87
	movl	$1, %r10d
	jmp	.L76
.L85:
	movl	%edx, %r9d
	subl	$2, %eax
	subl	$1, %ecx
	movl	$1, %edi
	jmp	.L10
.L38:
	movl	$1, %r10d
	jmp	.L11
.L86:
	jmp	.L13
	.cfi_endproc
.LFE23:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE3:
	.section	.text.startup
.LHOTE3:
	.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:
```