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,sum;
void calc(int a,int b,int c){
    if(a>n || b>k || c>s)
        return;
    if(b==k && c==s){
        sum++;
        return;
    }
    calc(a+1,b+1,c+a+1);
    calc(a+1,b,c);
}
int main(void){
    for(;sum=0,scanf("%d %d %d",&n,&k,&s),n+k+s;){
        calc(0,0,0);
        printf("%d\n",sum);
    }
    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	sum
	.align 4
	.type	sum, @object
	.size	sum, 4
sum:
	.zero	4
	.text
	.globl	calc
	.type	calc, @function
calc:
.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	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jg	.L6
	movl	k(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L6
	movl	s(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jg	.L6
	movl	k(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L5
	movl	s(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jne	.L5
	movl	sum(%rip), %eax
	addl	$1, %eax
	movl	%eax, sum(%rip)
	jmp	.L1
.L5:
	movl	-12(%rbp), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	leal	1(%rax), %edx
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	calc
	movl	-4(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	movl	%ecx, %edi
	call	calc
	jmp	.L1
.L6:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	calc, .-calc
	.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	.L8
.L9:
	movl	$0, %edx
	movl	$0, %esi
	movl	$0, %edi
	call	calc
	movl	sum(%rip), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	movl	$0, sum(%rip)
	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), %edx
	movl	k(%rip), %eax
	addl	%eax, %edx
	movl	s(%rip), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	jne	.L9
	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	calc
	.type	calc, @function
calc:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	n(%rip), %edi
	jg	.L116
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leal	1(%rdi,%rdx), %eax
	movl	%edx, %r8d
	movl	%edi, %r11d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%esi, %ecx
	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	$136, %rsp
	.cfi_def_cfa_offset 192
	movl	%eax, 76(%rsp)
	leal	8(%rsi), %eax
	movl	%eax, 104(%rsp)
.L3:
	movl	k(%rip), %edx
	cmpl	%ecx, %edx
	jl	.L1
	movl	s(%rip), %eax
	cmpl	%r8d, %eax
	jl	.L1
	cmpl	%ecx, %edx
	jne	.L4
	cmpl	%r8d, %eax
	je	.L120
.L4:
	movl	n(%rip), %esi
	leal	1(%rcx), %eax
	addl	$1, %r11d
	movl	%eax, 80(%rsp)
	cmpl	%esi, %r11d
	jg	.L1
	leal	(%r11,%r11), %eax
	movl	%r11d, 12(%rsp)
	movl	%r11d, %r9d
	leal	1(%r8,%rax), %ebx
	addl	%r11d, %eax
	movl	%r8d, 16(%rsp)
	movl	%ecx, %r11d
	leal	3(%r8,%rax), %eax
	movl	%ebx, 52(%rsp)
	movl	%eax, 72(%rsp)
	movl	80(%rsp), %eax
	cmpl	%edx, %eax
	jg	.L87
.L135:
	movl	76(%rsp), %ebx
	cmpl	s(%rip), %ebx
	jg	.L87
	jne	.L8
	cmpl	%edx, %eax
	je	.L121
.L8:
	leal	2(%r11), %eax
	addl	$1, %r9d
	movl	%eax, 84(%rsp)
	cmpl	%esi, %r9d
	jg	.L87
	movl	72(%rsp), %eax
	movl	%r9d, 20(%rsp)
	leal	-1(%rax), %r10d
	movl	%eax, 68(%rsp)
	movl	%r11d, %eax
	movl	%r9d, %r11d
	movl	%eax, %r8d
	movl	84(%rsp), %eax
	movl	%r10d, %ecx
	cmpl	%edx, %eax
	jg	.L91
.L134:
	movl	52(%rsp), %ebx
	cmpl	s(%rip), %ebx
	jg	.L91
	jne	.L11
	cmpl	%edx, %eax
	je	.L122
.L11:
	leal	3(%r8), %eax
	addl	$1, %r11d
	movl	%eax, 88(%rsp)
	cmpl	%esi, %r11d
	jg	.L91
	movl	52(%rsp), %eax
	movl	88(%rsp), %edi
	movl	%r11d, 24(%rsp)
	movl	%esi, %r10d
	leal	1(%rax,%r11,2), %eax
	movl	%eax, 64(%rsp)
	cmpl	%edx, %edi
	jg	.L95
.L133:
	movl	s(%rip), %eax
	movl	68(%rsp), %ebx
	cmpl	%eax, %ebx
	jg	.L95
	cmpl	%edx, %edi
	jne	.L14
	cmpl	%eax, %ebx
	je	.L123
.L14:
	leal	4(%r8), %eax
	addl	$1, %r11d
	movl	%eax, 92(%rsp)
	cmpl	%r10d, %r11d
	jg	.L95
	leal	(%r11,%r11), %eax
	movl	%r11d, 28(%rsp)
	movl	%r11d, %r14d
	leal	2(%rcx,%rax), %r15d
	addl	%r11d, %eax
	movl	%ecx, 32(%rsp)
	leal	4(%rcx,%rax), %eax
	movl	%eax, 56(%rsp)
	leal	7(%rcx,%r11,4), %eax
	movl	%r15d, %ecx
	movl	%eax, 60(%rsp)
.L15:
	movl	92(%rsp), %eax
	cmpl	%edx, %eax
	jg	.L99
	movl	64(%rsp), %ebx
	cmpl	s(%rip), %ebx
	jg	.L99
	jne	.L17
	cmpl	%edx, %eax
	je	.L124
.L17:
	leal	5(%r8), %eax
	addl	$1, %r14d
	movl	%eax, 96(%rsp)
	cmpl	%r14d, %r10d
	jl	.L99
	movl	56(%rsp), %r11d
	movl	96(%rsp), %edi
	leal	6(%r8), %eax
	movl	%r14d, %ebp
	movl	%r14d, 36(%rsp)
	movl	60(%rsp), %r9d
	movl	%r10d, %esi
	movl	%eax, 100(%rsp)
	movl	%r11d, %r14d
	cmpl	%edx, %edi
	jg	.L103
.L132:
	movl	s(%rip), %eax
	cmpl	%eax, %ecx
	jg	.L103
	cmpl	%edx, %edi
	jne	.L20
	cmpl	%eax, %ecx
	je	.L125
.L20:
	addl	$1, %ebp
	cmpl	%esi, %ebp
	jg	.L103
	leal	7(%r8), %r10d
	leal	1(%r14), %eax
	movl	%ebp, 40(%rsp)
	movl	%r9d, %r13d
	movl	%r10d, %edi
	movl	%r14d, %r10d
	movl	%r9d, 44(%rsp)
	movl	%ebp, %ebx
	movl	%edi, %r14d
	movl	100(%rsp), %edi
	leal	9(%r8), %r11d
	cmpl	%edx, %edi
	jg	.L107
	.p2align 4,,10
	.p2align 3
.L131:
	cmpl	s(%rip), %r10d
	jg	.L107
	jne	.L23
	cmpl	%edx, %edi
	je	.L126
.L23:
	addl	$1, %ebx
	cmpl	%ebx, %esi
	jl	.L107
	leal	(%rax,%rbx,2), %ebp
	movl	%ebx, %r12d
	movl	%ebx, %r9d
	cmpl	%edx, %r14d
	jg	.L111
	.p2align 4,,10
	.p2align 3
.L130:
	movl	s(%rip), %edi
	cmpl	%edi, %r13d
	jg	.L111
	cmpl	%edx, %r14d
	jne	.L26
	cmpl	%edi, %r13d
	je	.L127
.L26:
	addl	$1, %r12d
	cmpl	%esi, %r12d
	jg	.L111
	movl	%r14d, 48(%rsp)
	movl	%r12d, %r15d
	movl	%r13d, %r14d
	leal	1(%rbp), %ebx
	movl	%r12d, %r13d
	movl	%r9d, %r12d
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L129:
	cmpl	s(%rip), %ebp
	jg	.L114
	jne	.L28
	cmpl	%edx, %edi
	je	.L128
.L28:
	leal	(%rbx,%r15), %edx
	addl	$1, %r15d
	movl	%r11d, %esi
	movl	%eax, 124(%rsp)
	movl	%r15d, %edi
	movl	%r8d, 120(%rsp)
	movl	%ecx, 116(%rsp)
	movl	%r10d, 112(%rsp)
	movl	%r11d, 108(%rsp)
	call	calc
	movl	n(%rip), %esi
	movl	108(%rsp), %r11d
	movl	112(%rsp), %r10d
	movl	116(%rsp), %ecx
	cmpl	%r15d, %esi
	movl	120(%rsp), %r8d
	movl	124(%rsp), %eax
	jl	.L114
	movl	k(%rip), %edx
.L29:
	movl	104(%rsp), %edi
	cmpl	%edx, %edi
	jle	.L129
.L114:
	movl	%r12d, %r9d
	movl	%r13d, %r12d
	movl	%r14d, %r13d
	movl	48(%rsp), %r14d
.L27:
	cmpl	%r12d, %esi
	jl	.L111
	movl	k(%rip), %edx
	addl	$1, %ebp
	cmpl	%edx, %r14d
	jle	.L130
.L111:
	movl	%r9d, %ebx
.L25:
	addl	$1, %r13d
	cmpl	%ebx, %esi
	jl	.L107
	movl	k(%rip), %edx
	movl	100(%rsp), %edi
	cmpl	%edx, %edi
	jle	.L131
.L107:
	movl	40(%rsp), %ebp
	movl	44(%rsp), %r9d
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L128:
	movl	%r12d, %r9d
	addl	$1, sum(%rip)
	movl	%r13d, %r12d
	movl	%r14d, %r13d
	movl	48(%rsp), %r14d
	jmp	.L27
.L126:
	addl	$1, sum(%rip)
	movl	40(%rsp), %ebp
	movl	44(%rsp), %r9d
.L22:
	movl	%eax, %r14d
	addl	$2, %r9d
	cmpl	%esi, %ebp
	jg	.L103
	movl	k(%rip), %edx
	movl	96(%rsp), %edi
	cmpl	%edx, %edi
	jle	.L132
.L103:
	movl	36(%rsp), %r14d
	movl	%esi, %r10d
	jmp	.L19
.L127:
	addl	$1, sum(%rip)
	movl	%r9d, %ebx
	jmp	.L25
.L99:
	movl	28(%rsp), %r11d
	movl	32(%rsp), %ecx
.L16:
	addl	$1, 64(%rsp)
	cmpl	%r10d, %r11d
	jg	.L95
	movl	k(%rip), %edx
	movl	88(%rsp), %edi
	cmpl	%edx, %edi
	jle	.L133
.L95:
	movl	24(%rsp), %r11d
	movl	%r10d, %esi
.L13:
	addl	$1, 68(%rsp)
	addl	$1, %ecx
	cmpl	%esi, %r11d
	jg	.L91
	movl	k(%rip), %edx
	movl	84(%rsp), %eax
	cmpl	%edx, %eax
	jle	.L134
.L91:
	movl	20(%rsp), %r9d
	movl	%r8d, %r11d
.L10:
	addl	$2, 72(%rsp)
	cmpl	%esi, %r9d
	jg	.L87
	movl	k(%rip), %edx
	movl	80(%rsp), %eax
	addl	$1, 52(%rsp)
	cmpl	%edx, %eax
	jle	.L135
.L87:
	movl	%r11d, %ecx
	movl	16(%rsp), %r8d
	movl	12(%rsp), %r11d
	jmp	.L7
.L125:
	addl	$1, sum(%rip)
	movl	36(%rsp), %r14d
	movl	%esi, %r10d
.L19:
	addl	$2, 56(%rsp)
	addl	$1, %ecx
	addl	$3, 60(%rsp)
	cmpl	%r10d, %r14d
	jg	.L99
	movl	k(%rip), %edx
	jmp	.L15
.L124:
	addl	$1, sum(%rip)
	movl	28(%rsp), %r11d
	movl	32(%rsp), %ecx
	jmp	.L16
.L123:
	addl	$1, sum(%rip)
	movl	24(%rsp), %r11d
	movl	%r10d, %esi
	jmp	.L13
.L120:
	addl	$1, sum(%rip)
.L1:
	addq	$136, %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
.L121:
	.cfi_restore_state
	addl	$1, sum(%rip)
	movl	%r11d, %ecx
	movl	16(%rsp), %r8d
	movl	12(%rsp), %r11d
.L7:
	addl	$1, 76(%rsp)
	cmpl	%esi, %r11d
	jle	.L3
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L122:
	addl	$1, sum(%rip)
	movl	20(%rsp), %r9d
	movl	%r8d, %r11d
	jmp	.L10
.L116:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE23:
	.size	calc, .-calc
	.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
	leaq	s(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	k(%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	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L137:
	movq	%r14, %rdx
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	movq	%r15, %rcx
	leaq	n(%rip), %rsi
	movl	$0, sum(%rip)
	call	__isoc99_scanf@PLT
	movl	n(%rip), %edi
	movl	k(%rip), %edx
	leal	(%rdi,%rdx), %eax
	addl	s(%rip), %eax
	je	.L146
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	testl	%edi, %edi
	js	.L138
	testl	%edx, %edx
	js	.L138
	.p2align 4,,10
	.p2align 3
.L139:
	movl	s(%rip), %eax
	testl	%eax, %eax
	js	.L138
	orl	%edx, %eax
	je	.L157
	addl	$1, %r12d
	cmpl	%edi, %r12d
	jg	.L138
	movl	%r12d, %r13d
	leal	2(%rbp), %ebx
	jmp	.L145
	.p2align 4,,10
	.p2align 3
.L159:
	movl	s(%rip), %esi
	cmpl	%esi, %r12d
	jg	.L143
	cmpl	$1, %edx
	jne	.L144
	cmpl	%esi, %r12d
	je	.L158
.L144:
	leal	(%rbx,%r13), %edx
	addl	$1, %r13d
	movl	$2, %esi
	movl	%r13d, %edi
	call	calc
	movl	n(%rip), %edi
	cmpl	%r13d, %edi
	jl	.L143
	movl	k(%rip), %edx
.L145:
	testl	%edx, %edx
	jg	.L159
.L143:
	addl	$1, %ebp
	cmpl	%edi, %r12d
	jg	.L138
	movl	k(%rip), %edx
	testl	%edx, %edx
	jns	.L139
.L138:
	movl	sum(%rip), %edx
.L140:
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L137
	.p2align 4,,10
	.p2align 3
.L158:
	addl	$1, sum(%rip)
	jmp	.L143
.L157:
	movl	sum(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, sum(%rip)
	jmp	.L140
.L146:
	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	sum
	.bss
	.align 4
	.type	sum, @object
	.size	sum, 4
sum:
	.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	calc
	.type	calc, @function
calc:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	n(%rip), %edi
	jg	.L116
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leal	1(%rdi,%rdx), %eax
	movl	%edx, %r8d
	movl	%edi, %r11d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%esi, %ecx
	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	$136, %rsp
	.cfi_def_cfa_offset 192
	movl	%eax, 76(%rsp)
	leal	8(%rsi), %eax
	movl	%eax, 104(%rsp)
.L3:
	movl	k(%rip), %edx
	cmpl	%ecx, %edx
	jl	.L1
	movl	s(%rip), %eax
	cmpl	%r8d, %eax
	jl	.L1
	cmpl	%ecx, %edx
	jne	.L4
	cmpl	%r8d, %eax
	je	.L120
.L4:
	movl	n(%rip), %esi
	leal	1(%rcx), %eax
	addl	$1, %r11d
	movl	%eax, 80(%rsp)
	cmpl	%esi, %r11d
	jg	.L1
	leal	(%r11,%r11), %eax
	movl	%r11d, 12(%rsp)
	movl	%r11d, %r9d
	leal	1(%r8,%rax), %ebx
	addl	%r11d, %eax
	movl	%r8d, 16(%rsp)
	movl	%ecx, %r11d
	leal	3(%r8,%rax), %eax
	movl	%ebx, 52(%rsp)
	movl	%eax, 72(%rsp)
	movl	80(%rsp), %eax
	cmpl	%edx, %eax
	jg	.L87
.L135:
	movl	76(%rsp), %ebx
	cmpl	s(%rip), %ebx
	jg	.L87
	jne	.L8
	cmpl	%edx, %eax
	je	.L121
.L8:
	leal	2(%r11), %eax
	addl	$1, %r9d
	movl	%eax, 84(%rsp)
	cmpl	%esi, %r9d
	jg	.L87
	movl	72(%rsp), %eax
	movl	%r9d, 20(%rsp)
	leal	-1(%rax), %r10d
	movl	%eax, 68(%rsp)
	movl	%r11d, %eax
	movl	%r9d, %r11d
	movl	%eax, %r8d
	movl	84(%rsp), %eax
	movl	%r10d, %ecx
	cmpl	%edx, %eax
	jg	.L91
.L134:
	movl	52(%rsp), %ebx
	cmpl	s(%rip), %ebx
	jg	.L91
	jne	.L11
	cmpl	%edx, %eax
	je	.L122
.L11:
	leal	3(%r8), %eax
	addl	$1, %r11d
	movl	%eax, 88(%rsp)
	cmpl	%esi, %r11d
	jg	.L91
	movl	52(%rsp), %eax
	movl	88(%rsp), %edi
	movl	%r11d, 24(%rsp)
	movl	%esi, %r10d
	leal	1(%rax,%r11,2), %eax
	movl	%eax, 64(%rsp)
	cmpl	%edx, %edi
	jg	.L95
.L133:
	movl	s(%rip), %eax
	movl	68(%rsp), %ebx
	cmpl	%eax, %ebx
	jg	.L95
	cmpl	%edx, %edi
	jne	.L14
	cmpl	%eax, %ebx
	je	.L123
.L14:
	leal	4(%r8), %eax
	addl	$1, %r11d
	movl	%eax, 92(%rsp)
	cmpl	%r10d, %r11d
	jg	.L95
	leal	(%r11,%r11), %eax
	movl	%r11d, 28(%rsp)
	movl	%r11d, %r14d
	leal	2(%rcx,%rax), %r15d
	addl	%r11d, %eax
	movl	%ecx, 32(%rsp)
	leal	4(%rcx,%rax), %eax
	movl	%eax, 56(%rsp)
	leal	7(%rcx,%r11,4), %eax
	movl	%r15d, %ecx
	movl	%eax, 60(%rsp)
.L15:
	movl	92(%rsp), %eax
	cmpl	%edx, %eax
	jg	.L99
	movl	64(%rsp), %ebx
	cmpl	s(%rip), %ebx
	jg	.L99
	jne	.L17
	cmpl	%edx, %eax
	je	.L124
.L17:
	leal	5(%r8), %eax
	addl	$1, %r14d
	movl	%eax, 96(%rsp)
	cmpl	%r14d, %r10d
	jl	.L99
	movl	56(%rsp), %r11d
	movl	96(%rsp), %edi
	leal	6(%r8), %eax
	movl	%r14d, %ebp
	movl	%r14d, 36(%rsp)
	movl	60(%rsp), %r9d
	movl	%r10d, %esi
	movl	%eax, 100(%rsp)
	movl	%r11d, %r14d
	cmpl	%edx, %edi
	jg	.L103
.L132:
	movl	s(%rip), %eax
	cmpl	%eax, %ecx
	jg	.L103
	cmpl	%edx, %edi
	jne	.L20
	cmpl	%eax, %ecx
	je	.L125
.L20:
	addl	$1, %ebp
	cmpl	%esi, %ebp
	jg	.L103
	leal	7(%r8), %r10d
	leal	1(%r14), %eax
	movl	%ebp, 40(%rsp)
	movl	%r9d, %r13d
	movl	%r10d, %edi
	movl	%r14d, %r10d
	movl	%r9d, 44(%rsp)
	movl	%ebp, %ebx
	movl	%edi, %r14d
	movl	100(%rsp), %edi
	leal	9(%r8), %r11d
	cmpl	%edx, %edi
	jg	.L107
	.p2align 4,,10
	.p2align 3
.L131:
	cmpl	s(%rip), %r10d
	jg	.L107
	jne	.L23
	cmpl	%edx, %edi
	je	.L126
.L23:
	addl	$1, %ebx
	cmpl	%ebx, %esi
	jl	.L107
	leal	(%rax,%rbx,2), %ebp
	movl	%ebx, %r12d
	movl	%ebx, %r9d
	cmpl	%edx, %r14d
	jg	.L111
	.p2align 4,,10
	.p2align 3
.L130:
	movl	s(%rip), %edi
	cmpl	%edi, %r13d
	jg	.L111
	cmpl	%edx, %r14d
	jne	.L26
	cmpl	%edi, %r13d
	je	.L127
.L26:
	addl	$1, %r12d
	cmpl	%esi, %r12d
	jg	.L111
	movl	%r14d, 48(%rsp)
	movl	%r12d, %r15d
	movl	%r13d, %r14d
	leal	1(%rbp), %ebx
	movl	%r12d, %r13d
	movl	%r9d, %r12d
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L129:
	cmpl	s(%rip), %ebp
	jg	.L114
	jne	.L28
	cmpl	%edx, %edi
	je	.L128
.L28:
	leal	(%rbx,%r15), %edx
	addl	$1, %r15d
	movl	%r11d, %esi
	movl	%eax, 124(%rsp)
	movl	%r15d, %edi
	movl	%r8d, 120(%rsp)
	movl	%ecx, 116(%rsp)
	movl	%r10d, 112(%rsp)
	movl	%r11d, 108(%rsp)
	call	calc
	movl	n(%rip), %esi
	movl	108(%rsp), %r11d
	movl	112(%rsp), %r10d
	movl	116(%rsp), %ecx
	cmpl	%r15d, %esi
	movl	120(%rsp), %r8d
	movl	124(%rsp), %eax
	jl	.L114
	movl	k(%rip), %edx
.L29:
	movl	104(%rsp), %edi
	cmpl	%edx, %edi
	jle	.L129
.L114:
	movl	%r12d, %r9d
	movl	%r13d, %r12d
	movl	%r14d, %r13d
	movl	48(%rsp), %r14d
.L27:
	cmpl	%r12d, %esi
	jl	.L111
	movl	k(%rip), %edx
	addl	$1, %ebp
	cmpl	%edx, %r14d
	jle	.L130
.L111:
	movl	%r9d, %ebx
.L25:
	addl	$1, %r13d
	cmpl	%ebx, %esi
	jl	.L107
	movl	k(%rip), %edx
	movl	100(%rsp), %edi
	cmpl	%edx, %edi
	jle	.L131
.L107:
	movl	40(%rsp), %ebp
	movl	44(%rsp), %r9d
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L128:
	movl	%r12d, %r9d
	addl	$1, sum(%rip)
	movl	%r13d, %r12d
	movl	%r14d, %r13d
	movl	48(%rsp), %r14d
	jmp	.L27
.L126:
	addl	$1, sum(%rip)
	movl	40(%rsp), %ebp
	movl	44(%rsp), %r9d
.L22:
	movl	%eax, %r14d
	addl	$2, %r9d
	cmpl	%esi, %ebp
	jg	.L103
	movl	k(%rip), %edx
	movl	96(%rsp), %edi
	cmpl	%edx, %edi
	jle	.L132
.L103:
	movl	36(%rsp), %r14d
	movl	%esi, %r10d
	jmp	.L19
.L127:
	addl	$1, sum(%rip)
	movl	%r9d, %ebx
	jmp	.L25
.L99:
	movl	28(%rsp), %r11d
	movl	32(%rsp), %ecx
.L16:
	addl	$1, 64(%rsp)
	cmpl	%r10d, %r11d
	jg	.L95
	movl	k(%rip), %edx
	movl	88(%rsp), %edi
	cmpl	%edx, %edi
	jle	.L133
.L95:
	movl	24(%rsp), %r11d
	movl	%r10d, %esi
.L13:
	addl	$1, 68(%rsp)
	addl	$1, %ecx
	cmpl	%esi, %r11d
	jg	.L91
	movl	k(%rip), %edx
	movl	84(%rsp), %eax
	cmpl	%edx, %eax
	jle	.L134
.L91:
	movl	20(%rsp), %r9d
	movl	%r8d, %r11d
.L10:
	addl	$2, 72(%rsp)
	cmpl	%esi, %r9d
	jg	.L87
	movl	k(%rip), %edx
	movl	80(%rsp), %eax
	addl	$1, 52(%rsp)
	cmpl	%edx, %eax
	jle	.L135
.L87:
	movl	%r11d, %ecx
	movl	16(%rsp), %r8d
	movl	12(%rsp), %r11d
	jmp	.L7
.L125:
	addl	$1, sum(%rip)
	movl	36(%rsp), %r14d
	movl	%esi, %r10d
.L19:
	addl	$2, 56(%rsp)
	addl	$1, %ecx
	addl	$3, 60(%rsp)
	cmpl	%r10d, %r14d
	jg	.L99
	movl	k(%rip), %edx
	jmp	.L15
.L124:
	addl	$1, sum(%rip)
	movl	28(%rsp), %r11d
	movl	32(%rsp), %ecx
	jmp	.L16
.L123:
	addl	$1, sum(%rip)
	movl	24(%rsp), %r11d
	movl	%r10d, %esi
	jmp	.L13
.L120:
	addl	$1, sum(%rip)
.L1:
	addq	$136, %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
.L121:
	.cfi_restore_state
	addl	$1, sum(%rip)
	movl	%r11d, %ecx
	movl	16(%rsp), %r8d
	movl	12(%rsp), %r11d
.L7:
	addl	$1, 76(%rsp)
	cmpl	%esi, %r11d
	jle	.L3
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L122:
	addl	$1, sum(%rip)
	movl	20(%rsp), %r9d
	movl	%r8d, %r11d
	jmp	.L10
.L116:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE23:
	.size	calc, .-calc
	.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
	leaq	s(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	k(%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	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L137:
	movq	%r14, %rdx
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	movq	%r15, %rcx
	leaq	n(%rip), %rsi
	movl	$0, sum(%rip)
	call	__isoc99_scanf@PLT
	movl	n(%rip), %edi
	movl	k(%rip), %edx
	leal	(%rdi,%rdx), %eax
	addl	s(%rip), %eax
	je	.L146
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	testl	%edi, %edi
	js	.L138
	testl	%edx, %edx
	js	.L138
	.p2align 4,,10
	.p2align 3
.L139:
	movl	s(%rip), %eax
	testl	%eax, %eax
	js	.L138
	orl	%edx, %eax
	je	.L157
	addl	$1, %r12d
	cmpl	%edi, %r12d
	jg	.L138
	movl	%r12d, %r13d
	leal	2(%rbp), %ebx
	jmp	.L145
	.p2align 4,,10
	.p2align 3
.L159:
	movl	s(%rip), %esi
	cmpl	%esi, %r12d
	jg	.L143
	cmpl	$1, %edx
	jne	.L144
	cmpl	%esi, %r12d
	je	.L158
.L144:
	leal	(%rbx,%r13), %edx
	addl	$1, %r13d
	movl	$2, %esi
	movl	%r13d, %edi
	call	calc
	movl	n(%rip), %edi
	cmpl	%r13d, %edi
	jl	.L143
	movl	k(%rip), %edx
.L145:
	testl	%edx, %edx
	jg	.L159
.L143:
	addl	$1, %ebp
	cmpl	%edi, %r12d
	jg	.L138
	movl	k(%rip), %edx
	testl	%edx, %edx
	jns	.L139
.L138:
	movl	sum(%rip), %edx
.L140:
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L137
	.p2align 4,,10
	.p2align 3
.L158:
	addl	$1, sum(%rip)
	jmp	.L143
.L157:
	movl	sum(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, sum(%rip)
	jmp	.L140
.L146:
	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	sum
	.bss
	.align 4
	.type	sum, @object
	.size	sum, 4
sum:
	.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,sum;
void calc(int a,int b,int c){
    if(a>n || b>k || c>s)
        return;
    if(b==k && c==s){
        sum++;
        return;
    }
    calc(a+1,b+1,c+a+1);
    calc(a+1,b,c);
}
int main(void){
    for(;sum=0,scanf("%d %d %d",&n,&k,&s),n+k+s;){
        calc(0,0,0);
        printf("%d\n",sum);
    }
    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,sum;
void calc(int a,int b,int c){
    if(a>n || b>k || c>s)
        return;
    if(b==k && c==s){
        sum++;
        return;
    }
    calc(a+1,b+1,c+a+1);
    calc(a+1,b,c);
}
int main(void){
    for(;sum=0,scanf("%d %d %d",&n,&k,&s),n+k+s;){
        calc(0,0,0);
        printf("%d\n",sum);
    }
    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	sum
	.align 4
	.type	sum, @object
	.size	sum, 4
sum:
	.zero	4
	.text
	.globl	calc
	.type	calc, @function
calc:
.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	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jg	.L6
	movl	k(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L6
	movl	s(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jg	.L6
	movl	k(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L5
	movl	s(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jne	.L5
	movl	sum(%rip), %eax
	addl	$1, %eax
	movl	%eax, sum(%rip)
	jmp	.L1
.L5:
	movl	-12(%rbp), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	leal	1(%rax), %edx
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	calc
	movl	-4(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	movl	%ecx, %edi
	call	calc
	jmp	.L1
.L6:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	calc, .-calc
	.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	.L8
.L9:
	movl	$0, %edx
	movl	$0, %esi
	movl	$0, %edi
	call	calc
	movl	sum(%rip), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	movl	$0, sum(%rip)
	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), %edx
	movl	k(%rip), %eax
	addl	%eax, %edx
	movl	s(%rip), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	jne	.L9
	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	sum
	.align 4
	.type	sum, @object
	.size	sum, 4
sum:
	.zero	4
	.text
	.globl	calc
	.type	calc, @function
calc:
.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	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jg	.L6
	movl	k(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L6
	movl	s(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jg	.L6
	movl	k(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L5
	movl	s(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jne	.L5
	movl	sum(%rip), %eax
	addl	$1, %eax
	movl	%eax, sum(%rip)
	jmp	.L1
.L5:
	movl	-12(%rbp), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	leal	1(%rax), %edx
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	calc
	movl	-4(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%eax, %esi
	movl	%ecx, %edi
	call	calc
	jmp	.L1
.L6:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	calc, .-calc
	.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	.L8
.L9:
	movl	$0, %edx
	movl	$0, %esi
	movl	$0, %edi
	call	calc
	movl	sum(%rip), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	movl	$0, sum(%rip)
	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), %edx
	movl	k(%rip), %eax
	addl	%eax, %edx
	movl	s(%rip), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	jne	.L9
	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:
