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>
#include<stdlib.h>
#include<math.h>
#include<string.h>
int main(void){
    int num_attendance;
    int *rate;
    int kinds_color=0;
    int class[9]={0};

    scanf("%d",&num_attendance);
    rate=(int *)malloc(sizeof(int)*num_attendance);
    int i;
    for(i=0;i<num_attendance;i++){
        scanf("%d",&rate[i]);
        if(rate[i]<=399){
            class[0]++;
        }
        else if(rate[i]<=799){
            class[1]++;
        }
        else if(rate[i]<=1199){
            class[2]++;
        }
        else if(rate[i]<=1599){
            class[3]++;
        }
        else if(rate[i]<=1999){
            class[4]++;
        }
        else if(rate[i]<=2399){
            class[5]++;
        }
        else if(rate[i]<=2799){
            class[6]++;
        }
        else if(rate[i]<=3199){
            class[7]++;
        }
        else if(3200<=rate[i]){
            class[8]++;
        }
    }
    for(i=0;i<8;i++){
        if(class[i]!=0){
            kinds_color++;
        }
    }
    if(kinds_color!=0){
        printf("%d ",kinds_color);
    }
    else{
        printf("1 ");
    }
    kinds_color+=class[8];
    printf("%d",kinds_color);
    return 0;
    
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d "
.LC2:
	.string	"1 "
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -64(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -16(%rbp)
	leaq	-68(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-68(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -56(%rbp)
	movl	$0, -60(%rbp)
	jmp	.L2
.L12:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$399, %eax
	jg	.L3
	movl	-48(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -48(%rbp)
	jmp	.L4
.L3:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$799, %eax
	jg	.L5
	movl	-44(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -44(%rbp)
	jmp	.L4
.L5:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$1199, %eax
	jg	.L6
	movl	-40(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -40(%rbp)
	jmp	.L4
.L6:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$1599, %eax
	jg	.L7
	movl	-36(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -36(%rbp)
	jmp	.L4
.L7:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$1999, %eax
	jg	.L8
	movl	-32(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L4
.L8:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$2399, %eax
	jg	.L9
	movl	-28(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -28(%rbp)
	jmp	.L4
.L9:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$2799, %eax
	jg	.L10
	movl	-24(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	.L4
.L10:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$3199, %eax
	jg	.L11
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -20(%rbp)
	jmp	.L4
.L11:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$3199, %eax
	jle	.L4
	movl	-16(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
.L4:
	addl	$1, -60(%rbp)
.L2:
	movl	-68(%rbp), %eax
	cmpl	%eax, -60(%rbp)
	jl	.L12
	movl	$0, -60(%rbp)
	jmp	.L13
.L15:
	movl	-60(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L14
	addl	$1, -64(%rbp)
.L14:
	addl	$1, -60(%rbp)
.L13:
	cmpl	$7, -60(%rbp)
	jle	.L15
	cmpl	$0, -64(%rbp)
	je	.L16
	movl	-64(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L17
.L16:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L17:
	movl	-16(%rbp), %eax
	addl	%eax, -64(%rbp)
	movl	-64(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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"
.LC2:
	.string	"%d "
.LC3:
	.string	"1 "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %r14
	pxor	%xmm0, %xmm0
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%r14, %rdi
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$64, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	movaps	%xmm0, 16(%rsp)
	movaps	%xmm0, 32(%rsp)
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rdi
	movq	%rdi, %rbx
	salq	$2, %rdi
	call	malloc@PLT
	testl	%ebx, %ebx
	jle	.L16
	movq	%rax, %rbx
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	xorl	%ebp, %ebp
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L20:
	addl	$1, %r12d
	movl	%r12d, 16(%rsp)
.L4:
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, 12(%rsp)
	jle	.L2
.L12:
	movq	%rbx, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%rbx), %eax
	cmpl	$399, %eax
	jle	.L20
	cmpl	$799, %eax
	jg	.L5
	addl	$1, 20(%rsp)
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, 12(%rsp)
	jg	.L12
.L2:
	pxor	%xmm0, %xmm0
	movdqa	%xmm0, %xmm1
	pcmpeqd	16(%rsp), %xmm1
	pcmpeqd	%xmm0, %xmm1
	pcmpeqd	32(%rsp), %xmm0
	pandn	.LC1(%rip), %xmm0
	psubd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %ebx
	testl	%ebx, %ebx
	je	.L13
	movd	%xmm0, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L14:
	xorl	%eax, %eax
	leal	0(%r13,%rbx), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$64, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	cmpl	$1199, %eax
	jg	.L6
	addl	$1, 24(%rsp)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	$1599, %eax
	jg	.L7
	addl	$1, 28(%rsp)
	jmp	.L4
.L7:
	cmpl	$1999, %eax
	jg	.L8
	addl	$1, 32(%rsp)
	jmp	.L4
.L13:
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L14
.L8:
	cmpl	$2399, %eax
	jle	.L22
	cmpl	$2799, %eax
	jg	.L10
	addl	$1, 40(%rsp)
	jmp	.L4
.L22:
	addl	$1, 36(%rsp)
	jmp	.L4
.L16:
	xorl	%r13d, %r13d
	jmp	.L2
.L10:
	cmpl	$3199, %eax
	jg	.L11
	addl	$1, 44(%rsp)
	jmp	.L4
.L11:
	addl	$1, %r13d
	jmp	.L4
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.long	1
	.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"
.LC2:
	.string	"%d "
.LC3:
	.string	"1 "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %r14
	pxor	%xmm0, %xmm0
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%r14, %rdi
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$64, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	movaps	%xmm0, 16(%rsp)
	movaps	%xmm0, 32(%rsp)
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rdi
	movq	%rdi, %rbx
	salq	$2, %rdi
	call	malloc@PLT
	testl	%ebx, %ebx
	jle	.L16
	movq	%rax, %rbx
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	xorl	%ebp, %ebp
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L20:
	addl	$1, %r12d
	movl	%r12d, 16(%rsp)
.L4:
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, 12(%rsp)
	jle	.L2
.L12:
	movq	%rbx, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%rbx), %eax
	cmpl	$399, %eax
	jle	.L20
	cmpl	$799, %eax
	jg	.L5
	addl	$1, 20(%rsp)
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, 12(%rsp)
	jg	.L12
.L2:
	pxor	%xmm0, %xmm0
	movdqa	%xmm0, %xmm1
	pcmpeqd	16(%rsp), %xmm1
	pcmpeqd	%xmm0, %xmm1
	pcmpeqd	32(%rsp), %xmm0
	pandn	.LC1(%rip), %xmm0
	psubd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %ebx
	testl	%ebx, %ebx
	je	.L13
	movd	%xmm0, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L14:
	xorl	%eax, %eax
	leal	0(%r13,%rbx), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$64, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	cmpl	$1199, %eax
	jg	.L6
	addl	$1, 24(%rsp)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	$1599, %eax
	jg	.L7
	addl	$1, 28(%rsp)
	jmp	.L4
.L7:
	cmpl	$1999, %eax
	jg	.L8
	addl	$1, 32(%rsp)
	jmp	.L4
.L13:
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L14
.L8:
	cmpl	$2399, %eax
	jle	.L22
	cmpl	$2799, %eax
	jg	.L10
	addl	$1, 40(%rsp)
	jmp	.L4
.L22:
	addl	$1, 36(%rsp)
	jmp	.L4
.L16:
	xorl	%r13d, %r13d
	jmp	.L2
.L10:
	cmpl	$3199, %eax
	jg	.L11
	addl	$1, 44(%rsp)
	jmp	.L4
.L11:
	addl	$1, %r13d
	jmp	.L4
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.long	1
	.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>
#include<stdlib.h>
#include<math.h>
#include<string.h>
int main(void){
    int num_attendance;
    int *rate;
    int kinds_color=0;
    int class[9]={0};

    scanf("%d",&num_attendance);
    rate=(int *)malloc(sizeof(int)*num_attendance);
    int i;
    for(i=0;i<num_attendance;i++){
        scanf("%d",&rate[i]);
        if(rate[i]<=399){
            class[0]++;
        }
        else if(rate[i]<=799){
            class[1]++;
        }
        else if(rate[i]<=1199){
            class[2]++;
        }
        else if(rate[i]<=1599){
            class[3]++;
        }
        else if(rate[i]<=1999){
            class[4]++;
        }
        else if(rate[i]<=2399){
            class[5]++;
        }
        else if(rate[i]<=2799){
            class[6]++;
        }
        else if(rate[i]<=3199){
            class[7]++;
        }
        else if(3200<=rate[i]){
            class[8]++;
        }
    }
    for(i=0;i<8;i++){
        if(class[i]!=0){
            kinds_color++;
        }
    }
    if(kinds_color!=0){
        printf("%d ",kinds_color);
    }
    else{
        printf("1 ");
    }
    kinds_color+=class[8];
    printf("%d",kinds_color);
    return 0;
    
}
4
2100 2500 4217 2700
 20
800 810 820 830 840 850 860 870 880 890 900 1771 920 930 940 950 960 970 980 990
 5
1100 3348 2800 3200 3200
 20
800 810 820 830 840 850 860 870 880 890 900 1771 920 930 120 950 960 970 980 990
 5
1101 3348 2955 3200 2889
 5
1101 3348 2302 3200 2889
 4
2100 4691 248 409
 20
800 1586 820 830 840 850 860 433 1213 259 900 1303 920 1028 92 950 960 970 980 990
 20
800 1586 820 830 840 850 860 433 1213 259 900 1303 920 1028 92 2243 960 970 980 990
 20
800 2108 443 830 840 1093 116 614 398 92 399 1139 1229 646 92 2243 960 970 1914 990

2 3 2 2 2 5 3 3 2 4 3 5 3 4 4 4 5 5 6 6
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>
#include<stdlib.h>
#include<math.h>
#include<string.h>
int main(void){
    int num_attendance;
    int *rate;
    int kinds_color=0;
    int class[9]={0};

    scanf("%d",&num_attendance);
    rate=(int *)malloc(sizeof(int)*num_attendance);
    int i;
    for(i=0;i<num_attendance;i++){
        scanf("%d",&rate[i]);
        if(rate[i]<=399){
            class[0]++;
        }
        else if(rate[i]<=799){
            class[1]++;
        }
        else if(rate[i]<=1199){
            class[2]++;
        }
        else if(rate[i]<=1599){
            class[3]++;
        }
        else if(rate[i]<=1999){
            class[4]++;
        }
        else if(rate[i]<=2399){
            class[5]++;
        }
        else if(rate[i]<=2799){
            class[6]++;
        }
        else if(rate[i]<=3199){
            class[7]++;
        }
        else if(3200<=rate[i]){
            class[8]++;
        }
    }
    for(i=0;i<8;i++){
        if(class[i]!=0){
            kinds_color++;
        }
    }
    if(kinds_color!=0){
        printf("%d ",kinds_color);
    }
    else{
        printf("1 ");
    }
    kinds_color+=class[8];
    printf("%d",kinds_color);
    return 0;
    
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d "
.LC2:
	.string	"1 "
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -64(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -16(%rbp)
	leaq	-68(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-68(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -56(%rbp)
	movl	$0, -60(%rbp)
	jmp	.L2
.L12:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$399, %eax
	jg	.L3
	movl	-48(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -48(%rbp)
	jmp	.L4
.L3:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$799, %eax
	jg	.L5
	movl	-44(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -44(%rbp)
	jmp	.L4
.L5:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$1199, %eax
	jg	.L6
	movl	-40(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -40(%rbp)
	jmp	.L4
.L6:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$1599, %eax
	jg	.L7
	movl	-36(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -36(%rbp)
	jmp	.L4
.L7:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$1999, %eax
	jg	.L8
	movl	-32(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L4
.L8:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$2399, %eax
	jg	.L9
	movl	-28(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -28(%rbp)
	jmp	.L4
.L9:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$2799, %eax
	jg	.L10
	movl	-24(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	.L4
.L10:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$3199, %eax
	jg	.L11
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -20(%rbp)
	jmp	.L4
.L11:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$3199, %eax
	jle	.L4
	movl	-16(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
.L4:
	addl	$1, -60(%rbp)
.L2:
	movl	-68(%rbp), %eax
	cmpl	%eax, -60(%rbp)
	jl	.L12
	movl	$0, -60(%rbp)
	jmp	.L13
.L15:
	movl	-60(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L14
	addl	$1, -64(%rbp)
.L14:
	addl	$1, -60(%rbp)
.L13:
	cmpl	$7, -60(%rbp)
	jle	.L15
	cmpl	$0, -64(%rbp)
	je	.L16
	movl	-64(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L17
.L16:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L17:
	movl	-16(%rbp), %eax
	addl	%eax, -64(%rbp)
	movl	-64(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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"
.LC1:
	.string	"%d "
.LC2:
	.string	"1 "
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -64(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -16(%rbp)
	leaq	-68(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-68(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -56(%rbp)
	movl	$0, -60(%rbp)
	jmp	.L2
.L12:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$399, %eax
	jg	.L3
	movl	-48(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -48(%rbp)
	jmp	.L4
.L3:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$799, %eax
	jg	.L5
	movl	-44(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -44(%rbp)
	jmp	.L4
.L5:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$1199, %eax
	jg	.L6
	movl	-40(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -40(%rbp)
	jmp	.L4
.L6:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$1599, %eax
	jg	.L7
	movl	-36(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -36(%rbp)
	jmp	.L4
.L7:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$1999, %eax
	jg	.L8
	movl	-32(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L4
.L8:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$2399, %eax
	jg	.L9
	movl	-28(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -28(%rbp)
	jmp	.L4
.L9:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$2799, %eax
	jg	.L10
	movl	-24(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	.L4
.L10:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$3199, %eax
	jg	.L11
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -20(%rbp)
	jmp	.L4
.L11:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$3199, %eax
	jle	.L4
	movl	-16(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
.L4:
	addl	$1, -60(%rbp)
.L2:
	movl	-68(%rbp), %eax
	cmpl	%eax, -60(%rbp)
	jl	.L12
	movl	$0, -60(%rbp)
	jmp	.L13
.L15:
	movl	-60(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L14
	addl	$1, -64(%rbp)
.L14:
	addl	$1, -60(%rbp)
.L13:
	cmpl	$7, -60(%rbp)
	jle	.L15
	cmpl	$0, -64(%rbp)
	je	.L16
	movl	-64(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L17
.L16:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L17:
	movl	-16(%rbp), %eax
	addl	%eax, -64(%rbp)
	movl	-64(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
