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 n, k, s, ans;

void dfs(int num,int cnt,int sum){
  if(sum==s&&cnt==k) ans++;
  if(num>n) return;
  if(cnt==k) return;

  dfs(num+1, cnt+1, sum+num);
  dfs(num+1, cnt, sum);
}

int main(){

  while(scanf("%d %d %d", &n, &k, &s), n){
    ans=0;
    dfs(1,0,0);
    printf("%d\n", ans);
  }

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.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	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	s(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jne	.L2
	movl	k(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L2
	movl	ans(%rip), %eax
	addl	$1, %eax
	movl	%eax, ans(%rip)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jg	.L6
	movl	k(%rip), %eax
	cmpl	%eax, -8(%rbp)
	je	.L7
	movl	-12(%rbp), %edx
	movl	-4(%rbp), %eax
	addl	%eax, %edx
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	dfs
	movl	-4(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	movl	%ecx, %edi
	call	dfs
	jmp	.L1
.L6:
	nop
	jmp	.L1
.L7:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dfs, .-dfs
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d %d %d"
	.text
	.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
	jmp	.L9
.L10:
	movl	$0, ans(%rip)
	movl	$0, %edx
	movl	$0, %esi
	movl	$1, %edi
	call	dfs
	movl	ans(%rip), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L9:
	leaq	s(%rip), %rax
	movq	%rax, %rcx
	leaq	k(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jne	.L10
	movl	$0, %eax
	popq	%rbp
	.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
	.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
	movl	%esi, %r8d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leal	(%rdi,%rax), %r11d
	leal	9(%rsi), %eax
	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	$104, %rsp
	.cfi_def_cfa_offset 160
	movl	s(%rip), %r9d
	movl	%eax, 64(%rsp)
	movl	%r11d, %eax
	movl	%edx, 52(%rsp)
	movl	%r9d, %r11d
	movl	n(%rip), %edx
	movl	%eax, %r9d
	movl	%edi, 4(%rsp)
	cmpl	52(%rsp), %r11d
	je	.L68
.L3:
	cmpl	%edx, 4(%rsp)
	jg	.L1
	cmpl	%r8d, k(%rip)
	je	.L1
.L46:
	leal	1(%r8), %eax
	movl	%r9d, (%rsp)
	movl	%eax, 20(%rsp)
	addl	$1, 4(%rsp)
	movl	4(%rsp), %r10d
.L6:
	cmpl	%r11d, (%rsp)
	je	.L69
.L7:
	cmpl	%edx, %r10d
	jg	.L48
	movl	20(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L48
.L45:
	addl	$1, %r10d
	movl	(%rsp), %edi
	leal	2(%r8), %eax
	leal	(%r10,%r10), %ecx
	movl	%eax, 24(%rsp)
	movl	%r10d, %r9d
	leal	(%rcx,%r10), %eax
	movl	%r10d, 8(%rsp)
	addl	%edi, %eax
	movl	%eax, 40(%rsp)
	leal	-1(%rdi), %eax
	leal	(%rcx,%rax), %edi
	addl	%r10d, %eax
	movl	%r8d, %r10d
	movl	%edi, 44(%rsp)
	movl	%eax, 56(%rsp)
	cmpl	56(%rsp), %r11d
	je	.L70
.L11:
	cmpl	%edx, %r9d
	jg	.L50
	movl	24(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L50
.L44:
	movl	40(%rsp), %ecx
	addl	$1, %r9d
	leal	3(%r10), %eax
	movl	%r9d, 12(%rsp)
	movl	%r9d, %r15d
	movl	%r10d, %r9d
	movl	%r11d, %r10d
	movl	%eax, 28(%rsp)
	movl	%ecx, %r11d
	cmpl	%r10d, 44(%rsp)
	je	.L71
.L15:
	cmpl	%edx, %r15d
	jg	.L52
	movl	28(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L52
.L43:
	leal	4(%r9), %eax
	addl	$1, %r15d
	movl	%r10d, %esi
	movl	%eax, 32(%rsp)
	movl	%r15d, %r10d
	movl	%r15d, %r12d
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	%r11d, %esi
	je	.L72
	cmpl	%edx, %r12d
	jle	.L73
.L54:
	movl	%r10d, %r15d
	movl	%esi, %r10d
.L21:
	addl	$1, %r11d
	cmpl	%r10d, 44(%rsp)
	jne	.L15
.L71:
	movl	28(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L74
	cmpl	%edx, %r15d
	jle	.L43
.L52:
	movl	%r10d, %r11d
	movl	%r9d, %r10d
	movl	12(%rsp), %r9d
.L17:
	addl	$2, 40(%rsp)
	addl	$1, 44(%rsp)
	cmpl	56(%rsp), %r11d
	jne	.L11
.L70:
	movl	24(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L75
	cmpl	%edx, %r9d
	jle	.L44
.L50:
	movl	%r10d, %r8d
	movl	8(%rsp), %r10d
	cmpl	%r11d, (%rsp)
	jne	.L7
.L69:
	movl	20(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L76
	cmpl	%edx, %r10d
	jle	.L45
.L48:
	movl	(%rsp), %r9d
.L9:
	addl	$1, %r9d
	cmpl	52(%rsp), %r11d
	jne	.L3
.L68:
	cmpl	%r8d, k(%rip)
	je	.L77
	cmpl	%edx, 4(%rsp)
	jle	.L46
.L1:
	addq	$104, %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
.L72:
	.cfi_restore_state
	movl	32(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L78
	cmpl	%edx, %r12d
	jg	.L54
.L42:
	addl	$1, %r12d
	leal	5(%r9), %eax
	leal	(%r12,%r12), %ecx
	movl	%eax, 36(%rsp)
	movl	%r12d, %ebp
	leal	(%rcx,%r12), %eax
	leal	(%rax,%r11), %r14d
	leal	-1(%r11), %eax
	leal	(%rcx,%rax), %r8d
	addl	%r12d, %eax
	movl	%r8d, %r15d
	movl	%eax, 60(%rsp)
	movl	%r12d, %r8d
	cmpl	60(%rsp), %esi
	je	.L79
.L23:
	cmpl	%edx, %ebp
	jle	.L80
.L56:
	movl	%r8d, %r12d
	jmp	.L18
.L78:
	movl	%r10d, %r15d
	addl	$1, ans(%rip)
	movl	%esi, %r10d
	jmp	.L21
.L80:
	movl	36(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L56
.L41:
	leal	6(%r9), %eax
	addl	$1, %ebp
	movl	%r14d, %r13d
	movl	%eax, 16(%rsp)
	leal	7(%r9), %eax
	movl	%ebp, %ebx
	movl	%eax, %r12d
.L26:
	cmpl	%r15d, %esi
	je	.L81
	cmpl	%edx, %ebx
	jle	.L82
.L29:
	addl	$2, %r14d
	addl	$1, %r15d
	cmpl	60(%rsp), %esi
	jne	.L23
.L79:
	movl	36(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L83
	cmpl	%edx, %ebp
	jle	.L41
	jmp	.L56
.L83:
	addl	$1, ans(%rip)
	movl	%r8d, %r12d
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L81:
	movl	16(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L84
	cmpl	%edx, %ebx
	jg	.L29
.L40:
	addl	$1, %ebx
	leal	8(%r9), %eax
	movl	%ebx, %ecx
.L30:
	cmpl	%esi, %r13d
	je	.L85
	cmpl	%ecx, %edx
	jl	.L33
	cmpl	k(%rip), %r12d
	jne	.L39
.L33:
	addl	$1, %r13d
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L85:
	cmpl	k(%rip), %r12d
	je	.L86
	cmpl	%ecx, %edx
	jl	.L33
.L39:
	leal	1(%rcx), %edi
	addl	%r13d, %ecx
	movl	%r12d, 68(%rsp)
	movl	%ebx, %r12d
	movl	%edi, 48(%rsp)
	movl	%ecx, %ebx
	movl	68(%rsp), %ecx
.L37:
	cmpl	%ebx, %esi
	je	.L87
	cmpl	%edx, %edi
	jg	.L63
	cmpl	k(%rip), %eax
	jne	.L38
.L63:
	movl	%r12d, %ebx
	movl	%ecx, %r12d
.L36:
	movl	48(%rsp), %ecx
	jmp	.L30
.L84:
	addl	$1, ans(%rip)
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L86:
	addl	$1, ans(%rip)
	jmp	.L33
.L73:
	movl	32(%rsp), %eax
	cmpl	k(%rip), %eax
	jne	.L42
	jmp	.L54
.L74:
	movl	%r10d, %r11d
	addl	$1, ans(%rip)
	movl	%r9d, %r10d
	movl	12(%rsp), %r9d
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L87:
	cmpl	k(%rip), %eax
	je	.L88
	cmpl	%edx, %edi
	jg	.L63
.L38:
	movl	64(%rsp), %esi
	leal	(%rdi,%rbx), %edx
	addl	$1, %edi
	movl	%ecx, 92(%rsp)
	movl	%eax, 88(%rsp)
	movl	%r9d, 84(%rsp)
	movl	%r11d, 80(%rsp)
	movl	%r8d, 76(%rsp)
	movl	%r10d, 72(%rsp)
	movl	%edi, 68(%rsp)
	call	dfs
	movl	s(%rip), %esi
	movl	n(%rip), %edx
	movl	68(%rsp), %edi
	movl	72(%rsp), %r10d
	movl	76(%rsp), %r8d
	movl	80(%rsp), %r11d
	movl	84(%rsp), %r9d
	movl	88(%rsp), %eax
	movl	92(%rsp), %ecx
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L88:
	movl	%r12d, %ebx
	addl	$1, ans(%rip)
	movl	%ecx, %r12d
	jmp	.L36
.L75:
	movl	%r10d, %r8d
	addl	$1, ans(%rip)
	movl	8(%rsp), %r10d
	jmp	.L6
.L77:
	addl	$1, ans(%rip)
	addq	$104, %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
.L82:
	.cfi_restore_state
	movl	16(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L29
	jmp	.L40
.L76:
	addl	$1, ans(%rip)
	movl	(%rsp), %r9d
	jmp	.L9
	.cfi_endproc
.LFE23:
	.size	dfs, .-dfs
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d %d %d"
	.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	s(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	k(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	n(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L90:
	movq	%r12, %rsi
	movq	%r14, %rcx
	movq	%r13, %rdx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	n(%rip), %esi
	testl	%esi, %esi
	je	.L105
	movl	s(%rip), %edx
	movl	$1, %r15d
	movl	$0, ans(%rip)
	testl	%edx, %edx
	je	.L106
.L92:
	cmpl	%r15d, %esi
	jl	.L95
	movl	k(%rip), %eax
	testl	%eax, %eax
	je	.L95
.L96:
	leal	1(%r15), %ebx
	movl	%ebx, %ebp
	cmpl	%r15d, %edx
	je	.L107
.L97:
	cmpl	%ebp, %esi
	jl	.L99
	cmpl	$1, k(%rip)
	je	.L99
.L102:
	leal	0(%rbp,%r15), %edx
	addl	$1, %ebp
	movl	$2, %esi
	movl	%ebp, %edi
	call	dfs
	movl	s(%rip), %edx
	movl	n(%rip), %esi
	cmpl	%r15d, %edx
	jne	.L97
.L107:
	cmpl	$1, k(%rip)
	je	.L108
	cmpl	%ebp, %esi
	jge	.L102
.L99:
	movl	%ebx, %r15d
.L110:
	testl	%edx, %edx
	jne	.L92
.L106:
	movl	k(%rip), %ecx
	testl	%ecx, %ecx
	je	.L109
	cmpl	%r15d, %esi
	jge	.L96
.L95:
	movl	ans(%rip), %edx
.L94:
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L90
	.p2align 4,,10
	.p2align 3
.L108:
	addl	$1, ans(%rip)
	movl	%ebx, %r15d
	jmp	.L110
	.p2align 4,,10
	.p2align 3
.L109:
	movl	ans(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ans(%rip)
	jmp	.L94
.L105:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	ans
	.bss
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%edx, %eax
	movl	%esi, %r8d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leal	(%rdi,%rax), %r11d
	leal	9(%rsi), %eax
	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	$104, %rsp
	.cfi_def_cfa_offset 160
	movl	s(%rip), %r9d
	movl	%eax, 64(%rsp)
	movl	%r11d, %eax
	movl	%edx, 52(%rsp)
	movl	%r9d, %r11d
	movl	n(%rip), %edx
	movl	%eax, %r9d
	movl	%edi, 4(%rsp)
	cmpl	52(%rsp), %r11d
	je	.L68
.L3:
	cmpl	%edx, 4(%rsp)
	jg	.L1
	cmpl	%r8d, k(%rip)
	je	.L1
.L46:
	leal	1(%r8), %eax
	movl	%r9d, (%rsp)
	movl	%eax, 20(%rsp)
	addl	$1, 4(%rsp)
	movl	4(%rsp), %r10d
.L6:
	cmpl	%r11d, (%rsp)
	je	.L69
.L7:
	cmpl	%edx, %r10d
	jg	.L48
	movl	20(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L48
.L45:
	addl	$1, %r10d
	movl	(%rsp), %edi
	leal	2(%r8), %eax
	leal	(%r10,%r10), %ecx
	movl	%eax, 24(%rsp)
	movl	%r10d, %r9d
	leal	(%rcx,%r10), %eax
	movl	%r10d, 8(%rsp)
	addl	%edi, %eax
	movl	%eax, 40(%rsp)
	leal	-1(%rdi), %eax
	leal	(%rcx,%rax), %edi
	addl	%r10d, %eax
	movl	%r8d, %r10d
	movl	%edi, 44(%rsp)
	movl	%eax, 56(%rsp)
	cmpl	56(%rsp), %r11d
	je	.L70
.L11:
	cmpl	%edx, %r9d
	jg	.L50
	movl	24(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L50
.L44:
	movl	40(%rsp), %ecx
	addl	$1, %r9d
	leal	3(%r10), %eax
	movl	%r9d, 12(%rsp)
	movl	%r9d, %r15d
	movl	%r10d, %r9d
	movl	%r11d, %r10d
	movl	%eax, 28(%rsp)
	movl	%ecx, %r11d
	cmpl	%r10d, 44(%rsp)
	je	.L71
.L15:
	cmpl	%edx, %r15d
	jg	.L52
	movl	28(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L52
.L43:
	leal	4(%r9), %eax
	addl	$1, %r15d
	movl	%r10d, %esi
	movl	%eax, 32(%rsp)
	movl	%r15d, %r10d
	movl	%r15d, %r12d
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	%r11d, %esi
	je	.L72
	cmpl	%edx, %r12d
	jle	.L73
.L54:
	movl	%r10d, %r15d
	movl	%esi, %r10d
.L21:
	addl	$1, %r11d
	cmpl	%r10d, 44(%rsp)
	jne	.L15
.L71:
	movl	28(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L74
	cmpl	%edx, %r15d
	jle	.L43
.L52:
	movl	%r10d, %r11d
	movl	%r9d, %r10d
	movl	12(%rsp), %r9d
.L17:
	addl	$2, 40(%rsp)
	addl	$1, 44(%rsp)
	cmpl	56(%rsp), %r11d
	jne	.L11
.L70:
	movl	24(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L75
	cmpl	%edx, %r9d
	jle	.L44
.L50:
	movl	%r10d, %r8d
	movl	8(%rsp), %r10d
	cmpl	%r11d, (%rsp)
	jne	.L7
.L69:
	movl	20(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L76
	cmpl	%edx, %r10d
	jle	.L45
.L48:
	movl	(%rsp), %r9d
.L9:
	addl	$1, %r9d
	cmpl	52(%rsp), %r11d
	jne	.L3
.L68:
	cmpl	%r8d, k(%rip)
	je	.L77
	cmpl	%edx, 4(%rsp)
	jle	.L46
.L1:
	addq	$104, %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
.L72:
	.cfi_restore_state
	movl	32(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L78
	cmpl	%edx, %r12d
	jg	.L54
.L42:
	addl	$1, %r12d
	leal	5(%r9), %eax
	leal	(%r12,%r12), %ecx
	movl	%eax, 36(%rsp)
	movl	%r12d, %ebp
	leal	(%rcx,%r12), %eax
	leal	(%rax,%r11), %r14d
	leal	-1(%r11), %eax
	leal	(%rcx,%rax), %r8d
	addl	%r12d, %eax
	movl	%r8d, %r15d
	movl	%eax, 60(%rsp)
	movl	%r12d, %r8d
	cmpl	60(%rsp), %esi
	je	.L79
.L23:
	cmpl	%edx, %ebp
	jle	.L80
.L56:
	movl	%r8d, %r12d
	jmp	.L18
.L78:
	movl	%r10d, %r15d
	addl	$1, ans(%rip)
	movl	%esi, %r10d
	jmp	.L21
.L80:
	movl	36(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L56
.L41:
	leal	6(%r9), %eax
	addl	$1, %ebp
	movl	%r14d, %r13d
	movl	%eax, 16(%rsp)
	leal	7(%r9), %eax
	movl	%ebp, %ebx
	movl	%eax, %r12d
.L26:
	cmpl	%r15d, %esi
	je	.L81
	cmpl	%edx, %ebx
	jle	.L82
.L29:
	addl	$2, %r14d
	addl	$1, %r15d
	cmpl	60(%rsp), %esi
	jne	.L23
.L79:
	movl	36(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L83
	cmpl	%edx, %ebp
	jle	.L41
	jmp	.L56
.L83:
	addl	$1, ans(%rip)
	movl	%r8d, %r12d
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L81:
	movl	16(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L84
	cmpl	%edx, %ebx
	jg	.L29
.L40:
	addl	$1, %ebx
	leal	8(%r9), %eax
	movl	%ebx, %ecx
.L30:
	cmpl	%esi, %r13d
	je	.L85
	cmpl	%ecx, %edx
	jl	.L33
	cmpl	k(%rip), %r12d
	jne	.L39
.L33:
	addl	$1, %r13d
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L85:
	cmpl	k(%rip), %r12d
	je	.L86
	cmpl	%ecx, %edx
	jl	.L33
.L39:
	leal	1(%rcx), %edi
	addl	%r13d, %ecx
	movl	%r12d, 68(%rsp)
	movl	%ebx, %r12d
	movl	%edi, 48(%rsp)
	movl	%ecx, %ebx
	movl	68(%rsp), %ecx
.L37:
	cmpl	%ebx, %esi
	je	.L87
	cmpl	%edx, %edi
	jg	.L63
	cmpl	k(%rip), %eax
	jne	.L38
.L63:
	movl	%r12d, %ebx
	movl	%ecx, %r12d
.L36:
	movl	48(%rsp), %ecx
	jmp	.L30
.L84:
	addl	$1, ans(%rip)
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L86:
	addl	$1, ans(%rip)
	jmp	.L33
.L73:
	movl	32(%rsp), %eax
	cmpl	k(%rip), %eax
	jne	.L42
	jmp	.L54
.L74:
	movl	%r10d, %r11d
	addl	$1, ans(%rip)
	movl	%r9d, %r10d
	movl	12(%rsp), %r9d
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L87:
	cmpl	k(%rip), %eax
	je	.L88
	cmpl	%edx, %edi
	jg	.L63
.L38:
	movl	64(%rsp), %esi
	leal	(%rdi,%rbx), %edx
	addl	$1, %edi
	movl	%ecx, 92(%rsp)
	movl	%eax, 88(%rsp)
	movl	%r9d, 84(%rsp)
	movl	%r11d, 80(%rsp)
	movl	%r8d, 76(%rsp)
	movl	%r10d, 72(%rsp)
	movl	%edi, 68(%rsp)
	call	dfs
	movl	s(%rip), %esi
	movl	n(%rip), %edx
	movl	68(%rsp), %edi
	movl	72(%rsp), %r10d
	movl	76(%rsp), %r8d
	movl	80(%rsp), %r11d
	movl	84(%rsp), %r9d
	movl	88(%rsp), %eax
	movl	92(%rsp), %ecx
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L88:
	movl	%r12d, %ebx
	addl	$1, ans(%rip)
	movl	%ecx, %r12d
	jmp	.L36
.L75:
	movl	%r10d, %r8d
	addl	$1, ans(%rip)
	movl	8(%rsp), %r10d
	jmp	.L6
.L77:
	addl	$1, ans(%rip)
	addq	$104, %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
.L82:
	.cfi_restore_state
	movl	16(%rsp), %eax
	cmpl	k(%rip), %eax
	je	.L29
	jmp	.L40
.L76:
	addl	$1, ans(%rip)
	movl	(%rsp), %r9d
	jmp	.L9
	.cfi_endproc
.LFE23:
	.size	dfs, .-dfs
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d %d %d"
	.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	s(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	k(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	n(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L90:
	movq	%r12, %rsi
	movq	%r14, %rcx
	movq	%r13, %rdx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	n(%rip), %esi
	testl	%esi, %esi
	je	.L105
	movl	s(%rip), %edx
	movl	$1, %r15d
	movl	$0, ans(%rip)
	testl	%edx, %edx
	je	.L106
.L92:
	cmpl	%r15d, %esi
	jl	.L95
	movl	k(%rip), %eax
	testl	%eax, %eax
	je	.L95
.L96:
	leal	1(%r15), %ebx
	movl	%ebx, %ebp
	cmpl	%r15d, %edx
	je	.L107
.L97:
	cmpl	%ebp, %esi
	jl	.L99
	cmpl	$1, k(%rip)
	je	.L99
.L102:
	leal	0(%rbp,%r15), %edx
	addl	$1, %ebp
	movl	$2, %esi
	movl	%ebp, %edi
	call	dfs
	movl	s(%rip), %edx
	movl	n(%rip), %esi
	cmpl	%r15d, %edx
	jne	.L97
.L107:
	cmpl	$1, k(%rip)
	je	.L108
	cmpl	%ebp, %esi
	jge	.L102
.L99:
	movl	%ebx, %r15d
.L110:
	testl	%edx, %edx
	jne	.L92
.L106:
	movl	k(%rip), %ecx
	testl	%ecx, %ecx
	je	.L109
	cmpl	%r15d, %esi
	jge	.L96
.L95:
	movl	ans(%rip), %edx
.L94:
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L90
	.p2align 4,,10
	.p2align 3
.L108:
	addl	$1, ans(%rip)
	movl	%ebx, %r15d
	jmp	.L110
	.p2align 4,,10
	.p2align 3
.L109:
	movl	ans(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ans(%rip)
	jmp	.L94
.L105:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	ans
	.bss
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>

int n, k, s, ans;

void dfs(int num,int cnt,int sum){
  if(sum==s&&cnt==k) ans++;
  if(num>n) return;
  if(cnt==k) return;

  dfs(num+1, cnt+1, sum+num);
  dfs(num+1, cnt, sum);
}

int main(){

  while(scanf("%d %d %d", &n, &k, &s), n){
    ans=0;
    dfs(1,0,0);
    printf("%d\n", ans);
  }

  return 0;
}
9 3 23
9 3 22
10 3 28
16 10 107
20 8 102
20 10 105
20 10 155
3 5 3
4 2 11
0 0 0
 9 3 23
9 3 22
10 3 28
16 10 107
20 8 102
20 10 105
20 20 155
3 5 3
4 2 11
0 0 0
 9 3 23
9 3 22
10 3 28
16 10 107
20 8 102
20 8 105
20 20 155
3 5 3
4 2 11
0 0 0
 9 3 23
2 3 22
10 3 28
16 10 107
20 8 102
20 8 105
20 20 155
3 5 3
2 2 11
0 0 0
 9 3 23
2 3 22
10 3 28
16 10 107
20 8 18
20 8 105
20 20 155
3 5 3
2 2 11
0 0 0
 9 3 23
9 3 22
10 3 28
16 10 107
26 8 102
20 10 105
20 10 155
3 4 3
4 2 11
0 0 0
 4 3 23
9 3 22
10 3 28
16 10 107
20 8 102
20 8 105
20 20 155
3 5 3
4 2 11
0 0 0
 9 3 23
16 3 22
10 3 28
16 10 107
20 8 102
20 8 105
20 20 155
3 5 3
2 2 11
0 0 0
 9 3 23
2 3 22
10 3 28
16 10 107
20 8 102
20 8 19
20 20 155
3 5 3
2 2 11
0 0 0
 9 3 23
9 3 22
10 3 28
16 10 107
26 8 102
20 10 105
20 10 2
3 4 3
4 2 11
0 0 0

1
2
0
20
1542
5448
1
0
0
 1
2
0
20
1542
5448
0
0
0
 1
2
0
20
1542
1095
0
0
0
 1
0
0
20
1542
1095
0
0
0
 1
0
0
20
0
1095
0
0
0
 1
2
0
20
32200
5448
1
0
0
 0
2
0
20
1542
1095
0
0
0
 1
26
0
20
1542
1095
0
0
0
 1
0
0
20
1542
0
0
0
0
 1
2
0
20
32200
5448
0
0
0

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 n, k, s, ans;

void dfs(int num,int cnt,int sum){
  if(sum==s&&cnt==k) ans++;
  if(num>n) return;
  if(cnt==k) return;

  dfs(num+1, cnt+1, sum+num);
  dfs(num+1, cnt, sum);
}

int main(){

  while(scanf("%d %d %d", &n, &k, &s), n){
    ans=0;
    dfs(1,0,0);
    printf("%d\n", ans);
  }

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.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	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	s(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jne	.L2
	movl	k(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L2
	movl	ans(%rip), %eax
	addl	$1, %eax
	movl	%eax, ans(%rip)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jg	.L6
	movl	k(%rip), %eax
	cmpl	%eax, -8(%rbp)
	je	.L7
	movl	-12(%rbp), %edx
	movl	-4(%rbp), %eax
	addl	%eax, %edx
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	dfs
	movl	-4(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	movl	%ecx, %edi
	call	dfs
	jmp	.L1
.L6:
	nop
	jmp	.L1
.L7:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dfs, .-dfs
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d %d %d"
	.text
	.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
	jmp	.L9
.L10:
	movl	$0, ans(%rip)
	movl	$0, %edx
	movl	$0, %esi
	movl	$1, %edi
	call	dfs
	movl	ans(%rip), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L9:
	leaq	s(%rip), %rax
	movq	%rax, %rcx
	leaq	k(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jne	.L10
	movl	$0, %eax
	popq	%rbp
	.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	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.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	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	s(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jne	.L2
	movl	k(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L2
	movl	ans(%rip), %eax
	addl	$1, %eax
	movl	%eax, ans(%rip)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jg	.L6
	movl	k(%rip), %eax
	cmpl	%eax, -8(%rbp)
	je	.L7
	movl	-12(%rbp), %edx
	movl	-4(%rbp), %eax
	addl	%eax, %edx
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	dfs
	movl	-4(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	movl	%ecx, %edi
	call	dfs
	jmp	.L1
.L6:
	nop
	jmp	.L1
.L7:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dfs, .-dfs
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d %d %d"
	.text
	.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
	jmp	.L9
.L10:
	movl	$0, ans(%rip)
	movl	$0, %edx
	movl	$0, %esi
	movl	$1, %edi
	call	dfs
	movl	ans(%rip), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L9:
	leaq	s(%rip), %rax
	movq	%rax, %rcx
	leaq	k(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jne	.L10
	movl	$0, %eax
	popq	%rbp
	.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:
