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 <memory.h>
void f(int now,int rest,int list[],int p){
int i;
list[p]=now;
if(rest==0){
for(i=0;i<=p;i++){
if(i>0){
printf(" ");
}
printf("%d",list[i]);
}
puts("");
}
for(i=rest;i>0;i--){
if(i>now){
continue;
}
f(i,rest-i,list,p+1);
}
}
int main(void){
int n,i,list[301];
while(1){
scanf("%d",&n);
if(n==0){
break;
}
memset(list,0,sizeof(list));
for(i=n;i>0;i--){
f(i,n-i,list,0);
}
}
return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	""
	.text
	.globl	f
	.type	f, @function
f:
.LFB0:
	.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)
	movq	%rdx, -32(%rbp)
	movl	%ecx, -36(%rbp)
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rdx)
	cmpl	$0, -24(%rbp)
	jne	.L2
	movl	$0, -4(%rbp)
	jmp	.L3
.L5:
	cmpl	$0, -4(%rbp)
	jle	.L4
	movl	$32, %edi
	call	putchar@PLT
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L3:
	movl	-4(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jle	.L5
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L2:
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L6
.L9:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L10
	movl	-36(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-24(%rbp), %eax
	subl	-4(%rbp), %eax
	movl	%eax, %esi
	movq	-32(%rbp), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	f
	jmp	.L8
.L10:
	nop
.L8:
	subl	$1, -4(%rbp)
.L6:
	cmpl	$0, -4(%rbp)
	jg	.L9
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1232, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L16:
	leaq	-1224(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1224(%rbp), %eax
	testl	%eax, %eax
	je	.L20
	leaq	-1216(%rbp), %rax
	movl	$1204, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	-1224(%rbp), %eax
	movl	%eax, -1220(%rbp)
	jmp	.L14
.L15:
	movl	-1224(%rbp), %eax
	subl	-1220(%rbp), %eax
	movl	%eax, %esi
	leaq	-1216(%rbp), %rdx
	movl	-1220(%rbp), %eax
	movl	$0, %ecx
	movl	%eax, %edi
	call	f
	subl	$1, -1220(%rbp)
.L14:
	cmpl	$0, -1220(%rbp)
	jg	.L15
	jmp	.L16
.L20:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	""
.LC1:
	.string	"%d"
	.text
	.p2align 4
	.globl	f
	.type	f, @function
f:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdx, %r15
	movslq	%ecx, %rdx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$168, %rsp
	.cfi_def_cfa_offset 224
	movl	%edi, (%r15,%rdx,4)
	movl	%ecx, 148(%rsp)
	testl	%esi, %esi
	je	.L2
	jle	.L1
	movl	%esi, %eax
	leal	1(%rcx), %esi
	movslq	%esi, %rdx
	movl	%esi, 152(%rsp)
	leaq	(%r15,%rdx,4), %rsi
	movq	%rsi, 128(%rsp)
	leal	2(%rcx), %esi
	movslq	%esi, %rdx
	movl	%esi, 144(%rsp)
	leaq	(%r15,%rdx,4), %rsi
	movq	%rsi, 136(%rsp)
	leal	3(%rcx), %esi
	movslq	%esi, %rdx
	movl	%esi, 124(%rsp)
	leaq	(%r15,%rdx,4), %rsi
	movq	%rsi, 112(%rsp)
	leal	4(%rcx), %esi
	movslq	%esi, %rdx
	movl	%esi, 108(%rsp)
	leaq	(%r15,%rdx,4), %rsi
	movq	%rsi, 96(%rsp)
	leal	5(%rcx), %esi
	movslq	%esi, %rdx
	movl	%esi, 88(%rsp)
	leaq	(%r15,%rdx,4), %rsi
	movq	%rsi, 72(%rsp)
	leal	6(%rcx), %esi
	movslq	%esi, %rdx
	movl	%esi, 64(%rsp)
	leaq	(%r15,%rdx,4), %rsi
	movq	%rsi, 56(%rsp)
	leal	7(%rcx), %esi
	addl	$8, %ecx
	movslq	%esi, %rdx
	movl	%esi, 44(%rsp)
	leaq	(%r15,%rdx,4), %rsi
	movslq	%ecx, %rdx
	movl	%ecx, 68(%rsp)
	leaq	(%r15,%rdx,4), %rcx
	movq	%rsi, 32(%rsp)
	movq	%rcx, 16(%rsp)
	cmpl	%eax, %edi
	jge	.L64
	xorl	%edx, %edx
	testl	%edi, %edi
	movl	$1, %ecx
	cmovs	%edx, %edi
	movl	%eax, %edx
	subl	%edi, %edx
	cmpl	%edi, %eax
	cmovg	%edx, %ecx
	subl	$1, %edx
	cmpl	$2, %edx
	jbe	.L65
	cmpl	%edi, %eax
	jle	.L65
	movd	%eax, %xmm4
	movl	%ecx, %esi
	movdqa	.LC3(%rip), %xmm3
	xorl	%edx, %edx
	pshufd	$0, %xmm4, %xmm1
	paddd	.LC2(%rip), %xmm1
	shrl	$2, %esi
	pcmpeqd	%xmm2, %xmm2
.L10:
	movdqa	%xmm1, %xmm0
	addl	$1, %edx
	paddd	%xmm3, %xmm1
	paddd	%xmm2, %xmm0
	cmpl	%edx, %esi
	jne	.L10
	movl	%ecx, %esi
	pshufd	$255, %xmm0, %xmm0
	movl	%eax, %edx
	andl	$-4, %esi
	movd	%xmm0, 92(%rsp)
	subl	%esi, %edx
	cmpl	%ecx, %esi
	je	.L13
.L9:
	leal	-1(%rdx), %ecx
	movl	%ecx, 92(%rsp)
	cmpl	%edi, %ecx
	jle	.L13
	leal	-2(%rdx), %ecx
	subl	$3, %edx
	cmpl	%edi, %ecx
	cmovle	%ecx, %edx
	movl	%edx, 92(%rsp)
.L13:
	movl	92(%rsp), %r10d
	testl	%r10d, %r10d
	jle	.L1
.L8:
	subl	92(%rsp), %eax
	movl	%eax, 120(%rsp)
	movl	148(%rsp), %eax
	addl	$9, %eax
	movl	%eax, 156(%rsp)
.L61:
	movl	120(%rsp), %eax
	movq	128(%rsp), %rcx
	movl	92(%rsp), %esi
	movl	%eax, 80(%rsp)
	movl	%esi, (%rcx)
	testl	%eax, %eax
	jne	.L66
	movl	152(%rsp), %r9d
	xorl	%ebp, %ebp
	movl	148(%rsp), %r12d
	leaq	.LC1(%rip), %rbx
	testl	%r9d, %r9d
	jns	.L15
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L122:
	movl	$32, %edi
	addq	$1, %rbp
	call	putchar@PLT
.L15:
	movl	(%r15,%rbp,4), %edx
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	%ebp, %r12d
	jge	.L122
.L17:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
.L16:
	addl	$1, 120(%rsp)
	subl	$1, 92(%rsp)
	jne	.L61
.L1:
	addq	$168, %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
.L2:
	.cfi_restore_state
	movl	148(%rsp), %r11d
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %rbp
	movl	%ecx, %r12d
	testl	%r11d, %r11d
	jns	.L5
.L7:
	addq	$168, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	leaq	.LC0(%rip), %rdi
	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
	jmp	puts@PLT
.L6:
	.cfi_restore_state
	movl	$32, %edi
	call	putchar@PLT
.L5:
	movl	(%r15,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, %r12d
	jge	.L6
	jmp	.L7
.L66:
	movl	$0, 104(%rsp)
.L14:
	movl	80(%rsp), %eax
	cmpl	%eax, 92(%rsp)
	jl	.L19
	movl	104(%rsp), %ecx
	movq	136(%rsp), %rsi
	movl	%ecx, 48(%rsp)
	movl	%eax, (%rsi)
	testl	%ecx, %ecx
	jne	.L68
	movl	144(%rsp), %r8d
	xorl	%ebp, %ebp
	movl	144(%rsp), %r12d
	leaq	.LC1(%rip), %rbx
	testl	%r8d, %r8d
	jns	.L21
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L123:
	movl	$32, %edi
	call	putchar@PLT
.L21:
	movl	(%r15,%rbp,4), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, %r12d
	jge	.L123
.L22:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
.L19:
	addl	$1, 104(%rsp)
	subl	$1, 80(%rsp)
	jne	.L14
	jmp	.L16
.L68:
	movl	$0, 84(%rsp)
	.p2align 4,,10
	.p2align 3
.L20:
	movl	48(%rsp), %eax
	cmpl	%eax, 80(%rsp)
	jl	.L24
	movl	84(%rsp), %ecx
	movq	112(%rsp), %rsi
	movl	%ecx, 28(%rsp)
	movl	%eax, (%rsi)
	testl	%ecx, %ecx
	jne	.L70
	movl	124(%rsp), %edi
	movl	124(%rsp), %r12d
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %rbx
	testl	%edi, %edi
	jns	.L26
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L124:
	movl	$32, %edi
	call	putchar@PLT
.L26:
	movl	(%r15,%rbp,4), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, %r12d
	jge	.L124
.L27:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
.L24:
	addl	$1, 84(%rsp)
	subl	$1, 48(%rsp)
	jne	.L20
	jmp	.L19
.L70:
	movl	$0, 52(%rsp)
	.p2align 4,,10
	.p2align 3
.L25:
	movl	28(%rsp), %eax
	movl	48(%rsp), %ecx
	cmpl	%ecx, %eax
	jg	.L29
	movl	52(%rsp), %ecx
	movq	96(%rsp), %rsi
	movl	%ecx, 12(%rsp)
	movl	%eax, (%rsi)
	testl	%ecx, %ecx
	jne	.L72
	movl	108(%rsp), %esi
	movl	108(%rsp), %r12d
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %rbx
	testl	%esi, %esi
	jns	.L31
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L125:
	movl	$32, %edi
	call	putchar@PLT
.L31:
	movl	(%r15,%rbp,4), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, %r12d
	jge	.L125
.L32:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
.L29:
	addl	$1, 52(%rsp)
	subl	$1, 28(%rsp)
	jne	.L25
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L72:
	movl	$0, 40(%rsp)
	movq	%r15, %r14
	.p2align 4,,10
	.p2align 3
.L30:
	movl	12(%rsp), %eax
	movl	28(%rsp), %ecx
	cmpl	%ecx, %eax
	jg	.L34
	movl	40(%rsp), %ecx
	movq	72(%rsp), %rsi
	movl	%ecx, (%rsp)
	movl	%eax, (%rsi)
	testl	%ecx, %ecx
	jne	.L74
	movl	88(%rsp), %ecx
	movl	88(%rsp), %r12d
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %rbx
	testl	%ecx, %ecx
	jns	.L36
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L126:
	movl	$32, %edi
	call	putchar@PLT
.L36:
	movl	(%r14,%rbp,4), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, %r12d
	jge	.L126
.L37:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
.L34:
	addl	$1, 40(%rsp)
	subl	$1, 12(%rsp)
	jne	.L30
	movq	%r14, %r15
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L74:
	movl	$0, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L35:
	movl	(%rsp), %eax
	movl	12(%rsp), %ecx
	cmpl	%ecx, %eax
	jg	.L39
	movl	24(%rsp), %ecx
	movq	56(%rsp), %rsi
	movl	%ecx, %ebp
	movl	%eax, (%rsi)
	testl	%ecx, %ecx
	jne	.L76
	movl	64(%rsp), %edx
	movl	64(%rsp), %r12d
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %rbx
	testl	%edx, %edx
	jns	.L41
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L127:
	movl	$32, %edi
	call	putchar@PLT
.L41:
	movl	(%r14,%rbp,4), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, %r12d
	jge	.L127
.L42:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
.L39:
	addl	$1, 24(%rsp)
	subl	$1, (%rsp)
	jne	.L35
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L76:
	movl	$0, 8(%rsp)
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L40:
	cmpl	(%rsp), %ebp
	jg	.L44
	movl	8(%rsp), %eax
	movq	32(%rsp), %rcx
	movl	%eax, %ebx
	movl	%ebp, (%rcx)
	testl	%eax, %eax
	jne	.L78
	movl	44(%rsp), %eax
	movl	44(%rsp), %r13d
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jns	.L46
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L128:
	movl	$32, %edi
	call	putchar@PLT
.L46:
	movl	(%r14,%rbx,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, %r13d
	jge	.L128
.L47:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
.L44:
	addl	$1, 8(%rsp)
	subl	$1, %ebp
	jne	.L40
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L78:
	movl	%ebp, 4(%rsp)
	movl	68(%rsp), %r15d
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L45:
	cmpl	4(%rsp), %ebx
	jg	.L49
	movq	16(%rsp), %rax
	movl	%r13d, %ebp
	movl	%ebx, (%rax)
	testl	%r13d, %r13d
	jne	.L50
	xorl	%ebp, %ebp
	testl	%r15d, %r15d
	jns	.L51
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L129:
	movl	$32, %edi
	call	putchar@PLT
.L51:
	movl	(%r14,%rbp,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, %r15d
	jge	.L129
.L52:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
.L49:
	addl	$1, %r13d
	subl	$1, %ebx
	jne	.L45
.L130:
	movl	4(%rsp), %ebp
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L50:
	cmpl	%ebx, %ebp
	jg	.L53
	movl	%r13d, %esi
	movl	156(%rsp), %ecx
	movq	%r14, %rdx
	movl	%ebp, %edi
	subl	%ebp, %esi
	call	f
	.p2align 4,,10
	.p2align 3
.L53:
	subl	$1, %ebp
	jne	.L50
	addl	$1, %r13d
	subl	$1, %ebx
	jne	.L45
	jmp	.L130
.L64:
	movl	%eax, 92(%rsp)
	jmp	.L8
.L65:
	movl	%eax, %edx
	jmp	.L9
	.cfi_endproc
.LFE35:
	.size	f, .-f
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.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
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1256, %rsp
	.cfi_def_cfa_offset 1312
	movq	%fs:40, %rax
	movq	%rax, 1240(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L150:
	movq	8(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %ebp
	testl	%ebp, %ebp
	je	.L132
	leaq	32(%rsp), %r12
	movl	$150, %ecx
	movl	$0, %eax
	movq	%r12, %rdi
	rep stosq
	movl	$0, (%rdi)
	jle	.L150
	movl	%ebp, %r9d
	movl	%ebp, 32(%rsp)
	subl	%ebp, %r9d
	testl	%r9d, %r9d
	je	.L134
	.p2align 4,,10
	.p2align 3
.L165:
	jle	.L136
	cmpl	%ebp, %r9d
	jle	.L153
	movl	%r9d, %ecx
	subl	%ebp, %ecx
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L154
	movd	%r9d, %xmm2
	movl	%ecx, %edx
	xorl	%eax, %eax
	pshufd	$0, %xmm2, %xmm0
	paddd	.LC2(%rip), %xmm0
	shrl	$2, %edx
	.p2align 4,,10
	.p2align 3
.L139:
	addl	$1, %eax
	movdqa	%xmm0, %xmm1
	paddd	.LC3(%rip), %xmm0
	paddd	.LC4(%rip), %xmm1
	cmpl	%eax, %edx
	jne	.L139
	movl	%ecx, %edx
	pshufd	$255, %xmm1, %xmm1
	movl	%r9d, %eax
	andl	$-4, %edx
	movd	%xmm1, %r14d
	subl	%edx, %eax
	cmpl	%edx, %ecx
	je	.L143
.L138:
	leal	-1(%rax), %r14d
	cmpl	%r14d, %ebp
	jge	.L143
	leal	-2(%rax), %r14d
	subl	$3, %eax
	cmpl	%r14d, %ebp
	cmovl	%eax, %r14d
.L137:
	subl	%r14d, %r9d
	movl	%r9d, %r15d
	jmp	.L148
	.p2align 4,,10
	.p2align 3
.L164:
	movl	32(%rsp), %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__printf_chk@PLT
	movl	$32, %edi
	call	putchar@PLT
	movl	36(%rsp), %edx
	movq	%r13, %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	subl	$1, %r14d
	je	.L136
.L148:
	movl	%r14d, 36(%rsp)
	movl	%r15d, %ebx
	testl	%r15d, %r15d
	je	.L164
.L145:
	cmpl	%r14d, %ebx
	jg	.L147
	movl	%r15d, %esi
	movl	$2, %ecx
	movq	%r12, %rdx
	movl	%ebx, %edi
	subl	%ebx, %esi
	call	f
.L147:
	subl	$1, %ebx
	jne	.L145
	addl	$1, %r15d
	subl	$1, %r14d
	jne	.L148
	.p2align 4,,10
	.p2align 3
.L136:
	subl	$1, %ebp
	je	.L150
	movl	28(%rsp), %r9d
	movl	%ebp, 32(%rsp)
	subl	%ebp, %r9d
	testl	%r9d, %r9d
	jne	.L165
.L134:
	movl	%ebp, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L136
	.p2align 4,,10
	.p2align 3
.L153:
	movl	%r9d, %r14d
	jmp	.L137
	.p2align 4,,10
	.p2align 3
.L143:
	testl	%r14d, %r14d
	jle	.L136
	jmp	.L137
.L154:
	movl	%r9d, %eax
	jmp	.L138
.L132:
	movq	1240(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L166
	addq	$1256, %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
.L166:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	0
	.long	-1
	.long	-2
	.long	-3
	.align 16
.LC3:
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.align 16
.LC4:
	.long	-1
	.long	-1
	.long	-1
	.long	-1
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	""
.LC1:
	.string	"%d"
	.text
	.p2align 4
	.globl	f
	.type	f, @function
f:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdx, %r15
	movslq	%ecx, %rdx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$168, %rsp
	.cfi_def_cfa_offset 224
	movl	%edi, (%r15,%rdx,4)
	movl	%ecx, 148(%rsp)
	testl	%esi, %esi
	je	.L2
	jle	.L1
	movl	%esi, %eax
	leal	1(%rcx), %esi
	movslq	%esi, %rdx
	movl	%esi, 152(%rsp)
	leaq	(%r15,%rdx,4), %rsi
	movq	%rsi, 128(%rsp)
	leal	2(%rcx), %esi
	movslq	%esi, %rdx
	movl	%esi, 144(%rsp)
	leaq	(%r15,%rdx,4), %rsi
	movq	%rsi, 136(%rsp)
	leal	3(%rcx), %esi
	movslq	%esi, %rdx
	movl	%esi, 124(%rsp)
	leaq	(%r15,%rdx,4), %rsi
	movq	%rsi, 112(%rsp)
	leal	4(%rcx), %esi
	movslq	%esi, %rdx
	movl	%esi, 108(%rsp)
	leaq	(%r15,%rdx,4), %rsi
	movq	%rsi, 96(%rsp)
	leal	5(%rcx), %esi
	movslq	%esi, %rdx
	movl	%esi, 88(%rsp)
	leaq	(%r15,%rdx,4), %rsi
	movq	%rsi, 72(%rsp)
	leal	6(%rcx), %esi
	movslq	%esi, %rdx
	movl	%esi, 64(%rsp)
	leaq	(%r15,%rdx,4), %rsi
	movq	%rsi, 56(%rsp)
	leal	7(%rcx), %esi
	addl	$8, %ecx
	movslq	%esi, %rdx
	movl	%esi, 44(%rsp)
	leaq	(%r15,%rdx,4), %rsi
	movslq	%ecx, %rdx
	movl	%ecx, 68(%rsp)
	leaq	(%r15,%rdx,4), %rcx
	movq	%rsi, 32(%rsp)
	movq	%rcx, 16(%rsp)
	cmpl	%eax, %edi
	jge	.L64
	xorl	%edx, %edx
	testl	%edi, %edi
	movl	$1, %ecx
	cmovs	%edx, %edi
	movl	%eax, %edx
	subl	%edi, %edx
	cmpl	%edi, %eax
	cmovg	%edx, %ecx
	subl	$1, %edx
	cmpl	$2, %edx
	jbe	.L65
	cmpl	%edi, %eax
	jle	.L65
	movd	%eax, %xmm4
	movl	%ecx, %esi
	movdqa	.LC3(%rip), %xmm3
	xorl	%edx, %edx
	pshufd	$0, %xmm4, %xmm1
	paddd	.LC2(%rip), %xmm1
	shrl	$2, %esi
	pcmpeqd	%xmm2, %xmm2
.L10:
	movdqa	%xmm1, %xmm0
	addl	$1, %edx
	paddd	%xmm3, %xmm1
	paddd	%xmm2, %xmm0
	cmpl	%edx, %esi
	jne	.L10
	movl	%ecx, %esi
	pshufd	$255, %xmm0, %xmm0
	movl	%eax, %edx
	andl	$-4, %esi
	movd	%xmm0, 92(%rsp)
	subl	%esi, %edx
	cmpl	%ecx, %esi
	je	.L13
.L9:
	leal	-1(%rdx), %ecx
	movl	%ecx, 92(%rsp)
	cmpl	%edi, %ecx
	jle	.L13
	leal	-2(%rdx), %ecx
	subl	$3, %edx
	cmpl	%edi, %ecx
	cmovle	%ecx, %edx
	movl	%edx, 92(%rsp)
.L13:
	movl	92(%rsp), %r10d
	testl	%r10d, %r10d
	jle	.L1
.L8:
	subl	92(%rsp), %eax
	movl	%eax, 120(%rsp)
	movl	148(%rsp), %eax
	addl	$9, %eax
	movl	%eax, 156(%rsp)
.L61:
	movl	120(%rsp), %eax
	movq	128(%rsp), %rcx
	movl	92(%rsp), %esi
	movl	%eax, 80(%rsp)
	movl	%esi, (%rcx)
	testl	%eax, %eax
	jne	.L66
	movl	152(%rsp), %r9d
	xorl	%ebp, %ebp
	movl	148(%rsp), %r12d
	leaq	.LC1(%rip), %rbx
	testl	%r9d, %r9d
	jns	.L15
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L122:
	movl	$32, %edi
	addq	$1, %rbp
	call	putchar@PLT
.L15:
	movl	(%r15,%rbp,4), %edx
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	%ebp, %r12d
	jge	.L122
.L17:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
.L16:
	addl	$1, 120(%rsp)
	subl	$1, 92(%rsp)
	jne	.L61
.L1:
	addq	$168, %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
.L2:
	.cfi_restore_state
	movl	148(%rsp), %r11d
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %rbp
	movl	%ecx, %r12d
	testl	%r11d, %r11d
	jns	.L5
.L7:
	addq	$168, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	leaq	.LC0(%rip), %rdi
	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
	jmp	puts@PLT
.L6:
	.cfi_restore_state
	movl	$32, %edi
	call	putchar@PLT
.L5:
	movl	(%r15,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, %r12d
	jge	.L6
	jmp	.L7
.L66:
	movl	$0, 104(%rsp)
.L14:
	movl	80(%rsp), %eax
	cmpl	%eax, 92(%rsp)
	jl	.L19
	movl	104(%rsp), %ecx
	movq	136(%rsp), %rsi
	movl	%ecx, 48(%rsp)
	movl	%eax, (%rsi)
	testl	%ecx, %ecx
	jne	.L68
	movl	144(%rsp), %r8d
	xorl	%ebp, %ebp
	movl	144(%rsp), %r12d
	leaq	.LC1(%rip), %rbx
	testl	%r8d, %r8d
	jns	.L21
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L123:
	movl	$32, %edi
	call	putchar@PLT
.L21:
	movl	(%r15,%rbp,4), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, %r12d
	jge	.L123
.L22:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
.L19:
	addl	$1, 104(%rsp)
	subl	$1, 80(%rsp)
	jne	.L14
	jmp	.L16
.L68:
	movl	$0, 84(%rsp)
	.p2align 4,,10
	.p2align 3
.L20:
	movl	48(%rsp), %eax
	cmpl	%eax, 80(%rsp)
	jl	.L24
	movl	84(%rsp), %ecx
	movq	112(%rsp), %rsi
	movl	%ecx, 28(%rsp)
	movl	%eax, (%rsi)
	testl	%ecx, %ecx
	jne	.L70
	movl	124(%rsp), %edi
	movl	124(%rsp), %r12d
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %rbx
	testl	%edi, %edi
	jns	.L26
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L124:
	movl	$32, %edi
	call	putchar@PLT
.L26:
	movl	(%r15,%rbp,4), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, %r12d
	jge	.L124
.L27:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
.L24:
	addl	$1, 84(%rsp)
	subl	$1, 48(%rsp)
	jne	.L20
	jmp	.L19
.L70:
	movl	$0, 52(%rsp)
	.p2align 4,,10
	.p2align 3
.L25:
	movl	28(%rsp), %eax
	movl	48(%rsp), %ecx
	cmpl	%ecx, %eax
	jg	.L29
	movl	52(%rsp), %ecx
	movq	96(%rsp), %rsi
	movl	%ecx, 12(%rsp)
	movl	%eax, (%rsi)
	testl	%ecx, %ecx
	jne	.L72
	movl	108(%rsp), %esi
	movl	108(%rsp), %r12d
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %rbx
	testl	%esi, %esi
	jns	.L31
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L125:
	movl	$32, %edi
	call	putchar@PLT
.L31:
	movl	(%r15,%rbp,4), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, %r12d
	jge	.L125
.L32:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
.L29:
	addl	$1, 52(%rsp)
	subl	$1, 28(%rsp)
	jne	.L25
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L72:
	movl	$0, 40(%rsp)
	movq	%r15, %r14
	.p2align 4,,10
	.p2align 3
.L30:
	movl	12(%rsp), %eax
	movl	28(%rsp), %ecx
	cmpl	%ecx, %eax
	jg	.L34
	movl	40(%rsp), %ecx
	movq	72(%rsp), %rsi
	movl	%ecx, (%rsp)
	movl	%eax, (%rsi)
	testl	%ecx, %ecx
	jne	.L74
	movl	88(%rsp), %ecx
	movl	88(%rsp), %r12d
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %rbx
	testl	%ecx, %ecx
	jns	.L36
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L126:
	movl	$32, %edi
	call	putchar@PLT
.L36:
	movl	(%r14,%rbp,4), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, %r12d
	jge	.L126
.L37:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
.L34:
	addl	$1, 40(%rsp)
	subl	$1, 12(%rsp)
	jne	.L30
	movq	%r14, %r15
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L74:
	movl	$0, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L35:
	movl	(%rsp), %eax
	movl	12(%rsp), %ecx
	cmpl	%ecx, %eax
	jg	.L39
	movl	24(%rsp), %ecx
	movq	56(%rsp), %rsi
	movl	%ecx, %ebp
	movl	%eax, (%rsi)
	testl	%ecx, %ecx
	jne	.L76
	movl	64(%rsp), %edx
	movl	64(%rsp), %r12d
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %rbx
	testl	%edx, %edx
	jns	.L41
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L127:
	movl	$32, %edi
	call	putchar@PLT
.L41:
	movl	(%r14,%rbp,4), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, %r12d
	jge	.L127
.L42:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
.L39:
	addl	$1, 24(%rsp)
	subl	$1, (%rsp)
	jne	.L35
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L76:
	movl	$0, 8(%rsp)
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L40:
	cmpl	(%rsp), %ebp
	jg	.L44
	movl	8(%rsp), %eax
	movq	32(%rsp), %rcx
	movl	%eax, %ebx
	movl	%ebp, (%rcx)
	testl	%eax, %eax
	jne	.L78
	movl	44(%rsp), %eax
	movl	44(%rsp), %r13d
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jns	.L46
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L128:
	movl	$32, %edi
	call	putchar@PLT
.L46:
	movl	(%r14,%rbx,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, %r13d
	jge	.L128
.L47:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
.L44:
	addl	$1, 8(%rsp)
	subl	$1, %ebp
	jne	.L40
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L78:
	movl	%ebp, 4(%rsp)
	movl	68(%rsp), %r15d
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L45:
	cmpl	4(%rsp), %ebx
	jg	.L49
	movq	16(%rsp), %rax
	movl	%r13d, %ebp
	movl	%ebx, (%rax)
	testl	%r13d, %r13d
	jne	.L50
	xorl	%ebp, %ebp
	testl	%r15d, %r15d
	jns	.L51
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L129:
	movl	$32, %edi
	call	putchar@PLT
.L51:
	movl	(%r14,%rbp,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, %r15d
	jge	.L129
.L52:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
.L49:
	addl	$1, %r13d
	subl	$1, %ebx
	jne	.L45
.L130:
	movl	4(%rsp), %ebp
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L50:
	cmpl	%ebx, %ebp
	jg	.L53
	movl	%r13d, %esi
	movl	156(%rsp), %ecx
	movq	%r14, %rdx
	movl	%ebp, %edi
	subl	%ebp, %esi
	call	f
	.p2align 4,,10
	.p2align 3
.L53:
	subl	$1, %ebp
	jne	.L50
	addl	$1, %r13d
	subl	$1, %ebx
	jne	.L45
	jmp	.L130
.L64:
	movl	%eax, 92(%rsp)
	jmp	.L8
.L65:
	movl	%eax, %edx
	jmp	.L9
	.cfi_endproc
.LFE35:
	.size	f, .-f
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.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
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1256, %rsp
	.cfi_def_cfa_offset 1312
	movq	%fs:40, %rax
	movq	%rax, 1240(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L150:
	movq	8(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %ebp
	testl	%ebp, %ebp
	je	.L132
	leaq	32(%rsp), %r12
	movl	$150, %ecx
	movl	$0, %eax
	movq	%r12, %rdi
	rep stosq
	movl	$0, (%rdi)
	jle	.L150
	movl	%ebp, %r9d
	movl	%ebp, 32(%rsp)
	subl	%ebp, %r9d
	testl	%r9d, %r9d
	je	.L134
	.p2align 4,,10
	.p2align 3
.L165:
	jle	.L136
	cmpl	%ebp, %r9d
	jle	.L153
	movl	%r9d, %ecx
	subl	%ebp, %ecx
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L154
	movd	%r9d, %xmm2
	movl	%ecx, %edx
	xorl	%eax, %eax
	pshufd	$0, %xmm2, %xmm0
	paddd	.LC2(%rip), %xmm0
	shrl	$2, %edx
	.p2align 4,,10
	.p2align 3
.L139:
	addl	$1, %eax
	movdqa	%xmm0, %xmm1
	paddd	.LC3(%rip), %xmm0
	paddd	.LC4(%rip), %xmm1
	cmpl	%eax, %edx
	jne	.L139
	movl	%ecx, %edx
	pshufd	$255, %xmm1, %xmm1
	movl	%r9d, %eax
	andl	$-4, %edx
	movd	%xmm1, %r14d
	subl	%edx, %eax
	cmpl	%edx, %ecx
	je	.L143
.L138:
	leal	-1(%rax), %r14d
	cmpl	%r14d, %ebp
	jge	.L143
	leal	-2(%rax), %r14d
	subl	$3, %eax
	cmpl	%r14d, %ebp
	cmovl	%eax, %r14d
.L137:
	subl	%r14d, %r9d
	movl	%r9d, %r15d
	jmp	.L148
	.p2align 4,,10
	.p2align 3
.L164:
	movl	32(%rsp), %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__printf_chk@PLT
	movl	$32, %edi
	call	putchar@PLT
	movl	36(%rsp), %edx
	movq	%r13, %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	subl	$1, %r14d
	je	.L136
.L148:
	movl	%r14d, 36(%rsp)
	movl	%r15d, %ebx
	testl	%r15d, %r15d
	je	.L164
.L145:
	cmpl	%r14d, %ebx
	jg	.L147
	movl	%r15d, %esi
	movl	$2, %ecx
	movq	%r12, %rdx
	movl	%ebx, %edi
	subl	%ebx, %esi
	call	f
.L147:
	subl	$1, %ebx
	jne	.L145
	addl	$1, %r15d
	subl	$1, %r14d
	jne	.L148
	.p2align 4,,10
	.p2align 3
.L136:
	subl	$1, %ebp
	je	.L150
	movl	28(%rsp), %r9d
	movl	%ebp, 32(%rsp)
	subl	%ebp, %r9d
	testl	%r9d, %r9d
	jne	.L165
.L134:
	movl	%ebp, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L136
	.p2align 4,,10
	.p2align 3
.L153:
	movl	%r9d, %r14d
	jmp	.L137
	.p2align 4,,10
	.p2align 3
.L143:
	testl	%r14d, %r14d
	jle	.L136
	jmp	.L137
.L154:
	movl	%r9d, %eax
	jmp	.L138
.L132:
	movq	1240(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L166
	addq	$1256, %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
.L166:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	0
	.long	-1
	.long	-2
	.long	-3
	.align 16
.LC3:
	.long	-4
	.long	-4
	.long	-4
	.long	-4
	.align 16
.LC4:
	.long	-1
	.long	-1
	.long	-1
	.long	-1
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>
#include <memory.h>
void f(int now,int rest,int list[],int p){
int i;
list[p]=now;
if(rest==0){
for(i=0;i<=p;i++){
if(i>0){
printf(" ");
}
printf("%d",list[i]);
}
puts("");
}
for(i=rest;i>0;i--){
if(i>now){
continue;
}
f(i,rest-i,list,p+1);
}
}
int main(void){
int n,i,list[301];
while(1){
scanf("%d",&n);
if(n==0){
break;
}
memset(list,0,sizeof(list));
for(i=n;i>0;i--){
f(i,n-i,list,0);
}
}
return 0;
}
5
8
0
 5
6
0
 5
7
0
 5
4
0
 5
3
0
 5
0
0
 5
9
0
 5
14
0
 5
1
0
 5
2
0

5
4 1
3 2
3 1 1
2 2 1
2 1 1 1
1 1 1 1 1
8
7 1
6 2
6 1 1
5 3
5 2 1
5 1 1 1
4 4
4 3 1
4 2 2
4 2 1 1
4 1 1 1 1
3 3 2
3 3 1 1
3 2 2 1
3 2 1 1 1
3 1 1 1 1 1
2 2 2 2
2 2 2 1 1
2 2 1 1 1 1
2 1 1 1 1 1 1
1 1 1 1 1 1 1 1
 5
4 1
3 2
3 1 1
2 2 1
2 1 1 1
1 1 1 1 1
6
5 1
4 2
4 1 1
3 3
3 2 1
3 1 1 1
2 2 2
2 2 1 1
2 1 1 1 1
1 1 1 1 1 1
 5
4 1
3 2
3 1 1
2 2 1
2 1 1 1
1 1 1 1 1
7
6 1
5 2
5 1 1
4 3
4 2 1
4 1 1 1
3 3 1
3 2 2
3 2 1 1
3 1 1 1 1
2 2 2 1
2 2 1 1 1
2 1 1 1 1 1
1 1 1 1 1 1 1
 5
4 1
3 2
3 1 1
2 2 1
2 1 1 1
1 1 1 1 1
4
3 1
2 2
2 1 1
1 1 1 1
 5
4 1
3 2
3 1 1
2 2 1
2 1 1 1
1 1 1 1 1
3
2 1
1 1 1
 5
4 1
3 2
3 1 1
2 2 1
2 1 1 1
1 1 1 1 1
 5
4 1
3 2
3 1 1
2 2 1
2 1 1 1
1 1 1 1 1
9
8 1
7 2
7 1 1
6 3
6 2 1
6 1 1 1
5 4
5 3 1
5 2 2
5 2 1 1
5 1 1 1 1
4 4 1
4 3 2
4 3 1 1
4 2 2 1
4 2 1 1 1
4 1 1 1 1 1
3 3 3
3 3 2 1
3 3 1 1 1
3 2 2 2
3 2 2 1 1
3 2 1 1 1 1
3 1 1 1 1 1 1
2 2 2 2 1
2 2 2 1 1 1
2 2 1 1 1 1 1
2 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
 5
4 1
3 2
3 1 1
2 2 1
2 1 1 1
1 1 1 1 1
14
13 1
12 2
12 1 1
11 3
11 2 1
11 1 1 1
10 4
10 3 1
10 2 2
10 2 1 1
10 1 1 1 1
9 5
9 4 1
9 3 2
9 3 1 1
9 2 2 1
9 2 1 1 1
9 1 1 1 1 1
8 6
8 5 1
8 4 2
8 4 1 1
8 3 3
8 3 2 1
8 3 1 1 1
8 2 2 2
8 2 2 1 1
8 2 1 1 1 1
8 1 1 1 1 1 1
7 7
7 6 1
7 5 2
7 5 1 1
7 4 3
7 4 2 1
7 4 1 1 1
7 3 3 1
7 3 2 2
7 3 2 1 1
7 3 1 1 1 1
7 2 2 2 1
7 2 2 1 1 1
7 2 1 1 1 1 1
7 1 1 1 1 1 1 1
6 6 2
6 6 1 1
6 5 3
6 5 2 1
6 5 1 1 1
6 4 4
6 4 3 1
6 4 2 2
6 4 2 1 1
6 4 1 1 1 1
6 3 3 2
6 3 3 1 1
6 3 2 2 1
6 3 2 1 1 1
6 3 1 1 1 1 1
6 2 2 2 2
6 2 2 2 1 1
6 2 2 1 1 1 1
6 2 1 1 1 1 1 1
6 1 1 1 1 1 1 1 1
5 5 4
5 5 3 1
5 5 2 2
5 5 2 1 1
5 5 1 1 1 1
5 4 4 1
5 4 3 2
5 4 3 1 1
5 4 2 2 1
5 4 2 1 1 1
5 4 1 1 1 1 1
5 3 3 3
5 3 3 2 1
5 3 3 1 1 1
5 3 2 2 2
5 3 2 2 1 1
5 3 2 1 1 1 1
5 3 1 1 1 1 1 1
5 2 2 2 2 1
5 2 2 2 1 1 1
5 2 2 1 1 1 1 1
5 2 1 1 1 1 1 1 1
5 1 1 1 1 1 1 1 1 1
4 4 4 2
4 4 4 1 1
4 4 3 3
4 4 3 2 1
4 4 3 1 1 1
4 4 2 2 2
4 4 2 2 1 1
4 4 2 1 1 1 1
4 4 1 1 1 1 1 1
4 3 3 3 1
4 3 3 2 2
4 3 3 2 1 1
4 3 3 1 1 1 1
4 3 2 2 2 1
4 3 2 2 1 1 1
4 3 2 1 1 1 1 1
4 3 1 1 1 1 1 1 1
4 2 2 2 2 2
4 2 2 2 2 1 1
4 2 2 2 1 1 1 1
4 2 2 1 1 1 1 1 1
4 2 1 1 1 1 1 1 1 1
4 1 1 1 1 1 1 1 1 1 1
3 3 3 3 2
3 3 3 3 1 1
3 3 3 2 2 1
3 3 3 2 1 1 1
3 3 3 1 1 1 1 1
3 3 2 2 2 2
3 3 2 2 2 1 1
3 3 2 2 1 1 1 1
3 3 2 1 1 1 1 1 1
3 3 1 1 1 1 1 1 1 1
3 2 2 2 2 2 1
3 2 2 2 2 1 1 1
3 2 2 2 1 1 1 1 1
3 2 2 1 1 1 1 1 1 1
3 2 1 1 1 1 1 1 1 1 1
3 1 1 1 1 1 1 1 1 1 1 1
2 2 2 2 2 2 2
2 2 2 2 2 2 1 1
2 2 2 2 2 1 1 1 1
2 2 2 2 1 1 1 1 1 1
2 2 2 1 1 1 1 1 1 1 1
2 2 1 1 1 1 1 1 1 1 1 1
2 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1
 5
4 1
3 2
3 1 1
2 2 1
2 1 1 1
1 1 1 1 1
1
 5
4 1
3 2
3 1 1
2 2 1
2 1 1 1
1 1 1 1 1
2
1 1

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

```c
#include <stdio.h>
#include <memory.h>
void f(int now,int rest,int list[],int p){
int i;
list[p]=now;
if(rest==0){
for(i=0;i<=p;i++){
if(i>0){
printf(" ");
}
printf("%d",list[i]);
}
puts("");
}
for(i=rest;i>0;i--){
if(i>now){
continue;
}
f(i,rest-i,list,p+1);
}
}
int main(void){
int n,i,list[301];
while(1){
scanf("%d",&n);
if(n==0){
break;
}
memset(list,0,sizeof(list));
for(i=n;i>0;i--){
f(i,n-i,list,0);
}
}
return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	""
	.text
	.globl	f
	.type	f, @function
f:
.LFB0:
	.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)
	movq	%rdx, -32(%rbp)
	movl	%ecx, -36(%rbp)
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rdx)
	cmpl	$0, -24(%rbp)
	jne	.L2
	movl	$0, -4(%rbp)
	jmp	.L3
.L5:
	cmpl	$0, -4(%rbp)
	jle	.L4
	movl	$32, %edi
	call	putchar@PLT
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L3:
	movl	-4(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jle	.L5
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L2:
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L6
.L9:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L10
	movl	-36(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-24(%rbp), %eax
	subl	-4(%rbp), %eax
	movl	%eax, %esi
	movq	-32(%rbp), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	f
	jmp	.L8
.L10:
	nop
.L8:
	subl	$1, -4(%rbp)
.L6:
	cmpl	$0, -4(%rbp)
	jg	.L9
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1232, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L16:
	leaq	-1224(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1224(%rbp), %eax
	testl	%eax, %eax
	je	.L20
	leaq	-1216(%rbp), %rax
	movl	$1204, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	-1224(%rbp), %eax
	movl	%eax, -1220(%rbp)
	jmp	.L14
.L15:
	movl	-1224(%rbp), %eax
	subl	-1220(%rbp), %eax
	movl	%eax, %esi
	leaq	-1216(%rbp), %rdx
	movl	-1220(%rbp), %eax
	movl	$0, %ecx
	movl	%eax, %edi
	call	f
	subl	$1, -1220(%rbp)
.L14:
	cmpl	$0, -1220(%rbp)
	jg	.L15
	jmp	.L16
.L20:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	""
	.text
	.globl	f
	.type	f, @function
f:
.LFB0:
	.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)
	movq	%rdx, -32(%rbp)
	movl	%ecx, -36(%rbp)
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rdx)
	cmpl	$0, -24(%rbp)
	jne	.L2
	movl	$0, -4(%rbp)
	jmp	.L3
.L5:
	cmpl	$0, -4(%rbp)
	jle	.L4
	movl	$32, %edi
	call	putchar@PLT
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L3:
	movl	-4(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jle	.L5
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L2:
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L6
.L9:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L10
	movl	-36(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-24(%rbp), %eax
	subl	-4(%rbp), %eax
	movl	%eax, %esi
	movq	-32(%rbp), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	f
	jmp	.L8
.L10:
	nop
.L8:
	subl	$1, -4(%rbp)
.L6:
	cmpl	$0, -4(%rbp)
	jg	.L9
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1232, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L16:
	leaq	-1224(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1224(%rbp), %eax
	testl	%eax, %eax
	je	.L20
	leaq	-1216(%rbp), %rax
	movl	$1204, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	-1224(%rbp), %eax
	movl	%eax, -1220(%rbp)
	jmp	.L14
.L15:
	movl	-1224(%rbp), %eax
	subl	-1220(%rbp), %eax
	movl	%eax, %esi
	leaq	-1216(%rbp), %rdx
	movl	-1220(%rbp), %eax
	movl	$0, %ecx
	movl	%eax, %edi
	call	f
	subl	$1, -1220(%rbp)
.L14:
	cmpl	$0, -1220(%rbp)
	jg	.L15
	jmp	.L16
.L20:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
