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>
#define min(X, Y) ((X) < (Y) ? (X) : (Y))

const int inf = 1 << 30;
int a, b, c;
int n;
int lll[5];
int ll[5];
int l[10];


int solve(int pos)
{
    if (pos >= n) {
        int res = 0;
        for (int i = 0; i < 3; i++) {
            if (ll[i] == 0) {
                res = inf;
            }
            else {
                res += abs(ll[i] - lll[i]);
            }
        }

        return res;
    }

    int res = inf;
    for (int i = 0; i < 4; i++) {
 
        if (ll[i] == 0 || i == 3) {
            ll[i] = l[pos];
            res = min(solve(pos + 1), res);
        }
        else {
            ll[i] += l[pos];
            res = min(solve(pos + 1) + 10, res);
        }
        ll[i] -= l[pos];
    }

    return res;
}

int main()
{
    scanf("%d %d %d %d", &n, lll, lll + 1, lll + 2);
    for (int i = 0; i < n; i++) {
        scanf("%d", l + i);
    }

    printf("%d\n", solve(0));

    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	inf
	.section	.rodata
	.align 4
	.type	inf, @object
	.size	inf, 4
inf:
	.long	1073741824
	.globl	a
	.bss
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	lll
	.align 16
	.type	lll, @object
	.size	lll, 20
lll:
	.zero	20
	.globl	ll
	.align 16
	.type	ll, @object
	.size	ll, 20
ll:
	.zero	20
	.globl	l
	.align 32
	.type	l, @object
	.size	l, 40
l:
	.zero	40
	.text
	.globl	solve
	.type	solve, @function
solve:
.LFB6:
	.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	n(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L2
	movl	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L3
.L6:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ll(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L4
	movl	$1073741824, -16(%rbp)
	jmp	.L5
.L4:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ll(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	lll(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%eax, -16(%rbp)
.L5:
	addl	$1, -12(%rbp)
.L3:
	cmpl	$2, -12(%rbp)
	jle	.L6
	movl	-16(%rbp), %eax
	jmp	.L7
.L2:
	movl	$1073741824, -8(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L8
.L16:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ll(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L9
	cmpl	$3, -4(%rbp)
	jne	.L10
.L9:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	ll(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	solve
	cmpl	%eax, -8(%rbp)
	jle	.L11
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	solve
	jmp	.L12
.L11:
	movl	-8(%rbp), %eax
.L12:
	movl	%eax, -8(%rbp)
	jmp	.L13
.L10:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ll(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ll(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	solve
	addl	$10, %eax
	cmpl	%eax, -8(%rbp)
	jle	.L14
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	solve
	addl	$10, %eax
	jmp	.L15
.L14:
	movl	-8(%rbp), %eax
.L15:
	movl	%eax, -8(%rbp)
.L13:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ll(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	l(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ll(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L8:
	cmpl	$3, -4(%rbp)
	jle	.L16
	movl	-8(%rbp), %eax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	8+lll(%rip), %rdx
	leaq	4+lll(%rip), %rax
	movq	%rdx, %r8
	movq	%rax, %rcx
	leaq	lll(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4(%rbp)
	jmp	.L18
.L19:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L18:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L19
	movl	$0, %edi
	call	solve
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	solve.part.0, @function
solve.part.0:
.LFB41:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leal	1(%rdi), %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	$1073741824, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movslq	%edi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	l(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	ll(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	movl	(%r12,%r13,4), %edx
.L22:
	movl	(%rbx), %eax
	movl	n(%rip), %ecx
	testl	%eax, %eax
	je	.L38
	cmpl	$3, %ebp
	je	.L38
	leal	(%rax,%rdx), %esi
	movl	%esi, (%rbx)
	cmpl	%ecx, %r15d
	jge	.L56
	movl	%r15d, %edi
	call	solve.part.0
	addl	$10, %eax
	cmpl	%r14d, %eax
	jl	.L17
.L54:
	movl	(%r12,%r13,4), %edx
	movl	(%rbx), %eax
	subl	%edx, %eax
.L9:
	addl	$1, %ebp
	movl	%eax, (%rbx)
	addq	$4, %rbx
	cmpl	$4, %ebp
	jne	.L22
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r14d, %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
.L38:
	.cfi_restore_state
	movl	%edx, (%rbx)
	cmpl	%ecx, %r15d
	jge	.L57
	movl	%r15d, %edi
	call	solve.part.0
	cmpl	%r14d, %eax
	jge	.L54
	cmpl	%r15d, n(%rip)
	jle	.L58
	movl	%r15d, %edi
	call	solve.part.0
	movl	(%r12,%r13,4), %edx
	movl	%eax, %r14d
	movl	(%rbx), %eax
	subl	%edx, %eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L57:
	leaq	ll(%rip), %rax
	movl	(%rax), %ecx
	movl	$1073741824, %eax
	testl	%ecx, %ecx
	jne	.L59
	movl	4+ll(%rip), %esi
	movl	$1073741824, %r9d
	testl	%esi, %esi
	jne	.L60
.L6:
	movl	8+ll(%rip), %edi
	movl	$1073741824, %eax
	testl	%edi, %edi
	jne	.L61
.L7:
	cmpl	%eax, %r14d
	movl	$0, %eax
	jle	.L9
.L23:
	movl	$1073741824, %r8d
	testl	%ecx, %ecx
	jne	.L62
	movl	$1073741824, %ecx
	testl	%esi, %esi
	jne	.L63
.L12:
	movl	$1073741824, %r14d
	testl	%edi, %edi
	je	.L9
.L68:
	subl	8+lll(%rip), %edi
	movl	%edi, %r8d
	negl	%r8d
	cmovs	%edi, %r8d
	leal	(%r8,%rcx), %r14d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L56:
	leaq	ll(%rip), %rsi
	movl	(%rsi), %edi
	movl	$1073741824, %esi
	testl	%edi, %edi
	jne	.L64
.L14:
	movl	4+ll(%rip), %r9d
	movl	$1073741824, %ecx
	testl	%r9d, %r9d
	jne	.L65
	movl	8+ll(%rip), %esi
	movl	$1073741834, %r10d
	testl	%esi, %esi
	jne	.L66
.L16:
	cmpl	%r10d, %r14d
	jle	.L9
.L24:
	movl	$1073741824, %r8d
	testl	%edi, %edi
	je	.L19
	subl	lll(%rip), %edi
	movl	%edi, %r8d
	negl	%r8d
	cmovs	%edi, %r8d
.L19:
	movl	$1073741824, %ecx
	testl	%r9d, %r9d
	je	.L20
	subl	4+lll(%rip), %r9d
	movl	%r9d, %ecx
	negl	%ecx
	cmovs	%r9d, %ecx
	addl	%r8d, %ecx
.L20:
	movl	$1073741834, %r14d
	testl	%esi, %esi
	je	.L9
	subl	8+lll(%rip), %esi
	movl	%esi, %edi
	negl	%edi
	cmovns	%edi, %esi
	leal	10(%rcx,%rsi), %r14d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L61:
	movl	%edi, %r10d
	subl	8+lll(%rip), %r10d
	movl	%r10d, %eax
	negl	%eax
	cmovs	%r10d, %eax
	addl	%r9d, %eax
	cmpl	%eax, %r14d
	movl	$0, %eax
	jle	.L9
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L60:
	movl	%esi, %edi
	subl	4+lll(%rip), %edi
	movl	%edi, %r9d
	negl	%r9d
	cmovs	%edi, %r9d
	movl	8+ll(%rip), %edi
	addl	%eax, %r9d
	movl	$1073741824, %eax
	testl	%edi, %edi
	je	.L7
	jmp	.L61
	.p2align 4,,10
	.p2align 3
.L59:
	movl	%ecx, %esi
	subl	lll(%rip), %esi
	movl	$1073741824, %r9d
	movl	%esi, %eax
	negl	%eax
	cmovs	%esi, %eax
	movl	4+ll(%rip), %esi
	testl	%esi, %esi
	je	.L6
	jmp	.L60
	.p2align 4,,10
	.p2align 3
.L66:
	movl	%esi, %r11d
	subl	8+lll(%rip), %r11d
	movl	%r11d, %r10d
	negl	%r10d
	cmovs	%r11d, %r10d
	leal	10(%rcx,%r10), %r10d
	cmpl	%r10d, %r14d
	jle	.L9
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L65:
	movl	%r9d, %r10d
	subl	4+lll(%rip), %r10d
	movl	%r10d, %ecx
	negl	%ecx
	cmovs	%r10d, %ecx
	movl	$1073741834, %r10d
	addl	%esi, %ecx
	movl	8+ll(%rip), %esi
	testl	%esi, %esi
	je	.L16
	jmp	.L66
	.p2align 4,,10
	.p2align 3
.L64:
	movl	%edi, %ecx
	subl	lll(%rip), %ecx
	movl	%ecx, %esi
	negl	%esi
	cmovs	%ecx, %esi
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L17:
	cmpl	%r15d, n(%rip)
	jle	.L67
	movl	%r15d, %edi
	call	solve.part.0
	leal	10(%rax), %r14d
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L62:
	subl	lll(%rip), %ecx
	movl	%ecx, %r8d
	negl	%r8d
	cmovs	%ecx, %r8d
	movl	$1073741824, %ecx
	testl	%esi, %esi
	je	.L12
.L63:
	subl	4+lll(%rip), %esi
	movl	$1073741824, %r14d
	movl	%esi, %ecx
	negl	%ecx
	cmovs	%esi, %ecx
	addl	%r8d, %ecx
	testl	%edi, %edi
	je	.L9
	jmp	.L68
.L58:
	leaq	ll(%rip), %rax
	movl	(%r12,%r13,4), %edx
	movl	8+ll(%rip), %edi
	movl	(%rax), %ecx
	movl	(%rbx), %eax
	movl	4+ll(%rip), %esi
	subl	%edx, %eax
	jmp	.L23
.L67:
	leaq	ll(%rip), %rax
	movl	(%r12,%r13,4), %edx
	movl	4+ll(%rip), %r9d
	movl	(%rax), %edi
	movl	(%rbx), %eax
	movl	8+ll(%rip), %esi
	subl	%edx, %eax
	jmp	.L24
	.cfi_endproc
.LFE41:
	.size	solve.part.0, .-solve.part.0
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB39:
	.cfi_startproc
	endbr64
	cmpl	%edi, n(%rip)
	jle	.L81
	jmp	solve.part.0
	.p2align 4,,10
	.p2align 3
.L81:
	movl	ll(%rip), %eax
	movl	$1073741824, %edx
	testl	%eax, %eax
	jne	.L82
	movl	4+ll(%rip), %eax
	movl	$1073741824, %ecx
	testl	%eax, %eax
	jne	.L83
.L72:
	movl	8+ll(%rip), %edx
	movl	$1073741824, %eax
	testl	%edx, %edx
	jne	.L84
.L69:
	ret
	.p2align 4,,10
	.p2align 3
.L84:
	subl	8+lll(%rip), %edx
	movl	%edx, %eax
	negl	%eax
	cmovs	%edx, %eax
	addl	%ecx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L83:
	subl	4+lll(%rip), %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovs	%eax, %ecx
	movl	$1073741824, %eax
	addl	%edx, %ecx
	movl	8+ll(%rip), %edx
	testl	%edx, %edx
	je	.L69
	jmp	.L84
	.p2align 4,,10
	.p2align 3
.L82:
	subl	lll(%rip), %eax
	movl	$1073741824, %ecx
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movl	4+ll(%rip), %eax
	testl	%eax, %eax
	je	.L72
	jmp	.L83
	.cfi_endproc
.LFE39:
	.size	solve, .-solve
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	8+lll(%rip), %r8
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	-4(%r8), %rcx
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-4(%rcx), %rdx
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L86
	leaq	l(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L87:
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movq	%r12, %rdi
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	cmpl	%ebx, n(%rip)
	jg	.L87
.L86:
	xorl	%edi, %edi
	call	solve
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	l
	.bss
	.align 32
	.type	l, @object
	.size	l, 40
l:
	.zero	40
	.globl	ll
	.align 16
	.type	ll, @object
	.size	ll, 20
ll:
	.zero	20
	.globl	lll
	.align 16
	.type	lll, @object
	.size	lll, 20
lll:
	.zero	20
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	inf
	.section	.rodata
	.align 4
	.type	inf, @object
	.size	inf, 4
inf:
	.long	1073741824
	.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	solve.part.0, @function
solve.part.0:
.LFB41:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leal	1(%rdi), %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	$1073741824, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movslq	%edi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	l(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	ll(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	movl	(%r12,%r13,4), %edx
.L22:
	movl	(%rbx), %eax
	movl	n(%rip), %ecx
	testl	%eax, %eax
	je	.L38
	cmpl	$3, %ebp
	je	.L38
	leal	(%rax,%rdx), %esi
	movl	%esi, (%rbx)
	cmpl	%ecx, %r15d
	jge	.L56
	movl	%r15d, %edi
	call	solve.part.0
	addl	$10, %eax
	cmpl	%r14d, %eax
	jl	.L17
.L54:
	movl	(%r12,%r13,4), %edx
	movl	(%rbx), %eax
	subl	%edx, %eax
.L9:
	addl	$1, %ebp
	movl	%eax, (%rbx)
	addq	$4, %rbx
	cmpl	$4, %ebp
	jne	.L22
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r14d, %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
.L38:
	.cfi_restore_state
	movl	%edx, (%rbx)
	cmpl	%ecx, %r15d
	jge	.L57
	movl	%r15d, %edi
	call	solve.part.0
	cmpl	%r14d, %eax
	jge	.L54
	cmpl	%r15d, n(%rip)
	jle	.L58
	movl	%r15d, %edi
	call	solve.part.0
	movl	(%r12,%r13,4), %edx
	movl	%eax, %r14d
	movl	(%rbx), %eax
	subl	%edx, %eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L57:
	leaq	ll(%rip), %rax
	movl	(%rax), %ecx
	movl	$1073741824, %eax
	testl	%ecx, %ecx
	jne	.L59
	movl	4+ll(%rip), %esi
	movl	$1073741824, %r9d
	testl	%esi, %esi
	jne	.L60
.L6:
	movl	8+ll(%rip), %edi
	movl	$1073741824, %eax
	testl	%edi, %edi
	jne	.L61
.L7:
	cmpl	%eax, %r14d
	movl	$0, %eax
	jle	.L9
.L23:
	movl	$1073741824, %r8d
	testl	%ecx, %ecx
	jne	.L62
	movl	$1073741824, %ecx
	testl	%esi, %esi
	jne	.L63
.L12:
	movl	$1073741824, %r14d
	testl	%edi, %edi
	je	.L9
.L68:
	subl	8+lll(%rip), %edi
	movl	%edi, %r8d
	negl	%r8d
	cmovs	%edi, %r8d
	leal	(%r8,%rcx), %r14d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L56:
	leaq	ll(%rip), %rsi
	movl	(%rsi), %edi
	movl	$1073741824, %esi
	testl	%edi, %edi
	jne	.L64
.L14:
	movl	4+ll(%rip), %r9d
	movl	$1073741824, %ecx
	testl	%r9d, %r9d
	jne	.L65
	movl	8+ll(%rip), %esi
	movl	$1073741834, %r10d
	testl	%esi, %esi
	jne	.L66
.L16:
	cmpl	%r10d, %r14d
	jle	.L9
.L24:
	movl	$1073741824, %r8d
	testl	%edi, %edi
	je	.L19
	subl	lll(%rip), %edi
	movl	%edi, %r8d
	negl	%r8d
	cmovs	%edi, %r8d
.L19:
	movl	$1073741824, %ecx
	testl	%r9d, %r9d
	je	.L20
	subl	4+lll(%rip), %r9d
	movl	%r9d, %ecx
	negl	%ecx
	cmovs	%r9d, %ecx
	addl	%r8d, %ecx
.L20:
	movl	$1073741834, %r14d
	testl	%esi, %esi
	je	.L9
	subl	8+lll(%rip), %esi
	movl	%esi, %edi
	negl	%edi
	cmovns	%edi, %esi
	leal	10(%rcx,%rsi), %r14d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L61:
	movl	%edi, %r10d
	subl	8+lll(%rip), %r10d
	movl	%r10d, %eax
	negl	%eax
	cmovs	%r10d, %eax
	addl	%r9d, %eax
	cmpl	%eax, %r14d
	movl	$0, %eax
	jle	.L9
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L60:
	movl	%esi, %edi
	subl	4+lll(%rip), %edi
	movl	%edi, %r9d
	negl	%r9d
	cmovs	%edi, %r9d
	movl	8+ll(%rip), %edi
	addl	%eax, %r9d
	movl	$1073741824, %eax
	testl	%edi, %edi
	je	.L7
	jmp	.L61
	.p2align 4,,10
	.p2align 3
.L59:
	movl	%ecx, %esi
	subl	lll(%rip), %esi
	movl	$1073741824, %r9d
	movl	%esi, %eax
	negl	%eax
	cmovs	%esi, %eax
	movl	4+ll(%rip), %esi
	testl	%esi, %esi
	je	.L6
	jmp	.L60
	.p2align 4,,10
	.p2align 3
.L66:
	movl	%esi, %r11d
	subl	8+lll(%rip), %r11d
	movl	%r11d, %r10d
	negl	%r10d
	cmovs	%r11d, %r10d
	leal	10(%rcx,%r10), %r10d
	cmpl	%r10d, %r14d
	jle	.L9
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L65:
	movl	%r9d, %r10d
	subl	4+lll(%rip), %r10d
	movl	%r10d, %ecx
	negl	%ecx
	cmovs	%r10d, %ecx
	movl	$1073741834, %r10d
	addl	%esi, %ecx
	movl	8+ll(%rip), %esi
	testl	%esi, %esi
	je	.L16
	jmp	.L66
	.p2align 4,,10
	.p2align 3
.L64:
	movl	%edi, %ecx
	subl	lll(%rip), %ecx
	movl	%ecx, %esi
	negl	%esi
	cmovs	%ecx, %esi
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L17:
	cmpl	%r15d, n(%rip)
	jle	.L67
	movl	%r15d, %edi
	call	solve.part.0
	leal	10(%rax), %r14d
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L62:
	subl	lll(%rip), %ecx
	movl	%ecx, %r8d
	negl	%r8d
	cmovs	%ecx, %r8d
	movl	$1073741824, %ecx
	testl	%esi, %esi
	je	.L12
.L63:
	subl	4+lll(%rip), %esi
	movl	$1073741824, %r14d
	movl	%esi, %ecx
	negl	%ecx
	cmovs	%esi, %ecx
	addl	%r8d, %ecx
	testl	%edi, %edi
	je	.L9
	jmp	.L68
.L58:
	leaq	ll(%rip), %rax
	movl	(%r12,%r13,4), %edx
	movl	8+ll(%rip), %edi
	movl	(%rax), %ecx
	movl	(%rbx), %eax
	movl	4+ll(%rip), %esi
	subl	%edx, %eax
	jmp	.L23
.L67:
	leaq	ll(%rip), %rax
	movl	(%r12,%r13,4), %edx
	movl	4+ll(%rip), %r9d
	movl	(%rax), %edi
	movl	(%rbx), %eax
	movl	8+ll(%rip), %esi
	subl	%edx, %eax
	jmp	.L24
	.cfi_endproc
.LFE41:
	.size	solve.part.0, .-solve.part.0
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB39:
	.cfi_startproc
	endbr64
	cmpl	%edi, n(%rip)
	jle	.L81
	jmp	solve.part.0
	.p2align 4,,10
	.p2align 3
.L81:
	movl	ll(%rip), %eax
	movl	$1073741824, %edx
	testl	%eax, %eax
	jne	.L82
	movl	4+ll(%rip), %eax
	movl	$1073741824, %ecx
	testl	%eax, %eax
	jne	.L83
.L72:
	movl	8+ll(%rip), %edx
	movl	$1073741824, %eax
	testl	%edx, %edx
	jne	.L84
.L69:
	ret
	.p2align 4,,10
	.p2align 3
.L84:
	subl	8+lll(%rip), %edx
	movl	%edx, %eax
	negl	%eax
	cmovs	%edx, %eax
	addl	%ecx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L83:
	subl	4+lll(%rip), %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovs	%eax, %ecx
	movl	$1073741824, %eax
	addl	%edx, %ecx
	movl	8+ll(%rip), %edx
	testl	%edx, %edx
	je	.L69
	jmp	.L84
	.p2align 4,,10
	.p2align 3
.L82:
	subl	lll(%rip), %eax
	movl	$1073741824, %ecx
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movl	4+ll(%rip), %eax
	testl	%eax, %eax
	je	.L72
	jmp	.L83
	.cfi_endproc
.LFE39:
	.size	solve, .-solve
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	8+lll(%rip), %r8
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	-4(%r8), %rcx
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-4(%rcx), %rdx
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L86
	leaq	l(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L87:
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movq	%r12, %rdi
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	cmpl	%ebx, n(%rip)
	jg	.L87
.L86:
	xorl	%edi, %edi
	call	solve
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	l
	.bss
	.align 32
	.type	l, @object
	.size	l, 40
l:
	.zero	40
	.globl	ll
	.align 16
	.type	ll, @object
	.size	ll, 20
ll:
	.zero	20
	.globl	lll
	.align 16
	.type	lll, @object
	.size	lll, 20
lll:
	.zero	20
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	inf
	.section	.rodata
	.align 4
	.type	inf, @object
	.size	inf, 4
inf:
	.long	1073741824
	.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>
#define min(X, Y) ((X) < (Y) ? (X) : (Y))

const int inf = 1 << 30;
int a, b, c;
int n;
int lll[5];
int ll[5];
int l[10];


int solve(int pos)
{
    if (pos >= n) {
        int res = 0;
        for (int i = 0; i < 3; i++) {
            if (ll[i] == 0) {
                res = inf;
            }
            else {
                res += abs(ll[i] - lll[i]);
            }
        }

        return res;
    }

    int res = inf;
    for (int i = 0; i < 4; i++) {
 
        if (ll[i] == 0 || i == 3) {
            ll[i] = l[pos];
            res = min(solve(pos + 1), res);
        }
        else {
            ll[i] += l[pos];
            res = min(solve(pos + 1) + 10, res);
        }
        ll[i] -= l[pos];
    }

    return res;
}

int main()
{
    scanf("%d %d %d %d", &n, lll, lll + 1, lll + 2);
    for (int i = 0; i < n; i++) {
        scanf("%d", l + i);
    }

    printf("%d\n", solve(0));

    return 0;
}

8 1100 800 100
300
333
400
444
500
555
600
666
 5 100 171 80
98
40
30
21
80
 8 100 90 80
100
100
90
90
90
80
80
20
 8 1100 800 100
297
333
400
444
500
555
600
666
 5 100 171 80
68
40
30
21
80
 8 100 90 110
100
100
90
90
90
80
80
20
 8 1100 800 100
297
333
400
444
336
555
600
666
 5 100 171 80
68
40
42
21
80
 8 100 90 110
100
100
90
104
90
80
80
20
 5 100 171 80
80
40
42
21
80

243
 102
 0
 240
 132
 10
 271
 120
 6
 108

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>
#define min(X, Y) ((X) < (Y) ? (X) : (Y))

const int inf = 1 << 30;
int a, b, c;
int n;
int lll[5];
int ll[5];
int l[10];


int solve(int pos)
{
    if (pos >= n) {
        int res = 0;
        for (int i = 0; i < 3; i++) {
            if (ll[i] == 0) {
                res = inf;
            }
            else {
                res += abs(ll[i] - lll[i]);
            }
        }

        return res;
    }

    int res = inf;
    for (int i = 0; i < 4; i++) {
 
        if (ll[i] == 0 || i == 3) {
            ll[i] = l[pos];
            res = min(solve(pos + 1), res);
        }
        else {
            ll[i] += l[pos];
            res = min(solve(pos + 1) + 10, res);
        }
        ll[i] -= l[pos];
    }

    return res;
}

int main()
{
    scanf("%d %d %d %d", &n, lll, lll + 1, lll + 2);
    for (int i = 0; i < n; i++) {
        scanf("%d", l + i);
    }

    printf("%d\n", solve(0));

    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	inf
	.section	.rodata
	.align 4
	.type	inf, @object
	.size	inf, 4
inf:
	.long	1073741824
	.globl	a
	.bss
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	lll
	.align 16
	.type	lll, @object
	.size	lll, 20
lll:
	.zero	20
	.globl	ll
	.align 16
	.type	ll, @object
	.size	ll, 20
ll:
	.zero	20
	.globl	l
	.align 32
	.type	l, @object
	.size	l, 40
l:
	.zero	40
	.text
	.globl	solve
	.type	solve, @function
solve:
.LFB6:
	.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	n(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L2
	movl	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L3
.L6:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ll(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L4
	movl	$1073741824, -16(%rbp)
	jmp	.L5
.L4:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ll(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	lll(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%eax, -16(%rbp)
.L5:
	addl	$1, -12(%rbp)
.L3:
	cmpl	$2, -12(%rbp)
	jle	.L6
	movl	-16(%rbp), %eax
	jmp	.L7
.L2:
	movl	$1073741824, -8(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L8
.L16:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ll(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L9
	cmpl	$3, -4(%rbp)
	jne	.L10
.L9:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	ll(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	solve
	cmpl	%eax, -8(%rbp)
	jle	.L11
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	solve
	jmp	.L12
.L11:
	movl	-8(%rbp), %eax
.L12:
	movl	%eax, -8(%rbp)
	jmp	.L13
.L10:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ll(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ll(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	solve
	addl	$10, %eax
	cmpl	%eax, -8(%rbp)
	jle	.L14
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	solve
	addl	$10, %eax
	jmp	.L15
.L14:
	movl	-8(%rbp), %eax
.L15:
	movl	%eax, -8(%rbp)
.L13:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ll(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	l(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ll(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L8:
	cmpl	$3, -4(%rbp)
	jle	.L16
	movl	-8(%rbp), %eax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	8+lll(%rip), %rdx
	leaq	4+lll(%rip), %rax
	movq	%rdx, %r8
	movq	%rax, %rcx
	leaq	lll(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4(%rbp)
	jmp	.L18
.L19:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L18:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L19
	movl	$0, %edi
	call	solve
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	inf
	.section	.rodata
	.align 4
	.type	inf, @object
	.size	inf, 4
inf:
	.long	1073741824
	.globl	a
	.bss
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	lll
	.align 16
	.type	lll, @object
	.size	lll, 20
lll:
	.zero	20
	.globl	ll
	.align 16
	.type	ll, @object
	.size	ll, 20
ll:
	.zero	20
	.globl	l
	.align 32
	.type	l, @object
	.size	l, 40
l:
	.zero	40
	.text
	.globl	solve
	.type	solve, @function
solve:
.LFB6:
	.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	n(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L2
	movl	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L3
.L6:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ll(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L4
	movl	$1073741824, -16(%rbp)
	jmp	.L5
.L4:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ll(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	lll(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%eax, -16(%rbp)
.L5:
	addl	$1, -12(%rbp)
.L3:
	cmpl	$2, -12(%rbp)
	jle	.L6
	movl	-16(%rbp), %eax
	jmp	.L7
.L2:
	movl	$1073741824, -8(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L8
.L16:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ll(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L9
	cmpl	$3, -4(%rbp)
	jne	.L10
.L9:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	ll(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	solve
	cmpl	%eax, -8(%rbp)
	jle	.L11
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	solve
	jmp	.L12
.L11:
	movl	-8(%rbp), %eax
.L12:
	movl	%eax, -8(%rbp)
	jmp	.L13
.L10:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ll(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ll(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	solve
	addl	$10, %eax
	cmpl	%eax, -8(%rbp)
	jle	.L14
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	solve
	addl	$10, %eax
	jmp	.L15
.L14:
	movl	-8(%rbp), %eax
.L15:
	movl	%eax, -8(%rbp)
.L13:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ll(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	l(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ll(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L8:
	cmpl	$3, -4(%rbp)
	jle	.L16
	movl	-8(%rbp), %eax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	8+lll(%rip), %rdx
	leaq	4+lll(%rip), %rax
	movq	%rdx, %r8
	movq	%rax, %rcx
	leaq	lll(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4(%rbp)
	jmp	.L18
.L19:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L18:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L19
	movl	$0, %edi
	call	solve
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
