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

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

int judge_point(int A[], int a[], int b[], int c[], int d[], int N, int M, int Q)
{
    int p = 0;
    for (size_t i = 0; i < Q; i++)
    {
        if (A[b[i] - 1] - A[a[i] - 1] == c[i])
        {
            p += d[i];
        }
    }
    return p;
}

int max(int a, int b)
{
    return a > b ? a : b;
}

int main(int argc, char const *argv[])
{
    int N, M, Q;
    int a[50], b[50], c[50], d[50];

    scanf("%d %d %d", &N, &M, &Q);
    for (size_t i = 0; i < Q; i++)
    {
        scanf("%d %d %d %d", &a[i], &b[i], &c[i], &d[i]);
    }

    int A_len = N;
    int A_num_max = M;
    int A[10];
    unsigned point = 0;

    for (size_t i0 = 1; i0 <= A_num_max; i0++)
        for (size_t i1 = i0; i1 <= A_num_max; i1++)
            for (size_t i2 = i1; i2 <= A_num_max; i2++)
                for (size_t i3 = i2; i3 <= A_num_max; i3++)
                    for (size_t i4 = i3; i4 <= A_num_max; i4++)
                        for (size_t i5 = i4; i5 <= A_num_max; i5++)
                            for (size_t i6 = i5; i6 <= A_num_max; i6++)
                                for (size_t i7 = i6; i7 <= A_num_max; i7++)
                                    for (size_t i8 = i7; i8 <= A_num_max; i8++)
                                        for (size_t i9 = i8; i9 <= A_num_max; i9++)
                                        {
                                            A[0] = i0;
                                            A[1] = i1;
                                            A[2] = i2;
                                            A[3] = i3;
                                            A[4] = i4;
                                            A[5] = i5;
                                            A[6] = i6;
                                            A[7] = i7;
                                            A[8] = i8;
                                            A[9] = i9;
                                            point = max(point, judge_point(A, a, b, c, d, N, M, Q));
                                        }

    printf("%u\n", point);
    
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	judge_point
	.type	judge_point, @function
judge_point:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movq	%rcx, -48(%rbp)
	movq	%r8, -56(%rbp)
	movl	%r9d, -60(%rbp)
	movl	$0, -12(%rbp)
	movq	$0, -8(%rbp)
	jmp	.L2
.L4:
	movq	-8(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movq	-8(%rbp), %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	leaq	-4(%rdx), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movq	-8(%rbp), %rax
	leaq	0(,%rax,4), %rcx
	movq	-48(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jne	.L3
	movq	-8(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	addl	%eax, -12(%rbp)
.L3:
	addq	$1, -8(%rbp)
.L2:
	movl	24(%rbp), %eax
	cltq
	cmpq	%rax, -8(%rbp)
	jb	.L4
	movl	-12(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	judge_point, .-judge_point
	.globl	max
	.type	max, @function
max:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	max, .-max
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d %d %d %d"
.LC2:
	.string	"%u\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
	subq	$1008, %rsp
	movl	%edi, -996(%rbp)
	movq	%rsi, -1008(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-984(%rbp), %rcx
	leaq	-988(%rbp), %rdx
	leaq	-992(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -968(%rbp)
	jmp	.L9
.L10:
	leaq	-208(%rbp), %rdx
	movq	-968(%rbp), %rax
	salq	$2, %rax
	leaq	(%rdx,%rax), %rsi
	leaq	-416(%rbp), %rdx
	movq	-968(%rbp), %rax
	salq	$2, %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-624(%rbp), %rdx
	movq	-968(%rbp), %rax
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-832(%rbp), %rdi
	movq	-968(%rbp), %rax
	salq	$2, %rax
	addq	%rdi, %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -968(%rbp)
.L9:
	movl	-984(%rbp), %eax
	cltq
	cmpq	%rax, -968(%rbp)
	jb	.L10
	movl	-992(%rbp), %eax
	movl	%eax, -976(%rbp)
	movl	-988(%rbp), %eax
	movl	%eax, -972(%rbp)
	movl	$0, -980(%rbp)
	movq	$1, -960(%rbp)
	jmp	.L11
.L30:
	movq	-960(%rbp), %rax
	movq	%rax, -952(%rbp)
	jmp	.L12
.L29:
	movq	-952(%rbp), %rax
	movq	%rax, -944(%rbp)
	jmp	.L13
.L28:
	movq	-944(%rbp), %rax
	movq	%rax, -936(%rbp)
	jmp	.L14
.L27:
	movq	-936(%rbp), %rax
	movq	%rax, -928(%rbp)
	jmp	.L15
.L26:
	movq	-928(%rbp), %rax
	movq	%rax, -920(%rbp)
	jmp	.L16
.L25:
	movq	-920(%rbp), %rax
	movq	%rax, -912(%rbp)
	jmp	.L17
.L24:
	movq	-912(%rbp), %rax
	movq	%rax, -904(%rbp)
	jmp	.L18
.L23:
	movq	-904(%rbp), %rax
	movq	%rax, -896(%rbp)
	jmp	.L19
.L22:
	movq	-896(%rbp), %rax
	movq	%rax, -888(%rbp)
	jmp	.L20
.L21:
	movq	-960(%rbp), %rax
	movl	%eax, -880(%rbp)
	movq	-952(%rbp), %rax
	movl	%eax, -876(%rbp)
	movq	-944(%rbp), %rax
	movl	%eax, -872(%rbp)
	movq	-936(%rbp), %rax
	movl	%eax, -868(%rbp)
	movq	-928(%rbp), %rax
	movl	%eax, -864(%rbp)
	movq	-920(%rbp), %rax
	movl	%eax, -860(%rbp)
	movq	-912(%rbp), %rax
	movl	%eax, -856(%rbp)
	movq	-904(%rbp), %rax
	movl	%eax, -852(%rbp)
	movq	-896(%rbp), %rax
	movl	%eax, -848(%rbp)
	movq	-888(%rbp), %rax
	movl	%eax, -844(%rbp)
	movl	-984(%rbp), %r8d
	movl	-988(%rbp), %edi
	movl	-992(%rbp), %r9d
	leaq	-208(%rbp), %r10
	leaq	-416(%rbp), %rcx
	leaq	-624(%rbp), %rdx
	leaq	-832(%rbp), %rsi
	leaq	-880(%rbp), %rax
	pushq	%r8
	pushq	%rdi
	movq	%r10, %r8
	movq	%rax, %rdi
	call	judge_point
	addq	$16, %rsp
	movl	%eax, %edx
	movl	-980(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	max
	movl	%eax, -980(%rbp)
	addq	$1, -888(%rbp)
.L20:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -888(%rbp)
	jbe	.L21
	addq	$1, -896(%rbp)
.L19:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -896(%rbp)
	jbe	.L22
	addq	$1, -904(%rbp)
.L18:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -904(%rbp)
	jbe	.L23
	addq	$1, -912(%rbp)
.L17:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -912(%rbp)
	jbe	.L24
	addq	$1, -920(%rbp)
.L16:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -920(%rbp)
	jbe	.L25
	addq	$1, -928(%rbp)
.L15:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -928(%rbp)
	jbe	.L26
	addq	$1, -936(%rbp)
.L14:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -936(%rbp)
	jbe	.L27
	addq	$1, -944(%rbp)
.L13:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -944(%rbp)
	jbe	.L28
	addq	$1, -952(%rbp)
.L12:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -952(%rbp)
	jbe	.L29
	addq	$1, -960(%rbp)
.L11:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -960(%rbp)
	jbe	.L30
	movl	-980(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	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
	.globl	judge_point
	.type	judge_point, @function
judge_point:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movslq	24(%rsp), %r11
	testq	%r11, %r11
	je	.L5
	movq	%rsi, %r9
	movq	%rdx, %r10
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	(%r10,%rax,4), %rdx
	movslq	(%r9,%rax,4), %rsi
	movl	-4(%rdi,%rdx,4), %edx
	subl	-4(%rdi,%rsi,4), %edx
	cmpl	(%rcx,%rax,4), %edx
	jne	.L3
	addl	(%r8,%rax,4), %r12d
.L3:
	addq	$1, %rax
	cmpq	%r11, %rax
	jne	.L4
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	xorl	%r12d, %r12d
	movl	%r12d, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE39:
	.size	judge_point, .-judge_point
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB40:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovge	%esi, %eax
	ret
	.cfi_endproc
.LFE40:
	.size	max, .-max
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d %d %d %d"
.LC2:
	.string	"%u\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	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1016, %rsp
	.cfi_def_cfa_offset 1072
	movq	%fs:40, %rax
	movq	%rax, 1000(%rsp)
	xorl	%eax, %eax
	leaq	124(%rsp), %rcx
	leaq	120(%rsp), %rdx
	leaq	116(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	124(%rsp), %eax
	testl	%eax, %eax
	je	.L38
	leaq	592(%rsp), %r15
	xorl	%ebx, %ebx
	xorl	%ebp, %ebp
	leaq	384(%rsp), %r14
	leaq	800(%rsp), %r9
	movq	%r15, %rdi
	leaq	176(%rsp), %r10
	movq	%r14, %rax
	leaq	.LC1(%rip), %r12
	movq	%r9, %r15
	movq	%r10, %r14
	movq	%rdi, %r9
	movq	%rax, %r10
.L12:
	leaq	(%r9,%rbx), %rcx
	leaq	(%r10,%rbx), %rdx
	xorl	%eax, %eax
	movq	%r12, %rdi
	leaq	(%r14,%rbx), %rsi
	leaq	(%r15,%rbx), %r8
	movq	%r9, 16(%rsp)
	addq	$1, %rbp
	movq	%r10, 8(%rsp)
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	movslq	124(%rsp), %r13
	movq	8(%rsp), %r10
	movq	16(%rsp), %r9
	cmpq	%rbp, %r13
	ja	.L12
.L11:
	movslq	120(%rsp), %rbx
	xorl	%r12d, %r12d
	movq	$1, 64(%rsp)
	testq	%rbx, %rbx
	je	.L14
	movq	64(%rsp), %rax
	movl	%r12d, %ebp
	movq	%rbx, %r12
	movq	%r13, %rbx
.L13:
	movq	%rax, 72(%rsp)
	leaq	592(%rsp), %rax
	movq	%rax, 32(%rsp)
.L36:
	movq	72(%rsp), %rax
	movq	%rax, 80(%rsp)
	cmpq	%rax, %r12
	jb	.L32
.L35:
	movq	80(%rsp), %rax
	movq	%rax, 88(%rsp)
	cmpq	%rax, %r12
	jb	.L30
.L33:
	movq	88(%rsp), %rax
	movq	%rax, 96(%rsp)
	cmpq	%rax, %r12
	jb	.L28
.L31:
	movq	96(%rsp), %rax
	movq	%rax, 104(%rsp)
	cmpq	%rax, %r12
	jb	.L26
	movq	%rbx, %r15
	movl	%ebp, %ebx
	movq	%r12, %rbp
.L29:
	movl	64(%rsp), %edi
	movq	%rax, 48(%rsp)
	movl	%edi, 28(%rsp)
	cmpq	%rax, %rbp
	jb	.L24
.L27:
	movq	48(%rsp), %rax
	movl	72(%rsp), %edi
	movq	%rax, 56(%rsp)
	movl	%edi, 16(%rsp)
	cmpq	%rax, %rbp
	jb	.L22
.L25:
	movq	56(%rsp), %rax
	movq	%rax, 40(%rsp)
	cmpq	%rax, %rbp
	jb	.L19
	movl	104(%rsp), %eax
	movl	80(%rsp), %r14d
	movl	88(%rsp), %r13d
	movl	96(%rsp), %r12d
	movl	%eax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L23:
	cmpq	40(%rsp), %rbp
	jb	.L21
	movq	40(%rsp), %rcx
	movl	48(%rsp), %r11d
	movl	56(%rsp), %r10d
	movd	%ecx, %xmm1
	.p2align 4,,10
	.p2align 3
.L18:
	movl	28(%rsp), %eax
	movdqa	%xmm1, %xmm0
	movd	%ecx, %xmm2
	xorl	%edx, %edx
	punpckldq	%xmm2, %xmm0
	movl	%r14d, 136(%rsp)
	movl	%eax, 128(%rsp)
	movl	16(%rsp), %eax
	movl	%r13d, 140(%rsp)
	movl	%eax, 132(%rsp)
	movl	8(%rsp), %eax
	movl	%r12d, 144(%rsp)
	movl	%eax, 148(%rsp)
	movl	%r11d, 152(%rsp)
	movl	%r10d, 156(%rsp)
	movq	%xmm0, 160(%rsp)
	testq	%r15, %r15
	je	.L15
	xorl	%eax, %eax
	leaq	384(%rsp), %r9
	leaq	176(%rsp), %r8
	.p2align 4,,10
	.p2align 3
.L17:
	movslq	(%r8,%rax,4), %rdi
	movslq	(%r9,%rax,4), %rsi
	movl	124(%rsp,%rsi,4), %esi
	subl	124(%rsp,%rdi,4), %esi
	movq	32(%rsp), %rdi
	cmpl	(%rdi,%rax,4), %esi
	jne	.L16
	addl	800(%rsp,%rax,4), %edx
.L16:
	addq	$1, %rax
	cmpq	%r15, %rax
	jne	.L17
.L15:
	cmpl	%edx, %ebx
	cmovl	%edx, %ebx
	addq	$1, %rcx
	cmpq	%rbp, %rcx
	jbe	.L18
.L21:
	addq	$1, 40(%rsp)
	movq	40(%rsp), %rax
	cmpq	%rbp, %rax
	jbe	.L23
.L19:
	addq	$1, 56(%rsp)
	movq	56(%rsp), %rax
	cmpq	%rbp, %rax
	jbe	.L25
.L22:
	addq	$1, 48(%rsp)
	movq	48(%rsp), %rax
	cmpq	%rbp, %rax
	jbe	.L27
.L24:
	addq	$1, 104(%rsp)
	movq	104(%rsp), %rax
	cmpq	%rbp, %rax
	jbe	.L29
	movq	%rbp, %r12
	movl	%ebx, %ebp
	movq	%r15, %rbx
.L26:
	addq	$1, 96(%rsp)
	movq	96(%rsp), %rax
	cmpq	%r12, %rax
	jbe	.L31
.L28:
	addq	$1, 88(%rsp)
	movq	88(%rsp), %rax
	cmpq	%r12, %rax
	jbe	.L33
.L30:
	addq	$1, 80(%rsp)
	movq	80(%rsp), %rax
	cmpq	%r12, %rax
	jbe	.L35
.L32:
	addq	$1, 72(%rsp)
	movq	72(%rsp), %rax
	cmpq	%r12, %rax
	jbe	.L36
	addq	$1, 64(%rsp)
	movq	64(%rsp), %rax
	cmpq	%r12, %rax
	jbe	.L13
	movl	%ebp, %r12d
.L14:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	1000(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L75
	addq	$1016, %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
.L38:
	.cfi_restore_state
	xorl	%r13d, %r13d
	jmp	.L11
.L75:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.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:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	judge_point
	.type	judge_point, @function
judge_point:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movslq	24(%rsp), %r11
	testq	%r11, %r11
	je	.L5
	movq	%rsi, %r9
	movq	%rdx, %r10
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	(%r10,%rax,4), %rdx
	movslq	(%r9,%rax,4), %rsi
	movl	-4(%rdi,%rdx,4), %edx
	subl	-4(%rdi,%rsi,4), %edx
	cmpl	(%rcx,%rax,4), %edx
	jne	.L3
	addl	(%r8,%rax,4), %r12d
.L3:
	addq	$1, %rax
	cmpq	%r11, %rax
	jne	.L4
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	xorl	%r12d, %r12d
	movl	%r12d, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE39:
	.size	judge_point, .-judge_point
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB40:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovge	%esi, %eax
	ret
	.cfi_endproc
.LFE40:
	.size	max, .-max
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d %d %d %d"
.LC2:
	.string	"%u\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	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1016, %rsp
	.cfi_def_cfa_offset 1072
	movq	%fs:40, %rax
	movq	%rax, 1000(%rsp)
	xorl	%eax, %eax
	leaq	124(%rsp), %rcx
	leaq	120(%rsp), %rdx
	leaq	116(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	124(%rsp), %eax
	testl	%eax, %eax
	je	.L38
	leaq	592(%rsp), %r15
	xorl	%ebx, %ebx
	xorl	%ebp, %ebp
	leaq	384(%rsp), %r14
	leaq	800(%rsp), %r9
	movq	%r15, %rdi
	leaq	176(%rsp), %r10
	movq	%r14, %rax
	leaq	.LC1(%rip), %r12
	movq	%r9, %r15
	movq	%r10, %r14
	movq	%rdi, %r9
	movq	%rax, %r10
.L12:
	leaq	(%r9,%rbx), %rcx
	leaq	(%r10,%rbx), %rdx
	xorl	%eax, %eax
	movq	%r12, %rdi
	leaq	(%r14,%rbx), %rsi
	leaq	(%r15,%rbx), %r8
	movq	%r9, 16(%rsp)
	addq	$1, %rbp
	movq	%r10, 8(%rsp)
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	movslq	124(%rsp), %r13
	movq	8(%rsp), %r10
	movq	16(%rsp), %r9
	cmpq	%rbp, %r13
	ja	.L12
.L11:
	movslq	120(%rsp), %rbx
	xorl	%r12d, %r12d
	movq	$1, 64(%rsp)
	testq	%rbx, %rbx
	je	.L14
	movq	64(%rsp), %rax
	movl	%r12d, %ebp
	movq	%rbx, %r12
	movq	%r13, %rbx
.L13:
	movq	%rax, 72(%rsp)
	leaq	592(%rsp), %rax
	movq	%rax, 32(%rsp)
.L36:
	movq	72(%rsp), %rax
	movq	%rax, 80(%rsp)
	cmpq	%rax, %r12
	jb	.L32
.L35:
	movq	80(%rsp), %rax
	movq	%rax, 88(%rsp)
	cmpq	%rax, %r12
	jb	.L30
.L33:
	movq	88(%rsp), %rax
	movq	%rax, 96(%rsp)
	cmpq	%rax, %r12
	jb	.L28
.L31:
	movq	96(%rsp), %rax
	movq	%rax, 104(%rsp)
	cmpq	%rax, %r12
	jb	.L26
	movq	%rbx, %r15
	movl	%ebp, %ebx
	movq	%r12, %rbp
.L29:
	movl	64(%rsp), %edi
	movq	%rax, 48(%rsp)
	movl	%edi, 28(%rsp)
	cmpq	%rax, %rbp
	jb	.L24
.L27:
	movq	48(%rsp), %rax
	movl	72(%rsp), %edi
	movq	%rax, 56(%rsp)
	movl	%edi, 16(%rsp)
	cmpq	%rax, %rbp
	jb	.L22
.L25:
	movq	56(%rsp), %rax
	movq	%rax, 40(%rsp)
	cmpq	%rax, %rbp
	jb	.L19
	movl	104(%rsp), %eax
	movl	80(%rsp), %r14d
	movl	88(%rsp), %r13d
	movl	96(%rsp), %r12d
	movl	%eax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L23:
	cmpq	40(%rsp), %rbp
	jb	.L21
	movq	40(%rsp), %rcx
	movl	48(%rsp), %r11d
	movl	56(%rsp), %r10d
	movd	%ecx, %xmm1
	.p2align 4,,10
	.p2align 3
.L18:
	movl	28(%rsp), %eax
	movdqa	%xmm1, %xmm0
	movd	%ecx, %xmm2
	xorl	%edx, %edx
	punpckldq	%xmm2, %xmm0
	movl	%r14d, 136(%rsp)
	movl	%eax, 128(%rsp)
	movl	16(%rsp), %eax
	movl	%r13d, 140(%rsp)
	movl	%eax, 132(%rsp)
	movl	8(%rsp), %eax
	movl	%r12d, 144(%rsp)
	movl	%eax, 148(%rsp)
	movl	%r11d, 152(%rsp)
	movl	%r10d, 156(%rsp)
	movq	%xmm0, 160(%rsp)
	testq	%r15, %r15
	je	.L15
	xorl	%eax, %eax
	leaq	384(%rsp), %r9
	leaq	176(%rsp), %r8
	.p2align 4,,10
	.p2align 3
.L17:
	movslq	(%r8,%rax,4), %rdi
	movslq	(%r9,%rax,4), %rsi
	movl	124(%rsp,%rsi,4), %esi
	subl	124(%rsp,%rdi,4), %esi
	movq	32(%rsp), %rdi
	cmpl	(%rdi,%rax,4), %esi
	jne	.L16
	addl	800(%rsp,%rax,4), %edx
.L16:
	addq	$1, %rax
	cmpq	%r15, %rax
	jne	.L17
.L15:
	cmpl	%edx, %ebx
	cmovl	%edx, %ebx
	addq	$1, %rcx
	cmpq	%rbp, %rcx
	jbe	.L18
.L21:
	addq	$1, 40(%rsp)
	movq	40(%rsp), %rax
	cmpq	%rbp, %rax
	jbe	.L23
.L19:
	addq	$1, 56(%rsp)
	movq	56(%rsp), %rax
	cmpq	%rbp, %rax
	jbe	.L25
.L22:
	addq	$1, 48(%rsp)
	movq	48(%rsp), %rax
	cmpq	%rbp, %rax
	jbe	.L27
.L24:
	addq	$1, 104(%rsp)
	movq	104(%rsp), %rax
	cmpq	%rbp, %rax
	jbe	.L29
	movq	%rbp, %r12
	movl	%ebx, %ebp
	movq	%r15, %rbx
.L26:
	addq	$1, 96(%rsp)
	movq	96(%rsp), %rax
	cmpq	%r12, %rax
	jbe	.L31
.L28:
	addq	$1, 88(%rsp)
	movq	88(%rsp), %rax
	cmpq	%r12, %rax
	jbe	.L33
.L30:
	addq	$1, 80(%rsp)
	movq	80(%rsp), %rax
	cmpq	%r12, %rax
	jbe	.L35
.L32:
	addq	$1, 72(%rsp)
	movq	72(%rsp), %rax
	cmpq	%r12, %rax
	jbe	.L36
	addq	$1, 64(%rsp)
	movq	64(%rsp), %rax
	cmpq	%r12, %rax
	jbe	.L13
	movl	%ebp, %r12d
.L14:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	1000(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L75
	addq	$1016, %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
.L38:
	.cfi_restore_state
	xorl	%r13d, %r13d
	jmp	.L11
.L75:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.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:

#include <stdio.h>
#include <stdlib.h>

int judge_point(int A[], int a[], int b[], int c[], int d[], int N, int M, int Q)
{
    int p = 0;
    for (size_t i = 0; i < Q; i++)
    {
        if (A[b[i] - 1] - A[a[i] - 1] == c[i])
        {
            p += d[i];
        }
    }
    return p;
}

int max(int a, int b)
{
    return a > b ? a : b;
}

int main(int argc, char const *argv[])
{
    int N, M, Q;
    int a[50], b[50], c[50], d[50];

    scanf("%d %d %d", &N, &M, &Q);
    for (size_t i = 0; i < Q; i++)
    {
        scanf("%d %d %d %d", &a[i], &b[i], &c[i], &d[i]);
    }

    int A_len = N;
    int A_num_max = M;
    int A[10];
    unsigned point = 0;

    for (size_t i0 = 1; i0 <= A_num_max; i0++)
        for (size_t i1 = i0; i1 <= A_num_max; i1++)
            for (size_t i2 = i1; i2 <= A_num_max; i2++)
                for (size_t i3 = i2; i3 <= A_num_max; i3++)
                    for (size_t i4 = i3; i4 <= A_num_max; i4++)
                        for (size_t i5 = i4; i5 <= A_num_max; i5++)
                            for (size_t i6 = i5; i6 <= A_num_max; i6++)
                                for (size_t i7 = i6; i7 <= A_num_max; i7++)
                                    for (size_t i8 = i7; i8 <= A_num_max; i8++)
                                        for (size_t i9 = i8; i9 <= A_num_max; i9++)
                                        {
                                            A[0] = i0;
                                            A[1] = i1;
                                            A[2] = i2;
                                            A[3] = i3;
                                            A[4] = i4;
                                            A[5] = i5;
                                            A[6] = i6;
                                            A[7] = i7;
                                            A[8] = i8;
                                            A[9] = i9;
                                            point = max(point, judge_point(A, a, b, c, d, N, M, Q));
                                        }

    printf("%u\n", point);
    
    return 0;
}

10 10 1
1 10 12 1
 4 6 10
2 4 1 86568
1 4 0 90629
2 3 0 90310
3 4 1 29211
3 4 1 78537
3 4 2 8580
1 2 1 96263
1 4 2 2156
1 2 0 94325
1 4 3 94328
 4 6 10
2 4 1 86568
1 4 0 90629
2 3 0 90310
3 4 1 29211
3 4 1 114896
3 4 2 8580
1 2 1 96263
1 4 2 2156
1 3 0 94325
1 4 3 94328
 4 6 10
2 4 1 86568
1 4 0 90629
2 3 0 90310
3 4 1 29211
3 4 1 114896
3 4 2 8580
1 2 0 96263
1 4 2 2156
1 3 0 28081
1 4 3 94328
 4 6 10
2 4 1 86568
1 4 0 90629
2 3 0 90310
3 4 1 1368
3 4 1 114896
3 4 2 8580
1 2 0 96263
1 4 2 2156
1 3 0 28081
1 4 3 94328
 4 6 10
2 4 1 86568
1 4 0 90629
2 3 0 90310
3 4 1 1368
3 4 1 114896
3 4 2 8580
1 2 0 38547
1 4 2 2156
1 3 0 28081
1 4 3 94328
 4 6 10
2 4 1 86568
1 4 0 90629
2 3 0 29125
3 4 1 1368
3 4 1 114896
1 4 2 8580
1 2 1 38547
1 4 2 2156
1 3 0 28081
1 4 3 94328
 4 6 10
2 4 2 86568
1 4 0 90629
2 3 0 29125
3 4 1 1368
3 4 1 114896
1 4 2 8580
1 2 1 38547
1 4 2 2156
0 3 0 24162
1 4 3 94328
 3 4 3
2 3 3 100
1 2 2 10
2 3 2 10
 4 6 10
2 4 1 86568
1 4 0 90629
2 3 0 90310
3 4 1 29211
3 4 1 78537
3 4 2 8580
1 2 1 96263
1 4 2 2156
2 2 0 94325
1 4 3 94328

0
 383045
 419404
 445329
 417486
 387470
 326285
 335707
 100
 477370

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

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

int judge_point(int A[], int a[], int b[], int c[], int d[], int N, int M, int Q)
{
    int p = 0;
    for (size_t i = 0; i < Q; i++)
    {
        if (A[b[i] - 1] - A[a[i] - 1] == c[i])
        {
            p += d[i];
        }
    }
    return p;
}

int max(int a, int b)
{
    return a > b ? a : b;
}

int main(int argc, char const *argv[])
{
    int N, M, Q;
    int a[50], b[50], c[50], d[50];

    scanf("%d %d %d", &N, &M, &Q);
    for (size_t i = 0; i < Q; i++)
    {
        scanf("%d %d %d %d", &a[i], &b[i], &c[i], &d[i]);
    }

    int A_len = N;
    int A_num_max = M;
    int A[10];
    unsigned point = 0;

    for (size_t i0 = 1; i0 <= A_num_max; i0++)
        for (size_t i1 = i0; i1 <= A_num_max; i1++)
            for (size_t i2 = i1; i2 <= A_num_max; i2++)
                for (size_t i3 = i2; i3 <= A_num_max; i3++)
                    for (size_t i4 = i3; i4 <= A_num_max; i4++)
                        for (size_t i5 = i4; i5 <= A_num_max; i5++)
                            for (size_t i6 = i5; i6 <= A_num_max; i6++)
                                for (size_t i7 = i6; i7 <= A_num_max; i7++)
                                    for (size_t i8 = i7; i8 <= A_num_max; i8++)
                                        for (size_t i9 = i8; i9 <= A_num_max; i9++)
                                        {
                                            A[0] = i0;
                                            A[1] = i1;
                                            A[2] = i2;
                                            A[3] = i3;
                                            A[4] = i4;
                                            A[5] = i5;
                                            A[6] = i6;
                                            A[7] = i7;
                                            A[8] = i8;
                                            A[9] = i9;
                                            point = max(point, judge_point(A, a, b, c, d, N, M, Q));
                                        }

    printf("%u\n", point);
    
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	judge_point
	.type	judge_point, @function
judge_point:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movq	%rcx, -48(%rbp)
	movq	%r8, -56(%rbp)
	movl	%r9d, -60(%rbp)
	movl	$0, -12(%rbp)
	movq	$0, -8(%rbp)
	jmp	.L2
.L4:
	movq	-8(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movq	-8(%rbp), %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	leaq	-4(%rdx), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movq	-8(%rbp), %rax
	leaq	0(,%rax,4), %rcx
	movq	-48(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jne	.L3
	movq	-8(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	addl	%eax, -12(%rbp)
.L3:
	addq	$1, -8(%rbp)
.L2:
	movl	24(%rbp), %eax
	cltq
	cmpq	%rax, -8(%rbp)
	jb	.L4
	movl	-12(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	judge_point, .-judge_point
	.globl	max
	.type	max, @function
max:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	max, .-max
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d %d %d %d"
.LC2:
	.string	"%u\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
	subq	$1008, %rsp
	movl	%edi, -996(%rbp)
	movq	%rsi, -1008(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-984(%rbp), %rcx
	leaq	-988(%rbp), %rdx
	leaq	-992(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -968(%rbp)
	jmp	.L9
.L10:
	leaq	-208(%rbp), %rdx
	movq	-968(%rbp), %rax
	salq	$2, %rax
	leaq	(%rdx,%rax), %rsi
	leaq	-416(%rbp), %rdx
	movq	-968(%rbp), %rax
	salq	$2, %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-624(%rbp), %rdx
	movq	-968(%rbp), %rax
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-832(%rbp), %rdi
	movq	-968(%rbp), %rax
	salq	$2, %rax
	addq	%rdi, %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -968(%rbp)
.L9:
	movl	-984(%rbp), %eax
	cltq
	cmpq	%rax, -968(%rbp)
	jb	.L10
	movl	-992(%rbp), %eax
	movl	%eax, -976(%rbp)
	movl	-988(%rbp), %eax
	movl	%eax, -972(%rbp)
	movl	$0, -980(%rbp)
	movq	$1, -960(%rbp)
	jmp	.L11
.L30:
	movq	-960(%rbp), %rax
	movq	%rax, -952(%rbp)
	jmp	.L12
.L29:
	movq	-952(%rbp), %rax
	movq	%rax, -944(%rbp)
	jmp	.L13
.L28:
	movq	-944(%rbp), %rax
	movq	%rax, -936(%rbp)
	jmp	.L14
.L27:
	movq	-936(%rbp), %rax
	movq	%rax, -928(%rbp)
	jmp	.L15
.L26:
	movq	-928(%rbp), %rax
	movq	%rax, -920(%rbp)
	jmp	.L16
.L25:
	movq	-920(%rbp), %rax
	movq	%rax, -912(%rbp)
	jmp	.L17
.L24:
	movq	-912(%rbp), %rax
	movq	%rax, -904(%rbp)
	jmp	.L18
.L23:
	movq	-904(%rbp), %rax
	movq	%rax, -896(%rbp)
	jmp	.L19
.L22:
	movq	-896(%rbp), %rax
	movq	%rax, -888(%rbp)
	jmp	.L20
.L21:
	movq	-960(%rbp), %rax
	movl	%eax, -880(%rbp)
	movq	-952(%rbp), %rax
	movl	%eax, -876(%rbp)
	movq	-944(%rbp), %rax
	movl	%eax, -872(%rbp)
	movq	-936(%rbp), %rax
	movl	%eax, -868(%rbp)
	movq	-928(%rbp), %rax
	movl	%eax, -864(%rbp)
	movq	-920(%rbp), %rax
	movl	%eax, -860(%rbp)
	movq	-912(%rbp), %rax
	movl	%eax, -856(%rbp)
	movq	-904(%rbp), %rax
	movl	%eax, -852(%rbp)
	movq	-896(%rbp), %rax
	movl	%eax, -848(%rbp)
	movq	-888(%rbp), %rax
	movl	%eax, -844(%rbp)
	movl	-984(%rbp), %r8d
	movl	-988(%rbp), %edi
	movl	-992(%rbp), %r9d
	leaq	-208(%rbp), %r10
	leaq	-416(%rbp), %rcx
	leaq	-624(%rbp), %rdx
	leaq	-832(%rbp), %rsi
	leaq	-880(%rbp), %rax
	pushq	%r8
	pushq	%rdi
	movq	%r10, %r8
	movq	%rax, %rdi
	call	judge_point
	addq	$16, %rsp
	movl	%eax, %edx
	movl	-980(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	max
	movl	%eax, -980(%rbp)
	addq	$1, -888(%rbp)
.L20:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -888(%rbp)
	jbe	.L21
	addq	$1, -896(%rbp)
.L19:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -896(%rbp)
	jbe	.L22
	addq	$1, -904(%rbp)
.L18:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -904(%rbp)
	jbe	.L23
	addq	$1, -912(%rbp)
.L17:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -912(%rbp)
	jbe	.L24
	addq	$1, -920(%rbp)
.L16:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -920(%rbp)
	jbe	.L25
	addq	$1, -928(%rbp)
.L15:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -928(%rbp)
	jbe	.L26
	addq	$1, -936(%rbp)
.L14:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -936(%rbp)
	jbe	.L27
	addq	$1, -944(%rbp)
.L13:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -944(%rbp)
	jbe	.L28
	addq	$1, -952(%rbp)
.L12:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -952(%rbp)
	jbe	.L29
	addq	$1, -960(%rbp)
.L11:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -960(%rbp)
	jbe	.L30
	movl	-980(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	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	judge_point
	.type	judge_point, @function
judge_point:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movq	%rcx, -48(%rbp)
	movq	%r8, -56(%rbp)
	movl	%r9d, -60(%rbp)
	movl	$0, -12(%rbp)
	movq	$0, -8(%rbp)
	jmp	.L2
.L4:
	movq	-8(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movq	-8(%rbp), %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	leaq	-4(%rdx), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movq	-8(%rbp), %rax
	leaq	0(,%rax,4), %rcx
	movq	-48(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jne	.L3
	movq	-8(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	addl	%eax, -12(%rbp)
.L3:
	addq	$1, -8(%rbp)
.L2:
	movl	24(%rbp), %eax
	cltq
	cmpq	%rax, -8(%rbp)
	jb	.L4
	movl	-12(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	judge_point, .-judge_point
	.globl	max
	.type	max, @function
max:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	max, .-max
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d %d %d %d"
.LC2:
	.string	"%u\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
	subq	$1008, %rsp
	movl	%edi, -996(%rbp)
	movq	%rsi, -1008(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-984(%rbp), %rcx
	leaq	-988(%rbp), %rdx
	leaq	-992(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -968(%rbp)
	jmp	.L9
.L10:
	leaq	-208(%rbp), %rdx
	movq	-968(%rbp), %rax
	salq	$2, %rax
	leaq	(%rdx,%rax), %rsi
	leaq	-416(%rbp), %rdx
	movq	-968(%rbp), %rax
	salq	$2, %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-624(%rbp), %rdx
	movq	-968(%rbp), %rax
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-832(%rbp), %rdi
	movq	-968(%rbp), %rax
	salq	$2, %rax
	addq	%rdi, %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -968(%rbp)
.L9:
	movl	-984(%rbp), %eax
	cltq
	cmpq	%rax, -968(%rbp)
	jb	.L10
	movl	-992(%rbp), %eax
	movl	%eax, -976(%rbp)
	movl	-988(%rbp), %eax
	movl	%eax, -972(%rbp)
	movl	$0, -980(%rbp)
	movq	$1, -960(%rbp)
	jmp	.L11
.L30:
	movq	-960(%rbp), %rax
	movq	%rax, -952(%rbp)
	jmp	.L12
.L29:
	movq	-952(%rbp), %rax
	movq	%rax, -944(%rbp)
	jmp	.L13
.L28:
	movq	-944(%rbp), %rax
	movq	%rax, -936(%rbp)
	jmp	.L14
.L27:
	movq	-936(%rbp), %rax
	movq	%rax, -928(%rbp)
	jmp	.L15
.L26:
	movq	-928(%rbp), %rax
	movq	%rax, -920(%rbp)
	jmp	.L16
.L25:
	movq	-920(%rbp), %rax
	movq	%rax, -912(%rbp)
	jmp	.L17
.L24:
	movq	-912(%rbp), %rax
	movq	%rax, -904(%rbp)
	jmp	.L18
.L23:
	movq	-904(%rbp), %rax
	movq	%rax, -896(%rbp)
	jmp	.L19
.L22:
	movq	-896(%rbp), %rax
	movq	%rax, -888(%rbp)
	jmp	.L20
.L21:
	movq	-960(%rbp), %rax
	movl	%eax, -880(%rbp)
	movq	-952(%rbp), %rax
	movl	%eax, -876(%rbp)
	movq	-944(%rbp), %rax
	movl	%eax, -872(%rbp)
	movq	-936(%rbp), %rax
	movl	%eax, -868(%rbp)
	movq	-928(%rbp), %rax
	movl	%eax, -864(%rbp)
	movq	-920(%rbp), %rax
	movl	%eax, -860(%rbp)
	movq	-912(%rbp), %rax
	movl	%eax, -856(%rbp)
	movq	-904(%rbp), %rax
	movl	%eax, -852(%rbp)
	movq	-896(%rbp), %rax
	movl	%eax, -848(%rbp)
	movq	-888(%rbp), %rax
	movl	%eax, -844(%rbp)
	movl	-984(%rbp), %r8d
	movl	-988(%rbp), %edi
	movl	-992(%rbp), %r9d
	leaq	-208(%rbp), %r10
	leaq	-416(%rbp), %rcx
	leaq	-624(%rbp), %rdx
	leaq	-832(%rbp), %rsi
	leaq	-880(%rbp), %rax
	pushq	%r8
	pushq	%rdi
	movq	%r10, %r8
	movq	%rax, %rdi
	call	judge_point
	addq	$16, %rsp
	movl	%eax, %edx
	movl	-980(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	max
	movl	%eax, -980(%rbp)
	addq	$1, -888(%rbp)
.L20:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -888(%rbp)
	jbe	.L21
	addq	$1, -896(%rbp)
.L19:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -896(%rbp)
	jbe	.L22
	addq	$1, -904(%rbp)
.L18:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -904(%rbp)
	jbe	.L23
	addq	$1, -912(%rbp)
.L17:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -912(%rbp)
	jbe	.L24
	addq	$1, -920(%rbp)
.L16:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -920(%rbp)
	jbe	.L25
	addq	$1, -928(%rbp)
.L15:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -928(%rbp)
	jbe	.L26
	addq	$1, -936(%rbp)
.L14:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -936(%rbp)
	jbe	.L27
	addq	$1, -944(%rbp)
.L13:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -944(%rbp)
	jbe	.L28
	addq	$1, -952(%rbp)
.L12:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -952(%rbp)
	jbe	.L29
	addq	$1, -960(%rbp)
.L11:
	movl	-972(%rbp), %eax
	cltq
	cmpq	%rax, -960(%rbp)
	jbe	.L30
	movl	-980(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	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:
