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>

int a[32];

void aa(int x, int n, int t){
  int i;
  if(x < 0) return;
  //printf("x = %d  n = %d  t = %d\n", x, n, t);

  if(x == 0){
    printf("%d", a[0]);
    for(i = 1; i < n; i++) printf(" %d", a[i]);
    printf("\n");
    return;
  }

  for(i = t; i > 0; i--){
    a[n] = i;
    aa(x - i, n + 1, i);
    //printf("i = %d\n", i);
  }
}
main(){
    int n,i,j;
  while(1){
    scanf("%d",&n);
    if(n==0) break;
    aa(n, 0, n);

  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 128
a:
	.zero	128
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	" %d"
	.text
	.globl	aa
	.type	aa, @function
aa:
.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)
	js	.L9
	cmpl	$0, -20(%rbp)
	jne	.L4
	movl	a(%rip), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$1, -4(%rbp)
	jmp	.L5
.L6:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L5:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L6
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L1
.L4:
	movl	-28(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L7
.L8:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-24(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-20(%rbp), %eax
	subl	-4(%rbp), %eax
	movl	-4(%rbp), %edx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	aa
	subl	$1, -4(%rbp)
.L7:
	cmpl	$0, -4(%rbp)
	jg	.L8
	jmp	.L1
.L9:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	aa, .-aa
	.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
.L13:
	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
	je	.L17
	movl	-12(%rbp), %edx
	movl	-12(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	aa
	jmp	.L13
.L17:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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	" %d"
	.text
	.p2align 4
	.globl	aa
	.type	aa, @function
aa:
.LFB23:
	.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
	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	%edi, 164(%rsp)
	movl	%esi, 48(%rsp)
	testl	%edi, %edi
	js	.L1
	je	.L4
	movl	%edx, %eax
	testl	%edx, %edx
	jle	.L1
	movl	%edi, %r10d
	leal	6(%rsi), %edx
	leal	5(%rsi), %r9d
	subl	%eax, %r10d
	movl	%edx, 88(%rsp)
	leal	4(%rsi), %r8d
	leal	3(%rsi), %ebx
	leaq	8+a(%rip), %rax
	leal	2(%rsi), %edi
	movl	%r8d, 120(%rsp)
	leaq	(%rax,%rdx,4), %rdx
	leal	1(%rsi), %ecx
	movl	%edi, 176(%rsp)
	movq	%rdx, 64(%rsp)
	movl	%r9d, %edx
	leal	7(%rsi), %r11d
	leaq	a(%rip), %r15
	leaq	(%rax,%rdx,4), %rdx
	movl	%ecx, 180(%rsp)
	leaq	.LC1(%rip), %r14
	movq	%rdx, 104(%rsp)
	movl	%r8d, %edx
	leaq	(%rax,%rdx,4), %rdx
	movl	%r11d, 60(%rsp)
	leal	8(%rsi), %r11d
	movq	%rdx, 128(%rsp)
	movl	%ebx, %edx
	leaq	(%rax,%rdx,4), %rdx
	movl	%ebx, 160(%rsp)
	movq	%rdx, 152(%rsp)
	movl	%edi, %edx
	leaq	(%rax,%rdx,4), %rdx
	movl	%r9d, 96(%rsp)
	movq	%rdx, 192(%rsp)
	movl	%ecx, %edx
	leaq	(%rax,%rdx,4), %rcx
	movl	%esi, %edx
	movl	%r11d, 20(%rsp)
	movq	%rcx, 216(%rsp)
	leaq	(%rax,%rdx,4), %rcx
	leal	-1(%rsi), %edx
	leaq	(%rax,%rdx,4), %rax
	movl	%r10d, 144(%rsp)
	movq	%rax, 184(%rsp)
	movslq	%esi, %rax
	movq	%rcx, 208(%rsp)
	movq	%rax, 200(%rsp)
.L70:
	movl	164(%rsp), %eax
	movl	144(%rsp), %ecx
	movq	200(%rsp), %rdx
	subl	%ecx, %eax
	movl	%eax, 148(%rsp)
	movl	%eax, (%r15,%rdx,4)
	testl	%ecx, %ecx
	js	.L11
	movslq	180(%rsp), %rax
	movq	%rax, 168(%rsp)
	je	.L117
.L12:
	movl	148(%rsp), %eax
	movl	144(%rsp), %ecx
	movq	168(%rsp), %rdx
	subl	%eax, %ecx
	movl	%eax, (%r15,%rdx,4)
	movl	%ecx, 124(%rsp)
	js	.L17
	movl	%eax, 100(%rsp)
	movslq	176(%rsp), %rax
	movq	%rax, 136(%rsp)
	je	.L118
.L18:
	movq	136(%rsp), %rcx
	movl	100(%rsp), %eax
	movl	%eax, (%r15,%rcx,4)
	cmpl	%eax, 124(%rsp)
	js	.L23
	je	.L119
	movl	124(%rsp), %ecx
	movl	%eax, %edx
	leal	(%rax,%rax), %eax
	movl	%edx, 92(%rsp)
	subl	%eax, %ecx
	movslq	160(%rsp), %rax
	movl	%ecx, 52(%rsp)
	movq	%rax, 112(%rsp)
.L66:
	movq	112(%rsp), %rdx
	movl	92(%rsp), %eax
	movl	%eax, (%r15,%rdx,4)
	movl	52(%rsp), %edx
	testl	%edx, %edx
	js	.L29
	movl	%eax, 32(%rsp)
	movslq	120(%rsp), %rax
	movq	%rax, 80(%rsp)
	je	.L120
.L30:
	movq	80(%rsp), %rcx
	movl	32(%rsp), %eax
	movl	%eax, (%r15,%rcx,4)
	cmpl	%eax, 52(%rsp)
	js	.L35
	je	.L121
	movl	52(%rsp), %r12d
	movl	%eax, %r13d
	leal	(%rax,%rax), %eax
	subl	%eax, %r12d
	movslq	96(%rsp), %rax
	movl	%r12d, %ebp
	movl	%r13d, %r12d
	movq	%rax, 40(%rsp)
.L63:
	movq	40(%rsp), %rax
	movl	%r12d, (%r15,%rax,4)
	testl	%ebp, %ebp
	js	.L41
	movslq	88(%rsp), %rax
	movl	%r12d, %r13d
	movq	%rax, 8(%rsp)
	movslq	60(%rsp), %rax
	movq	%rax, 72(%rsp)
	je	.L122
	movl	%r12d, 56(%rsp)
.L42:
	movq	8(%rsp), %rax
	movl	%r13d, (%r15,%rax,4)
	cmpl	%r13d, %ebp
	js	.L47
	je	.L123
	leal	(%r13,%r13), %eax
	movl	%ebp, %ecx
	movl	%r13d, %ebx
	subl	%eax, %ecx
	movl	48(%rsp), %eax
	movl	%ecx, 16(%rsp)
	leal	9(%rax), %r12d
	movslq	20(%rsp), %rax
	movq	%rax, 24(%rsp)
.L60:
	movq	72(%rsp), %rax
	movl	%ebx, (%r15,%rax,4)
	movl	16(%rsp), %eax
	testl	%eax, %eax
	js	.L53
	movl	%ebx, %eax
	je	.L124
.L58:
	movl	16(%rsp), %edi
	movq	24(%rsp), %rcx
	movl	%eax, %edx
	movl	%r12d, %esi
	movl	%eax, 36(%rsp)
	subl	%eax, %edi
	movl	%eax, (%r15,%rcx,4)
	call	aa
	movl	36(%rsp), %eax
	subl	$1, %eax
	jne	.L58
.L53:
	addl	$1, 16(%rsp)
	subl	$1, %ebx
	jne	.L60
.L47:
	subl	$1, %r13d
	jne	.L42
	movl	56(%rsp), %r12d
.L41:
	addl	$1, %ebp
	subl	$1, %r12d
	jne	.L63
.L35:
	subl	$1, 32(%rsp)
	jne	.L30
.L29:
	addl	$1, 52(%rsp)
	subl	$1, 92(%rsp)
	jne	.L66
.L23:
	subl	$1, 100(%rsp)
	jne	.L18
.L17:
	subl	$1, 148(%rsp)
	jne	.L12
.L11:
	addl	$1, 144(%rsp)
	movl	144(%rsp), %eax
	cmpl	164(%rsp), %eax
	jne	.L70
.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
.L124:
	.cfi_restore_state
	movl	(%r15), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC0(%rip), %rsi
	call	__printf_chk@PLT
	cmpl	$1, 20(%rsp)
	leaq	4+a(%rip), %rcx
	jle	.L57
	movl	%ebx, 36(%rsp)
	movq	%rcx, %rbx
	.p2align 4,,10
	.p2align 3
.L56:
	movl	(%rbx), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	64(%rsp), %rbx
	jne	.L56
	movl	36(%rsp), %ebx
.L57:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L53
	.p2align 4,,10
	.p2align 3
.L123:
	movl	(%r15), %edx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	leaq	4+a(%rip), %rbx
	call	__printf_chk@PLT
	cmpl	$1, 60(%rsp)
	movq	104(%rsp), %r12
	jle	.L51
	.p2align 4,,10
	.p2align 3
.L50:
	movl	(%rbx), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%r12, %rbx
	jne	.L50
.L51:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L122:
	movl	(%r15), %edx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	leaq	4+a(%rip), %rbx
	call	__printf_chk@PLT
	cmpl	$1, 88(%rsp)
	movq	128(%rsp), %r13
	jle	.L45
	.p2align 4,,10
	.p2align 3
.L44:
	movl	(%rbx), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%r13, %rbx
	jne	.L44
.L45:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L41
.L121:
	movl	(%r15), %edx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	leaq	4+a(%rip), %rbx
	call	__printf_chk@PLT
	cmpl	$1, 96(%rsp)
	movq	152(%rsp), %rbp
	jle	.L39
	.p2align 4,,10
	.p2align 3
.L38:
	movl	(%rbx), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%rbp, %rbx
	jne	.L38
.L39:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L35
.L120:
	movl	(%r15), %edx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	leaq	4+a(%rip), %rbx
	call	__printf_chk@PLT
	cmpl	$1, 120(%rsp)
	movq	192(%rsp), %rbp
	jle	.L33
	.p2align 4,,10
	.p2align 3
.L32:
	movl	(%rbx), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%rbp, %rbx
	jne	.L32
.L33:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L29
.L119:
	movl	(%r15), %edx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	leaq	4+a(%rip), %rbx
	call	__printf_chk@PLT
	cmpl	$1, 160(%rsp)
	movq	216(%rsp), %rbp
	jle	.L27
	.p2align 4,,10
	.p2align 3
.L26:
	movl	(%rbx), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%rbp, %rbx
	jne	.L26
.L27:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L23
.L118:
	movl	(%r15), %edx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	leaq	4+a(%rip), %rbx
	call	__printf_chk@PLT
	cmpl	$1, 176(%rsp)
	movq	208(%rsp), %rbp
	jle	.L21
.L20:
	movl	(%rbx), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%rbp, %rbx
	jne	.L20
.L21:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L17
.L117:
	movl	(%r15), %edx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	leaq	4+a(%rip), %rbx
	call	__printf_chk@PLT
	cmpl	$1, 180(%rsp)
	jle	.L15
.L14:
	movl	(%rbx), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%rbx, 184(%rsp)
	jne	.L14
.L15:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L11
.L4:
	movl	a(%rip), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC0(%rip), %rsi
	call	__printf_chk@PLT
	cmpl	$1, 48(%rsp)
	jle	.L9
	movl	48(%rsp), %eax
	leaq	4+a(%rip), %rbx
	leaq	.LC1(%rip), %rbp
	leal	-2(%rax), %edx
	leaq	4(%rbx), %rax
	leaq	(%rax,%rdx,4), %r12
.L8:
	movl	(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%r12, %rbx
	jne	.L8
.L9:
	addq	$232, %rsp
	.cfi_def_cfa_offset 56
	movl	$10, %edi
	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	putchar@PLT
	.cfi_endproc
.LFE23:
	.size	aa, .-aa
	.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
	leaq	.LC0(%rip), %r14
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L127:
	movq	8(%rsp), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %ebp
	testl	%ebp, %ebp
	je	.L126
	js	.L127
	movslq	%ebp, %rax
	xorl	%r15d, %r15d
	leaq	a(%rip), %r12
	movq	%rax, (%rsp)
.L130:
	movl	%ebp, %r13d
	movl	%r15d, %ebx
	subl	%r15d, %r13d
	movl	%r13d, (%r12)
	testl	%r15d, %r15d
	je	.L138
.L128:
	movl	%ebx, %edi
	movl	%r13d, %edx
	movl	$2, %esi
	movl	%r13d, 4+a(%rip)
	subl	%r13d, %edi
	call	aa
	subl	$1, %r13d
	jne	.L128
	addq	$1, %r15
	cmpq	(%rsp), %r15
	jne	.L130
	jmp	.L127
	.p2align 4,,10
	.p2align 3
.L138:
	movl	%r13d, %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$10, %edi
	addq	$1, %r15
	call	putchar@PLT
	cmpq	(%rsp), %r15
	jne	.L130
	jmp	.L127
	.p2align 4,,10
	.p2align 3
.L126:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L139
	addq	$40, %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
.L139:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 128
a:
	.zero	128
	.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	" %d"
	.text
	.p2align 4
	.globl	aa
	.type	aa, @function
aa:
.LFB23:
	.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
	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	%edi, 164(%rsp)
	movl	%esi, 48(%rsp)
	testl	%edi, %edi
	js	.L1
	je	.L4
	movl	%edx, %eax
	testl	%edx, %edx
	jle	.L1
	movl	%edi, %r10d
	leal	6(%rsi), %edx
	leal	5(%rsi), %r9d
	subl	%eax, %r10d
	movl	%edx, 88(%rsp)
	leal	4(%rsi), %r8d
	leal	3(%rsi), %ebx
	leaq	8+a(%rip), %rax
	leal	2(%rsi), %edi
	movl	%r8d, 120(%rsp)
	leaq	(%rax,%rdx,4), %rdx
	leal	1(%rsi), %ecx
	movl	%edi, 176(%rsp)
	movq	%rdx, 64(%rsp)
	movl	%r9d, %edx
	leal	7(%rsi), %r11d
	leaq	a(%rip), %r15
	leaq	(%rax,%rdx,4), %rdx
	movl	%ecx, 180(%rsp)
	leaq	.LC1(%rip), %r14
	movq	%rdx, 104(%rsp)
	movl	%r8d, %edx
	leaq	(%rax,%rdx,4), %rdx
	movl	%r11d, 60(%rsp)
	leal	8(%rsi), %r11d
	movq	%rdx, 128(%rsp)
	movl	%ebx, %edx
	leaq	(%rax,%rdx,4), %rdx
	movl	%ebx, 160(%rsp)
	movq	%rdx, 152(%rsp)
	movl	%edi, %edx
	leaq	(%rax,%rdx,4), %rdx
	movl	%r9d, 96(%rsp)
	movq	%rdx, 192(%rsp)
	movl	%ecx, %edx
	leaq	(%rax,%rdx,4), %rcx
	movl	%esi, %edx
	movl	%r11d, 20(%rsp)
	movq	%rcx, 216(%rsp)
	leaq	(%rax,%rdx,4), %rcx
	leal	-1(%rsi), %edx
	leaq	(%rax,%rdx,4), %rax
	movl	%r10d, 144(%rsp)
	movq	%rax, 184(%rsp)
	movslq	%esi, %rax
	movq	%rcx, 208(%rsp)
	movq	%rax, 200(%rsp)
.L70:
	movl	164(%rsp), %eax
	movl	144(%rsp), %ecx
	movq	200(%rsp), %rdx
	subl	%ecx, %eax
	movl	%eax, 148(%rsp)
	movl	%eax, (%r15,%rdx,4)
	testl	%ecx, %ecx
	js	.L11
	movslq	180(%rsp), %rax
	movq	%rax, 168(%rsp)
	je	.L117
.L12:
	movl	148(%rsp), %eax
	movl	144(%rsp), %ecx
	movq	168(%rsp), %rdx
	subl	%eax, %ecx
	movl	%eax, (%r15,%rdx,4)
	movl	%ecx, 124(%rsp)
	js	.L17
	movl	%eax, 100(%rsp)
	movslq	176(%rsp), %rax
	movq	%rax, 136(%rsp)
	je	.L118
.L18:
	movq	136(%rsp), %rcx
	movl	100(%rsp), %eax
	movl	%eax, (%r15,%rcx,4)
	cmpl	%eax, 124(%rsp)
	js	.L23
	je	.L119
	movl	124(%rsp), %ecx
	movl	%eax, %edx
	leal	(%rax,%rax), %eax
	movl	%edx, 92(%rsp)
	subl	%eax, %ecx
	movslq	160(%rsp), %rax
	movl	%ecx, 52(%rsp)
	movq	%rax, 112(%rsp)
.L66:
	movq	112(%rsp), %rdx
	movl	92(%rsp), %eax
	movl	%eax, (%r15,%rdx,4)
	movl	52(%rsp), %edx
	testl	%edx, %edx
	js	.L29
	movl	%eax, 32(%rsp)
	movslq	120(%rsp), %rax
	movq	%rax, 80(%rsp)
	je	.L120
.L30:
	movq	80(%rsp), %rcx
	movl	32(%rsp), %eax
	movl	%eax, (%r15,%rcx,4)
	cmpl	%eax, 52(%rsp)
	js	.L35
	je	.L121
	movl	52(%rsp), %r12d
	movl	%eax, %r13d
	leal	(%rax,%rax), %eax
	subl	%eax, %r12d
	movslq	96(%rsp), %rax
	movl	%r12d, %ebp
	movl	%r13d, %r12d
	movq	%rax, 40(%rsp)
.L63:
	movq	40(%rsp), %rax
	movl	%r12d, (%r15,%rax,4)
	testl	%ebp, %ebp
	js	.L41
	movslq	88(%rsp), %rax
	movl	%r12d, %r13d
	movq	%rax, 8(%rsp)
	movslq	60(%rsp), %rax
	movq	%rax, 72(%rsp)
	je	.L122
	movl	%r12d, 56(%rsp)
.L42:
	movq	8(%rsp), %rax
	movl	%r13d, (%r15,%rax,4)
	cmpl	%r13d, %ebp
	js	.L47
	je	.L123
	leal	(%r13,%r13), %eax
	movl	%ebp, %ecx
	movl	%r13d, %ebx
	subl	%eax, %ecx
	movl	48(%rsp), %eax
	movl	%ecx, 16(%rsp)
	leal	9(%rax), %r12d
	movslq	20(%rsp), %rax
	movq	%rax, 24(%rsp)
.L60:
	movq	72(%rsp), %rax
	movl	%ebx, (%r15,%rax,4)
	movl	16(%rsp), %eax
	testl	%eax, %eax
	js	.L53
	movl	%ebx, %eax
	je	.L124
.L58:
	movl	16(%rsp), %edi
	movq	24(%rsp), %rcx
	movl	%eax, %edx
	movl	%r12d, %esi
	movl	%eax, 36(%rsp)
	subl	%eax, %edi
	movl	%eax, (%r15,%rcx,4)
	call	aa
	movl	36(%rsp), %eax
	subl	$1, %eax
	jne	.L58
.L53:
	addl	$1, 16(%rsp)
	subl	$1, %ebx
	jne	.L60
.L47:
	subl	$1, %r13d
	jne	.L42
	movl	56(%rsp), %r12d
.L41:
	addl	$1, %ebp
	subl	$1, %r12d
	jne	.L63
.L35:
	subl	$1, 32(%rsp)
	jne	.L30
.L29:
	addl	$1, 52(%rsp)
	subl	$1, 92(%rsp)
	jne	.L66
.L23:
	subl	$1, 100(%rsp)
	jne	.L18
.L17:
	subl	$1, 148(%rsp)
	jne	.L12
.L11:
	addl	$1, 144(%rsp)
	movl	144(%rsp), %eax
	cmpl	164(%rsp), %eax
	jne	.L70
.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
.L124:
	.cfi_restore_state
	movl	(%r15), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC0(%rip), %rsi
	call	__printf_chk@PLT
	cmpl	$1, 20(%rsp)
	leaq	4+a(%rip), %rcx
	jle	.L57
	movl	%ebx, 36(%rsp)
	movq	%rcx, %rbx
	.p2align 4,,10
	.p2align 3
.L56:
	movl	(%rbx), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	64(%rsp), %rbx
	jne	.L56
	movl	36(%rsp), %ebx
.L57:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L53
	.p2align 4,,10
	.p2align 3
.L123:
	movl	(%r15), %edx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	leaq	4+a(%rip), %rbx
	call	__printf_chk@PLT
	cmpl	$1, 60(%rsp)
	movq	104(%rsp), %r12
	jle	.L51
	.p2align 4,,10
	.p2align 3
.L50:
	movl	(%rbx), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%r12, %rbx
	jne	.L50
.L51:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L122:
	movl	(%r15), %edx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	leaq	4+a(%rip), %rbx
	call	__printf_chk@PLT
	cmpl	$1, 88(%rsp)
	movq	128(%rsp), %r13
	jle	.L45
	.p2align 4,,10
	.p2align 3
.L44:
	movl	(%rbx), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%r13, %rbx
	jne	.L44
.L45:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L41
.L121:
	movl	(%r15), %edx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	leaq	4+a(%rip), %rbx
	call	__printf_chk@PLT
	cmpl	$1, 96(%rsp)
	movq	152(%rsp), %rbp
	jle	.L39
	.p2align 4,,10
	.p2align 3
.L38:
	movl	(%rbx), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%rbp, %rbx
	jne	.L38
.L39:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L35
.L120:
	movl	(%r15), %edx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	leaq	4+a(%rip), %rbx
	call	__printf_chk@PLT
	cmpl	$1, 120(%rsp)
	movq	192(%rsp), %rbp
	jle	.L33
	.p2align 4,,10
	.p2align 3
.L32:
	movl	(%rbx), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%rbp, %rbx
	jne	.L32
.L33:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L29
.L119:
	movl	(%r15), %edx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	leaq	4+a(%rip), %rbx
	call	__printf_chk@PLT
	cmpl	$1, 160(%rsp)
	movq	216(%rsp), %rbp
	jle	.L27
	.p2align 4,,10
	.p2align 3
.L26:
	movl	(%rbx), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%rbp, %rbx
	jne	.L26
.L27:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L23
.L118:
	movl	(%r15), %edx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	leaq	4+a(%rip), %rbx
	call	__printf_chk@PLT
	cmpl	$1, 176(%rsp)
	movq	208(%rsp), %rbp
	jle	.L21
.L20:
	movl	(%rbx), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%rbp, %rbx
	jne	.L20
.L21:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L17
.L117:
	movl	(%r15), %edx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	leaq	4+a(%rip), %rbx
	call	__printf_chk@PLT
	cmpl	$1, 180(%rsp)
	jle	.L15
.L14:
	movl	(%rbx), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%rbx, 184(%rsp)
	jne	.L14
.L15:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L11
.L4:
	movl	a(%rip), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC0(%rip), %rsi
	call	__printf_chk@PLT
	cmpl	$1, 48(%rsp)
	jle	.L9
	movl	48(%rsp), %eax
	leaq	4+a(%rip), %rbx
	leaq	.LC1(%rip), %rbp
	leal	-2(%rax), %edx
	leaq	4(%rbx), %rax
	leaq	(%rax,%rdx,4), %r12
.L8:
	movl	(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%r12, %rbx
	jne	.L8
.L9:
	addq	$232, %rsp
	.cfi_def_cfa_offset 56
	movl	$10, %edi
	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	putchar@PLT
	.cfi_endproc
.LFE23:
	.size	aa, .-aa
	.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
	leaq	.LC0(%rip), %r14
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L127:
	movq	8(%rsp), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %ebp
	testl	%ebp, %ebp
	je	.L126
	js	.L127
	movslq	%ebp, %rax
	xorl	%r15d, %r15d
	leaq	a(%rip), %r12
	movq	%rax, (%rsp)
.L130:
	movl	%ebp, %r13d
	movl	%r15d, %ebx
	subl	%r15d, %r13d
	movl	%r13d, (%r12)
	testl	%r15d, %r15d
	je	.L138
.L128:
	movl	%ebx, %edi
	movl	%r13d, %edx
	movl	$2, %esi
	movl	%r13d, 4+a(%rip)
	subl	%r13d, %edi
	call	aa
	subl	$1, %r13d
	jne	.L128
	addq	$1, %r15
	cmpq	(%rsp), %r15
	jne	.L130
	jmp	.L127
	.p2align 4,,10
	.p2align 3
.L138:
	movl	%r13d, %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$10, %edi
	addq	$1, %r15
	call	putchar@PLT
	cmpq	(%rsp), %r15
	jne	.L130
	jmp	.L127
	.p2align 4,,10
	.p2align 3
.L126:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L139
	addq	$40, %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
.L139:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 128
a:
	.zero	128
	.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>

int a[32];

void aa(int x, int n, int t){
  int i;
  if(x < 0) return;
  //printf("x = %d  n = %d  t = %d\n", x, n, t);

  if(x == 0){
    printf("%d", a[0]);
    for(i = 1; i < n; i++) printf(" %d", a[i]);
    printf("\n");
    return;
  }

  for(i = t; i > 0; i--){
    a[n] = i;
    aa(x - i, n + 1, i);
    //printf("i = %d\n", i);
  }
}
main(){
    int n,i,j;
  while(1){
    scanf("%d",&n);
    if(n==0) break;
    aa(n, 0, n);

  }
  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>

int a[32];

void aa(int x, int n, int t){
  int i;
  if(x < 0) return;
  //printf("x = %d  n = %d  t = %d\n", x, n, t);

  if(x == 0){
    printf("%d", a[0]);
    for(i = 1; i < n; i++) printf(" %d", a[i]);
    printf("\n");
    return;
  }

  for(i = t; i > 0; i--){
    a[n] = i;
    aa(x - i, n + 1, i);
    //printf("i = %d\n", i);
  }
}
main(){
    int n,i,j;
  while(1){
    scanf("%d",&n);
    if(n==0) break;
    aa(n, 0, n);

  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 128
a:
	.zero	128
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	" %d"
	.text
	.globl	aa
	.type	aa, @function
aa:
.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)
	js	.L9
	cmpl	$0, -20(%rbp)
	jne	.L4
	movl	a(%rip), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$1, -4(%rbp)
	jmp	.L5
.L6:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L5:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L6
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L1
.L4:
	movl	-28(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L7
.L8:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-24(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-20(%rbp), %eax
	subl	-4(%rbp), %eax
	movl	-4(%rbp), %edx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	aa
	subl	$1, -4(%rbp)
.L7:
	cmpl	$0, -4(%rbp)
	jg	.L8
	jmp	.L1
.L9:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	aa, .-aa
	.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
.L13:
	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
	je	.L17
	movl	-12(%rbp), %edx
	movl	-12(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	aa
	jmp	.L13
.L17:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 128
a:
	.zero	128
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	" %d"
	.text
	.globl	aa
	.type	aa, @function
aa:
.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)
	js	.L9
	cmpl	$0, -20(%rbp)
	jne	.L4
	movl	a(%rip), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$1, -4(%rbp)
	jmp	.L5
.L6:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L5:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L6
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L1
.L4:
	movl	-28(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L7
.L8:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-24(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-20(%rbp), %eax
	subl	-4(%rbp), %eax
	movl	-4(%rbp), %edx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	aa
	subl	$1, -4(%rbp)
.L7:
	cmpl	$0, -4(%rbp)
	jg	.L8
	jmp	.L1
.L9:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	aa, .-aa
	.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
.L13:
	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
	je	.L17
	movl	-12(%rbp), %edx
	movl	-12(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	aa
	jmp	.L13
.L17:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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:
