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

```c
// https://atcoder.jp/contests/abc047/tasks/abc047_b
// B - すぬけ君の塗り絵 2 イージー

#include <stdio.h>

// 標準入力から改行かスペースまで読み取り、数字として返す
int get_num() {
    // 10文字+区切り文字までしか受け付けられない
    char s[11];
    int i, n;
    // scanf()の直後は改行が入力に残っているので、
    // 最初の改行は読み飛ばす
    do {
        s[0] = getchar();
    } while (s[0] == '\0' || s[0] == '\n');
    for (i = 1; i < sizeof(s); i++) {
        s[i] = getchar();
        if (s[i] == ' ' || s[i] == '\n') {
            s[i] = '\0';
            break;
        }
    }
    sscanf(s, "%d", &n);
    return n;
}

int main(int argc, const char * argv[]) {
    int w, h, n, i, j, k;
    int x, y, a, count;
    int c[100][100] = {0};
    w = get_num();
    h = get_num();
    n = get_num();

    for (i = 0; i < n; i++) {
        x = get_num();
        y = get_num();
        a = get_num();

        switch (a) {
            case 1:
                for (j = 0; j < h; j++) {
                    for (k = 0; k < x; k++) {
                        c[k][j] = 1;
                    }
                }
                break;
            case 2:
                for (j = 0; j < h; j++) {
                    for (k = x; k < w; k++) {
                        c[k][j] = 1;
                    }
                }
                break;
            case 3:
                for (j = 0; j < y; j++) {
                    for (k = 0; k < w; k++) {
                        c[k][j] = 1;
                    }
                }
                break;
            case 4:
                for (j = y; j < h; j++) {
                    for (k = 0; k < w; k++) {
                        c[k][j] = 1;
                    }
                }

            default:
                break;
        }
    }
    
    count = 0;
    
    for (j = 0; j < h; j++) {
        for (k = 0; k < w; k++) {
            if (c[k][j] == 0) {
                count ++;
            }
        }
    }
    
    printf("%d\n", count);
    
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	get_num
	.type	get_num, @function
get_num:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L2:
	call	getchar@PLT
	movb	%al, -19(%rbp)
	movzbl	-19(%rbp), %eax
	testb	%al, %al
	je	.L2
	movzbl	-19(%rbp), %eax
	cmpb	$10, %al
	je	.L2
	movl	$1, -24(%rbp)
	jmp	.L3
.L7:
	call	getchar@PLT
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	cltq
	movb	%dl, -19(%rbp,%rax)
	movl	-24(%rbp), %eax
	cltq
	movzbl	-19(%rbp,%rax), %eax
	cmpb	$32, %al
	je	.L4
	movl	-24(%rbp), %eax
	cltq
	movzbl	-19(%rbp,%rax), %eax
	cmpb	$10, %al
	jne	.L5
.L4:
	movl	-24(%rbp), %eax
	cltq
	movb	$0, -19(%rbp,%rax)
	jmp	.L6
.L5:
	addl	$1, -24(%rbp)
.L3:
	movl	-24(%rbp), %eax
	cmpl	$10, %eax
	jbe	.L7
.L6:
	leaq	-28(%rbp), %rdx
	leaq	-19(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-28(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	get_num, .-get_num
	.section	.rodata
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-36864(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3216, %rsp
	movl	%edi, -40068(%rbp)
	movq	%rsi, -40080(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40016(%rbp), %rax
	movl	$40000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, %eax
	call	get_num
	movl	%eax, -40040(%rbp)
	movl	$0, %eax
	call	get_num
	movl	%eax, -40036(%rbp)
	movl	$0, %eax
	call	get_num
	movl	%eax, -40032(%rbp)
	movl	$0, -40056(%rbp)
	jmp	.L11
.L34:
	movl	$0, %eax
	call	get_num
	movl	%eax, -40028(%rbp)
	movl	$0, %eax
	call	get_num
	movl	%eax, -40024(%rbp)
	movl	$0, %eax
	call	get_num
	movl	%eax, -40020(%rbp)
	cmpl	$4, -40020(%rbp)
	je	.L12
	cmpl	$4, -40020(%rbp)
	jg	.L42
	cmpl	$3, -40020(%rbp)
	je	.L14
	cmpl	$3, -40020(%rbp)
	jg	.L42
	cmpl	$1, -40020(%rbp)
	je	.L15
	cmpl	$2, -40020(%rbp)
	je	.L16
	jmp	.L42
.L15:
	movl	$0, -40052(%rbp)
	jmp	.L17
.L20:
	movl	$0, -40048(%rbp)
	jmp	.L18
.L19:
	movl	-40052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40048(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	$1, -40016(%rbp,%rax,4)
	addl	$1, -40048(%rbp)
.L18:
	movl	-40048(%rbp), %eax
	cmpl	-40028(%rbp), %eax
	jl	.L19
	addl	$1, -40052(%rbp)
.L17:
	movl	-40052(%rbp), %eax
	cmpl	-40036(%rbp), %eax
	jl	.L20
	jmp	.L21
.L16:
	movl	$0, -40052(%rbp)
	jmp	.L22
.L25:
	movl	-40028(%rbp), %eax
	movl	%eax, -40048(%rbp)
	jmp	.L23
.L24:
	movl	-40052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40048(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	$1, -40016(%rbp,%rax,4)
	addl	$1, -40048(%rbp)
.L23:
	movl	-40048(%rbp), %eax
	cmpl	-40040(%rbp), %eax
	jl	.L24
	addl	$1, -40052(%rbp)
.L22:
	movl	-40052(%rbp), %eax
	cmpl	-40036(%rbp), %eax
	jl	.L25
	jmp	.L21
.L14:
	movl	$0, -40052(%rbp)
	jmp	.L26
.L29:
	movl	$0, -40048(%rbp)
	jmp	.L27
.L28:
	movl	-40052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40048(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	$1, -40016(%rbp,%rax,4)
	addl	$1, -40048(%rbp)
.L27:
	movl	-40048(%rbp), %eax
	cmpl	-40040(%rbp), %eax
	jl	.L28
	addl	$1, -40052(%rbp)
.L26:
	movl	-40052(%rbp), %eax
	cmpl	-40024(%rbp), %eax
	jl	.L29
	jmp	.L21
.L12:
	movl	-40024(%rbp), %eax
	movl	%eax, -40052(%rbp)
	jmp	.L30
.L33:
	movl	$0, -40048(%rbp)
	jmp	.L31
.L32:
	movl	-40052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40048(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	$1, -40016(%rbp,%rax,4)
	addl	$1, -40048(%rbp)
.L31:
	movl	-40048(%rbp), %eax
	cmpl	-40040(%rbp), %eax
	jl	.L32
	addl	$1, -40052(%rbp)
.L30:
	movl	-40052(%rbp), %eax
	cmpl	-40036(%rbp), %eax
	jl	.L33
.L42:
	nop
.L21:
	addl	$1, -40056(%rbp)
.L11:
	movl	-40056(%rbp), %eax
	cmpl	-40032(%rbp), %eax
	jl	.L34
	movl	$0, -40044(%rbp)
	movl	$0, -40052(%rbp)
	jmp	.L35
.L39:
	movl	$0, -40048(%rbp)
	jmp	.L36
.L38:
	movl	-40052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40048(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-40016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L37
	addl	$1, -40044(%rbp)
.L37:
	addl	$1, -40048(%rbp)
.L36:
	movl	-40048(%rbp), %eax
	cmpl	-40040(%rbp), %eax
	jl	.L38
	addl	$1, -40052(%rbp)
.L35:
	movl	-40052(%rbp), %eax
	cmpl	-40036(%rbp), %eax
	jl	.L39
	movl	-40044(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L41
	call	__stack_chk_fail@PLT
.L41:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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"
	.text
	.p2align 4
	.globl	get_num
	.type	get_num, @function
get_num:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L10:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	movb	%al, 13(%rsp)
	testb	%al, %al
	je	.L10
	cmpb	$10, %al
	je	.L10
	movl	$1, %ebx
	leaq	13(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L6:
	movq	stdin(%rip), %rdi
	movslq	%ebx, %r12
	call	getc@PLT
	movb	%al, 0(%rbp,%rbx)
	cmpb	$32, %al
	je	.L8
	cmpb	$10, %al
	je	.L8
	addq	$1, %rbx
	cmpq	$11, %rbx
	jne	.L6
.L5:
	leaq	8(%rsp), %rdx
	leaq	.LC0(%rip), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movl	8(%rsp), %eax
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L13
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	movb	$0, 13(%rsp,%r12)
	jmp	.L5
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	get_num, .-get_num
	.section	.rodata.str1.1
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.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
	leaq	-36864(%rsp), %r11
	.cfi_def_cfa 11, 36920
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3272, %rsp
	.cfi_def_cfa_offset 40192
	movl	$40000, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 40120(%rsp)
	xorl	%eax, %eax
	leaq	96(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, 16(%rsp)
	call	memset@PLT
	xorl	%eax, %eax
	call	get_num
	movl	%eax, %ebp
	xorl	%eax, %eax
	call	get_num
	movl	%eax, 32(%rsp)
	movl	%eax, %ebx
	xorl	%eax, %eax
	call	get_num
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L15
	leal	-1(%rbp), %eax
	movl	$0, 8(%rsp)
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	movq	%rax, %rcx
	salq	$2, %rax
	salq	$4, %rcx
	movq	%rax, 56(%rsp)
	leaq	496(%rsp), %rax
	movq	%rax, 48(%rsp)
	addq	%rcx, %rax
	movq	%rax, 64(%rsp)
	leal	-1(%rbx), %eax
	movl	%eax, 36(%rsp)
	movl	%ebx, %eax
	shrl	$2, %eax
	movq	%rcx, 72(%rsp)
	subl	$1, %eax
	salq	$4, %rax
	movq	%rax, 24(%rsp)
	movl	%ebx, %eax
	andl	$3, %ebx
	andl	$-4, %eax
	movl	%ebx, 44(%rsp)
	leaq	40109(%rsp), %rbx
	movl	%eax, 40(%rsp)
	leaq	92(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L117:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	movb	%al, 40109(%rsp)
	testb	%al, %al
	je	.L117
	cmpb	$10, %al
	je	.L117
	movl	$1, %r12d
	.p2align 4,,10
	.p2align 3
.L20:
	movq	stdin(%rip), %rdi
	movslq	%r12d, %r13
	call	getc@PLT
	movb	%al, (%rbx,%r12)
	cmpb	$32, %al
	je	.L90
	cmpb	$10, %al
	je	.L90
	addq	$1, %r12
	cmpq	$11, %r12
	jne	.L20
.L19:
	movq	(%rsp), %rdx
	leaq	.LC0(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movl	92(%rsp), %r12d
	.p2align 4,,10
	.p2align 3
.L118:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	movb	%al, 40109(%rsp)
	testb	%al, %al
	je	.L118
	cmpb	$10, %al
	je	.L118
	movl	$1, %r14d
	.p2align 4,,10
	.p2align 3
.L25:
	movq	stdin(%rip), %rdi
	movslq	%r14d, %r13
	call	getc@PLT
	movb	%al, (%rbx,%r14)
	cmpb	$32, %al
	je	.L91
	cmpb	$10, %al
	je	.L91
	addq	$1, %r14
	cmpq	$11, %r14
	jne	.L25
.L24:
	movq	(%rsp), %rdx
	leaq	.LC0(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movl	92(%rsp), %r13d
	.p2align 4,,10
	.p2align 3
.L119:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	movb	%al, 40109(%rsp)
	testb	%al, %al
	je	.L119
	cmpb	$10, %al
	je	.L119
	movl	$1, %r15d
	.p2align 4,,10
	.p2align 3
.L30:
	movq	stdin(%rip), %rdi
	movslq	%r15d, %r14
	call	getc@PLT
	movb	%al, (%rbx,%r15)
	cmpb	$32, %al
	je	.L92
	cmpb	$10, %al
	je	.L92
	addq	$1, %r15
	cmpq	$11, %r15
	jne	.L30
.L29:
	movq	(%rsp), %rdx
	leaq	.LC0(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movl	92(%rsp), %eax
	cmpl	$3, %eax
	je	.L31
	jg	.L32
	cmpl	$1, %eax
	je	.L33
	cmpl	$2, %eax
	jne	.L35
	movl	32(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L35
	cmpl	%r12d, %ebp
	jle	.L35
	movslq	%r12d, %rax
	movdqa	.LC1(%rip), %xmm0
	movl	36(%rsp), %r9d
	leaq	(%rax,%rax,4), %rax
	movl	40(%rsp), %ecx
	movl	44(%rsp), %r10d
	leaq	(%rax,%rax,4), %rsi
	movq	24(%rsp), %rax
	salq	$4, %rsi
	addq	16(%rsp), %rsi
	leaq	16(%rax), %rdi
	.p2align 4,,10
	.p2align 3
.L41:
	leaq	(%rdi,%rsi), %rdx
	movq	%rsi, %rax
	cmpl	$2, %r9d
	jbe	.L133
	.p2align 4,,10
	.p2align 3
.L47:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rax, %rdx
	jne	.L47
	cmpl	%ecx, %r8d
	je	.L48
	movl	%r10d, %r13d
	movl	%ecx, %edx
.L49:
	movslq	%r12d, %rax
	movslq	%edx, %r11
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	salq	$2, %rax
	addq	%rax, %r11
	movl	$1, 96(%rsp,%r11,4)
	leal	1(%rdx), %r11d
	cmpl	$1, %r13d
	je	.L48
	movslq	%r11d, %r11
	addl	$2, %edx
	addq	%rax, %r11
	movl	$1, 96(%rsp,%r11,4)
	cmpl	$2, %r13d
	je	.L48
	movslq	%edx, %rdx
	addq	%rdx, %rax
	movl	$1, 96(%rsp,%rax,4)
.L48:
	addl	$1, %r12d
	addq	$400, %rsi
	cmpl	%ebp, %r12d
	jne	.L41
	.p2align 4,,10
	.p2align 3
.L35:
	addl	$1, 8(%rsp)
	movl	8(%rsp), %eax
	cmpl	%eax, 12(%rsp)
	jne	.L117
.L15:
	movl	32(%rsp), %r11d
	testl	%r11d, %r11d
	jle	.L88
	movl	%ebp, %eax
	movl	%ebp, %edi
	movq	16(%rsp), %rsi
	leal	-1(%rbp), %r9d
	shrl	$2, %eax
	andl	$-4, %edi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	subl	$1, %eax
	pxor	%xmm3, %xmm3
	leaq	5(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %r8
	salq	$6, %r8
	.p2align 4,,10
	.p2align 3
.L64:
	testl	%ebp, %ebp
	jle	.L82
	cmpl	$11, %r9d
	jbe	.L89
	leaq	(%r8,%rsi), %r10
	movq	%rsi, %rax
	pxor	%xmm2, %xmm2
	.p2align 4,,10
	.p2align 3
.L66:
	movd	1200(%rax), %xmm7
	movd	(%rax), %xmm0
	addq	$1600, %rax
	movd	-800(%rax), %xmm1
	punpckldq	%xmm7, %xmm1
	movd	-1200(%rax), %xmm7
	punpckldq	%xmm7, %xmm0
	punpcklqdq	%xmm1, %xmm0
	pcmpeqd	%xmm3, %xmm0
	psubd	%xmm0, %xmm2
	cmpq	%rax, %r10
	jne	.L66
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	addl	%eax, %edx
	movl	%edi, %eax
	cmpl	%edi, %ebp
	je	.L82
.L65:
	movslq	%eax, %rbx
	movslq	%ecx, %r10
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	leal	1(%rax), %ebx
	adcl	$0, %edx
	cmpl	%ebx, %ebp
	jle	.L82
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	leal	2(%rax), %ebx
	adcl	$0, %edx
	cmpl	%ebp, %ebx
	jge	.L82
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	leal	3(%rax), %ebx
	adcl	$0, %edx
	cmpl	%ebp, %ebx
	jge	.L82
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	leal	4(%rax), %ebx
	adcl	$0, %edx
	cmpl	%ebx, %ebp
	jle	.L82
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	leal	5(%rax), %ebx
	adcl	$0, %edx
	cmpl	%ebx, %ebp
	jle	.L82
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	leal	6(%rax), %ebx
	adcl	$0, %edx
	cmpl	%ebx, %ebp
	jle	.L82
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	leal	7(%rax), %ebx
	adcl	$0, %edx
	cmpl	%ebx, %ebp
	jle	.L82
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	leal	8(%rax), %ebx
	adcl	$0, %edx
	cmpl	%ebx, %ebp
	jle	.L82
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	leal	9(%rax), %ebx
	adcl	$0, %edx
	cmpl	%ebx, %ebp
	jle	.L82
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	leal	10(%rax), %ebx
	adcl	$0, %edx
	cmpl	%ebx, %ebp
	jle	.L82
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	adcl	$0, %edx
	addl	$11, %eax
	cmpl	%eax, %ebp
	jle	.L82
	cltq
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	leaq	(%r10,%rax,4), %rax
	cmpl	$1, 96(%rsp,%rax,4)
	adcl	$0, %edx
	.p2align 4,,10
	.p2align 3
.L82:
	addl	$1, %ecx
	addq	$4, %rsi
	cmpl	%ecx, %r11d
	jne	.L64
.L63:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	40120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L134
	addq	$40136, %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
.L32:
	.cfi_restore_state
	cmpl	$4, %eax
	jne	.L35
	movl	32(%rsp), %eax
	cmpl	%r13d, %eax
	jle	.L35
	testl	%ebp, %ebp
	jle	.L35
	movl	%eax, %edi
	subl	%r13d, %edi
	leal	-1(%rdi), %eax
	cmpl	$2, %eax
	jbe	.L37
	movq	16(%rsp), %rcx
	movslq	%r13d, %rax
	movl	%edi, %esi
	shrl	$2, %esi
	leaq	(%rcx,%rax,4), %rcx
	movq	72(%rsp), %rax
	salq	$4, %rsi
	addq	%rcx, %rsi
	leaq	400(%rcx,%rax), %rdx
	.p2align 4,,10
	.p2align 3
.L38:
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L56:
	movdqa	.LC1(%rip), %xmm6
	addq	$400, %rax
	movups	%xmm6, -400(%rax)
	cmpq	%rdx, %rax
	jne	.L56
	addq	$16, %rcx
	leaq	16(%rax), %rdx
	cmpq	%rsi, %rcx
	jne	.L38
	movl	%edi, %eax
	andl	$-4, %eax
	addl	%eax, %r13d
	cmpl	%eax, %edi
	je	.L35
.L37:
	movq	16(%rsp), %rcx
	movq	48(%rsp), %rsi
	movslq	%r13d, %rax
	leaq	(%rcx,%rax,4), %rcx
	addq	56(%rsp), %rax
	leaq	(%rsi,%rax,4), %rdx
	movl	32(%rsp), %esi
	.p2align 4,,10
	.p2align 3
.L60:
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L59:
	movl	$1, (%rax)
	addq	$400, %rax
	cmpq	%rdx, %rax
	jne	.L59
	addl	$1, %r13d
	addq	$4, %rcx
	addq	$4, %rdx
	cmpl	%r13d, %esi
	jg	.L60
	addl	$1, 8(%rsp)
	movl	8(%rsp), %eax
	cmpl	%eax, 12(%rsp)
	jne	.L117
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L92:
	movb	$0, 40109(%rsp,%r14)
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L90:
	movb	$0, 40109(%rsp,%r13)
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L91:
	movb	$0, 40109(%rsp,%r13)
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L31:
	testl	%r13d, %r13d
	jle	.L35
	testl	%ebp, %ebp
	jle	.L35
	leal	-1(%r13), %eax
	cmpl	$2, %eax
	jbe	.L84
	movl	%r13d, %esi
	movq	16(%rsp), %rcx
	movq	64(%rsp), %rdx
	shrl	$2, %esi
	salq	$4, %rsi
	addq	%rcx, %rsi
	.p2align 4,,10
	.p2align 3
.L40:
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L51:
	movdqa	.LC1(%rip), %xmm5
	addq	$400, %rax
	movaps	%xmm5, -400(%rax)
	cmpq	%rdx, %rax
	jne	.L51
	addq	$16, %rcx
	leaq	16(%rax), %rdx
	cmpq	%rsi, %rcx
	jne	.L40
	movl	%r13d, %ecx
	andl	$-4, %ecx
	testb	$3, %r13b
	je	.L35
.L39:
	movq	16(%rsp), %rsi
	movslq	%ecx, %rax
	movq	48(%rsp), %rdi
	leaq	(%rsi,%rax,4), %rsi
	addq	56(%rsp), %rax
	leaq	(%rdi,%rax,4), %rdx
	.p2align 4,,10
	.p2align 3
.L54:
	movq	%rsi, %rax
	.p2align 4,,10
	.p2align 3
.L53:
	movl	$1, (%rax)
	addq	$400, %rax
	cmpq	%rdx, %rax
	jne	.L53
	addl	$1, %ecx
	addq	$4, %rsi
	addq	$4, %rdx
	cmpl	%ecx, %r13d
	jg	.L54
	addl	$1, 8(%rsp)
	movl	8(%rsp), %eax
	cmpl	%eax, 12(%rsp)
	jne	.L117
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L33:
	movl	32(%rsp), %eax
	testl	%eax, %eax
	jle	.L35
	movq	24(%rsp), %rax
	movq	16(%rsp), %rsi
	xorl	%edi, %edi
	leaq	16(%rax), %r8
	testl	%r12d, %r12d
	jle	.L35
	movl	36(%rsp), %r10d
	movl	40(%rsp), %ecx
	leaq	(%r8,%rsi), %rdx
	movq	%rsi, %rax
	movl	32(%rsp), %r9d
	movl	44(%rsp), %r11d
	cmpl	$2, %r10d
	jbe	.L135
	.p2align 4,,10
	.p2align 3
.L43:
	movdqa	.LC1(%rip), %xmm4
	addq	$16, %rax
	movaps	%xmm4, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L43
	cmpl	%ecx, %r9d
	je	.L44
	movl	%r11d, %r14d
	movl	%ecx, %edx
.L45:
	movslq	%edi, %rax
	movslq	%edx, %r13
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	salq	$2, %rax
	addq	%rax, %r13
	movl	$1, 96(%rsp,%r13,4)
	leal	1(%rdx), %r13d
	cmpl	$1, %r14d
	je	.L44
	movslq	%r13d, %r13
	addl	$2, %edx
	addq	%rax, %r13
	movl	$1, 96(%rsp,%r13,4)
	cmpl	$2, %r14d
	je	.L44
	movslq	%edx, %rdx
	addq	%rdx, %rax
	movl	$1, 96(%rsp,%rax,4)
.L44:
	addl	$1, %edi
	addq	$400, %rsi
	cmpl	%r12d, %edi
	je	.L35
	leaq	(%r8,%rsi), %rdx
	movq	%rsi, %rax
	cmpl	$2, %r10d
	ja	.L43
.L135:
	movl	%r9d, %r14d
	xorl	%edx, %edx
	jmp	.L45
.L133:
	movl	%r8d, %r13d
	xorl	%edx, %edx
	jmp	.L49
.L89:
	xorl	%eax, %eax
	jmp	.L65
.L84:
	xorl	%ecx, %ecx
	jmp	.L39
.L88:
	xorl	%edx, %edx
	jmp	.L63
.L134:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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"
	.text
	.p2align 4
	.globl	get_num
	.type	get_num, @function
get_num:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L10:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	movb	%al, 13(%rsp)
	testb	%al, %al
	je	.L10
	cmpb	$10, %al
	je	.L10
	movl	$1, %ebx
	leaq	13(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L6:
	movq	stdin(%rip), %rdi
	movslq	%ebx, %r12
	call	getc@PLT
	movb	%al, 0(%rbp,%rbx)
	cmpb	$32, %al
	je	.L8
	cmpb	$10, %al
	je	.L8
	addq	$1, %rbx
	cmpq	$11, %rbx
	jne	.L6
.L5:
	leaq	8(%rsp), %rdx
	leaq	.LC0(%rip), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movl	8(%rsp), %eax
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L13
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	movb	$0, 13(%rsp,%r12)
	jmp	.L5
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	get_num, .-get_num
	.section	.rodata.str1.1
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.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
	leaq	-36864(%rsp), %r11
	.cfi_def_cfa 11, 36920
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3272, %rsp
	.cfi_def_cfa_offset 40192
	movl	$40000, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 40120(%rsp)
	xorl	%eax, %eax
	leaq	96(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, 16(%rsp)
	call	memset@PLT
	xorl	%eax, %eax
	call	get_num
	movl	%eax, %ebp
	xorl	%eax, %eax
	call	get_num
	movl	%eax, 32(%rsp)
	movl	%eax, %ebx
	xorl	%eax, %eax
	call	get_num
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L15
	leal	-1(%rbp), %eax
	movl	$0, 8(%rsp)
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	movq	%rax, %rcx
	salq	$2, %rax
	salq	$4, %rcx
	movq	%rax, 56(%rsp)
	leaq	496(%rsp), %rax
	movq	%rax, 48(%rsp)
	addq	%rcx, %rax
	movq	%rax, 64(%rsp)
	leal	-1(%rbx), %eax
	movl	%eax, 36(%rsp)
	movl	%ebx, %eax
	shrl	$2, %eax
	movq	%rcx, 72(%rsp)
	subl	$1, %eax
	salq	$4, %rax
	movq	%rax, 24(%rsp)
	movl	%ebx, %eax
	andl	$3, %ebx
	andl	$-4, %eax
	movl	%ebx, 44(%rsp)
	leaq	40109(%rsp), %rbx
	movl	%eax, 40(%rsp)
	leaq	92(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L117:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	movb	%al, 40109(%rsp)
	testb	%al, %al
	je	.L117
	cmpb	$10, %al
	je	.L117
	movl	$1, %r12d
	.p2align 4,,10
	.p2align 3
.L20:
	movq	stdin(%rip), %rdi
	movslq	%r12d, %r13
	call	getc@PLT
	movb	%al, (%rbx,%r12)
	cmpb	$32, %al
	je	.L90
	cmpb	$10, %al
	je	.L90
	addq	$1, %r12
	cmpq	$11, %r12
	jne	.L20
.L19:
	movq	(%rsp), %rdx
	leaq	.LC0(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movl	92(%rsp), %r12d
	.p2align 4,,10
	.p2align 3
.L118:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	movb	%al, 40109(%rsp)
	testb	%al, %al
	je	.L118
	cmpb	$10, %al
	je	.L118
	movl	$1, %r14d
	.p2align 4,,10
	.p2align 3
.L25:
	movq	stdin(%rip), %rdi
	movslq	%r14d, %r13
	call	getc@PLT
	movb	%al, (%rbx,%r14)
	cmpb	$32, %al
	je	.L91
	cmpb	$10, %al
	je	.L91
	addq	$1, %r14
	cmpq	$11, %r14
	jne	.L25
.L24:
	movq	(%rsp), %rdx
	leaq	.LC0(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movl	92(%rsp), %r13d
	.p2align 4,,10
	.p2align 3
.L119:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	movb	%al, 40109(%rsp)
	testb	%al, %al
	je	.L119
	cmpb	$10, %al
	je	.L119
	movl	$1, %r15d
	.p2align 4,,10
	.p2align 3
.L30:
	movq	stdin(%rip), %rdi
	movslq	%r15d, %r14
	call	getc@PLT
	movb	%al, (%rbx,%r15)
	cmpb	$32, %al
	je	.L92
	cmpb	$10, %al
	je	.L92
	addq	$1, %r15
	cmpq	$11, %r15
	jne	.L30
.L29:
	movq	(%rsp), %rdx
	leaq	.LC0(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movl	92(%rsp), %eax
	cmpl	$3, %eax
	je	.L31
	jg	.L32
	cmpl	$1, %eax
	je	.L33
	cmpl	$2, %eax
	jne	.L35
	movl	32(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L35
	cmpl	%r12d, %ebp
	jle	.L35
	movslq	%r12d, %rax
	movdqa	.LC1(%rip), %xmm0
	movl	36(%rsp), %r9d
	leaq	(%rax,%rax,4), %rax
	movl	40(%rsp), %ecx
	movl	44(%rsp), %r10d
	leaq	(%rax,%rax,4), %rsi
	movq	24(%rsp), %rax
	salq	$4, %rsi
	addq	16(%rsp), %rsi
	leaq	16(%rax), %rdi
	.p2align 4,,10
	.p2align 3
.L41:
	leaq	(%rdi,%rsi), %rdx
	movq	%rsi, %rax
	cmpl	$2, %r9d
	jbe	.L133
	.p2align 4,,10
	.p2align 3
.L47:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rax, %rdx
	jne	.L47
	cmpl	%ecx, %r8d
	je	.L48
	movl	%r10d, %r13d
	movl	%ecx, %edx
.L49:
	movslq	%r12d, %rax
	movslq	%edx, %r11
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	salq	$2, %rax
	addq	%rax, %r11
	movl	$1, 96(%rsp,%r11,4)
	leal	1(%rdx), %r11d
	cmpl	$1, %r13d
	je	.L48
	movslq	%r11d, %r11
	addl	$2, %edx
	addq	%rax, %r11
	movl	$1, 96(%rsp,%r11,4)
	cmpl	$2, %r13d
	je	.L48
	movslq	%edx, %rdx
	addq	%rdx, %rax
	movl	$1, 96(%rsp,%rax,4)
.L48:
	addl	$1, %r12d
	addq	$400, %rsi
	cmpl	%ebp, %r12d
	jne	.L41
	.p2align 4,,10
	.p2align 3
.L35:
	addl	$1, 8(%rsp)
	movl	8(%rsp), %eax
	cmpl	%eax, 12(%rsp)
	jne	.L117
.L15:
	movl	32(%rsp), %r11d
	testl	%r11d, %r11d
	jle	.L88
	movl	%ebp, %eax
	movl	%ebp, %edi
	movq	16(%rsp), %rsi
	leal	-1(%rbp), %r9d
	shrl	$2, %eax
	andl	$-4, %edi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	subl	$1, %eax
	pxor	%xmm3, %xmm3
	leaq	5(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %r8
	salq	$6, %r8
	.p2align 4,,10
	.p2align 3
.L64:
	testl	%ebp, %ebp
	jle	.L82
	cmpl	$11, %r9d
	jbe	.L89
	leaq	(%r8,%rsi), %r10
	movq	%rsi, %rax
	pxor	%xmm2, %xmm2
	.p2align 4,,10
	.p2align 3
.L66:
	movd	1200(%rax), %xmm7
	movd	(%rax), %xmm0
	addq	$1600, %rax
	movd	-800(%rax), %xmm1
	punpckldq	%xmm7, %xmm1
	movd	-1200(%rax), %xmm7
	punpckldq	%xmm7, %xmm0
	punpcklqdq	%xmm1, %xmm0
	pcmpeqd	%xmm3, %xmm0
	psubd	%xmm0, %xmm2
	cmpq	%rax, %r10
	jne	.L66
	movdqa	%xmm2, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	addl	%eax, %edx
	movl	%edi, %eax
	cmpl	%edi, %ebp
	je	.L82
.L65:
	movslq	%eax, %rbx
	movslq	%ecx, %r10
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	leal	1(%rax), %ebx
	adcl	$0, %edx
	cmpl	%ebx, %ebp
	jle	.L82
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	leal	2(%rax), %ebx
	adcl	$0, %edx
	cmpl	%ebp, %ebx
	jge	.L82
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	leal	3(%rax), %ebx
	adcl	$0, %edx
	cmpl	%ebp, %ebx
	jge	.L82
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	leal	4(%rax), %ebx
	adcl	$0, %edx
	cmpl	%ebx, %ebp
	jle	.L82
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	leal	5(%rax), %ebx
	adcl	$0, %edx
	cmpl	%ebx, %ebp
	jle	.L82
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	leal	6(%rax), %ebx
	adcl	$0, %edx
	cmpl	%ebx, %ebp
	jle	.L82
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	leal	7(%rax), %ebx
	adcl	$0, %edx
	cmpl	%ebx, %ebp
	jle	.L82
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	leal	8(%rax), %ebx
	adcl	$0, %edx
	cmpl	%ebx, %ebp
	jle	.L82
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	leal	9(%rax), %ebx
	adcl	$0, %edx
	cmpl	%ebx, %ebp
	jle	.L82
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	leal	10(%rax), %ebx
	adcl	$0, %edx
	cmpl	%ebx, %ebp
	jle	.L82
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r10,%rbx,4), %rbx
	cmpl	$1, 96(%rsp,%rbx,4)
	adcl	$0, %edx
	addl	$11, %eax
	cmpl	%eax, %ebp
	jle	.L82
	cltq
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	leaq	(%r10,%rax,4), %rax
	cmpl	$1, 96(%rsp,%rax,4)
	adcl	$0, %edx
	.p2align 4,,10
	.p2align 3
.L82:
	addl	$1, %ecx
	addq	$4, %rsi
	cmpl	%ecx, %r11d
	jne	.L64
.L63:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	40120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L134
	addq	$40136, %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
.L32:
	.cfi_restore_state
	cmpl	$4, %eax
	jne	.L35
	movl	32(%rsp), %eax
	cmpl	%r13d, %eax
	jle	.L35
	testl	%ebp, %ebp
	jle	.L35
	movl	%eax, %edi
	subl	%r13d, %edi
	leal	-1(%rdi), %eax
	cmpl	$2, %eax
	jbe	.L37
	movq	16(%rsp), %rcx
	movslq	%r13d, %rax
	movl	%edi, %esi
	shrl	$2, %esi
	leaq	(%rcx,%rax,4), %rcx
	movq	72(%rsp), %rax
	salq	$4, %rsi
	addq	%rcx, %rsi
	leaq	400(%rcx,%rax), %rdx
	.p2align 4,,10
	.p2align 3
.L38:
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L56:
	movdqa	.LC1(%rip), %xmm6
	addq	$400, %rax
	movups	%xmm6, -400(%rax)
	cmpq	%rdx, %rax
	jne	.L56
	addq	$16, %rcx
	leaq	16(%rax), %rdx
	cmpq	%rsi, %rcx
	jne	.L38
	movl	%edi, %eax
	andl	$-4, %eax
	addl	%eax, %r13d
	cmpl	%eax, %edi
	je	.L35
.L37:
	movq	16(%rsp), %rcx
	movq	48(%rsp), %rsi
	movslq	%r13d, %rax
	leaq	(%rcx,%rax,4), %rcx
	addq	56(%rsp), %rax
	leaq	(%rsi,%rax,4), %rdx
	movl	32(%rsp), %esi
	.p2align 4,,10
	.p2align 3
.L60:
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L59:
	movl	$1, (%rax)
	addq	$400, %rax
	cmpq	%rdx, %rax
	jne	.L59
	addl	$1, %r13d
	addq	$4, %rcx
	addq	$4, %rdx
	cmpl	%r13d, %esi
	jg	.L60
	addl	$1, 8(%rsp)
	movl	8(%rsp), %eax
	cmpl	%eax, 12(%rsp)
	jne	.L117
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L92:
	movb	$0, 40109(%rsp,%r14)
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L90:
	movb	$0, 40109(%rsp,%r13)
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L91:
	movb	$0, 40109(%rsp,%r13)
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L31:
	testl	%r13d, %r13d
	jle	.L35
	testl	%ebp, %ebp
	jle	.L35
	leal	-1(%r13), %eax
	cmpl	$2, %eax
	jbe	.L84
	movl	%r13d, %esi
	movq	16(%rsp), %rcx
	movq	64(%rsp), %rdx
	shrl	$2, %esi
	salq	$4, %rsi
	addq	%rcx, %rsi
	.p2align 4,,10
	.p2align 3
.L40:
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L51:
	movdqa	.LC1(%rip), %xmm5
	addq	$400, %rax
	movaps	%xmm5, -400(%rax)
	cmpq	%rdx, %rax
	jne	.L51
	addq	$16, %rcx
	leaq	16(%rax), %rdx
	cmpq	%rsi, %rcx
	jne	.L40
	movl	%r13d, %ecx
	andl	$-4, %ecx
	testb	$3, %r13b
	je	.L35
.L39:
	movq	16(%rsp), %rsi
	movslq	%ecx, %rax
	movq	48(%rsp), %rdi
	leaq	(%rsi,%rax,4), %rsi
	addq	56(%rsp), %rax
	leaq	(%rdi,%rax,4), %rdx
	.p2align 4,,10
	.p2align 3
.L54:
	movq	%rsi, %rax
	.p2align 4,,10
	.p2align 3
.L53:
	movl	$1, (%rax)
	addq	$400, %rax
	cmpq	%rdx, %rax
	jne	.L53
	addl	$1, %ecx
	addq	$4, %rsi
	addq	$4, %rdx
	cmpl	%ecx, %r13d
	jg	.L54
	addl	$1, 8(%rsp)
	movl	8(%rsp), %eax
	cmpl	%eax, 12(%rsp)
	jne	.L117
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L33:
	movl	32(%rsp), %eax
	testl	%eax, %eax
	jle	.L35
	movq	24(%rsp), %rax
	movq	16(%rsp), %rsi
	xorl	%edi, %edi
	leaq	16(%rax), %r8
	testl	%r12d, %r12d
	jle	.L35
	movl	36(%rsp), %r10d
	movl	40(%rsp), %ecx
	leaq	(%r8,%rsi), %rdx
	movq	%rsi, %rax
	movl	32(%rsp), %r9d
	movl	44(%rsp), %r11d
	cmpl	$2, %r10d
	jbe	.L135
	.p2align 4,,10
	.p2align 3
.L43:
	movdqa	.LC1(%rip), %xmm4
	addq	$16, %rax
	movaps	%xmm4, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L43
	cmpl	%ecx, %r9d
	je	.L44
	movl	%r11d, %r14d
	movl	%ecx, %edx
.L45:
	movslq	%edi, %rax
	movslq	%edx, %r13
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	salq	$2, %rax
	addq	%rax, %r13
	movl	$1, 96(%rsp,%r13,4)
	leal	1(%rdx), %r13d
	cmpl	$1, %r14d
	je	.L44
	movslq	%r13d, %r13
	addl	$2, %edx
	addq	%rax, %r13
	movl	$1, 96(%rsp,%r13,4)
	cmpl	$2, %r14d
	je	.L44
	movslq	%edx, %rdx
	addq	%rdx, %rax
	movl	$1, 96(%rsp,%rax,4)
.L44:
	addl	$1, %edi
	addq	$400, %rsi
	cmpl	%r12d, %edi
	je	.L35
	leaq	(%r8,%rsi), %rdx
	movq	%rsi, %rax
	cmpl	$2, %r10d
	ja	.L43
.L135:
	movl	%r9d, %r14d
	xorl	%edx, %edx
	jmp	.L45
.L133:
	movl	%r8d, %r13d
	xorl	%edx, %edx
	jmp	.L49
.L89:
	xorl	%eax, %eax
	jmp	.L65
.L84:
	xorl	%ecx, %ecx
	jmp	.L39
.L88:
	xorl	%edx, %edx
	jmp	.L63
.L134:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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:

// https://atcoder.jp/contests/abc047/tasks/abc047_b
// B - すぬけ君の塗り絵 2 イージー

#include <stdio.h>

// 標準入力から改行かスペースまで読み取り、数字として返す
int get_num() {
    // 10文字+区切り文字までしか受け付けられない
    char s[11];
    int i, n;
    // scanf()の直後は改行が入力に残っているので、
    // 最初の改行は読み飛ばす
    do {
        s[0] = getchar();
    } while (s[0] == '\0' || s[0] == '\n');
    for (i = 1; i < sizeof(s); i++) {
        s[i] = getchar();
        if (s[i] == ' ' || s[i] == '\n') {
            s[i] = '\0';
            break;
        }
    }
    sscanf(s, "%d", &n);
    return n;
}

int main(int argc, const char * argv[]) {
    int w, h, n, i, j, k;
    int x, y, a, count;
    int c[100][100] = {0};
    w = get_num();
    h = get_num();
    n = get_num();

    for (i = 0; i < n; i++) {
        x = get_num();
        y = get_num();
        a = get_num();

        switch (a) {
            case 1:
                for (j = 0; j < h; j++) {
                    for (k = 0; k < x; k++) {
                        c[k][j] = 1;
                    }
                }
                break;
            case 2:
                for (j = 0; j < h; j++) {
                    for (k = x; k < w; k++) {
                        c[k][j] = 1;
                    }
                }
                break;
            case 3:
                for (j = 0; j < y; j++) {
                    for (k = 0; k < w; k++) {
                        c[k][j] = 1;
                    }
                }
                break;
            case 4:
                for (j = y; j < h; j++) {
                    for (k = 0; k < w; k++) {
                        c[k][j] = 1;
                    }
                }

            default:
                break;
        }
    }
    
    count = 0;
    
    for (j = 0; j < h; j++) {
        for (k = 0; k < w; k++) {
            if (c[k][j] == 0) {
                count ++;
            }
        }
    }
    
    printf("%d\n", count);
    
    return 0;
}

5 4 3
2 1 1
3 6 4
1 4 2
 5 4 2
2 1 1
6 3 4
 5 4 2
2 1 2
6 3 4
 10 10 5
1 6 1
4 1 1
6 9 4
9 4 2
3 1 4
 5 4 1
2 1 2
6 3 4
 5 4 3
2 0 2
2 6 2
1 4 2
 10 10 5
1 14 1
4 1 1
6 4 4
9 0 2
3 2 4
 10 10 5
1 6 1
4 1 3
6 9 4
9 4 2
3 0 3
 5 1 3
2 0 2
2 11 2
2 4 2
 5 6 3
2 0 2
3 11 2
2 4 2

0
 9
 6
 5
 8
 4
 10
 64
 2
 12

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

```c
// https://atcoder.jp/contests/abc047/tasks/abc047_b
// B - すぬけ君の塗り絵 2 イージー

#include <stdio.h>

// 標準入力から改行かスペースまで読み取り、数字として返す
int get_num() {
    // 10文字+区切り文字までしか受け付けられない
    char s[11];
    int i, n;
    // scanf()の直後は改行が入力に残っているので、
    // 最初の改行は読み飛ばす
    do {
        s[0] = getchar();
    } while (s[0] == '\0' || s[0] == '\n');
    for (i = 1; i < sizeof(s); i++) {
        s[i] = getchar();
        if (s[i] == ' ' || s[i] == '\n') {
            s[i] = '\0';
            break;
        }
    }
    sscanf(s, "%d", &n);
    return n;
}

int main(int argc, const char * argv[]) {
    int w, h, n, i, j, k;
    int x, y, a, count;
    int c[100][100] = {0};
    w = get_num();
    h = get_num();
    n = get_num();

    for (i = 0; i < n; i++) {
        x = get_num();
        y = get_num();
        a = get_num();

        switch (a) {
            case 1:
                for (j = 0; j < h; j++) {
                    for (k = 0; k < x; k++) {
                        c[k][j] = 1;
                    }
                }
                break;
            case 2:
                for (j = 0; j < h; j++) {
                    for (k = x; k < w; k++) {
                        c[k][j] = 1;
                    }
                }
                break;
            case 3:
                for (j = 0; j < y; j++) {
                    for (k = 0; k < w; k++) {
                        c[k][j] = 1;
                    }
                }
                break;
            case 4:
                for (j = y; j < h; j++) {
                    for (k = 0; k < w; k++) {
                        c[k][j] = 1;
                    }
                }

            default:
                break;
        }
    }
    
    count = 0;
    
    for (j = 0; j < h; j++) {
        for (k = 0; k < w; k++) {
            if (c[k][j] == 0) {
                count ++;
            }
        }
    }
    
    printf("%d\n", count);
    
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	get_num
	.type	get_num, @function
get_num:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L2:
	call	getchar@PLT
	movb	%al, -19(%rbp)
	movzbl	-19(%rbp), %eax
	testb	%al, %al
	je	.L2
	movzbl	-19(%rbp), %eax
	cmpb	$10, %al
	je	.L2
	movl	$1, -24(%rbp)
	jmp	.L3
.L7:
	call	getchar@PLT
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	cltq
	movb	%dl, -19(%rbp,%rax)
	movl	-24(%rbp), %eax
	cltq
	movzbl	-19(%rbp,%rax), %eax
	cmpb	$32, %al
	je	.L4
	movl	-24(%rbp), %eax
	cltq
	movzbl	-19(%rbp,%rax), %eax
	cmpb	$10, %al
	jne	.L5
.L4:
	movl	-24(%rbp), %eax
	cltq
	movb	$0, -19(%rbp,%rax)
	jmp	.L6
.L5:
	addl	$1, -24(%rbp)
.L3:
	movl	-24(%rbp), %eax
	cmpl	$10, %eax
	jbe	.L7
.L6:
	leaq	-28(%rbp), %rdx
	leaq	-19(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-28(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	get_num, .-get_num
	.section	.rodata
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-36864(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3216, %rsp
	movl	%edi, -40068(%rbp)
	movq	%rsi, -40080(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40016(%rbp), %rax
	movl	$40000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, %eax
	call	get_num
	movl	%eax, -40040(%rbp)
	movl	$0, %eax
	call	get_num
	movl	%eax, -40036(%rbp)
	movl	$0, %eax
	call	get_num
	movl	%eax, -40032(%rbp)
	movl	$0, -40056(%rbp)
	jmp	.L11
.L34:
	movl	$0, %eax
	call	get_num
	movl	%eax, -40028(%rbp)
	movl	$0, %eax
	call	get_num
	movl	%eax, -40024(%rbp)
	movl	$0, %eax
	call	get_num
	movl	%eax, -40020(%rbp)
	cmpl	$4, -40020(%rbp)
	je	.L12
	cmpl	$4, -40020(%rbp)
	jg	.L42
	cmpl	$3, -40020(%rbp)
	je	.L14
	cmpl	$3, -40020(%rbp)
	jg	.L42
	cmpl	$1, -40020(%rbp)
	je	.L15
	cmpl	$2, -40020(%rbp)
	je	.L16
	jmp	.L42
.L15:
	movl	$0, -40052(%rbp)
	jmp	.L17
.L20:
	movl	$0, -40048(%rbp)
	jmp	.L18
.L19:
	movl	-40052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40048(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	$1, -40016(%rbp,%rax,4)
	addl	$1, -40048(%rbp)
.L18:
	movl	-40048(%rbp), %eax
	cmpl	-40028(%rbp), %eax
	jl	.L19
	addl	$1, -40052(%rbp)
.L17:
	movl	-40052(%rbp), %eax
	cmpl	-40036(%rbp), %eax
	jl	.L20
	jmp	.L21
.L16:
	movl	$0, -40052(%rbp)
	jmp	.L22
.L25:
	movl	-40028(%rbp), %eax
	movl	%eax, -40048(%rbp)
	jmp	.L23
.L24:
	movl	-40052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40048(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	$1, -40016(%rbp,%rax,4)
	addl	$1, -40048(%rbp)
.L23:
	movl	-40048(%rbp), %eax
	cmpl	-40040(%rbp), %eax
	jl	.L24
	addl	$1, -40052(%rbp)
.L22:
	movl	-40052(%rbp), %eax
	cmpl	-40036(%rbp), %eax
	jl	.L25
	jmp	.L21
.L14:
	movl	$0, -40052(%rbp)
	jmp	.L26
.L29:
	movl	$0, -40048(%rbp)
	jmp	.L27
.L28:
	movl	-40052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40048(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	$1, -40016(%rbp,%rax,4)
	addl	$1, -40048(%rbp)
.L27:
	movl	-40048(%rbp), %eax
	cmpl	-40040(%rbp), %eax
	jl	.L28
	addl	$1, -40052(%rbp)
.L26:
	movl	-40052(%rbp), %eax
	cmpl	-40024(%rbp), %eax
	jl	.L29
	jmp	.L21
.L12:
	movl	-40024(%rbp), %eax
	movl	%eax, -40052(%rbp)
	jmp	.L30
.L33:
	movl	$0, -40048(%rbp)
	jmp	.L31
.L32:
	movl	-40052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40048(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	$1, -40016(%rbp,%rax,4)
	addl	$1, -40048(%rbp)
.L31:
	movl	-40048(%rbp), %eax
	cmpl	-40040(%rbp), %eax
	jl	.L32
	addl	$1, -40052(%rbp)
.L30:
	movl	-40052(%rbp), %eax
	cmpl	-40036(%rbp), %eax
	jl	.L33
.L42:
	nop
.L21:
	addl	$1, -40056(%rbp)
.L11:
	movl	-40056(%rbp), %eax
	cmpl	-40032(%rbp), %eax
	jl	.L34
	movl	$0, -40044(%rbp)
	movl	$0, -40052(%rbp)
	jmp	.L35
.L39:
	movl	$0, -40048(%rbp)
	jmp	.L36
.L38:
	movl	-40052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40048(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-40016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L37
	addl	$1, -40044(%rbp)
.L37:
	addl	$1, -40048(%rbp)
.L36:
	movl	-40048(%rbp), %eax
	cmpl	-40040(%rbp), %eax
	jl	.L38
	addl	$1, -40052(%rbp)
.L35:
	movl	-40052(%rbp), %eax
	cmpl	-40036(%rbp), %eax
	jl	.L39
	movl	-40044(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L41
	call	__stack_chk_fail@PLT
.L41:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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"
	.text
	.globl	get_num
	.type	get_num, @function
get_num:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L2:
	call	getchar@PLT
	movb	%al, -19(%rbp)
	movzbl	-19(%rbp), %eax
	testb	%al, %al
	je	.L2
	movzbl	-19(%rbp), %eax
	cmpb	$10, %al
	je	.L2
	movl	$1, -24(%rbp)
	jmp	.L3
.L7:
	call	getchar@PLT
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	cltq
	movb	%dl, -19(%rbp,%rax)
	movl	-24(%rbp), %eax
	cltq
	movzbl	-19(%rbp,%rax), %eax
	cmpb	$32, %al
	je	.L4
	movl	-24(%rbp), %eax
	cltq
	movzbl	-19(%rbp,%rax), %eax
	cmpb	$10, %al
	jne	.L5
.L4:
	movl	-24(%rbp), %eax
	cltq
	movb	$0, -19(%rbp,%rax)
	jmp	.L6
.L5:
	addl	$1, -24(%rbp)
.L3:
	movl	-24(%rbp), %eax
	cmpl	$10, %eax
	jbe	.L7
.L6:
	leaq	-28(%rbp), %rdx
	leaq	-19(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-28(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	get_num, .-get_num
	.section	.rodata
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-36864(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3216, %rsp
	movl	%edi, -40068(%rbp)
	movq	%rsi, -40080(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40016(%rbp), %rax
	movl	$40000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, %eax
	call	get_num
	movl	%eax, -40040(%rbp)
	movl	$0, %eax
	call	get_num
	movl	%eax, -40036(%rbp)
	movl	$0, %eax
	call	get_num
	movl	%eax, -40032(%rbp)
	movl	$0, -40056(%rbp)
	jmp	.L11
.L34:
	movl	$0, %eax
	call	get_num
	movl	%eax, -40028(%rbp)
	movl	$0, %eax
	call	get_num
	movl	%eax, -40024(%rbp)
	movl	$0, %eax
	call	get_num
	movl	%eax, -40020(%rbp)
	cmpl	$4, -40020(%rbp)
	je	.L12
	cmpl	$4, -40020(%rbp)
	jg	.L42
	cmpl	$3, -40020(%rbp)
	je	.L14
	cmpl	$3, -40020(%rbp)
	jg	.L42
	cmpl	$1, -40020(%rbp)
	je	.L15
	cmpl	$2, -40020(%rbp)
	je	.L16
	jmp	.L42
.L15:
	movl	$0, -40052(%rbp)
	jmp	.L17
.L20:
	movl	$0, -40048(%rbp)
	jmp	.L18
.L19:
	movl	-40052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40048(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	$1, -40016(%rbp,%rax,4)
	addl	$1, -40048(%rbp)
.L18:
	movl	-40048(%rbp), %eax
	cmpl	-40028(%rbp), %eax
	jl	.L19
	addl	$1, -40052(%rbp)
.L17:
	movl	-40052(%rbp), %eax
	cmpl	-40036(%rbp), %eax
	jl	.L20
	jmp	.L21
.L16:
	movl	$0, -40052(%rbp)
	jmp	.L22
.L25:
	movl	-40028(%rbp), %eax
	movl	%eax, -40048(%rbp)
	jmp	.L23
.L24:
	movl	-40052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40048(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	$1, -40016(%rbp,%rax,4)
	addl	$1, -40048(%rbp)
.L23:
	movl	-40048(%rbp), %eax
	cmpl	-40040(%rbp), %eax
	jl	.L24
	addl	$1, -40052(%rbp)
.L22:
	movl	-40052(%rbp), %eax
	cmpl	-40036(%rbp), %eax
	jl	.L25
	jmp	.L21
.L14:
	movl	$0, -40052(%rbp)
	jmp	.L26
.L29:
	movl	$0, -40048(%rbp)
	jmp	.L27
.L28:
	movl	-40052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40048(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	$1, -40016(%rbp,%rax,4)
	addl	$1, -40048(%rbp)
.L27:
	movl	-40048(%rbp), %eax
	cmpl	-40040(%rbp), %eax
	jl	.L28
	addl	$1, -40052(%rbp)
.L26:
	movl	-40052(%rbp), %eax
	cmpl	-40024(%rbp), %eax
	jl	.L29
	jmp	.L21
.L12:
	movl	-40024(%rbp), %eax
	movl	%eax, -40052(%rbp)
	jmp	.L30
.L33:
	movl	$0, -40048(%rbp)
	jmp	.L31
.L32:
	movl	-40052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40048(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	$1, -40016(%rbp,%rax,4)
	addl	$1, -40048(%rbp)
.L31:
	movl	-40048(%rbp), %eax
	cmpl	-40040(%rbp), %eax
	jl	.L32
	addl	$1, -40052(%rbp)
.L30:
	movl	-40052(%rbp), %eax
	cmpl	-40036(%rbp), %eax
	jl	.L33
.L42:
	nop
.L21:
	addl	$1, -40056(%rbp)
.L11:
	movl	-40056(%rbp), %eax
	cmpl	-40032(%rbp), %eax
	jl	.L34
	movl	$0, -40044(%rbp)
	movl	$0, -40052(%rbp)
	jmp	.L35
.L39:
	movl	$0, -40048(%rbp)
	jmp	.L36
.L38:
	movl	-40052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40048(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-40016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L37
	addl	$1, -40044(%rbp)
.L37:
	addl	$1, -40048(%rbp)
.L36:
	movl	-40048(%rbp), %eax
	cmpl	-40040(%rbp), %eax
	jl	.L38
	addl	$1, -40052(%rbp)
.L35:
	movl	-40052(%rbp), %eax
	cmpl	-40036(%rbp), %eax
	jl	.L39
	movl	-40044(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L41
	call	__stack_chk_fail@PLT
.L41:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
