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>
#define abs(a) ((a)>(0)?(a):-(a))
int n,A,B,C;
int min(int a,int b,int c,int d){
  int min=a;
  if(b<min)min=b;
  if(c<min)min=c;
  if(d<min)min=d;
  return min;
}
int dfs(int a,int b,int c,int d,int *l){
  if(d==n&&(a*b*c>0)) return abs(a-A)+abs(b-B)+abs(c-C)-30;
  else if(d==n)return 1e9;
  else{
     int r1=dfs(a,b,c,d+1,l);
     int r2=dfs(a+l[d],b,c,d+1,l)+10;
     int r3=dfs(a,b+l[d],c,d+1,l)+10;
     int r4=dfs(a,b,c+l[d],d+1,l)+10;
    return min(r1,r2,r3,r4);
  }
}
int main(){
  int i;
  scanf("%d%d%d%d",&n,&A,&B,&C);
  int l[n];
  for(i=0;i<n;i++)scanf("%d",&l[i]);
  printf("%d",dfs(0,0,0,0,l));
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	A
	.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
	.text
	.globl	min
	.type	min, @function
min:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	-24(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jge	.L2
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jge	.L3
	movl	-28(%rbp), %eax
	movl	%eax, -4(%rbp)
.L3:
	movl	-32(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jge	.L4
	movl	-32(%rbp), %eax
	movl	%eax, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	min, .-min
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movq	%r8, -40(%rbp)
	movl	n(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jne	.L7
	movl	-20(%rbp), %eax
	imull	-24(%rbp), %eax
	imull	-28(%rbp), %eax
	testl	%eax, %eax
	jle	.L7
	movl	A(%rip), %edx
	movl	-20(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, %ecx
	movl	B(%rip), %edx
	movl	-24(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%eax, %ecx
	movl	C(%rip), %edx
	movl	-28(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%ecx, %eax
	subl	$30, %eax
	jmp	.L8
.L7:
	movl	n(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jne	.L9
	movl	$1000000000, %eax
	jmp	.L8
.L9:
	movl	-32(%rbp), %eax
	leal	1(%rax), %ecx
	movq	-40(%rbp), %rdi
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movq	%rdi, %r8
	movl	%eax, %edi
	call	dfs
	movl	%eax, -16(%rbp)
	movl	-32(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-20(%rbp), %eax
	leal	(%rdx,%rax), %edi
	movq	-40(%rbp), %rsi
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	movq	%rsi, %r8
	movl	%eax, %esi
	call	dfs
	addl	$10, %eax
	movl	%eax, -12(%rbp)
	movl	-32(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-24(%rbp), %eax
	leal	(%rdx,%rax), %esi
	movq	-40(%rbp), %rdi
	movl	-28(%rbp), %edx
	movl	-20(%rbp), %eax
	movq	%rdi, %r8
	movl	%eax, %edi
	call	dfs
	addl	$10, %eax
	movl	%eax, -8(%rbp)
	movl	-32(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-28(%rbp), %eax
	addl	%eax, %edx
	movq	-40(%rbp), %rdi
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movq	%rdi, %r8
	movl	%eax, %edi
	call	dfs
	addl	$10, %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %ecx
	movl	-8(%rbp), %edx
	movl	-12(%rbp), %esi
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	min
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	dfs, .-dfs
	.section	.rodata
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	C(%rip), %r8
	leaq	B(%rip), %rax
	movq	%rax, %rcx
	leaq	A(%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	n(%rip), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L11:
	cmpq	%rdx, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L13
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L13:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -76(%rbp)
	jmp	.L14
.L15:
	movl	-76(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -76(%rbp)
.L14:
	movl	n(%rip), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L15
	movq	-64(%rbp), %rax
	movq	%rax, %r8
	movl	$0, %ecx
	movl	$0, %edx
	movl	$0, %esi
	movl	$0, %edi
	call	dfs
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	%rbx, %rsp
	movl	$0, %eax
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	min
	.type	min, @function
min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%ecx, %edx
	movl	%edi, %eax
	cmovg	%ecx, %edx
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	cmpl	%edi, %edx
	cmovle	%edx, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.p2align 4
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%esi, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%edi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%edx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movslq	%ecx, %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	cmpl	%ebx, n(%rip)
	je	.L8
	leal	1(%rbx), %r14d
	movq	%r8, 8(%rsp)
	movl	%r14d, %ecx
	call	dfs
	movq	8(%rsp), %r8
	movl	%r14d, %ecx
	movl	%ebp, %edx
	movl	%r13d, %esi
	movl	%eax, 28(%rsp)
	movl	(%r8,%rbx,4), %r15d
	leal	(%r12,%r15), %edi
	call	dfs
	movq	8(%rsp), %r8
	movl	%r14d, %ecx
	movl	%ebp, %edx
	leal	0(%r13,%r15), %esi
	movl	%r12d, %edi
	movl	%eax, %ebx
	movq	%r8, 16(%rsp)
	call	dfs
	movq	16(%rsp), %r8
	movl	%r14d, %ecx
	movl	%r13d, %esi
	leal	0(%rbp,%r15), %edx
	movl	%r12d, %edi
	movl	%eax, 8(%rsp)
	call	dfs
	movl	8(%rsp), %r14d
	movl	28(%rsp), %r9d
	movl	%eax, %r8d
	leal	10(%rbx), %eax
	addl	$10, %r14d
	leal	10(%r8), %edx
	cmpl	%r14d, %eax
	cmovg	%r14d, %eax
	cmpl	%r9d, %eax
	cmovg	%r9d, %eax
	cmpl	%edx, %eax
	cmovg	%edx, %eax
.L3:
	addq	$40, %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
.L8:
	.cfi_restore_state
	movl	%edi, %edx
	movl	$1000000000, %eax
	imull	%esi, %edx
	imull	%ebp, %edx
	testl	%edx, %edx
	jle	.L3
	subl	A(%rip), %r12d
	movl	%r12d, %eax
	negl	%eax
	cmovs	%r12d, %eax
	subl	B(%rip), %r13d
	movl	%r13d, %edx
	negl	%edx
	cmovns	%edx, %r13d
	subl	C(%rip), %ebp
	movl	%ebp, %ecx
	addl	%r13d, %eax
	negl	%ecx
	cmovns	%ecx, %ebp
	addq	$40, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	leal	-30(%rax,%rbp), %eax
	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
	.cfi_endproc
.LFE24:
	.size	dfs, .-dfs
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	B(%rip), %rcx
	leaq	A(%rip), %rdx
	leaq	n(%rip), %rsi
	leaq	C(%rip), %r8
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	n(%rip), %rax
	movq	%rsp, %rsi
	movq	%rax, %rcx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L11
.L22:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L22
.L11:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L23
.L12:
	movq	%rsp, %r14
	leaq	.LC1(%rip), %r13
	testl	%ecx, %ecx
	jle	.L13
	movq	%r14, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r12, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %r12
	cmpl	%ebx, n(%rip)
	jg	.L14
.L13:
	xorl	%edx, %edx
	xorl	%esi, %esi
	xorl	%edi, %edi
	xorl	%ecx, %ecx
	movq	%r14, %r8
	call	dfs
	movq	%r13, %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L24
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L23:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L12
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	C
	.bss
	.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	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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	min
	.type	min, @function
min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%ecx, %edx
	movl	%edi, %eax
	cmovg	%ecx, %edx
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	cmpl	%edi, %edx
	cmovle	%edx, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.p2align 4
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%esi, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%edi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%edx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movslq	%ecx, %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	cmpl	%ebx, n(%rip)
	je	.L8
	leal	1(%rbx), %r14d
	movq	%r8, 8(%rsp)
	movl	%r14d, %ecx
	call	dfs
	movq	8(%rsp), %r8
	movl	%r14d, %ecx
	movl	%ebp, %edx
	movl	%r13d, %esi
	movl	%eax, 28(%rsp)
	movl	(%r8,%rbx,4), %r15d
	leal	(%r12,%r15), %edi
	call	dfs
	movq	8(%rsp), %r8
	movl	%r14d, %ecx
	movl	%ebp, %edx
	leal	0(%r13,%r15), %esi
	movl	%r12d, %edi
	movl	%eax, %ebx
	movq	%r8, 16(%rsp)
	call	dfs
	movq	16(%rsp), %r8
	movl	%r14d, %ecx
	movl	%r13d, %esi
	leal	0(%rbp,%r15), %edx
	movl	%r12d, %edi
	movl	%eax, 8(%rsp)
	call	dfs
	movl	8(%rsp), %r14d
	movl	28(%rsp), %r9d
	movl	%eax, %r8d
	leal	10(%rbx), %eax
	addl	$10, %r14d
	leal	10(%r8), %edx
	cmpl	%r14d, %eax
	cmovg	%r14d, %eax
	cmpl	%r9d, %eax
	cmovg	%r9d, %eax
	cmpl	%edx, %eax
	cmovg	%edx, %eax
.L3:
	addq	$40, %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
.L8:
	.cfi_restore_state
	movl	%edi, %edx
	movl	$1000000000, %eax
	imull	%esi, %edx
	imull	%ebp, %edx
	testl	%edx, %edx
	jle	.L3
	subl	A(%rip), %r12d
	movl	%r12d, %eax
	negl	%eax
	cmovs	%r12d, %eax
	subl	B(%rip), %r13d
	movl	%r13d, %edx
	negl	%edx
	cmovns	%edx, %r13d
	subl	C(%rip), %ebp
	movl	%ebp, %ecx
	addl	%r13d, %eax
	negl	%ecx
	cmovns	%ecx, %ebp
	addq	$40, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	leal	-30(%rax,%rbp), %eax
	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
	.cfi_endproc
.LFE24:
	.size	dfs, .-dfs
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	B(%rip), %rcx
	leaq	A(%rip), %rdx
	leaq	n(%rip), %rsi
	leaq	C(%rip), %r8
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	n(%rip), %rax
	movq	%rsp, %rsi
	movq	%rax, %rcx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L11
.L22:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L22
.L11:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L23
.L12:
	movq	%rsp, %r14
	leaq	.LC1(%rip), %r13
	testl	%ecx, %ecx
	jle	.L13
	movq	%r14, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r12, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %r12
	cmpl	%ebx, n(%rip)
	jg	.L14
.L13:
	xorl	%edx, %edx
	xorl	%esi, %esi
	xorl	%edi, %edi
	xorl	%ecx, %ecx
	movq	%r14, %r8
	call	dfs
	movq	%r13, %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L24
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L23:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L12
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	C
	.bss
	.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	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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>
#define abs(a) ((a)>(0)?(a):-(a))
int n,A,B,C;
int min(int a,int b,int c,int d){
  int min=a;
  if(b<min)min=b;
  if(c<min)min=c;
  if(d<min)min=d;
  return min;
}
int dfs(int a,int b,int c,int d,int *l){
  if(d==n&&(a*b*c>0)) return abs(a-A)+abs(b-B)+abs(c-C)-30;
  else if(d==n)return 1e9;
  else{
     int r1=dfs(a,b,c,d+1,l);
     int r2=dfs(a+l[d],b,c,d+1,l)+10;
     int r3=dfs(a,b+l[d],c,d+1,l)+10;
     int r4=dfs(a,b,c+l[d],d+1,l)+10;
    return min(r1,r2,r3,r4);
  }
}
int main(){
  int i;
  scanf("%d%d%d%d",&n,&A,&B,&C);
  int l[n];
  for(i=0;i<n;i++)scanf("%d",&l[i]);
  printf("%d",dfs(0,0,0,0,l));
}
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>
#define abs(a) ((a)>(0)?(a):-(a))
int n,A,B,C;
int min(int a,int b,int c,int d){
  int min=a;
  if(b<min)min=b;
  if(c<min)min=c;
  if(d<min)min=d;
  return min;
}
int dfs(int a,int b,int c,int d,int *l){
  if(d==n&&(a*b*c>0)) return abs(a-A)+abs(b-B)+abs(c-C)-30;
  else if(d==n)return 1e9;
  else{
     int r1=dfs(a,b,c,d+1,l);
     int r2=dfs(a+l[d],b,c,d+1,l)+10;
     int r3=dfs(a,b+l[d],c,d+1,l)+10;
     int r4=dfs(a,b,c+l[d],d+1,l)+10;
    return min(r1,r2,r3,r4);
  }
}
int main(){
  int i;
  scanf("%d%d%d%d",&n,&A,&B,&C);
  int l[n];
  for(i=0;i<n;i++)scanf("%d",&l[i]);
  printf("%d",dfs(0,0,0,0,l));
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	A
	.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
	.text
	.globl	min
	.type	min, @function
min:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	-24(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jge	.L2
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jge	.L3
	movl	-28(%rbp), %eax
	movl	%eax, -4(%rbp)
.L3:
	movl	-32(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jge	.L4
	movl	-32(%rbp), %eax
	movl	%eax, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	min, .-min
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movq	%r8, -40(%rbp)
	movl	n(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jne	.L7
	movl	-20(%rbp), %eax
	imull	-24(%rbp), %eax
	imull	-28(%rbp), %eax
	testl	%eax, %eax
	jle	.L7
	movl	A(%rip), %edx
	movl	-20(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, %ecx
	movl	B(%rip), %edx
	movl	-24(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%eax, %ecx
	movl	C(%rip), %edx
	movl	-28(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%ecx, %eax
	subl	$30, %eax
	jmp	.L8
.L7:
	movl	n(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jne	.L9
	movl	$1000000000, %eax
	jmp	.L8
.L9:
	movl	-32(%rbp), %eax
	leal	1(%rax), %ecx
	movq	-40(%rbp), %rdi
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movq	%rdi, %r8
	movl	%eax, %edi
	call	dfs
	movl	%eax, -16(%rbp)
	movl	-32(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-20(%rbp), %eax
	leal	(%rdx,%rax), %edi
	movq	-40(%rbp), %rsi
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	movq	%rsi, %r8
	movl	%eax, %esi
	call	dfs
	addl	$10, %eax
	movl	%eax, -12(%rbp)
	movl	-32(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-24(%rbp), %eax
	leal	(%rdx,%rax), %esi
	movq	-40(%rbp), %rdi
	movl	-28(%rbp), %edx
	movl	-20(%rbp), %eax
	movq	%rdi, %r8
	movl	%eax, %edi
	call	dfs
	addl	$10, %eax
	movl	%eax, -8(%rbp)
	movl	-32(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-28(%rbp), %eax
	addl	%eax, %edx
	movq	-40(%rbp), %rdi
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movq	%rdi, %r8
	movl	%eax, %edi
	call	dfs
	addl	$10, %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %ecx
	movl	-8(%rbp), %edx
	movl	-12(%rbp), %esi
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	min
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	dfs, .-dfs
	.section	.rodata
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	C(%rip), %r8
	leaq	B(%rip), %rax
	movq	%rax, %rcx
	leaq	A(%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	n(%rip), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L11:
	cmpq	%rdx, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L13
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L13:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -76(%rbp)
	jmp	.L14
.L15:
	movl	-76(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -76(%rbp)
.L14:
	movl	n(%rip), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L15
	movq	-64(%rbp), %rax
	movq	%rax, %r8
	movl	$0, %ecx
	movl	$0, %edx
	movl	$0, %esi
	movl	$0, %edi
	call	dfs
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	%rbx, %rsp
	movl	$0, %eax
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	A
	.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
	.text
	.globl	min
	.type	min, @function
min:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	-24(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jge	.L2
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jge	.L3
	movl	-28(%rbp), %eax
	movl	%eax, -4(%rbp)
.L3:
	movl	-32(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jge	.L4
	movl	-32(%rbp), %eax
	movl	%eax, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	min, .-min
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movq	%r8, -40(%rbp)
	movl	n(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jne	.L7
	movl	-20(%rbp), %eax
	imull	-24(%rbp), %eax
	imull	-28(%rbp), %eax
	testl	%eax, %eax
	jle	.L7
	movl	A(%rip), %edx
	movl	-20(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, %ecx
	movl	B(%rip), %edx
	movl	-24(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%eax, %ecx
	movl	C(%rip), %edx
	movl	-28(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%ecx, %eax
	subl	$30, %eax
	jmp	.L8
.L7:
	movl	n(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jne	.L9
	movl	$1000000000, %eax
	jmp	.L8
.L9:
	movl	-32(%rbp), %eax
	leal	1(%rax), %ecx
	movq	-40(%rbp), %rdi
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movq	%rdi, %r8
	movl	%eax, %edi
	call	dfs
	movl	%eax, -16(%rbp)
	movl	-32(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-20(%rbp), %eax
	leal	(%rdx,%rax), %edi
	movq	-40(%rbp), %rsi
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	movq	%rsi, %r8
	movl	%eax, %esi
	call	dfs
	addl	$10, %eax
	movl	%eax, -12(%rbp)
	movl	-32(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-24(%rbp), %eax
	leal	(%rdx,%rax), %esi
	movq	-40(%rbp), %rdi
	movl	-28(%rbp), %edx
	movl	-20(%rbp), %eax
	movq	%rdi, %r8
	movl	%eax, %edi
	call	dfs
	addl	$10, %eax
	movl	%eax, -8(%rbp)
	movl	-32(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-28(%rbp), %eax
	addl	%eax, %edx
	movq	-40(%rbp), %rdi
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movq	%rdi, %r8
	movl	%eax, %edi
	call	dfs
	addl	$10, %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %ecx
	movl	-8(%rbp), %edx
	movl	-12(%rbp), %esi
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	min
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	dfs, .-dfs
	.section	.rodata
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	C(%rip), %r8
	leaq	B(%rip), %rax
	movq	%rax, %rcx
	leaq	A(%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	n(%rip), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L11:
	cmpq	%rdx, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L13
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L13:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -76(%rbp)
	jmp	.L14
.L15:
	movl	-76(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -76(%rbp)
.L14:
	movl	n(%rip), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L15
	movq	-64(%rbp), %rax
	movq	%rax, %r8
	movl	$0, %ecx
	movl	$0, %edx
	movl	$0, %esi
	movl	$0, %edi
	call	dfs
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	%rbx, %rsp
	movl	$0, %eax
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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:
