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

```c
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>

int dp[100010], M, k[100010]={0};
int **G;

int max(int len, ...) {
    int i, _max, num;
    va_list ap;
    va_start(ap, len);

    _max = va_arg(ap, int);
    for (i = 1; i < len; i++) {
        num = va_arg(ap, int);
        if (num > _max)
            _max = num;
    }
    va_end(ap);
    return _max;
}

int rec(int v) {
    int i, res;
    if (dp[v] != -1) return dp[v]; // 既に更新済み

    res = 0;
    for (i=0;i<k[v];i++) {
        int nv = G[v][i];
        res = max(2,res, rec(nv) + 1);
    }
    return dp[v] = res; // メモしながらリターン
}

int main(void) {
    int i, N, res, x, y;
    scanf("%d%d", &N, &M);
    G = (int **)malloc(sizeof(int *)*N);
    for (i=0;i<N;i++) {
        G[i] = (int *)malloc(sizeof(int)*M);
    }

    for (i=0;i<M;i++) {
        scanf("%d%d", &x, &y);
        x--; y--;
        G[x][k[x]++] = y;
    }

    for (i=0;i<N;i++) dp[i] = -1;
    res = 0;
    for (i=0;i<N;i++) res = max(2,res,rec(i));
    printf("%d\n", res);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 400040
dp:
	.zero	400040
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	k
	.align 32
	.type	k, @object
	.size	k, 400040
k:
	.zero	400040
	.globl	G
	.align 8
	.type	G, @object
	.size	G, 8
G:
	.zero	8
	.text
	.globl	max
	.type	max, @function
max:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$240, %rsp
	movl	%edi, -228(%rbp)
	movq	%rsi, -168(%rbp)
	movq	%rdx, -160(%rbp)
	movq	%rcx, -152(%rbp)
	movq	%r8, -144(%rbp)
	movq	%r9, -136(%rbp)
	testb	%al, %al
	je	.L2
	movaps	%xmm0, -128(%rbp)
	movaps	%xmm1, -112(%rbp)
	movaps	%xmm2, -96(%rbp)
	movaps	%xmm3, -80(%rbp)
	movaps	%xmm4, -64(%rbp)
	movaps	%xmm5, -48(%rbp)
	movaps	%xmm6, -32(%rbp)
	movaps	%xmm7, -16(%rbp)
.L2:
	movq	%fs:40, %rax
	movq	%rax, -184(%rbp)
	xorl	%eax, %eax
	movl	$8, -208(%rbp)
	movl	$48, -204(%rbp)
	leaq	16(%rbp), %rax
	movq	%rax, -200(%rbp)
	leaq	-176(%rbp), %rax
	movq	%rax, -192(%rbp)
	movl	-208(%rbp), %eax
	cmpl	$47, %eax
	ja	.L3
	movq	-192(%rbp), %rax
	movl	-208(%rbp), %edx
	movl	%edx, %edx
	addq	%rdx, %rax
	movl	-208(%rbp), %edx
	addl	$8, %edx
	movl	%edx, -208(%rbp)
	jmp	.L4
.L3:
	movq	-200(%rbp), %rax
	leaq	8(%rax), %rdx
	movq	%rdx, -200(%rbp)
.L4:
	movl	(%rax), %eax
	movl	%eax, -216(%rbp)
	movl	$1, -220(%rbp)
	jmp	.L5
.L9:
	movl	-208(%rbp), %eax
	cmpl	$47, %eax
	ja	.L6
	movq	-192(%rbp), %rax
	movl	-208(%rbp), %edx
	movl	%edx, %edx
	addq	%rdx, %rax
	movl	-208(%rbp), %edx
	addl	$8, %edx
	movl	%edx, -208(%rbp)
	jmp	.L7
.L6:
	movq	-200(%rbp), %rax
	leaq	8(%rax), %rdx
	movq	%rdx, -200(%rbp)
.L7:
	movl	(%rax), %eax
	movl	%eax, -212(%rbp)
	movl	-212(%rbp), %eax
	cmpl	-216(%rbp), %eax
	jle	.L8
	movl	-212(%rbp), %eax
	movl	%eax, -216(%rbp)
.L8:
	addl	$1, -220(%rbp)
.L5:
	movl	-220(%rbp), %eax
	cmpl	-228(%rbp), %eax
	jl	.L9
	movl	-216(%rbp), %eax
	movq	-184(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	max, .-max
	.globl	rec
	.type	rec, @function
rec:
.LFB7:
	.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
	movl	%edi, -20(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	je	.L13
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	jmp	.L14
.L13:
	movl	$0, -8(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L15
.L16:
	movq	G(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	rec
	leal	1(%rax), %edx
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	movl	$2, %edi
	movl	$0, %eax
	call	max
	movl	%eax, -8(%rbp)
	addl	$1, -12(%rbp)
.L15:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	k(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L16
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	rec, .-rec
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-44(%rbp), %rax
	leaq	M(%rip), %rdx
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, G(%rip)
	movl	$0, -32(%rbp)
	jmp	.L18
.L19:
	movl	M(%rip), %eax
	cltq
	salq	$2, %rax
	movq	G(%rip), %rcx
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	leaq	(%rcx,%rdx), %rbx
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, (%rbx)
	addl	$1, -32(%rbp)
.L18:
	movl	-44(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L19
	movl	$0, -32(%rbp)
	jmp	.L20
.L21:
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
	movl	-36(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -36(%rbp)
	movq	G(%rip), %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdi
	movl	-40(%rbp), %edx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	k(%rip), %rax
	movl	(%rcx,%rax), %eax
	leal	1(%rax), %ecx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rsi
	leaq	k(%rip), %rdx
	movl	%ecx, (%rsi,%rdx)
	cltq
	salq	$2, %rax
	leaq	(%rdi,%rax), %rdx
	movl	-36(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -32(%rbp)
.L20:
	movl	M(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L21
	movl	$0, -32(%rbp)
	jmp	.L22
.L23:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -32(%rbp)
.L22:
	movl	-44(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L23
	movl	$0, -28(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L24
.L25:
	movl	-32(%rbp), %eax
	movl	%eax, %edi
	call	rec
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	movl	$2, %edi
	movl	$0, %eax
	call	max
	movl	%eax, -28(%rbp)
	addl	$1, -32(%rbp)
.L24:
	movl	-44(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L25
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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
	.p2align 4
	.type	max.constprop.0, @function
max.constprop.0:
.LFB43:
	.cfi_startproc
	subq	$88, %rsp
	.cfi_def_cfa_offset 96
	movq	%rsi, 40(%rsp)
	movq	%rdx, 48(%rsp)
	movl	48(%rsp), %edx
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	96(%rsp), %rax
	movl	$8, (%rsp)
	movq	%rax, 8(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 16(%rsp)
	movl	40(%rsp), %eax
	cmpl	%edx, %eax
	cmovl	%edx, %eax
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L10
	addq	$88, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE43:
	.size	max.constprop.0, .-max.constprop.0
	.p2align 4
	.type	rec.part.0, @function
rec.part.0:
.LFB42:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%edi, %rax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	k(%rip), %r13
	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	$120, %rsp
	.cfi_def_cfa_offset 176
	movl	0(%r13,%rax,4), %r9d
	movq	%rax, 88(%rsp)
	testl	%r9d, %r9d
	jle	.L36
	salq	$3, %rax
	movl	$0, 104(%rsp)
	leaq	dp(%rip), %r14
	movq	%rax, 96(%rsp)
	movq	$0, 56(%rsp)
.L35:
	movq	96(%rsp), %rdi
	movq	G(%rip), %rax
	movq	(%rax,%rdi), %rdx
	movq	56(%rsp), %rdi
	movslq	(%rdx,%rdi,4), %rbx
	movl	(%r14,%rbx,4), %edx
	movq	%rbx, 72(%rsp)
	cmpl	$-1, %edx
	je	.L13
	addl	$1, %edx
.L14:
	movl	104(%rsp), %esi
	movl	$2, %edi
	xorl	%eax, %eax
	call	max.constprop.0
	movq	88(%rsp), %rcx
	addq	$1, 56(%rsp)
	movl	%eax, 104(%rsp)
	movq	56(%rsp), %rax
	cmpl	%eax, 0(%r13,%rcx,4)
	jg	.L35
	movq	%rcx, %rbx
.L12:
	movl	104(%rsp), %eax
	movl	%eax, (%r14,%rbx,4)
	addq	$120, %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
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	movl	0(%r13,%rbx,4), %r8d
	testl	%r8d, %r8d
	jle	.L37
	leaq	0(,%rbx,8), %rbx
	movl	$0, 44(%rsp)
	movq	%rbx, 80(%rsp)
	movq	$0, 16(%rsp)
.L34:
	movq	80(%rsp), %rbx
	movq	16(%rsp), %rsi
	movq	(%rax,%rbx), %rdx
	movslq	(%rdx,%rsi,4), %rcx
	movl	(%r14,%rcx,4), %edx
	movq	%rcx, 32(%rsp)
	cmpl	$-1, %edx
	je	.L16
	addl	$1, %edx
.L17:
	movl	44(%rsp), %esi
	movl	$2, %edi
	xorl	%eax, %eax
	call	max.constprop.0
	movq	72(%rsp), %rdi
	addq	$1, 16(%rsp)
	movl	%eax, 44(%rsp)
	movq	16(%rsp), %rax
	cmpl	%eax, 0(%r13,%rdi,4)
	jle	.L45
	movq	G(%rip), %rax
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L16:
	movl	0(%r13,%rcx,4), %edi
	testl	%edi, %edi
	jle	.L38
	leaq	0(,%rcx,8), %rdi
	movq	$0, (%rsp)
	movq	%rdi, 64(%rsp)
	movl	$0, 40(%rsp)
.L32:
	movq	64(%rsp), %rcx
	movq	(%rax,%rcx), %rdx
	movq	(%rsp), %rcx
	movslq	(%rdx,%rcx,4), %rcx
	movl	(%r14,%rcx,4), %edx
	movq	%rcx, 8(%rsp)
	cmpl	$-1, %edx
	je	.L19
	addl	$1, %edx
.L20:
	movl	40(%rsp), %esi
	movl	$2, %edi
	xorl	%eax, %eax
	call	max.constprop.0
	movq	32(%rsp), %rdi
	addq	$1, (%rsp)
	movl	%eax, 40(%rsp)
	movq	(%rsp), %rax
	cmpl	%eax, 0(%r13,%rdi,4)
	jle	.L46
	movq	G(%rip), %rax
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L19:
	movq	%rcx, %rdi
	movl	0(%r13,%rcx,4), %ecx
	testl	%ecx, %ecx
	jle	.L39
	salq	$3, %rdi
	xorl	%ebx, %ebx
	xorl	%ebp, %ebp
	movq	%rdi, 24(%rsp)
.L30:
	movq	24(%rsp), %rcx
	movq	(%rax,%rcx), %rdx
	movslq	(%rdx,%rbx,4), %r15
	movl	(%r14,%r15,4), %edx
	cmpl	$-1, %edx
	je	.L22
	addl	$1, %edx
.L23:
	movl	%ebp, %esi
	movl	$2, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	max.constprop.0
	movl	%eax, %ebp
	movq	8(%rsp), %rax
	cmpl	%ebx, 0(%r13,%rax,4)
	jle	.L47
	movq	G(%rip), %rax
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L22:
	movl	0(%r13,%r15,4), %edx
	testl	%edx, %edx
	jle	.L40
	xorl	%r12d, %r12d
	leaq	0(,%r15,8), %rcx
	movq	%rbx, 48(%rsp)
	xorl	%esi, %esi
	movq	%r12, %rbx
	movq	%rcx, %r12
.L28:
	movq	(%rax,%r12), %rax
	movslq	(%rax,%rbx,4), %rax
	movl	(%r14,%rax,4), %edx
	movq	%rax, %rdi
	cmpl	$-1, %edx
	jne	.L25
	movl	%esi, 108(%rsp)
	call	rec.part.0
	movl	108(%rsp), %esi
	leal	1(%rax), %edx
	.p2align 4,,10
	.p2align 3
.L44:
	movl	$2, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	max.constprop.0
	movl	%eax, %esi
	cmpl	%ebx, 0(%r13,%r15,4)
	jle	.L48
	movq	G(%rip), %rax
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L25:
	addl	$1, %edx
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L48:
	movq	48(%rsp), %rbx
	leal	1(%rax), %edx
.L24:
	movl	%esi, (%r14,%r15,4)
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L47:
	leal	1(%rbp), %edx
.L21:
	movl	%ebp, (%r14,%rax,4)
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L46:
	movl	40(%rsp), %eax
	leal	1(%rax), %edx
	movq	%rdi, %rax
.L18:
	movl	40(%rsp), %ebx
	movl	%ebx, (%r14,%rax,4)
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L40:
	movl	$1, %edx
	xorl	%esi, %esi
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L45:
	movl	44(%rsp), %eax
	leal	1(%rax), %edx
	movq	%rdi, %rax
.L15:
	movl	44(%rsp), %ecx
	movl	%ecx, (%r14,%rax,4)
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L39:
	movl	$1, %edx
	xorl	%ebp, %ebp
	movq	%rdi, %rax
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L38:
	movl	$0, 40(%rsp)
	movl	$1, %edx
	movq	%rcx, %rax
	jmp	.L18
.L37:
	movl	$0, 44(%rsp)
	movl	$1, %edx
	movq	%rbx, %rax
	jmp	.L15
.L36:
	movl	$0, 104(%rsp)
	leaq	dp(%rip), %r14
	movq	%rax, %rbx
	jmp	.L12
	.cfi_endproc
.LFE42:
	.size	rec.part.0, .-rec.part.0
	.section	.text.unlikely,"ax",@progbits
.LCOLDB0:
	.text
.LHOTB0:
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB39:
	.cfi_startproc
	endbr64
	subq	$88, %rsp
	.cfi_def_cfa_offset 96
	movq	%r9, 72(%rsp)
	leaq	32(%rsp), %r9
	movq	%rsi, 40(%rsp)
	movq	%rdx, 48(%rsp)
	movq	%rcx, 56(%rsp)
	movq	%r8, 64(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	96(%rsp), %rax
	movq	%r9, 16(%rsp)
	movq	%rax, 8(%rsp)
	movl	8(%r9), %eax
	movl	$16, (%rsp)
	cmpl	$1, %edi
	jle	.L49
	movl	$16, %ecx
	leaq	96(%rsp), %r8
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L54:
	cmpl	$47, %ecx
	ja	.L53
	movl	%ecx, %esi
	addl	$8, %ecx
	movl	(%r9,%rsi), %esi
	cmpl	%esi, %eax
	cmovl	%esi, %eax
	addl	$1, %edx
	cmpl	%edx, %edi
	jne	.L54
	.p2align 4,,10
	.p2align 3
.L49:
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L66
	addq	$88, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L53:
	.cfi_restore_state
	movl	(%r8), %ecx
	leaq	8(%r8), %rsi
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	addl	$1, %edx
	cmpl	%edx, %edi
	jne	.L56
	jmp	.L49
.L66:
	call	__stack_chk_fail@PLT
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	max.cold, @function
max.cold:
.LFSB39:
.L56:
	.cfi_def_cfa_offset 96
	movq	%rsi, 8(%rsp)
.L59:
	movq	%rsi, %rcx
	addq	$8, %rsi
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	addl	$1, %edx
	cmpl	%edx, %edi
	jg	.L59
	jmp	.L49
	.cfi_endproc
.LFE39:
	.text
	.size	max, .-max
	.section	.text.unlikely
	.size	max.cold, .-max.cold
.LCOLDE0:
	.text
.LHOTE0:
	.p2align 4
	.globl	rec
	.type	rec, @function
rec:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	dp(%rip), %r15
	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
	movslq	%edi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	movl	(%r15,%r12,4), %ebp
	cmpl	$-1, %ebp
	jne	.L67
	leaq	k(%rip), %r13
	xorl	%ebp, %ebp
	movl	0(%r13,%r12,4), %eax
	testl	%eax, %eax
	jle	.L69
	leaq	0(,%r12,8), %r14
	xorl	%ebx, %ebx
.L72:
	movq	G(%rip), %rax
	movq	(%rax,%r14), %rax
	movslq	(%rax,%rbx,4), %rax
	movl	(%r15,%rax,4), %edx
	movq	%rax, %rdi
	cmpl	$-1, %edx
	jne	.L70
	call	rec.part.0
	leal	1(%rax), %edx
.L75:
	movl	%ebp, %esi
	movl	$2, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	max.constprop.0
	movl	%eax, %ebp
	cmpl	%ebx, 0(%r13,%r12,4)
	jg	.L72
.L69:
	movl	%ebp, (%r15,%r12,4)
.L67:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%ebp, %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
.L70:
	.cfi_restore_state
	addl	$1, %edx
	jmp	.L75
	.cfi_endproc
.LFE40:
	.size	rec, .-rec
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	M(%rip), %rdx
	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	.LC1(%rip), %rbx
	movq	%rbx, %rdi
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rdi
	movq	%rdi, %r14
	salq	$3, %rdi
	call	malloc@PLT
	movq	%rax, G(%rip)
	testl	%r14d, %r14d
	jle	.L77
	movslq	M(%rip), %r12
	movl	%r14d, %r14d
	movq	%rax, %rbp
	leaq	(%rax,%r14,8), %r14
	movq	%r12, %r13
	salq	$2, %r12
	.p2align 4,,10
	.p2align 3
.L78:
	movq	%r12, %rdi
	addq	$8, %rbp
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	cmpq	%rbp, %r14
	jne	.L78
.L79:
	testl	%r13d, %r13d
	jle	.L83
	xorl	%r13d, %r13d
	leaq	36(%rsp), %r12
	leaq	32(%rsp), %rbp
	leaq	k(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L80:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	32(%rsp), %eax
	movq	G(%rip), %rdx
	addl	$1, %r13d
	movl	36(%rsp), %ecx
	subl	$1, %eax
	movl	%eax, 32(%rsp)
	cltq
	subl	$1, %ecx
	movq	(%rdx,%rax,8), %rsi
	movslq	(%r14,%rax,4), %rdx
	movl	%ecx, 36(%rsp)
	leal	1(%rdx), %edi
	movl	%edi, (%r14,%rax,4)
	movl	%ecx, (%rsi,%rdx,4)
	cmpl	%r13d, M(%rip)
	jg	.L80
.L83:
	movslq	28(%rsp), %rax
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jle	.L82
	leaq	dp(%rip), %r13
	movl	$255, %esi
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	leaq	0(,%rax,4), %rdx
	movq	%r13, %rdi
	leaq	k(%rip), %r14
	call	memset@PLT
	.p2align 4,,10
	.p2align 3
.L89:
	movl	0(%r13,%r15,4), %ebp
	cmpl	$-1, %ebp
	jne	.L84
	movl	(%r14,%r15,4), %eax
	xorl	%ebp, %ebp
	testl	%eax, %eax
	jle	.L85
	leaq	0(,%r15,8), %rax
	xorl	%ebx, %ebx
	movq	%rax, 8(%rsp)
.L88:
	movq	G(%rip), %rax
	movq	8(%rsp), %rcx
	movq	(%rax,%rcx), %rax
	movslq	(%rax,%rbx,4), %rax
	movl	0(%r13,%rax,4), %edx
	movq	%rax, %rdi
	cmpl	$-1, %edx
	jne	.L86
	call	rec.part.0
	leal	1(%rax), %edx
.L97:
	movl	%ebp, %esi
	movl	$2, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	max.constprop.0
	movl	%eax, %ebp
	cmpl	%ebx, (%r14,%r15,4)
	jg	.L88
.L85:
	movl	%ebp, 0(%r13,%r15,4)
.L84:
	movl	%r12d, %esi
	movl	%ebp, %edx
	movl	$2, %edi
	xorl	%eax, %eax
	call	max.constprop.0
	addq	$1, %r15
	movl	%eax, %r12d
	cmpl	%r15d, 28(%rsp)
	jg	.L89
.L82:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L98
	addq	$56, %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
.L86:
	.cfi_restore_state
	addl	$1, %edx
	jmp	.L97
.L77:
	movl	M(%rip), %r13d
	jmp	.L79
.L98:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	G
	.bss
	.align 8
	.type	G, @object
	.size	G, 8
G:
	.zero	8
	.globl	k
	.align 32
	.type	k, @object
	.size	k, 400040
k:
	.zero	400040
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 400040
dp:
	.zero	400040
	.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
	.p2align 4
	.type	max.constprop.0, @function
max.constprop.0:
.LFB43:
	.cfi_startproc
	subq	$88, %rsp
	.cfi_def_cfa_offset 96
	movq	%rsi, 40(%rsp)
	movq	%rdx, 48(%rsp)
	movl	48(%rsp), %edx
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	96(%rsp), %rax
	movl	$8, (%rsp)
	movq	%rax, 8(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 16(%rsp)
	movl	40(%rsp), %eax
	cmpl	%edx, %eax
	cmovl	%edx, %eax
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L10
	addq	$88, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE43:
	.size	max.constprop.0, .-max.constprop.0
	.p2align 4
	.type	rec.part.0, @function
rec.part.0:
.LFB42:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%edi, %rax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	k(%rip), %r13
	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	$120, %rsp
	.cfi_def_cfa_offset 176
	movl	0(%r13,%rax,4), %r9d
	movq	%rax, 88(%rsp)
	testl	%r9d, %r9d
	jle	.L36
	salq	$3, %rax
	movl	$0, 104(%rsp)
	leaq	dp(%rip), %r14
	movq	%rax, 96(%rsp)
	movq	$0, 56(%rsp)
.L35:
	movq	96(%rsp), %rdi
	movq	G(%rip), %rax
	movq	(%rax,%rdi), %rdx
	movq	56(%rsp), %rdi
	movslq	(%rdx,%rdi,4), %rbx
	movl	(%r14,%rbx,4), %edx
	movq	%rbx, 72(%rsp)
	cmpl	$-1, %edx
	je	.L13
	addl	$1, %edx
.L14:
	movl	104(%rsp), %esi
	movl	$2, %edi
	xorl	%eax, %eax
	call	max.constprop.0
	movq	88(%rsp), %rcx
	addq	$1, 56(%rsp)
	movl	%eax, 104(%rsp)
	movq	56(%rsp), %rax
	cmpl	%eax, 0(%r13,%rcx,4)
	jg	.L35
	movq	%rcx, %rbx
.L12:
	movl	104(%rsp), %eax
	movl	%eax, (%r14,%rbx,4)
	addq	$120, %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
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	movl	0(%r13,%rbx,4), %r8d
	testl	%r8d, %r8d
	jle	.L37
	leaq	0(,%rbx,8), %rbx
	movl	$0, 44(%rsp)
	movq	%rbx, 80(%rsp)
	movq	$0, 16(%rsp)
.L34:
	movq	80(%rsp), %rbx
	movq	16(%rsp), %rsi
	movq	(%rax,%rbx), %rdx
	movslq	(%rdx,%rsi,4), %rcx
	movl	(%r14,%rcx,4), %edx
	movq	%rcx, 32(%rsp)
	cmpl	$-1, %edx
	je	.L16
	addl	$1, %edx
.L17:
	movl	44(%rsp), %esi
	movl	$2, %edi
	xorl	%eax, %eax
	call	max.constprop.0
	movq	72(%rsp), %rdi
	addq	$1, 16(%rsp)
	movl	%eax, 44(%rsp)
	movq	16(%rsp), %rax
	cmpl	%eax, 0(%r13,%rdi,4)
	jle	.L45
	movq	G(%rip), %rax
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L16:
	movl	0(%r13,%rcx,4), %edi
	testl	%edi, %edi
	jle	.L38
	leaq	0(,%rcx,8), %rdi
	movq	$0, (%rsp)
	movq	%rdi, 64(%rsp)
	movl	$0, 40(%rsp)
.L32:
	movq	64(%rsp), %rcx
	movq	(%rax,%rcx), %rdx
	movq	(%rsp), %rcx
	movslq	(%rdx,%rcx,4), %rcx
	movl	(%r14,%rcx,4), %edx
	movq	%rcx, 8(%rsp)
	cmpl	$-1, %edx
	je	.L19
	addl	$1, %edx
.L20:
	movl	40(%rsp), %esi
	movl	$2, %edi
	xorl	%eax, %eax
	call	max.constprop.0
	movq	32(%rsp), %rdi
	addq	$1, (%rsp)
	movl	%eax, 40(%rsp)
	movq	(%rsp), %rax
	cmpl	%eax, 0(%r13,%rdi,4)
	jle	.L46
	movq	G(%rip), %rax
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L19:
	movq	%rcx, %rdi
	movl	0(%r13,%rcx,4), %ecx
	testl	%ecx, %ecx
	jle	.L39
	salq	$3, %rdi
	xorl	%ebx, %ebx
	xorl	%ebp, %ebp
	movq	%rdi, 24(%rsp)
.L30:
	movq	24(%rsp), %rcx
	movq	(%rax,%rcx), %rdx
	movslq	(%rdx,%rbx,4), %r15
	movl	(%r14,%r15,4), %edx
	cmpl	$-1, %edx
	je	.L22
	addl	$1, %edx
.L23:
	movl	%ebp, %esi
	movl	$2, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	max.constprop.0
	movl	%eax, %ebp
	movq	8(%rsp), %rax
	cmpl	%ebx, 0(%r13,%rax,4)
	jle	.L47
	movq	G(%rip), %rax
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L22:
	movl	0(%r13,%r15,4), %edx
	testl	%edx, %edx
	jle	.L40
	xorl	%r12d, %r12d
	leaq	0(,%r15,8), %rcx
	movq	%rbx, 48(%rsp)
	xorl	%esi, %esi
	movq	%r12, %rbx
	movq	%rcx, %r12
.L28:
	movq	(%rax,%r12), %rax
	movslq	(%rax,%rbx,4), %rax
	movl	(%r14,%rax,4), %edx
	movq	%rax, %rdi
	cmpl	$-1, %edx
	jne	.L25
	movl	%esi, 108(%rsp)
	call	rec.part.0
	movl	108(%rsp), %esi
	leal	1(%rax), %edx
	.p2align 4,,10
	.p2align 3
.L44:
	movl	$2, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	max.constprop.0
	movl	%eax, %esi
	cmpl	%ebx, 0(%r13,%r15,4)
	jle	.L48
	movq	G(%rip), %rax
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L25:
	addl	$1, %edx
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L48:
	movq	48(%rsp), %rbx
	leal	1(%rax), %edx
.L24:
	movl	%esi, (%r14,%r15,4)
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L47:
	leal	1(%rbp), %edx
.L21:
	movl	%ebp, (%r14,%rax,4)
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L46:
	movl	40(%rsp), %eax
	leal	1(%rax), %edx
	movq	%rdi, %rax
.L18:
	movl	40(%rsp), %ebx
	movl	%ebx, (%r14,%rax,4)
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L40:
	movl	$1, %edx
	xorl	%esi, %esi
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L45:
	movl	44(%rsp), %eax
	leal	1(%rax), %edx
	movq	%rdi, %rax
.L15:
	movl	44(%rsp), %ecx
	movl	%ecx, (%r14,%rax,4)
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L39:
	movl	$1, %edx
	xorl	%ebp, %ebp
	movq	%rdi, %rax
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L38:
	movl	$0, 40(%rsp)
	movl	$1, %edx
	movq	%rcx, %rax
	jmp	.L18
.L37:
	movl	$0, 44(%rsp)
	movl	$1, %edx
	movq	%rbx, %rax
	jmp	.L15
.L36:
	movl	$0, 104(%rsp)
	leaq	dp(%rip), %r14
	movq	%rax, %rbx
	jmp	.L12
	.cfi_endproc
.LFE42:
	.size	rec.part.0, .-rec.part.0
	.section	.text.unlikely,"ax",@progbits
.LCOLDB0:
	.text
.LHOTB0:
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB39:
	.cfi_startproc
	endbr64
	subq	$88, %rsp
	.cfi_def_cfa_offset 96
	movq	%r9, 72(%rsp)
	leaq	32(%rsp), %r9
	movq	%rsi, 40(%rsp)
	movq	%rdx, 48(%rsp)
	movq	%rcx, 56(%rsp)
	movq	%r8, 64(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	96(%rsp), %rax
	movq	%r9, 16(%rsp)
	movq	%rax, 8(%rsp)
	movl	8(%r9), %eax
	movl	$16, (%rsp)
	cmpl	$1, %edi
	jle	.L49
	movl	$16, %ecx
	leaq	96(%rsp), %r8
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L54:
	cmpl	$47, %ecx
	ja	.L53
	movl	%ecx, %esi
	addl	$8, %ecx
	movl	(%r9,%rsi), %esi
	cmpl	%esi, %eax
	cmovl	%esi, %eax
	addl	$1, %edx
	cmpl	%edx, %edi
	jne	.L54
	.p2align 4,,10
	.p2align 3
.L49:
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L66
	addq	$88, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L53:
	.cfi_restore_state
	movl	(%r8), %ecx
	leaq	8(%r8), %rsi
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	addl	$1, %edx
	cmpl	%edx, %edi
	jne	.L56
	jmp	.L49
.L66:
	call	__stack_chk_fail@PLT
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	max.cold, @function
max.cold:
.LFSB39:
.L56:
	.cfi_def_cfa_offset 96
	movq	%rsi, 8(%rsp)
.L59:
	movq	%rsi, %rcx
	addq	$8, %rsi
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	addl	$1, %edx
	cmpl	%edx, %edi
	jg	.L59
	jmp	.L49
	.cfi_endproc
.LFE39:
	.text
	.size	max, .-max
	.section	.text.unlikely
	.size	max.cold, .-max.cold
.LCOLDE0:
	.text
.LHOTE0:
	.p2align 4
	.globl	rec
	.type	rec, @function
rec:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	dp(%rip), %r15
	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
	movslq	%edi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	movl	(%r15,%r12,4), %ebp
	cmpl	$-1, %ebp
	jne	.L67
	leaq	k(%rip), %r13
	xorl	%ebp, %ebp
	movl	0(%r13,%r12,4), %eax
	testl	%eax, %eax
	jle	.L69
	leaq	0(,%r12,8), %r14
	xorl	%ebx, %ebx
.L72:
	movq	G(%rip), %rax
	movq	(%rax,%r14), %rax
	movslq	(%rax,%rbx,4), %rax
	movl	(%r15,%rax,4), %edx
	movq	%rax, %rdi
	cmpl	$-1, %edx
	jne	.L70
	call	rec.part.0
	leal	1(%rax), %edx
.L75:
	movl	%ebp, %esi
	movl	$2, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	max.constprop.0
	movl	%eax, %ebp
	cmpl	%ebx, 0(%r13,%r12,4)
	jg	.L72
.L69:
	movl	%ebp, (%r15,%r12,4)
.L67:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%ebp, %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
.L70:
	.cfi_restore_state
	addl	$1, %edx
	jmp	.L75
	.cfi_endproc
.LFE40:
	.size	rec, .-rec
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	M(%rip), %rdx
	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	.LC1(%rip), %rbx
	movq	%rbx, %rdi
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rdi
	movq	%rdi, %r14
	salq	$3, %rdi
	call	malloc@PLT
	movq	%rax, G(%rip)
	testl	%r14d, %r14d
	jle	.L77
	movslq	M(%rip), %r12
	movl	%r14d, %r14d
	movq	%rax, %rbp
	leaq	(%rax,%r14,8), %r14
	movq	%r12, %r13
	salq	$2, %r12
	.p2align 4,,10
	.p2align 3
.L78:
	movq	%r12, %rdi
	addq	$8, %rbp
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	cmpq	%rbp, %r14
	jne	.L78
.L79:
	testl	%r13d, %r13d
	jle	.L83
	xorl	%r13d, %r13d
	leaq	36(%rsp), %r12
	leaq	32(%rsp), %rbp
	leaq	k(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L80:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	32(%rsp), %eax
	movq	G(%rip), %rdx
	addl	$1, %r13d
	movl	36(%rsp), %ecx
	subl	$1, %eax
	movl	%eax, 32(%rsp)
	cltq
	subl	$1, %ecx
	movq	(%rdx,%rax,8), %rsi
	movslq	(%r14,%rax,4), %rdx
	movl	%ecx, 36(%rsp)
	leal	1(%rdx), %edi
	movl	%edi, (%r14,%rax,4)
	movl	%ecx, (%rsi,%rdx,4)
	cmpl	%r13d, M(%rip)
	jg	.L80
.L83:
	movslq	28(%rsp), %rax
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jle	.L82
	leaq	dp(%rip), %r13
	movl	$255, %esi
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	leaq	0(,%rax,4), %rdx
	movq	%r13, %rdi
	leaq	k(%rip), %r14
	call	memset@PLT
	.p2align 4,,10
	.p2align 3
.L89:
	movl	0(%r13,%r15,4), %ebp
	cmpl	$-1, %ebp
	jne	.L84
	movl	(%r14,%r15,4), %eax
	xorl	%ebp, %ebp
	testl	%eax, %eax
	jle	.L85
	leaq	0(,%r15,8), %rax
	xorl	%ebx, %ebx
	movq	%rax, 8(%rsp)
.L88:
	movq	G(%rip), %rax
	movq	8(%rsp), %rcx
	movq	(%rax,%rcx), %rax
	movslq	(%rax,%rbx,4), %rax
	movl	0(%r13,%rax,4), %edx
	movq	%rax, %rdi
	cmpl	$-1, %edx
	jne	.L86
	call	rec.part.0
	leal	1(%rax), %edx
.L97:
	movl	%ebp, %esi
	movl	$2, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	max.constprop.0
	movl	%eax, %ebp
	cmpl	%ebx, (%r14,%r15,4)
	jg	.L88
.L85:
	movl	%ebp, 0(%r13,%r15,4)
.L84:
	movl	%r12d, %esi
	movl	%ebp, %edx
	movl	$2, %edi
	xorl	%eax, %eax
	call	max.constprop.0
	addq	$1, %r15
	movl	%eax, %r12d
	cmpl	%r15d, 28(%rsp)
	jg	.L89
.L82:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L98
	addq	$56, %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
.L86:
	.cfi_restore_state
	addl	$1, %edx
	jmp	.L97
.L77:
	movl	M(%rip), %r13d
	jmp	.L79
.L98:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	G
	.bss
	.align 8
	.type	G, @object
	.size	G, 8
G:
	.zero	8
	.globl	k
	.align 32
	.type	k, @object
	.size	k, 400040
k:
	.zero	400040
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 400040
dp:
	.zero	400040
	.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 <stdarg.h>
#include <stdio.h>
#include <stdlib.h>

int dp[100010], M, k[100010]={0};
int **G;

int max(int len, ...) {
    int i, _max, num;
    va_list ap;
    va_start(ap, len);

    _max = va_arg(ap, int);
    for (i = 1; i < len; i++) {
        num = va_arg(ap, int);
        if (num > _max)
            _max = num;
    }
    va_end(ap);
    return _max;
}

int rec(int v) {
    int i, res;
    if (dp[v] != -1) return dp[v]; // 既に更新済み

    res = 0;
    for (i=0;i<k[v];i++) {
        int nv = G[v][i];
        res = max(2,res, rec(nv) + 1);
    }
    return dp[v] = res; // メモしながらリターン
}

int main(void) {
    int i, N, res, x, y;
    scanf("%d%d", &N, &M);
    G = (int **)malloc(sizeof(int *)*N);
    for (i=0;i<N;i++) {
        G[i] = (int *)malloc(sizeof(int)*M);
    }

    for (i=0;i<M;i++) {
        scanf("%d%d", &x, &y);
        x--; y--;
        G[x][k[x]++] = y;
    }

    for (i=0;i<N;i++) dp[i] = -1;
    res = 0;
    for (i=0;i<N;i++) res = max(2,res,rec(i));
    printf("%d\n", res);
    return 0;
}
6 3
2 6
4 5
5 6
 6 3
2 6
4 6
5 6
 6 3
4 3
3 5
5 6
 4 0
1 2
1 3
3 2
2 4
3 4
 7 3
2 3
4 5
5 6
 7 3
2 3
1 5
5 6
 11 3
2 3
4 5
5 6
 4 5
1 2
1 4
3 2
2 4
3 4
 6 3
2 6
4 5
4 6
 7 1
2 3
4 5
5 6

2
 1
 3
 0
 2
 2
 2
 2
 1
 1

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

```c
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>

int dp[100010], M, k[100010]={0};
int **G;

int max(int len, ...) {
    int i, _max, num;
    va_list ap;
    va_start(ap, len);

    _max = va_arg(ap, int);
    for (i = 1; i < len; i++) {
        num = va_arg(ap, int);
        if (num > _max)
            _max = num;
    }
    va_end(ap);
    return _max;
}

int rec(int v) {
    int i, res;
    if (dp[v] != -1) return dp[v]; // 既に更新済み

    res = 0;
    for (i=0;i<k[v];i++) {
        int nv = G[v][i];
        res = max(2,res, rec(nv) + 1);
    }
    return dp[v] = res; // メモしながらリターン
}

int main(void) {
    int i, N, res, x, y;
    scanf("%d%d", &N, &M);
    G = (int **)malloc(sizeof(int *)*N);
    for (i=0;i<N;i++) {
        G[i] = (int *)malloc(sizeof(int)*M);
    }

    for (i=0;i<M;i++) {
        scanf("%d%d", &x, &y);
        x--; y--;
        G[x][k[x]++] = y;
    }

    for (i=0;i<N;i++) dp[i] = -1;
    res = 0;
    for (i=0;i<N;i++) res = max(2,res,rec(i));
    printf("%d\n", res);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 400040
dp:
	.zero	400040
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	k
	.align 32
	.type	k, @object
	.size	k, 400040
k:
	.zero	400040
	.globl	G
	.align 8
	.type	G, @object
	.size	G, 8
G:
	.zero	8
	.text
	.globl	max
	.type	max, @function
max:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$240, %rsp
	movl	%edi, -228(%rbp)
	movq	%rsi, -168(%rbp)
	movq	%rdx, -160(%rbp)
	movq	%rcx, -152(%rbp)
	movq	%r8, -144(%rbp)
	movq	%r9, -136(%rbp)
	testb	%al, %al
	je	.L2
	movaps	%xmm0, -128(%rbp)
	movaps	%xmm1, -112(%rbp)
	movaps	%xmm2, -96(%rbp)
	movaps	%xmm3, -80(%rbp)
	movaps	%xmm4, -64(%rbp)
	movaps	%xmm5, -48(%rbp)
	movaps	%xmm6, -32(%rbp)
	movaps	%xmm7, -16(%rbp)
.L2:
	movq	%fs:40, %rax
	movq	%rax, -184(%rbp)
	xorl	%eax, %eax
	movl	$8, -208(%rbp)
	movl	$48, -204(%rbp)
	leaq	16(%rbp), %rax
	movq	%rax, -200(%rbp)
	leaq	-176(%rbp), %rax
	movq	%rax, -192(%rbp)
	movl	-208(%rbp), %eax
	cmpl	$47, %eax
	ja	.L3
	movq	-192(%rbp), %rax
	movl	-208(%rbp), %edx
	movl	%edx, %edx
	addq	%rdx, %rax
	movl	-208(%rbp), %edx
	addl	$8, %edx
	movl	%edx, -208(%rbp)
	jmp	.L4
.L3:
	movq	-200(%rbp), %rax
	leaq	8(%rax), %rdx
	movq	%rdx, -200(%rbp)
.L4:
	movl	(%rax), %eax
	movl	%eax, -216(%rbp)
	movl	$1, -220(%rbp)
	jmp	.L5
.L9:
	movl	-208(%rbp), %eax
	cmpl	$47, %eax
	ja	.L6
	movq	-192(%rbp), %rax
	movl	-208(%rbp), %edx
	movl	%edx, %edx
	addq	%rdx, %rax
	movl	-208(%rbp), %edx
	addl	$8, %edx
	movl	%edx, -208(%rbp)
	jmp	.L7
.L6:
	movq	-200(%rbp), %rax
	leaq	8(%rax), %rdx
	movq	%rdx, -200(%rbp)
.L7:
	movl	(%rax), %eax
	movl	%eax, -212(%rbp)
	movl	-212(%rbp), %eax
	cmpl	-216(%rbp), %eax
	jle	.L8
	movl	-212(%rbp), %eax
	movl	%eax, -216(%rbp)
.L8:
	addl	$1, -220(%rbp)
.L5:
	movl	-220(%rbp), %eax
	cmpl	-228(%rbp), %eax
	jl	.L9
	movl	-216(%rbp), %eax
	movq	-184(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	max, .-max
	.globl	rec
	.type	rec, @function
rec:
.LFB7:
	.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
	movl	%edi, -20(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	je	.L13
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	jmp	.L14
.L13:
	movl	$0, -8(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L15
.L16:
	movq	G(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	rec
	leal	1(%rax), %edx
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	movl	$2, %edi
	movl	$0, %eax
	call	max
	movl	%eax, -8(%rbp)
	addl	$1, -12(%rbp)
.L15:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	k(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L16
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	rec, .-rec
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-44(%rbp), %rax
	leaq	M(%rip), %rdx
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, G(%rip)
	movl	$0, -32(%rbp)
	jmp	.L18
.L19:
	movl	M(%rip), %eax
	cltq
	salq	$2, %rax
	movq	G(%rip), %rcx
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	leaq	(%rcx,%rdx), %rbx
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, (%rbx)
	addl	$1, -32(%rbp)
.L18:
	movl	-44(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L19
	movl	$0, -32(%rbp)
	jmp	.L20
.L21:
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
	movl	-36(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -36(%rbp)
	movq	G(%rip), %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdi
	movl	-40(%rbp), %edx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	k(%rip), %rax
	movl	(%rcx,%rax), %eax
	leal	1(%rax), %ecx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rsi
	leaq	k(%rip), %rdx
	movl	%ecx, (%rsi,%rdx)
	cltq
	salq	$2, %rax
	leaq	(%rdi,%rax), %rdx
	movl	-36(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -32(%rbp)
.L20:
	movl	M(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L21
	movl	$0, -32(%rbp)
	jmp	.L22
.L23:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -32(%rbp)
.L22:
	movl	-44(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L23
	movl	$0, -28(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L24
.L25:
	movl	-32(%rbp), %eax
	movl	%eax, %edi
	call	rec
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	movl	$2, %edi
	movl	$0, %eax
	call	max
	movl	%eax, -28(%rbp)
	addl	$1, -32(%rbp)
.L24:
	movl	-44(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L25
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 400040
dp:
	.zero	400040
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	k
	.align 32
	.type	k, @object
	.size	k, 400040
k:
	.zero	400040
	.globl	G
	.align 8
	.type	G, @object
	.size	G, 8
G:
	.zero	8
	.text
	.globl	max
	.type	max, @function
max:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$240, %rsp
	movl	%edi, -228(%rbp)
	movq	%rsi, -168(%rbp)
	movq	%rdx, -160(%rbp)
	movq	%rcx, -152(%rbp)
	movq	%r8, -144(%rbp)
	movq	%r9, -136(%rbp)
	testb	%al, %al
	je	.L2
	movaps	%xmm0, -128(%rbp)
	movaps	%xmm1, -112(%rbp)
	movaps	%xmm2, -96(%rbp)
	movaps	%xmm3, -80(%rbp)
	movaps	%xmm4, -64(%rbp)
	movaps	%xmm5, -48(%rbp)
	movaps	%xmm6, -32(%rbp)
	movaps	%xmm7, -16(%rbp)
.L2:
	movq	%fs:40, %rax
	movq	%rax, -184(%rbp)
	xorl	%eax, %eax
	movl	$8, -208(%rbp)
	movl	$48, -204(%rbp)
	leaq	16(%rbp), %rax
	movq	%rax, -200(%rbp)
	leaq	-176(%rbp), %rax
	movq	%rax, -192(%rbp)
	movl	-208(%rbp), %eax
	cmpl	$47, %eax
	ja	.L3
	movq	-192(%rbp), %rax
	movl	-208(%rbp), %edx
	movl	%edx, %edx
	addq	%rdx, %rax
	movl	-208(%rbp), %edx
	addl	$8, %edx
	movl	%edx, -208(%rbp)
	jmp	.L4
.L3:
	movq	-200(%rbp), %rax
	leaq	8(%rax), %rdx
	movq	%rdx, -200(%rbp)
.L4:
	movl	(%rax), %eax
	movl	%eax, -216(%rbp)
	movl	$1, -220(%rbp)
	jmp	.L5
.L9:
	movl	-208(%rbp), %eax
	cmpl	$47, %eax
	ja	.L6
	movq	-192(%rbp), %rax
	movl	-208(%rbp), %edx
	movl	%edx, %edx
	addq	%rdx, %rax
	movl	-208(%rbp), %edx
	addl	$8, %edx
	movl	%edx, -208(%rbp)
	jmp	.L7
.L6:
	movq	-200(%rbp), %rax
	leaq	8(%rax), %rdx
	movq	%rdx, -200(%rbp)
.L7:
	movl	(%rax), %eax
	movl	%eax, -212(%rbp)
	movl	-212(%rbp), %eax
	cmpl	-216(%rbp), %eax
	jle	.L8
	movl	-212(%rbp), %eax
	movl	%eax, -216(%rbp)
.L8:
	addl	$1, -220(%rbp)
.L5:
	movl	-220(%rbp), %eax
	cmpl	-228(%rbp), %eax
	jl	.L9
	movl	-216(%rbp), %eax
	movq	-184(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	max, .-max
	.globl	rec
	.type	rec, @function
rec:
.LFB7:
	.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
	movl	%edi, -20(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	je	.L13
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	jmp	.L14
.L13:
	movl	$0, -8(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L15
.L16:
	movq	G(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	rec
	leal	1(%rax), %edx
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	movl	$2, %edi
	movl	$0, %eax
	call	max
	movl	%eax, -8(%rbp)
	addl	$1, -12(%rbp)
.L15:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	k(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L16
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	rec, .-rec
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-44(%rbp), %rax
	leaq	M(%rip), %rdx
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, G(%rip)
	movl	$0, -32(%rbp)
	jmp	.L18
.L19:
	movl	M(%rip), %eax
	cltq
	salq	$2, %rax
	movq	G(%rip), %rcx
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	leaq	(%rcx,%rdx), %rbx
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, (%rbx)
	addl	$1, -32(%rbp)
.L18:
	movl	-44(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L19
	movl	$0, -32(%rbp)
	jmp	.L20
.L21:
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
	movl	-36(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -36(%rbp)
	movq	G(%rip), %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdi
	movl	-40(%rbp), %edx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	k(%rip), %rax
	movl	(%rcx,%rax), %eax
	leal	1(%rax), %ecx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rsi
	leaq	k(%rip), %rdx
	movl	%ecx, (%rsi,%rdx)
	cltq
	salq	$2, %rax
	leaq	(%rdi,%rax), %rdx
	movl	-36(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -32(%rbp)
.L20:
	movl	M(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L21
	movl	$0, -32(%rbp)
	jmp	.L22
.L23:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -32(%rbp)
.L22:
	movl	-44(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L23
	movl	$0, -28(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L24
.L25:
	movl	-32(%rbp), %eax
	movl	%eax, %edi
	call	rec
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	movl	$2, %edi
	movl	$0, %eax
	call	max
	movl	%eax, -28(%rbp)
	addl	$1, -32(%rbp)
.L24:
	movl	-44(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L25
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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:
