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>

int main() {
    int n, i, j, w, x, y, z, d, t;
    int tariffs[7][3] = { {  60,  2,  600 },
                          {  80,  5,  800 },
                          { 100, 10, 1000 },
                          { 120, 15, 1200 },
                          { 140, 20, 1400 },
                          { 160, 25, 1600 },
                          { 999, 999, 999 } };
    while (1) {
        if (1 != scanf(" %d", &n)) return 1;
        if (n > 10000) return 1;
        if (n == 0) break;
        for (i=t=0; i<n; i++) {
            if (4 != scanf(" %d %d %d %d", &x ,&y, &z, &w)) return 1;
            if (x < 1 || x > 200 || y < 1 || y > 200 || z < 1 || z > 200) return 1;
            d = x + y + z;
            for (j=0; d > tariffs[j][0] || w > tariffs[j][1]; j++)
                ;
            if (j > 5) continue;
            t += tariffs[j][2];
        }
        printf("%d\n", t);
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	" %d"
.LC1:
	.string	" %d %d %d %d"
.LC2:
	.string	"%d\n"
	.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	$144, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$60, -96(%rbp)
	movl	$2, -92(%rbp)
	movl	$600, -88(%rbp)
	movl	$80, -84(%rbp)
	movl	$5, -80(%rbp)
	movl	$800, -76(%rbp)
	movl	$100, -72(%rbp)
	movl	$10, -68(%rbp)
	movl	$1000, -64(%rbp)
	movl	$120, -60(%rbp)
	movl	$15, -56(%rbp)
	movl	$1200, -52(%rbp)
	movl	$140, -48(%rbp)
	movl	$20, -44(%rbp)
	movl	$1400, -40(%rbp)
	movl	$160, -36(%rbp)
	movl	$25, -32(%rbp)
	movl	$1600, -28(%rbp)
	movl	$999, -24(%rbp)
	movl	$999, -20(%rbp)
	movl	$999, -16(%rbp)
.L16:
	leaq	-132(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L17
.L2:
	movl	-132(%rbp), %eax
	cmpl	$10000, %eax
	jle	.L4
	movl	$1, %eax
	jmp	.L17
.L4:
	movl	-132(%rbp), %eax
	testl	%eax, %eax
	je	.L20
	movl	$0, -104(%rbp)
	movl	-104(%rbp), %eax
	movl	%eax, -112(%rbp)
	jmp	.L7
.L15:
	leaq	-128(%rbp), %rsi
	leaq	-116(%rbp), %rcx
	leaq	-120(%rbp), %rdx
	leaq	-124(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$4, %eax
	je	.L8
	movl	$1, %eax
	jmp	.L17
.L8:
	movl	-124(%rbp), %eax
	testl	%eax, %eax
	jle	.L9
	movl	-124(%rbp), %eax
	cmpl	$200, %eax
	jg	.L9
	movl	-120(%rbp), %eax
	testl	%eax, %eax
	jle	.L9
	movl	-120(%rbp), %eax
	cmpl	$200, %eax
	jg	.L9
	movl	-116(%rbp), %eax
	testl	%eax, %eax
	jle	.L9
	movl	-116(%rbp), %eax
	cmpl	$200, %eax
	jle	.L10
.L9:
	movl	$1, %eax
	jmp	.L17
.L10:
	movl	-124(%rbp), %edx
	movl	-120(%rbp), %eax
	addl	%eax, %edx
	movl	-116(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -100(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L11
.L12:
	addl	$1, -108(%rbp)
.L11:
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$96, %rax
	movl	(%rax), %eax
	cmpl	%eax, -100(%rbp)
	jg	.L12
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$92, %rax
	movl	(%rax), %edx
	movl	-128(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L12
	cmpl	$5, -108(%rbp)
	jg	.L21
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$88, %rax
	movl	(%rax), %eax
	addl	%eax, -104(%rbp)
	jmp	.L14
.L21:
	nop
.L14:
	addl	$1, -112(%rbp)
.L7:
	movl	-132(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L15
	movl	-104(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L16
.L20:
	nop
	movl	$0, %eax
.L17:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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
.LC5:
	.string	" %d"
.LC6:
	.string	" %d %d %d %d"
.LC7:
	.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
	leaq	.LC6(%rip), %r14
	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	$152, %rsp
	.cfi_def_cfa_offset 208
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	movaps	%xmm0, 48(%rsp)
	movdqa	.LC1(%rip), %xmm0
	movq	%rax, %rsi
	movq	%rax, 8(%rsp)
	movaps	%xmm0, 64(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movaps	%xmm0, 80(%rsp)
	movdqa	.LC3(%rip), %xmm0
	movaps	%xmm0, 96(%rsp)
	movdqa	.LC4(%rip), %xmm0
	movaps	%xmm0, 112(%rsp)
.L18:
	xorl	%eax, %eax
	leaq	.LC5(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L2
	movl	28(%rsp), %eax
	cmpl	$10000, %eax
	jg	.L2
	testl	%eax, %eax
	je	.L1
	movl	$0, 4(%rsp)
	jle	.L4
	leaq	40(%rsp), %rbp
	xorl	%r12d, %r12d
	leaq	36(%rsp), %rbx
	movq	%rbp, %rax
	leaq	32(%rsp), %r15
	leaq	44(%rsp), %r13
	movq	%rbx, %rbp
	movl	%r12d, %ebx
	movq	%rax, %r12
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L34:
	cmpl	$2, %ecx
	jle	.L29
.L6:
	cmpl	$5, %ecx
	jle	.L30
.L9:
	cmpl	$10, %ecx
	jle	.L31
.L11:
	cmpl	$15, %ecx
	jle	.L32
.L13:
	cmpl	$20, %ecx
	jle	.L7
.L15:
	cmpl	$25, %ecx
	jle	.L33
.L16:
	addl	$1, %ebx
	cmpl	%ebx, 28(%rsp)
	jle	.L4
.L17:
	movq	%r12, %rdx
	movq	%r15, %r8
	movq	%r13, %rcx
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	%eax, %rdx
	cmpl	$4, %edx
	jne	.L2
	movl	36(%rsp), %eax
	leal	-1(%rax), %ecx
	cmpl	$199, %ecx
	ja	.L2
	movl	40(%rsp), %ecx
	leal	-1(%rcx), %esi
	cmpl	$199, %esi
	ja	.L2
	movl	44(%rsp), %esi
	leal	-1(%rsi), %edi
	cmpl	$199, %edi
	ja	.L2
	addl	%ecx, %eax
	movl	32(%rsp), %ecx
	addl	%esi, %eax
	cmpl	$60, %eax
	jle	.L34
	cmpl	$80, %eax
	jle	.L6
	cmpl	$100, %eax
	jle	.L9
	cmpl	$120, %eax
	jle	.L11
	cmpl	$140, %eax
	jle	.L13
	cmpl	$160, %eax
	jle	.L15
	addl	$1, %ebx
	cmpl	%ebx, 28(%rsp)
	jg	.L17
.L4:
	movl	4(%rsp), %edx
	leaq	.LC7(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rsp), %rsi
	jmp	.L18
.L29:
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L7:
	leaq	(%rdx,%rdx,2), %rax
	movl	56(%rsp,%rax,4), %eax
	addl	%eax, 4(%rsp)
	jmp	.L16
.L2:
	movl	$1, %eax
.L1:
	movq	136(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L35
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L30:
	.cfi_restore_state
	movl	$1, %edx
	jmp	.L7
.L31:
	movl	$2, %edx
	jmp	.L7
.L32:
	movl	$3, %edx
	jmp	.L7
.L33:
	movl	$5, %edx
	jmp	.L7
.L35:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	60
	.long	2
	.long	600
	.long	80
	.align 16
.LC1:
	.long	5
	.long	800
	.long	100
	.long	10
	.align 16
.LC2:
	.long	1000
	.long	120
	.long	15
	.long	1200
	.align 16
.LC3:
	.long	140
	.long	20
	.long	1400
	.long	160
	.align 16
.LC4:
	.long	25
	.long	1600
	.long	999
	.long	999
	.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
.LC5:
	.string	" %d"
.LC6:
	.string	" %d %d %d %d"
.LC7:
	.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
	leaq	.LC6(%rip), %r14
	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	$152, %rsp
	.cfi_def_cfa_offset 208
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	movaps	%xmm0, 48(%rsp)
	movdqa	.LC1(%rip), %xmm0
	movq	%rax, %rsi
	movq	%rax, 8(%rsp)
	movaps	%xmm0, 64(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movaps	%xmm0, 80(%rsp)
	movdqa	.LC3(%rip), %xmm0
	movaps	%xmm0, 96(%rsp)
	movdqa	.LC4(%rip), %xmm0
	movaps	%xmm0, 112(%rsp)
.L18:
	xorl	%eax, %eax
	leaq	.LC5(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L2
	movl	28(%rsp), %eax
	cmpl	$10000, %eax
	jg	.L2
	testl	%eax, %eax
	je	.L1
	movl	$0, 4(%rsp)
	jle	.L4
	leaq	40(%rsp), %rbp
	xorl	%r12d, %r12d
	leaq	36(%rsp), %rbx
	movq	%rbp, %rax
	leaq	32(%rsp), %r15
	leaq	44(%rsp), %r13
	movq	%rbx, %rbp
	movl	%r12d, %ebx
	movq	%rax, %r12
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L34:
	cmpl	$2, %ecx
	jle	.L29
.L6:
	cmpl	$5, %ecx
	jle	.L30
.L9:
	cmpl	$10, %ecx
	jle	.L31
.L11:
	cmpl	$15, %ecx
	jle	.L32
.L13:
	cmpl	$20, %ecx
	jle	.L7
.L15:
	cmpl	$25, %ecx
	jle	.L33
.L16:
	addl	$1, %ebx
	cmpl	%ebx, 28(%rsp)
	jle	.L4
.L17:
	movq	%r12, %rdx
	movq	%r15, %r8
	movq	%r13, %rcx
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	%eax, %rdx
	cmpl	$4, %edx
	jne	.L2
	movl	36(%rsp), %eax
	leal	-1(%rax), %ecx
	cmpl	$199, %ecx
	ja	.L2
	movl	40(%rsp), %ecx
	leal	-1(%rcx), %esi
	cmpl	$199, %esi
	ja	.L2
	movl	44(%rsp), %esi
	leal	-1(%rsi), %edi
	cmpl	$199, %edi
	ja	.L2
	addl	%ecx, %eax
	movl	32(%rsp), %ecx
	addl	%esi, %eax
	cmpl	$60, %eax
	jle	.L34
	cmpl	$80, %eax
	jle	.L6
	cmpl	$100, %eax
	jle	.L9
	cmpl	$120, %eax
	jle	.L11
	cmpl	$140, %eax
	jle	.L13
	cmpl	$160, %eax
	jle	.L15
	addl	$1, %ebx
	cmpl	%ebx, 28(%rsp)
	jg	.L17
.L4:
	movl	4(%rsp), %edx
	leaq	.LC7(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rsp), %rsi
	jmp	.L18
.L29:
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L7:
	leaq	(%rdx,%rdx,2), %rax
	movl	56(%rsp,%rax,4), %eax
	addl	%eax, 4(%rsp)
	jmp	.L16
.L2:
	movl	$1, %eax
.L1:
	movq	136(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L35
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L30:
	.cfi_restore_state
	movl	$1, %edx
	jmp	.L7
.L31:
	movl	$2, %edx
	jmp	.L7
.L32:
	movl	$3, %edx
	jmp	.L7
.L33:
	movl	$5, %edx
	jmp	.L7
.L35:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	60
	.long	2
	.long	600
	.long	80
	.align 16
.LC1:
	.long	5
	.long	800
	.long	100
	.long	10
	.align 16
.LC2:
	.long	1000
	.long	120
	.long	15
	.long	1200
	.align 16
.LC3:
	.long	140
	.long	20
	.long	1400
	.long	160
	.align 16
.LC4:
	.long	25
	.long	1600
	.long	999
	.long	999
	.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>

int main() {
    int n, i, j, w, x, y, z, d, t;
    int tariffs[7][3] = { {  60,  2,  600 },
                          {  80,  5,  800 },
                          { 100, 10, 1000 },
                          { 120, 15, 1200 },
                          { 140, 20, 1400 },
                          { 160, 25, 1600 },
                          { 999, 999, 999 } };
    while (1) {
        if (1 != scanf(" %d", &n)) return 1;
        if (n > 10000) return 1;
        if (n == 0) break;
        for (i=t=0; i<n; i++) {
            if (4 != scanf(" %d %d %d %d", &x ,&y, &z, &w)) return 1;
            if (x < 1 || x > 200 || y < 1 || y > 200 || z < 1 || z > 200) return 1;
            d = x + y + z;
            for (j=0; d > tariffs[j][0] || w > tariffs[j][1]; j++)
                ;
            if (j > 5) continue;
            t += tariffs[j][2];
        }
        printf("%d\n", t);
    }
    return 0;
}
2
50 25 5 5
80 60 10 30
3
10 7 25 24
5 8 12 5
30 30 30 18
0
 2
50 25 5 5
80 60 10 30
3
10 7 25 24
5 8 12 5
30 30 30 3
0
 2
50 25 5 5
135 60 10 30
3
10 7 25 24
5 8 13 5
30 30 30 14
0
 2
50 36 5 5
135 60 8 30
3
10 8 25 24
5 1 13 5
30 30 30 14
0
 2
74 2 5 5
80 82 1 0
0
7 2 0 24
2 -1 12 3
30 30 -1 11
0
 2
74 2 3 5
115 94 1 0
0
7 2 0 24
2 -1 12 3
54 30 -2 11
0
 2
50 34 5 5
80 60 10 30
3
10 15 25 24
5 8 12 5
30 30 30 18
0
 2
50 1 5 2
80 60 10 30
3
10 15 25 24
5 8 12 5
30 30 30 18
0
 2
86 25 5 5
135 60 10 30
3
10 8 25 24
5 8 13 5
30 30 30 14
0
 2
51 1 5 5
80 95 3 30
3
10 15 25 47
2 12 12 3
30 30 30 11
0

800
3800
 800
3400
 800
3600
 1000
3600
 1000
 800
 1000
3800
 600
3800
 1200
3600
 800
2000

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>

int main() {
    int n, i, j, w, x, y, z, d, t;
    int tariffs[7][3] = { {  60,  2,  600 },
                          {  80,  5,  800 },
                          { 100, 10, 1000 },
                          { 120, 15, 1200 },
                          { 140, 20, 1400 },
                          { 160, 25, 1600 },
                          { 999, 999, 999 } };
    while (1) {
        if (1 != scanf(" %d", &n)) return 1;
        if (n > 10000) return 1;
        if (n == 0) break;
        for (i=t=0; i<n; i++) {
            if (4 != scanf(" %d %d %d %d", &x ,&y, &z, &w)) return 1;
            if (x < 1 || x > 200 || y < 1 || y > 200 || z < 1 || z > 200) return 1;
            d = x + y + z;
            for (j=0; d > tariffs[j][0] || w > tariffs[j][1]; j++)
                ;
            if (j > 5) continue;
            t += tariffs[j][2];
        }
        printf("%d\n", t);
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	" %d"
.LC1:
	.string	" %d %d %d %d"
.LC2:
	.string	"%d\n"
	.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	$144, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$60, -96(%rbp)
	movl	$2, -92(%rbp)
	movl	$600, -88(%rbp)
	movl	$80, -84(%rbp)
	movl	$5, -80(%rbp)
	movl	$800, -76(%rbp)
	movl	$100, -72(%rbp)
	movl	$10, -68(%rbp)
	movl	$1000, -64(%rbp)
	movl	$120, -60(%rbp)
	movl	$15, -56(%rbp)
	movl	$1200, -52(%rbp)
	movl	$140, -48(%rbp)
	movl	$20, -44(%rbp)
	movl	$1400, -40(%rbp)
	movl	$160, -36(%rbp)
	movl	$25, -32(%rbp)
	movl	$1600, -28(%rbp)
	movl	$999, -24(%rbp)
	movl	$999, -20(%rbp)
	movl	$999, -16(%rbp)
.L16:
	leaq	-132(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L17
.L2:
	movl	-132(%rbp), %eax
	cmpl	$10000, %eax
	jle	.L4
	movl	$1, %eax
	jmp	.L17
.L4:
	movl	-132(%rbp), %eax
	testl	%eax, %eax
	je	.L20
	movl	$0, -104(%rbp)
	movl	-104(%rbp), %eax
	movl	%eax, -112(%rbp)
	jmp	.L7
.L15:
	leaq	-128(%rbp), %rsi
	leaq	-116(%rbp), %rcx
	leaq	-120(%rbp), %rdx
	leaq	-124(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$4, %eax
	je	.L8
	movl	$1, %eax
	jmp	.L17
.L8:
	movl	-124(%rbp), %eax
	testl	%eax, %eax
	jle	.L9
	movl	-124(%rbp), %eax
	cmpl	$200, %eax
	jg	.L9
	movl	-120(%rbp), %eax
	testl	%eax, %eax
	jle	.L9
	movl	-120(%rbp), %eax
	cmpl	$200, %eax
	jg	.L9
	movl	-116(%rbp), %eax
	testl	%eax, %eax
	jle	.L9
	movl	-116(%rbp), %eax
	cmpl	$200, %eax
	jle	.L10
.L9:
	movl	$1, %eax
	jmp	.L17
.L10:
	movl	-124(%rbp), %edx
	movl	-120(%rbp), %eax
	addl	%eax, %edx
	movl	-116(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -100(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L11
.L12:
	addl	$1, -108(%rbp)
.L11:
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$96, %rax
	movl	(%rax), %eax
	cmpl	%eax, -100(%rbp)
	jg	.L12
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$92, %rax
	movl	(%rax), %edx
	movl	-128(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L12
	cmpl	$5, -108(%rbp)
	jg	.L21
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$88, %rax
	movl	(%rax), %eax
	addl	%eax, -104(%rbp)
	jmp	.L14
.L21:
	nop
.L14:
	addl	$1, -112(%rbp)
.L7:
	movl	-132(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L15
	movl	-104(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L16
.L20:
	nop
	movl	$0, %eax
.L17:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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"
.LC1:
	.string	" %d %d %d %d"
.LC2:
	.string	"%d\n"
	.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	$144, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$60, -96(%rbp)
	movl	$2, -92(%rbp)
	movl	$600, -88(%rbp)
	movl	$80, -84(%rbp)
	movl	$5, -80(%rbp)
	movl	$800, -76(%rbp)
	movl	$100, -72(%rbp)
	movl	$10, -68(%rbp)
	movl	$1000, -64(%rbp)
	movl	$120, -60(%rbp)
	movl	$15, -56(%rbp)
	movl	$1200, -52(%rbp)
	movl	$140, -48(%rbp)
	movl	$20, -44(%rbp)
	movl	$1400, -40(%rbp)
	movl	$160, -36(%rbp)
	movl	$25, -32(%rbp)
	movl	$1600, -28(%rbp)
	movl	$999, -24(%rbp)
	movl	$999, -20(%rbp)
	movl	$999, -16(%rbp)
.L16:
	leaq	-132(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L17
.L2:
	movl	-132(%rbp), %eax
	cmpl	$10000, %eax
	jle	.L4
	movl	$1, %eax
	jmp	.L17
.L4:
	movl	-132(%rbp), %eax
	testl	%eax, %eax
	je	.L20
	movl	$0, -104(%rbp)
	movl	-104(%rbp), %eax
	movl	%eax, -112(%rbp)
	jmp	.L7
.L15:
	leaq	-128(%rbp), %rsi
	leaq	-116(%rbp), %rcx
	leaq	-120(%rbp), %rdx
	leaq	-124(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$4, %eax
	je	.L8
	movl	$1, %eax
	jmp	.L17
.L8:
	movl	-124(%rbp), %eax
	testl	%eax, %eax
	jle	.L9
	movl	-124(%rbp), %eax
	cmpl	$200, %eax
	jg	.L9
	movl	-120(%rbp), %eax
	testl	%eax, %eax
	jle	.L9
	movl	-120(%rbp), %eax
	cmpl	$200, %eax
	jg	.L9
	movl	-116(%rbp), %eax
	testl	%eax, %eax
	jle	.L9
	movl	-116(%rbp), %eax
	cmpl	$200, %eax
	jle	.L10
.L9:
	movl	$1, %eax
	jmp	.L17
.L10:
	movl	-124(%rbp), %edx
	movl	-120(%rbp), %eax
	addl	%eax, %edx
	movl	-116(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -100(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L11
.L12:
	addl	$1, -108(%rbp)
.L11:
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$96, %rax
	movl	(%rax), %eax
	cmpl	%eax, -100(%rbp)
	jg	.L12
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$92, %rax
	movl	(%rax), %edx
	movl	-128(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L12
	cmpl	$5, -108(%rbp)
	jg	.L21
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$88, %rax
	movl	(%rax), %eax
	addl	%eax, -104(%rbp)
	jmp	.L14
.L21:
	nop
.L14:
	addl	$1, -112(%rbp)
.L7:
	movl	-132(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L15
	movl	-104(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L16
.L20:
	nop
	movl	$0, %eax
.L17:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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:
