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 min(x, y) ((x) < (y) ? (x) : (y))
int nums[40];

void dfs(int x, int y, int z){
  int i;
  if(x == 0){
    int first = 0;
    for(i = 0;i < z;i++){
      if(first == 1)putchar(' ');
      printf("%d", nums[i]);
      first = 1;
    }
    puts("");
    return ;
  }
  for(i = y; i >= 1;i--){
    nums[z] = i;
    dfs(x - i, min(i, x - i), z + 1);
  }
}

int main(){
  while(1){
    int n;
    scanf("%d", &n);
    if(n == 0)return 0;
    dfs(n, n, 0);
  }
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	nums
	.bss
	.align 32
	.type	nums, @object
	.size	nums, 160
nums:
	.zero	160
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	""
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB0:
	.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	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	cmpl	$0, -20(%rbp)
	jne	.L2
	movl	$0, -4(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L3
.L5:
	cmpl	$1, -4(%rbp)
	jne	.L4
	movl	$32, %edi
	call	putchar@PLT
.L4:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nums(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$1, -4(%rbp)
	addl	$1, -8(%rbp)
.L3:
	movl	-8(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L5
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L1
.L2:
	movl	-24(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L7
.L8:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	nums(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-28(%rbp), %eax
	leal	1(%rax), %esi
	movl	-20(%rbp), %eax
	subl	-8(%rbp), %eax
	movl	%eax, %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	subl	-8(%rbp), %eax
	movl	%esi, %edx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	dfs
	subl	$1, -8(%rbp)
.L7:
	cmpl	$0, -8(%rbp)
	jg	.L8
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dfs, .-dfs
	.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	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L12:
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	testl	%eax, %eax
	jne	.L10
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	jmp	.L14
.L10:
	movl	-12(%rbp), %ecx
	movl	-12(%rbp), %eax
	movl	$0, %edx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	dfs
	jmp	.L12
.L14:
	call	__stack_chk_fail@PLT
.L13:
	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	"%d"
.LC1:
	.string	""
	.text
	.p2align 4
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%edx, %eax
	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	$232, %rsp
	.cfi_def_cfa_offset 288
	movl	%esi, 168(%rsp)
	testl	%edi, %edi
	je	.L2
	testl	%esi, %esi
	jle	.L1
	leal	1(%rdx), %esi
	leal	3(%rdx), %ebx
	movl	%edi, %ecx
	subl	168(%rsp), %ecx
	leal	2(%rdx), %edi
	leal	4(%rdx), %r8d
	movl	%ecx, 188(%rsp)
	leal	5(%rdx), %r9d
	leal	6(%rdx), %r10d
	movl	%esi, 172(%rsp)
	leal	7(%rdx), %r11d
	leal	8(%rdx), %edx
	movl	%edi, 184(%rsp)
	leaq	nums(%rip), %r14
	movl	%edx, 8(%rsp)
	movl	%r11d, %ecx
	leaq	4(%r14), %rdx
	movl	%ebx, 144(%rsp)
	leaq	(%rdx,%rcx,4), %rcx
	movl	%r8d, 120(%rsp)
	movq	%rcx, 72(%rsp)
	movl	%r10d, %ecx
	leaq	(%rdx,%rcx,4), %rcx
	movl	%r9d, 92(%rsp)
	movq	%rcx, 40(%rsp)
	movl	%r9d, %ecx
	leaq	(%rdx,%rcx,4), %rcx
	movl	%r10d, 60(%rsp)
	movq	%rcx, 104(%rsp)
	movl	%r8d, %ecx
	leaq	(%rdx,%rcx,4), %rcx
	movl	%r11d, 24(%rsp)
	movq	%rcx, 128(%rsp)
	movl	%ebx, %ecx
	leaq	(%rdx,%rcx,4), %rcx
	movq	%rcx, 160(%rsp)
	movl	%edi, %ecx
	leaq	(%rdx,%rcx,4), %rcx
	movq	%rcx, 200(%rsp)
	movl	%esi, %ecx
	leaq	(%rdx,%rcx,4), %rdx
	movq	%rdx, 208(%rsp)
	movl	%eax, %edx
	leaq	(%r14,%rdx,4), %rdx
	movq	%rdx, 176(%rsp)
	movslq	%eax, %rdx
	addl	$9, %eax
	movq	%rdx, 216(%rsp)
	movl	%eax, 88(%rsp)
.L72:
	movq	216(%rsp), %rdx
	movl	168(%rsp), %eax
	movl	%eax, (%r14,%rdx,4)
	movl	188(%rsp), %edx
	testl	%edx, %edx
	je	.L8
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	subl	%eax, %edx
	movl	%eax, 140(%rsp)
	movl	%edx, 148(%rsp)
	movslq	172(%rsp), %rdx
	movq	%rdx, 192(%rsp)
	testl	%eax, %eax
	jle	.L10
.L70:
	movq	192(%rsp), %rsi
	movl	140(%rsp), %eax
	movl	148(%rsp), %ecx
	movl	%eax, (%r14,%rsi,4)
	testl	%ecx, %ecx
	je	.L14
	cmpl	%eax, %ecx
	movslq	184(%rsp), %rsi
	cmovle	%ecx, %eax
	movq	%rsi, 152(%rsp)
	subl	%eax, %ecx
	movl	%eax, 124(%rsp)
	movl	%ecx, 136(%rsp)
	testl	%eax, %eax
	jle	.L16
.L68:
	movq	152(%rsp), %rsi
	movl	124(%rsp), %eax
	movl	136(%rsp), %edx
	movl	%eax, (%r14,%rsi,4)
	testl	%edx, %edx
	je	.L20
	cmpl	%eax, %edx
	movslq	144(%rsp), %rsi
	cmovle	%edx, %eax
	movq	%rsi, 112(%rsp)
	subl	%eax, %edx
	movl	%eax, 96(%rsp)
	movl	%edx, 100(%rsp)
	testl	%eax, %eax
	jle	.L22
.L66:
	movq	112(%rsp), %rcx
	movl	96(%rsp), %eax
	movl	%eax, (%r14,%rcx,4)
	movl	100(%rsp), %ecx
	testl	%ecx, %ecx
	je	.L26
	cmpl	%eax, %ecx
	movslq	120(%rsp), %rsi
	cmovle	%ecx, %eax
	movq	%rsi, 80(%rsp)
	subl	%eax, %ecx
	movl	%eax, 64(%rsp)
	movl	%ecx, 68(%rsp)
	testl	%eax, %eax
	jle	.L28
.L64:
	movq	80(%rsp), %rcx
	movl	64(%rsp), %eax
	movl	68(%rsp), %edx
	movl	%eax, (%r14,%rcx,4)
	testl	%edx, %edx
	je	.L32
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	subl	%eax, %edx
	movl	%eax, 28(%rsp)
	movl	%edx, 56(%rsp)
	movslq	92(%rsp), %rdx
	movq	%rdx, 48(%rsp)
	testl	%eax, %eax
	jle	.L34
.L62:
	movq	48(%rsp), %rax
	movl	28(%rsp), %ecx
	movl	%ecx, (%r14,%rax,4)
	movl	56(%rsp), %eax
	testl	%eax, %eax
	je	.L38
	cmpl	%ecx, %eax
	movl	%ecx, %ebx
	leaq	.LC1(%rip), %r15
	cmovle	%eax, %ebx
	subl	%ebx, %eax
	movl	%eax, %ebp
	movslq	60(%rsp), %rax
	movq	%rax, (%rsp)
	testl	%ebx, %ebx
	jle	.L40
.L60:
	movq	(%rsp), %rax
	movl	%ebx, (%r14,%rax,4)
	testl	%ebp, %ebp
	je	.L44
	movslq	24(%rsp), %rax
	cmpl	%ebx, %ebp
	movl	%ebx, %r13d
	movl	%ebp, %r12d
	cmovle	%ebp, %r13d
	movq	%rax, 32(%rsp)
	movslq	8(%rsp), %rax
	subl	%r13d, %r12d
	movq	%rax, 16(%rsp)
	testl	%r13d, %r13d
	jle	.L46
	movl	%ebx, 12(%rsp)
.L58:
	movq	32(%rsp), %rax
	movl	%r13d, (%r14,%rax,4)
	testl	%r12d, %r12d
	je	.L50
	cmpl	%r13d, %r12d
	movl	%r13d, %ebx
	cmovle	%r12d, %ebx
	testl	%ebx, %ebx
	jle	.L52
.L56:
	movl	%r12d, %edi
	movq	16(%rsp), %rax
	movl	88(%rsp), %edx
	subl	%ebx, %edi
	cmpl	%edi, %ebx
	movl	%edi, %esi
	movl	%ebx, (%r14,%rax,4)
	cmovle	%ebx, %esi
	call	dfs
	subl	$1, %ebx
	jne	.L56
.L52:
	addl	$1, %r12d
	subl	$1, %r13d
	jne	.L58
.L120:
	movl	12(%rsp), %ebx
.L46:
	addl	$1, %ebp
	subl	$1, %ebx
	jne	.L60
.L40:
	addl	$1, 56(%rsp)
	subl	$1, 28(%rsp)
	jne	.L62
.L34:
	addl	$1, 68(%rsp)
	subl	$1, 64(%rsp)
	jne	.L64
.L28:
	addl	$1, 100(%rsp)
	subl	$1, 96(%rsp)
	jne	.L66
.L22:
	addl	$1, 136(%rsp)
	subl	$1, 124(%rsp)
	jne	.L68
.L16:
	addl	$1, 148(%rsp)
	subl	$1, 140(%rsp)
	jne	.L70
.L10:
	addl	$1, 188(%rsp)
	subl	$1, 168(%rsp)
	jne	.L72
.L1:
	addq	$232, %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
.L50:
	.cfi_restore_state
	movl	8(%rsp), %eax
	movq	%r14, %rbx
	testl	%eax, %eax
	jle	.L55
.L54:
	movl	(%rbx), %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	72(%rsp), %rbx
	je	.L55
	movq	stdout(%rip), %rsi
	movl	$32, %edi
	call	putc@PLT
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L55:
	movq	%r15, %rdi
	addl	$1, %r12d
	call	puts@PLT
	subl	$1, %r13d
	jne	.L58
	jmp	.L120
	.p2align 4,,10
	.p2align 3
.L44:
	movl	24(%rsp), %edx
	movq	%r14, %r12
	testl	%edx, %edx
	jle	.L49
.L48:
	movl	(%r12), %edx
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %r12
	leaq	.LC0(%rip), %rsi
	call	__printf_chk@PLT
	cmpq	40(%rsp), %r12
	je	.L49
	movq	stdout(%rip), %rsi
	movl	$32, %edi
	call	putc@PLT
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L49:
	movq	%r15, %rdi
	call	puts@PLT
	jmp	.L46
	.p2align 4,,10
	.p2align 3
.L38:
	movl	60(%rsp), %ecx
	movq	%r14, %rbx
	testl	%ecx, %ecx
	jle	.L43
.L42:
	movl	(%rbx), %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	104(%rsp), %rbx
	je	.L43
	movq	stdout(%rip), %rsi
	movl	$32, %edi
	call	putc@PLT
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L43:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	addl	$1, 56(%rsp)
	subl	$1, 28(%rsp)
	jne	.L62
	jmp	.L34
.L32:
	movl	92(%rsp), %esi
	movq	128(%rsp), %r12
	movq	%r14, %rbp
	leaq	.LC0(%rip), %rbx
	testl	%esi, %esi
	jle	.L37
.L36:
	movl	0(%rbp), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__printf_chk@PLT
	cmpq	%rbp, %r12
	je	.L37
	movq	stdout(%rip), %rsi
	movl	$32, %edi
	call	putc@PLT
	jmp	.L36
.L37:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	addl	$1, 68(%rsp)
	subl	$1, 64(%rsp)
	jne	.L64
	jmp	.L28
.L26:
	movl	120(%rsp), %edi
	movq	160(%rsp), %r12
	movq	%r14, %rbp
	leaq	.LC0(%rip), %rbx
	testl	%edi, %edi
	jle	.L31
.L30:
	movl	0(%rbp), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__printf_chk@PLT
	cmpq	%rbp, %r12
	je	.L31
	movq	stdout(%rip), %rsi
	movl	$32, %edi
	call	putc@PLT
	jmp	.L30
.L31:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	addl	$1, 100(%rsp)
	subl	$1, 96(%rsp)
	jne	.L66
	jmp	.L22
.L20:
	movl	144(%rsp), %r8d
	movq	200(%rsp), %r12
	movq	%r14, %rbp
	leaq	.LC0(%rip), %rbx
	testl	%r8d, %r8d
	jle	.L25
.L24:
	movl	0(%rbp), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__printf_chk@PLT
	cmpq	%rbp, %r12
	je	.L25
	movq	stdout(%rip), %rsi
	movl	$32, %edi
	call	putc@PLT
	jmp	.L24
.L25:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	addl	$1, 136(%rsp)
	subl	$1, 124(%rsp)
	jne	.L68
	jmp	.L16
.L14:
	movl	184(%rsp), %r9d
	movq	208(%rsp), %r12
	movq	%r14, %rbp
	leaq	.LC0(%rip), %rbx
	testl	%r9d, %r9d
	jle	.L19
.L18:
	movl	0(%rbp), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__printf_chk@PLT
	cmpq	%rbp, %r12
	je	.L19
	movq	stdout(%rip), %rsi
	movl	$32, %edi
	call	putc@PLT
	jmp	.L18
.L19:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L16
.L8:
	movl	172(%rsp), %r10d
	movq	%r14, %rbp
	leaq	.LC0(%rip), %rbx
	testl	%r10d, %r10d
	jle	.L13
.L12:
	movl	0(%rbp), %edx
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpq	%rbp, 176(%rsp)
	je	.L13
	movq	stdout(%rip), %rsi
	movl	$32, %edi
	addq	$4, %rbp
	call	putc@PLT
	jmp	.L12
.L13:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L2:
	testl	%edx, %edx
	jle	.L6
	leaq	nums(%rip), %rbx
	leal	-1(%rdx), %edx
	leaq	4(%rbx), %rax
	leaq	.LC0(%rip), %rbp
	leaq	(%rax,%rdx,4), %r12
.L7:
	movl	(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%rbx, %r12
	je	.L6
	movq	stdout(%rip), %rsi
	movl	$32, %edi
	call	putc@PLT
	jmp	.L7
.L6:
	addq	$232, %rsp
	.cfi_def_cfa_offset 56
	leaq	.LC1(%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
	.cfi_endproc
.LFE23:
	.size	dfs, .-dfs
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.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
	leaq	.LC0(%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	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L128:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebp
	testl	%ebp, %ebp
	je	.L122
	movl	$0, %r15d
	leaq	nums(%rip), %r12
	jle	.L128
	movl	%ebp, (%r12)
	testl	%r15d, %r15d
	je	.L125
.L137:
	cmpl	%ebp, %r15d
	movl	%ebp, %ebx
	cmovle	%r15d, %ebx
.L126:
	movl	%r15d, %edi
	movl	%ebx, %esi
	movl	$2, %edx
	movl	%ebx, 4+nums(%rip)
	subl	%ebx, %edi
	cmpl	%ebx, %edi
	cmovle	%edi, %esi
	call	dfs
	subl	$1, %ebx
	jne	.L126
	addl	$1, %r15d
	subl	$1, %ebp
	je	.L128
.L136:
	movl	%ebp, (%r12)
	testl	%r15d, %r15d
	jne	.L137
.L125:
	movl	%ebp, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC1(%rip), %rdi
	addl	$1, %r15d
	call	puts@PLT
	subl	$1, %ebp
	jne	.L136
	jmp	.L128
	.p2align 4,,10
	.p2align 3
.L122:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L138
	addq	$24, %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
.L138:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	nums
	.bss
	.align 32
	.type	nums, @object
	.size	nums, 160
nums:
	.zero	160
	.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	"%d"
.LC1:
	.string	""
	.text
	.p2align 4
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%edx, %eax
	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	$232, %rsp
	.cfi_def_cfa_offset 288
	movl	%esi, 168(%rsp)
	testl	%edi, %edi
	je	.L2
	testl	%esi, %esi
	jle	.L1
	leal	1(%rdx), %esi
	leal	3(%rdx), %ebx
	movl	%edi, %ecx
	subl	168(%rsp), %ecx
	leal	2(%rdx), %edi
	leal	4(%rdx), %r8d
	movl	%ecx, 188(%rsp)
	leal	5(%rdx), %r9d
	leal	6(%rdx), %r10d
	movl	%esi, 172(%rsp)
	leal	7(%rdx), %r11d
	leal	8(%rdx), %edx
	movl	%edi, 184(%rsp)
	leaq	nums(%rip), %r14
	movl	%edx, 8(%rsp)
	movl	%r11d, %ecx
	leaq	4(%r14), %rdx
	movl	%ebx, 144(%rsp)
	leaq	(%rdx,%rcx,4), %rcx
	movl	%r8d, 120(%rsp)
	movq	%rcx, 72(%rsp)
	movl	%r10d, %ecx
	leaq	(%rdx,%rcx,4), %rcx
	movl	%r9d, 92(%rsp)
	movq	%rcx, 40(%rsp)
	movl	%r9d, %ecx
	leaq	(%rdx,%rcx,4), %rcx
	movl	%r10d, 60(%rsp)
	movq	%rcx, 104(%rsp)
	movl	%r8d, %ecx
	leaq	(%rdx,%rcx,4), %rcx
	movl	%r11d, 24(%rsp)
	movq	%rcx, 128(%rsp)
	movl	%ebx, %ecx
	leaq	(%rdx,%rcx,4), %rcx
	movq	%rcx, 160(%rsp)
	movl	%edi, %ecx
	leaq	(%rdx,%rcx,4), %rcx
	movq	%rcx, 200(%rsp)
	movl	%esi, %ecx
	leaq	(%rdx,%rcx,4), %rdx
	movq	%rdx, 208(%rsp)
	movl	%eax, %edx
	leaq	(%r14,%rdx,4), %rdx
	movq	%rdx, 176(%rsp)
	movslq	%eax, %rdx
	addl	$9, %eax
	movq	%rdx, 216(%rsp)
	movl	%eax, 88(%rsp)
.L72:
	movq	216(%rsp), %rdx
	movl	168(%rsp), %eax
	movl	%eax, (%r14,%rdx,4)
	movl	188(%rsp), %edx
	testl	%edx, %edx
	je	.L8
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	subl	%eax, %edx
	movl	%eax, 140(%rsp)
	movl	%edx, 148(%rsp)
	movslq	172(%rsp), %rdx
	movq	%rdx, 192(%rsp)
	testl	%eax, %eax
	jle	.L10
.L70:
	movq	192(%rsp), %rsi
	movl	140(%rsp), %eax
	movl	148(%rsp), %ecx
	movl	%eax, (%r14,%rsi,4)
	testl	%ecx, %ecx
	je	.L14
	cmpl	%eax, %ecx
	movslq	184(%rsp), %rsi
	cmovle	%ecx, %eax
	movq	%rsi, 152(%rsp)
	subl	%eax, %ecx
	movl	%eax, 124(%rsp)
	movl	%ecx, 136(%rsp)
	testl	%eax, %eax
	jle	.L16
.L68:
	movq	152(%rsp), %rsi
	movl	124(%rsp), %eax
	movl	136(%rsp), %edx
	movl	%eax, (%r14,%rsi,4)
	testl	%edx, %edx
	je	.L20
	cmpl	%eax, %edx
	movslq	144(%rsp), %rsi
	cmovle	%edx, %eax
	movq	%rsi, 112(%rsp)
	subl	%eax, %edx
	movl	%eax, 96(%rsp)
	movl	%edx, 100(%rsp)
	testl	%eax, %eax
	jle	.L22
.L66:
	movq	112(%rsp), %rcx
	movl	96(%rsp), %eax
	movl	%eax, (%r14,%rcx,4)
	movl	100(%rsp), %ecx
	testl	%ecx, %ecx
	je	.L26
	cmpl	%eax, %ecx
	movslq	120(%rsp), %rsi
	cmovle	%ecx, %eax
	movq	%rsi, 80(%rsp)
	subl	%eax, %ecx
	movl	%eax, 64(%rsp)
	movl	%ecx, 68(%rsp)
	testl	%eax, %eax
	jle	.L28
.L64:
	movq	80(%rsp), %rcx
	movl	64(%rsp), %eax
	movl	68(%rsp), %edx
	movl	%eax, (%r14,%rcx,4)
	testl	%edx, %edx
	je	.L32
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	subl	%eax, %edx
	movl	%eax, 28(%rsp)
	movl	%edx, 56(%rsp)
	movslq	92(%rsp), %rdx
	movq	%rdx, 48(%rsp)
	testl	%eax, %eax
	jle	.L34
.L62:
	movq	48(%rsp), %rax
	movl	28(%rsp), %ecx
	movl	%ecx, (%r14,%rax,4)
	movl	56(%rsp), %eax
	testl	%eax, %eax
	je	.L38
	cmpl	%ecx, %eax
	movl	%ecx, %ebx
	leaq	.LC1(%rip), %r15
	cmovle	%eax, %ebx
	subl	%ebx, %eax
	movl	%eax, %ebp
	movslq	60(%rsp), %rax
	movq	%rax, (%rsp)
	testl	%ebx, %ebx
	jle	.L40
.L60:
	movq	(%rsp), %rax
	movl	%ebx, (%r14,%rax,4)
	testl	%ebp, %ebp
	je	.L44
	movslq	24(%rsp), %rax
	cmpl	%ebx, %ebp
	movl	%ebx, %r13d
	movl	%ebp, %r12d
	cmovle	%ebp, %r13d
	movq	%rax, 32(%rsp)
	movslq	8(%rsp), %rax
	subl	%r13d, %r12d
	movq	%rax, 16(%rsp)
	testl	%r13d, %r13d
	jle	.L46
	movl	%ebx, 12(%rsp)
.L58:
	movq	32(%rsp), %rax
	movl	%r13d, (%r14,%rax,4)
	testl	%r12d, %r12d
	je	.L50
	cmpl	%r13d, %r12d
	movl	%r13d, %ebx
	cmovle	%r12d, %ebx
	testl	%ebx, %ebx
	jle	.L52
.L56:
	movl	%r12d, %edi
	movq	16(%rsp), %rax
	movl	88(%rsp), %edx
	subl	%ebx, %edi
	cmpl	%edi, %ebx
	movl	%edi, %esi
	movl	%ebx, (%r14,%rax,4)
	cmovle	%ebx, %esi
	call	dfs
	subl	$1, %ebx
	jne	.L56
.L52:
	addl	$1, %r12d
	subl	$1, %r13d
	jne	.L58
.L120:
	movl	12(%rsp), %ebx
.L46:
	addl	$1, %ebp
	subl	$1, %ebx
	jne	.L60
.L40:
	addl	$1, 56(%rsp)
	subl	$1, 28(%rsp)
	jne	.L62
.L34:
	addl	$1, 68(%rsp)
	subl	$1, 64(%rsp)
	jne	.L64
.L28:
	addl	$1, 100(%rsp)
	subl	$1, 96(%rsp)
	jne	.L66
.L22:
	addl	$1, 136(%rsp)
	subl	$1, 124(%rsp)
	jne	.L68
.L16:
	addl	$1, 148(%rsp)
	subl	$1, 140(%rsp)
	jne	.L70
.L10:
	addl	$1, 188(%rsp)
	subl	$1, 168(%rsp)
	jne	.L72
.L1:
	addq	$232, %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
.L50:
	.cfi_restore_state
	movl	8(%rsp), %eax
	movq	%r14, %rbx
	testl	%eax, %eax
	jle	.L55
.L54:
	movl	(%rbx), %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	72(%rsp), %rbx
	je	.L55
	movq	stdout(%rip), %rsi
	movl	$32, %edi
	call	putc@PLT
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L55:
	movq	%r15, %rdi
	addl	$1, %r12d
	call	puts@PLT
	subl	$1, %r13d
	jne	.L58
	jmp	.L120
	.p2align 4,,10
	.p2align 3
.L44:
	movl	24(%rsp), %edx
	movq	%r14, %r12
	testl	%edx, %edx
	jle	.L49
.L48:
	movl	(%r12), %edx
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %r12
	leaq	.LC0(%rip), %rsi
	call	__printf_chk@PLT
	cmpq	40(%rsp), %r12
	je	.L49
	movq	stdout(%rip), %rsi
	movl	$32, %edi
	call	putc@PLT
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L49:
	movq	%r15, %rdi
	call	puts@PLT
	jmp	.L46
	.p2align 4,,10
	.p2align 3
.L38:
	movl	60(%rsp), %ecx
	movq	%r14, %rbx
	testl	%ecx, %ecx
	jle	.L43
.L42:
	movl	(%rbx), %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	104(%rsp), %rbx
	je	.L43
	movq	stdout(%rip), %rsi
	movl	$32, %edi
	call	putc@PLT
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L43:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	addl	$1, 56(%rsp)
	subl	$1, 28(%rsp)
	jne	.L62
	jmp	.L34
.L32:
	movl	92(%rsp), %esi
	movq	128(%rsp), %r12
	movq	%r14, %rbp
	leaq	.LC0(%rip), %rbx
	testl	%esi, %esi
	jle	.L37
.L36:
	movl	0(%rbp), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__printf_chk@PLT
	cmpq	%rbp, %r12
	je	.L37
	movq	stdout(%rip), %rsi
	movl	$32, %edi
	call	putc@PLT
	jmp	.L36
.L37:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	addl	$1, 68(%rsp)
	subl	$1, 64(%rsp)
	jne	.L64
	jmp	.L28
.L26:
	movl	120(%rsp), %edi
	movq	160(%rsp), %r12
	movq	%r14, %rbp
	leaq	.LC0(%rip), %rbx
	testl	%edi, %edi
	jle	.L31
.L30:
	movl	0(%rbp), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__printf_chk@PLT
	cmpq	%rbp, %r12
	je	.L31
	movq	stdout(%rip), %rsi
	movl	$32, %edi
	call	putc@PLT
	jmp	.L30
.L31:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	addl	$1, 100(%rsp)
	subl	$1, 96(%rsp)
	jne	.L66
	jmp	.L22
.L20:
	movl	144(%rsp), %r8d
	movq	200(%rsp), %r12
	movq	%r14, %rbp
	leaq	.LC0(%rip), %rbx
	testl	%r8d, %r8d
	jle	.L25
.L24:
	movl	0(%rbp), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__printf_chk@PLT
	cmpq	%rbp, %r12
	je	.L25
	movq	stdout(%rip), %rsi
	movl	$32, %edi
	call	putc@PLT
	jmp	.L24
.L25:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	addl	$1, 136(%rsp)
	subl	$1, 124(%rsp)
	jne	.L68
	jmp	.L16
.L14:
	movl	184(%rsp), %r9d
	movq	208(%rsp), %r12
	movq	%r14, %rbp
	leaq	.LC0(%rip), %rbx
	testl	%r9d, %r9d
	jle	.L19
.L18:
	movl	0(%rbp), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__printf_chk@PLT
	cmpq	%rbp, %r12
	je	.L19
	movq	stdout(%rip), %rsi
	movl	$32, %edi
	call	putc@PLT
	jmp	.L18
.L19:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L16
.L8:
	movl	172(%rsp), %r10d
	movq	%r14, %rbp
	leaq	.LC0(%rip), %rbx
	testl	%r10d, %r10d
	jle	.L13
.L12:
	movl	0(%rbp), %edx
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpq	%rbp, 176(%rsp)
	je	.L13
	movq	stdout(%rip), %rsi
	movl	$32, %edi
	addq	$4, %rbp
	call	putc@PLT
	jmp	.L12
.L13:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L2:
	testl	%edx, %edx
	jle	.L6
	leaq	nums(%rip), %rbx
	leal	-1(%rdx), %edx
	leaq	4(%rbx), %rax
	leaq	.LC0(%rip), %rbp
	leaq	(%rax,%rdx,4), %r12
.L7:
	movl	(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%rbx, %r12
	je	.L6
	movq	stdout(%rip), %rsi
	movl	$32, %edi
	call	putc@PLT
	jmp	.L7
.L6:
	addq	$232, %rsp
	.cfi_def_cfa_offset 56
	leaq	.LC1(%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
	.cfi_endproc
.LFE23:
	.size	dfs, .-dfs
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.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
	leaq	.LC0(%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	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L128:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebp
	testl	%ebp, %ebp
	je	.L122
	movl	$0, %r15d
	leaq	nums(%rip), %r12
	jle	.L128
	movl	%ebp, (%r12)
	testl	%r15d, %r15d
	je	.L125
.L137:
	cmpl	%ebp, %r15d
	movl	%ebp, %ebx
	cmovle	%r15d, %ebx
.L126:
	movl	%r15d, %edi
	movl	%ebx, %esi
	movl	$2, %edx
	movl	%ebx, 4+nums(%rip)
	subl	%ebx, %edi
	cmpl	%ebx, %edi
	cmovle	%edi, %esi
	call	dfs
	subl	$1, %ebx
	jne	.L126
	addl	$1, %r15d
	subl	$1, %ebp
	je	.L128
.L136:
	movl	%ebp, (%r12)
	testl	%r15d, %r15d
	jne	.L137
.L125:
	movl	%ebp, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC1(%rip), %rdi
	addl	$1, %r15d
	call	puts@PLT
	subl	$1, %ebp
	jne	.L136
	jmp	.L128
	.p2align 4,,10
	.p2align 3
.L122:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L138
	addq	$24, %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
.L138:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	nums
	.bss
	.align 32
	.type	nums, @object
	.size	nums, 160
nums:
	.zero	160
	.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 min(x, y) ((x) < (y) ? (x) : (y))
int nums[40];

void dfs(int x, int y, int z){
  int i;
  if(x == 0){
    int first = 0;
    for(i = 0;i < z;i++){
      if(first == 1)putchar(' ');
      printf("%d", nums[i]);
      first = 1;
    }
    puts("");
    return ;
  }
  for(i = y; i >= 1;i--){
    nums[z] = i;
    dfs(x - i, min(i, x - i), z + 1);
  }
}

int main(){
  while(1){
    int n;
    scanf("%d", &n);
    if(n == 0)return 0;
    dfs(n, n, 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>
#define min(x, y) ((x) < (y) ? (x) : (y))
int nums[40];

void dfs(int x, int y, int z){
  int i;
  if(x == 0){
    int first = 0;
    for(i = 0;i < z;i++){
      if(first == 1)putchar(' ');
      printf("%d", nums[i]);
      first = 1;
    }
    puts("");
    return ;
  }
  for(i = y; i >= 1;i--){
    nums[z] = i;
    dfs(x - i, min(i, x - i), z + 1);
  }
}

int main(){
  while(1){
    int n;
    scanf("%d", &n);
    if(n == 0)return 0;
    dfs(n, n, 0);
  }
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	nums
	.bss
	.align 32
	.type	nums, @object
	.size	nums, 160
nums:
	.zero	160
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	""
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB0:
	.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	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	cmpl	$0, -20(%rbp)
	jne	.L2
	movl	$0, -4(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L3
.L5:
	cmpl	$1, -4(%rbp)
	jne	.L4
	movl	$32, %edi
	call	putchar@PLT
.L4:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nums(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$1, -4(%rbp)
	addl	$1, -8(%rbp)
.L3:
	movl	-8(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L5
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L1
.L2:
	movl	-24(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L7
.L8:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	nums(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-28(%rbp), %eax
	leal	1(%rax), %esi
	movl	-20(%rbp), %eax
	subl	-8(%rbp), %eax
	movl	%eax, %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	subl	-8(%rbp), %eax
	movl	%esi, %edx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	dfs
	subl	$1, -8(%rbp)
.L7:
	cmpl	$0, -8(%rbp)
	jg	.L8
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dfs, .-dfs
	.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	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L12:
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	testl	%eax, %eax
	jne	.L10
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	jmp	.L14
.L10:
	movl	-12(%rbp), %ecx
	movl	-12(%rbp), %eax
	movl	$0, %edx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	dfs
	jmp	.L12
.L14:
	call	__stack_chk_fail@PLT
.L13:
	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
	.globl	nums
	.bss
	.align 32
	.type	nums, @object
	.size	nums, 160
nums:
	.zero	160
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	""
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB0:
	.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	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	cmpl	$0, -20(%rbp)
	jne	.L2
	movl	$0, -4(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L3
.L5:
	cmpl	$1, -4(%rbp)
	jne	.L4
	movl	$32, %edi
	call	putchar@PLT
.L4:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nums(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$1, -4(%rbp)
	addl	$1, -8(%rbp)
.L3:
	movl	-8(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L5
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L1
.L2:
	movl	-24(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L7
.L8:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	nums(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-28(%rbp), %eax
	leal	1(%rax), %esi
	movl	-20(%rbp), %eax
	subl	-8(%rbp), %eax
	movl	%eax, %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	subl	-8(%rbp), %eax
	movl	%esi, %edx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	dfs
	subl	$1, -8(%rbp)
.L7:
	cmpl	$0, -8(%rbp)
	jg	.L8
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dfs, .-dfs
	.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	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L12:
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	testl	%eax, %eax
	jne	.L10
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	jmp	.L14
.L10:
	movl	-12(%rbp), %ecx
	movl	-12(%rbp), %eax
	movl	$0, %edx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	dfs
	jmp	.L12
.L14:
	call	__stack_chk_fail@PLT
.L13:
	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:
