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 max(int a, int b)
{
   if(a>b) return a;
   else return b;
}
int min(int a, int b)
{
   if(a<b) return a;
   else return b;
}

int main(void)
{
   int q1, b, c1, c2, q2;
   int qa;
   int hi, lo, ce;

   while(scanf("%d", &q1)){
      if(q1==0) break;
      scanf("%d %d %d %d", &b, &c1, &c2, &q2);

      qa=0;
      hi=q2;
      lo=1;
      //while(hi>=lo){
         ce=(hi+lo)/2;
	 if(c1*ce+c2*max(q1-ce, 0)<=b){
	    //lo=ce+1;
	    //qa=ce;
            for(qa=q2; qa>=ce; qa--){
               if(c1*qa+c2*max(q1-qa, 0)<=b) break;
            }
	 }
	 else {
	    //if(c1>=c2) hi=ce-1;
	    //else lo=ce+1;
	    if(c1>=c2){
            for(qa=ce-1; qa>0; qa--){
               if(c1*qa+c2*max(q1-qa, 0)<=b) break;
            }}
	    else {
	       if(c1*ce>b){
               for(qa=ce-1; qa>0; qa--){
                  if(c1*qa+c2*max(q1-qa, 0)<=b) break;
               }
	       }
	       else {
	          qa=min(b/c1, q2);
		  if(c1*qa+c2*max(q1-qa, 0)>b) qa=0;
	       }
	    }
	 }
      //}
      if(qa==0) printf("NA\n");
      else printf("%d %d\n", qa, (b-c1*qa)/c2);
   }
   return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	max
	.type	max, @function
max:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L2
	movl	-4(%rbp), %eax
	jmp	.L3
.L2:
	movl	-8(%rbp), %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	max, .-max
	.globl	min
	.type	min, @function
min:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L5
	movl	-4(%rbp), %eax
	jmp	.L6
.L5:
	movl	-8(%rbp), %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	min, .-min
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"NA"
.LC2:
	.string	"%d %d\n"
.LC3:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	jmp	.L8
.L28:
	movl	-60(%rbp), %eax
	testl	%eax, %eax
	je	.L31
	leaq	-44(%rbp), %rsi
	leaq	-48(%rbp), %rcx
	leaq	-52(%rbp), %rdx
	leaq	-56(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -40(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -36(%rbp)
	movl	$1, -32(%rbp)
	movl	-36(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -28(%rbp)
	movl	-52(%rbp), %eax
	imull	-28(%rbp), %eax
	movl	%eax, %ebx
	movl	-60(%rbp), %eax
	subl	-28(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	max
	movl	-48(%rbp), %edx
	imull	%edx, %eax
	leal	(%rbx,%rax), %edx
	movl	-56(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L11
	movl	-44(%rbp), %eax
	movl	%eax, -40(%rbp)
	jmp	.L12
.L15:
	movl	-52(%rbp), %eax
	imull	-40(%rbp), %eax
	movl	%eax, %ebx
	movl	-60(%rbp), %eax
	subl	-40(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	max
	movl	-48(%rbp), %edx
	imull	%edx, %eax
	leal	(%rbx,%rax), %edx
	movl	-56(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L32
	subl	$1, -40(%rbp)
.L12:
	movl	-40(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jge	.L15
	jmp	.L16
.L11:
	movl	-52(%rbp), %edx
	movl	-48(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L17
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
	jmp	.L18
.L21:
	movl	-52(%rbp), %eax
	imull	-40(%rbp), %eax
	movl	%eax, %ebx
	movl	-60(%rbp), %eax
	subl	-40(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	max
	movl	-48(%rbp), %edx
	imull	%edx, %eax
	leal	(%rbx,%rax), %edx
	movl	-56(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L33
	subl	$1, -40(%rbp)
.L18:
	cmpl	$0, -40(%rbp)
	jg	.L21
	jmp	.L16
.L17:
	movl	-52(%rbp), %eax
	imull	-28(%rbp), %eax
	movl	%eax, %edx
	movl	-56(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L22
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
	jmp	.L23
.L26:
	movl	-52(%rbp), %eax
	imull	-40(%rbp), %eax
	movl	%eax, %ebx
	movl	-60(%rbp), %eax
	subl	-40(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	max
	movl	-48(%rbp), %edx
	imull	%edx, %eax
	leal	(%rbx,%rax), %edx
	movl	-56(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L34
	subl	$1, -40(%rbp)
.L23:
	cmpl	$0, -40(%rbp)
	jg	.L26
	jmp	.L16
.L22:
	movl	-44(%rbp), %ecx
	movl	-56(%rbp), %eax
	movl	-52(%rbp), %edi
	cltd
	idivl	%edi
	movl	%ecx, %esi
	movl	%eax, %edi
	call	min
	movl	%eax, -40(%rbp)
	movl	-52(%rbp), %eax
	imull	-40(%rbp), %eax
	movl	%eax, %ebx
	movl	-60(%rbp), %eax
	subl	-40(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	max
	movl	-48(%rbp), %edx
	imull	%edx, %eax
	leal	(%rbx,%rax), %edx
	movl	-56(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L16
	movl	$0, -40(%rbp)
	jmp	.L16
.L32:
	nop
	jmp	.L16
.L33:
	nop
	jmp	.L16
.L34:
	nop
.L16:
	cmpl	$0, -40(%rbp)
	jne	.L27
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L8
.L27:
	movl	-56(%rbp), %edx
	movl	-52(%rbp), %eax
	imull	-40(%rbp), %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	-48(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%eax, %edx
	movl	-40(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	leaq	-60(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	jne	.L28
	jmp	.L10
.L31:
	nop
.L10:
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	max
	.type	max, @function
max:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovge	%edi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	max, .-max
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"NA"
.LC2:
	.string	"%d %d\n"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC2(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC1(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC3(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rbp
	leaq	20(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L6
	movl	4(%rsp), %eax
	testl	%eax, %eax
	je	.L6
	leaq	16(%rsp), %rcx
	leaq	12(%rsp), %rdx
	movq	%r13, %r8
	movq	%r12, %rdi
	leaq	8(%rsp), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %r8d
	movl	12(%rsp), %edi
	movl	$0, %r11d
	movl	4(%rsp), %esi
	movl	16(%rsp), %r9d
	leal	1(%r8), %edx
	movl	8(%rsp), %ecx
	movl	%edx, %eax
	movl	%esi, %r10d
	shrl	$31, %eax
	addl	%edx, %eax
	movl	%edi, %edx
	sarl	%eax
	imull	%eax, %edx
	subl	%eax, %r10d
	cmovs	%r11d, %r10d
	imull	%r9d, %r10d
	addl	%edx, %r10d
	cmpl	%ecx, %r10d
	jle	.L26
	cmpl	%r9d, %edi
	jge	.L27
	cmpl	%ecx, %edx
	jg	.L28
	movl	%ecx, %eax
	cltd
	idivl	%edi
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	movl	$0, %eax
	subl	%r8d, %esi
	cmovs	%eax, %esi
	movl	%edi, %eax
	imull	%r8d, %eax
	imull	%r9d, %esi
	addl	%eax, %esi
	cmpl	%esi, %ecx
	jl	.L15
.L8:
	testl	%r8d, %r8d
	jne	.L29
.L15:
	movq	%r14, %rdi
	call	puts@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L26:
	cmpl	%eax, %r8d
	jl	.L8
	movl	%edi, %r10d
	movl	%esi, %edx
	imull	%r8d, %r10d
	subl	%r8d, %edx
	cmovs	%r11d, %edx
	imull	%r9d, %edx
	addl	%r10d, %edx
	cmpl	%edx, %ecx
	jge	.L8
	subl	%edi, %r10d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	movl	%esi, %edx
	movl	$0, %r11d
	subl	%r8d, %edx
	cmovs	%r11d, %edx
	imull	%r9d, %edx
	addl	%r10d, %edx
	subl	%edi, %r10d
	cmpl	%edx, %ecx
	jge	.L8
.L9:
	subl	$1, %r8d
	cmpl	%r8d, %eax
	jle	.L10
	testl	%r8d, %r8d
	je	.L15
.L29:
	imull	%r8d, %edi
	movl	%edi, %edx
.L12:
	subl	%edx, %ecx
	movq	%r15, %rsi
	movl	$1, %edi
	movl	%ecx, %eax
	cltd
	idivl	%r9d
	movl	%r8d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L27:
	leal	-1(%rax), %r8d
	testl	%r8d, %r8d
	jle	.L8
	movl	%esi, %eax
	subl	%edi, %edx
	movl	$0, %r10d
	subl	%r8d, %eax
	cmovs	%r10d, %eax
	imull	%r9d, %eax
	addl	%edx, %eax
	cmpl	%eax, %ecx
	jge	.L12
	subl	%edi, %edx
	movl	%edx, %r10d
	.p2align 4,,10
	.p2align 3
.L13:
	subl	$1, %r8d
	je	.L15
	movl	%esi, %eax
	movl	%r10d, %edx
	movl	$0, %r11d
	subl	%edi, %r10d
	subl	%r8d, %eax
	cmovs	%r11d, %eax
	imull	%r9d, %eax
	addl	%edx, %eax
	cmpl	%eax, %ecx
	jl	.L13
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L28:
	leal	-1(%rax), %r8d
	testl	%r8d, %r8d
	jle	.L8
	movl	%esi, %eax
	subl	%edi, %edx
	movl	$0, %r10d
	subl	%r8d, %eax
	cmovs	%r10d, %eax
	imull	%r9d, %eax
	addl	%edx, %eax
	cmpl	%eax, %ecx
	jge	.L12
	subl	%edi, %edx
	movl	%edx, %r10d
	.p2align 4,,10
	.p2align 3
.L17:
	subl	$1, %r8d
	je	.L15
	movl	%esi, %eax
	movl	%r10d, %edx
	movl	$0, %r11d
	subl	%edi, %r10d
	subl	%r8d, %eax
	cmovs	%r11d, %eax
	imull	%r9d, %eax
	addl	%edx, %eax
	cmpl	%eax, %ecx
	jl	.L17
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L6:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	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
.L30:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovge	%edi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	max, .-max
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"NA"
.LC2:
	.string	"%d %d\n"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC2(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC1(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC3(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rbp
	leaq	20(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L6
	movl	4(%rsp), %eax
	testl	%eax, %eax
	je	.L6
	leaq	16(%rsp), %rcx
	leaq	12(%rsp), %rdx
	movq	%r13, %r8
	movq	%r12, %rdi
	leaq	8(%rsp), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %r8d
	movl	12(%rsp), %edi
	movl	$0, %r11d
	movl	4(%rsp), %esi
	movl	16(%rsp), %r9d
	leal	1(%r8), %edx
	movl	8(%rsp), %ecx
	movl	%edx, %eax
	movl	%esi, %r10d
	shrl	$31, %eax
	addl	%edx, %eax
	movl	%edi, %edx
	sarl	%eax
	imull	%eax, %edx
	subl	%eax, %r10d
	cmovs	%r11d, %r10d
	imull	%r9d, %r10d
	addl	%edx, %r10d
	cmpl	%ecx, %r10d
	jle	.L26
	cmpl	%r9d, %edi
	jge	.L27
	cmpl	%ecx, %edx
	jg	.L28
	movl	%ecx, %eax
	cltd
	idivl	%edi
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	movl	$0, %eax
	subl	%r8d, %esi
	cmovs	%eax, %esi
	movl	%edi, %eax
	imull	%r8d, %eax
	imull	%r9d, %esi
	addl	%eax, %esi
	cmpl	%esi, %ecx
	jl	.L15
.L8:
	testl	%r8d, %r8d
	jne	.L29
.L15:
	movq	%r14, %rdi
	call	puts@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L26:
	cmpl	%eax, %r8d
	jl	.L8
	movl	%edi, %r10d
	movl	%esi, %edx
	imull	%r8d, %r10d
	subl	%r8d, %edx
	cmovs	%r11d, %edx
	imull	%r9d, %edx
	addl	%r10d, %edx
	cmpl	%edx, %ecx
	jge	.L8
	subl	%edi, %r10d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	movl	%esi, %edx
	movl	$0, %r11d
	subl	%r8d, %edx
	cmovs	%r11d, %edx
	imull	%r9d, %edx
	addl	%r10d, %edx
	subl	%edi, %r10d
	cmpl	%edx, %ecx
	jge	.L8
.L9:
	subl	$1, %r8d
	cmpl	%r8d, %eax
	jle	.L10
	testl	%r8d, %r8d
	je	.L15
.L29:
	imull	%r8d, %edi
	movl	%edi, %edx
.L12:
	subl	%edx, %ecx
	movq	%r15, %rsi
	movl	$1, %edi
	movl	%ecx, %eax
	cltd
	idivl	%r9d
	movl	%r8d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L27:
	leal	-1(%rax), %r8d
	testl	%r8d, %r8d
	jle	.L8
	movl	%esi, %eax
	subl	%edi, %edx
	movl	$0, %r10d
	subl	%r8d, %eax
	cmovs	%r10d, %eax
	imull	%r9d, %eax
	addl	%edx, %eax
	cmpl	%eax, %ecx
	jge	.L12
	subl	%edi, %edx
	movl	%edx, %r10d
	.p2align 4,,10
	.p2align 3
.L13:
	subl	$1, %r8d
	je	.L15
	movl	%esi, %eax
	movl	%r10d, %edx
	movl	$0, %r11d
	subl	%edi, %r10d
	subl	%r8d, %eax
	cmovs	%r11d, %eax
	imull	%r9d, %eax
	addl	%edx, %eax
	cmpl	%eax, %ecx
	jl	.L13
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L28:
	leal	-1(%rax), %r8d
	testl	%r8d, %r8d
	jle	.L8
	movl	%esi, %eax
	subl	%edi, %edx
	movl	$0, %r10d
	subl	%r8d, %eax
	cmovs	%r10d, %eax
	imull	%r9d, %eax
	addl	%edx, %eax
	cmpl	%eax, %ecx
	jge	.L12
	subl	%edi, %edx
	movl	%edx, %r10d
	.p2align 4,,10
	.p2align 3
.L17:
	subl	$1, %r8d
	je	.L15
	movl	%esi, %eax
	movl	%r10d, %edx
	movl	$0, %r11d
	subl	%edi, %r10d
	subl	%r8d, %eax
	cmovs	%r11d, %eax
	imull	%r9d, %eax
	addl	%edx, %eax
	cmpl	%eax, %ecx
	jl	.L17
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L6:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	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
.L30:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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:

#include <stdio.h>

int max(int a, int b)
{
   if(a>b) return a;
   else return b;
}
int min(int a, int b)
{
   if(a<b) return a;
   else return b;
}

int main(void)
{
   int q1, b, c1, c2, q2;
   int qa;
   int hi, lo, ce;

   while(scanf("%d", &q1)){
      if(q1==0) break;
      scanf("%d %d %d %d", &b, &c1, &c2, &q2);

      qa=0;
      hi=q2;
      lo=1;
      //while(hi>=lo){
         ce=(hi+lo)/2;
	 if(c1*ce+c2*max(q1-ce, 0)<=b){
	    //lo=ce+1;
	    //qa=ce;
            for(qa=q2; qa>=ce; qa--){
               if(c1*qa+c2*max(q1-qa, 0)<=b) break;
            }
	 }
	 else {
	    //if(c1>=c2) hi=ce-1;
	    //else lo=ce+1;
	    if(c1>=c2){
            for(qa=ce-1; qa>0; qa--){
               if(c1*qa+c2*max(q1-qa, 0)<=b) break;
            }}
	    else {
	       if(c1*ce>b){
               for(qa=ce-1; qa>0; qa--){
                  if(c1*qa+c2*max(q1-qa, 0)<=b) break;
               }
	       }
	       else {
	          qa=min(b/c1, q2);
		  if(c1*qa+c2*max(q1-qa, 0)>b) qa=0;
	       }
	    }
	 }
      //}
      if(qa==0) printf("NA\n");
      else printf("%d %d\n", qa, (b-c1*qa)/c2);
   }
   return 0;
}
48 9297 240 126 32
20 3010 157 141 7
30 117002 5680 962 15
8 1673 1712 190 22
64 8478 87 54 307
23 5477 117 92 12
50 7558 1396 187 17
279 88677 2825 514 14
0
 48 9297 240 126 32
20 3010 157 141 7
30 117002 5843 962 15
8 1673 1712 190 22
64 8478 87 54 307
23 5477 117 92 12
50 7558 1396 187 17
279 88677 2825 514 14
0
 48 9297 240 126 32
20 3010 157 141 7
30 117002 5843 962 15
7 1673 1712 190 22
64 8478 160 54 307
23 5477 117 92 12
50 7558 1396 187 17
279 88677 2825 514 14
0
 48 9297 240 126 32
20 3010 157 141 7
30 117002 5843 962 15
7 1673 1712 190 22
64 8478 160 54 307
23 9941 117 92 12
50 7558 2714 187 17
279 88677 2825 514 14
0
 48 9297 240 126 32
20 3389 157 141 7
30 117002 5843 962 15
3 1673 1712 190 22
64 8478 160 54 307
23 9941 117 92 12
50 7558 2714 187 17
279 88677 2825 514 14
0
 48 9297 240 126 32
20 3389 157 141 7
30 65446 5843 962 15
3 1673 1492 190 22
64 8478 160 54 307
23 9941 117 92 12
50 7558 2714 187 17
173 88677 2825 514 14
0
 48 9297 240 126 32
20 3389 157 141 7
30 65446 6697 962 15
3 1673 1492 190 22
64 8478 160 54 307
23 9941 117 92 12
50 7558 2714 187 17
173 88677 2825 514 14
0
 48 9297 240 126 32
20 3389 177 141 7
30 65446 6697 962 15
3 1673 1779 190 22
64 8478 160 54 307
23 9941 117 92 12
50 7558 2714 187 17
173 88677 2825 514 14
0
 48 9297 240 126 32
20 3389 303 141 7
30 65446 6697 962 15
3 1673 1779 190 22
64 8478 160 54 307
23 9941 117 92 12
50 7558 2714 187 17
173 88677 2825 514 14
0
 48 5128 240 126 32
20 3389 303 141 7
30 65446 6697 962 15
3 1673 1779 111 22
64 8478 160 54 307
23 9941 118 92 12
50 7558 2714 187 17
173 88677 2825 514 14
0

28 20
7 13
15 33
NA
97 0
12 44
NA
NA
 28 20
7 13
15 30
NA
97 0
12 44
NA
NA
 28 20
7 13
15 30
NA
47 17
12 44
NA
NA
 28 20
7 13
15 30
NA
47 17
12 92
NA
NA
 28 20
7 16
15 30
NA
47 17
12 92
NA
NA
 28 20
7 16
7 25
NA
47 17
12 92
NA
NA
 28 20
7 16
6 26
NA
47 17
12 92
NA
NA
 28 20
7 15
6 26
NA
47 17
12 92
NA
NA
 28 20
3 17
6 26
NA
47 17
12 92
NA
NA
 NA
3 17
6 26
NA
47 17
12 92
NA
NA

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 max(int a, int b)
{
   if(a>b) return a;
   else return b;
}
int min(int a, int b)
{
   if(a<b) return a;
   else return b;
}

int main(void)
{
   int q1, b, c1, c2, q2;
   int qa;
   int hi, lo, ce;

   while(scanf("%d", &q1)){
      if(q1==0) break;
      scanf("%d %d %d %d", &b, &c1, &c2, &q2);

      qa=0;
      hi=q2;
      lo=1;
      //while(hi>=lo){
         ce=(hi+lo)/2;
	 if(c1*ce+c2*max(q1-ce, 0)<=b){
	    //lo=ce+1;
	    //qa=ce;
            for(qa=q2; qa>=ce; qa--){
               if(c1*qa+c2*max(q1-qa, 0)<=b) break;
            }
	 }
	 else {
	    //if(c1>=c2) hi=ce-1;
	    //else lo=ce+1;
	    if(c1>=c2){
            for(qa=ce-1; qa>0; qa--){
               if(c1*qa+c2*max(q1-qa, 0)<=b) break;
            }}
	    else {
	       if(c1*ce>b){
               for(qa=ce-1; qa>0; qa--){
                  if(c1*qa+c2*max(q1-qa, 0)<=b) break;
               }
	       }
	       else {
	          qa=min(b/c1, q2);
		  if(c1*qa+c2*max(q1-qa, 0)>b) qa=0;
	       }
	    }
	 }
      //}
      if(qa==0) printf("NA\n");
      else printf("%d %d\n", qa, (b-c1*qa)/c2);
   }
   return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	max
	.type	max, @function
max:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L2
	movl	-4(%rbp), %eax
	jmp	.L3
.L2:
	movl	-8(%rbp), %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	max, .-max
	.globl	min
	.type	min, @function
min:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L5
	movl	-4(%rbp), %eax
	jmp	.L6
.L5:
	movl	-8(%rbp), %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	min, .-min
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"NA"
.LC2:
	.string	"%d %d\n"
.LC3:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	jmp	.L8
.L28:
	movl	-60(%rbp), %eax
	testl	%eax, %eax
	je	.L31
	leaq	-44(%rbp), %rsi
	leaq	-48(%rbp), %rcx
	leaq	-52(%rbp), %rdx
	leaq	-56(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -40(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -36(%rbp)
	movl	$1, -32(%rbp)
	movl	-36(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -28(%rbp)
	movl	-52(%rbp), %eax
	imull	-28(%rbp), %eax
	movl	%eax, %ebx
	movl	-60(%rbp), %eax
	subl	-28(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	max
	movl	-48(%rbp), %edx
	imull	%edx, %eax
	leal	(%rbx,%rax), %edx
	movl	-56(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L11
	movl	-44(%rbp), %eax
	movl	%eax, -40(%rbp)
	jmp	.L12
.L15:
	movl	-52(%rbp), %eax
	imull	-40(%rbp), %eax
	movl	%eax, %ebx
	movl	-60(%rbp), %eax
	subl	-40(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	max
	movl	-48(%rbp), %edx
	imull	%edx, %eax
	leal	(%rbx,%rax), %edx
	movl	-56(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L32
	subl	$1, -40(%rbp)
.L12:
	movl	-40(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jge	.L15
	jmp	.L16
.L11:
	movl	-52(%rbp), %edx
	movl	-48(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L17
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
	jmp	.L18
.L21:
	movl	-52(%rbp), %eax
	imull	-40(%rbp), %eax
	movl	%eax, %ebx
	movl	-60(%rbp), %eax
	subl	-40(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	max
	movl	-48(%rbp), %edx
	imull	%edx, %eax
	leal	(%rbx,%rax), %edx
	movl	-56(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L33
	subl	$1, -40(%rbp)
.L18:
	cmpl	$0, -40(%rbp)
	jg	.L21
	jmp	.L16
.L17:
	movl	-52(%rbp), %eax
	imull	-28(%rbp), %eax
	movl	%eax, %edx
	movl	-56(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L22
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
	jmp	.L23
.L26:
	movl	-52(%rbp), %eax
	imull	-40(%rbp), %eax
	movl	%eax, %ebx
	movl	-60(%rbp), %eax
	subl	-40(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	max
	movl	-48(%rbp), %edx
	imull	%edx, %eax
	leal	(%rbx,%rax), %edx
	movl	-56(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L34
	subl	$1, -40(%rbp)
.L23:
	cmpl	$0, -40(%rbp)
	jg	.L26
	jmp	.L16
.L22:
	movl	-44(%rbp), %ecx
	movl	-56(%rbp), %eax
	movl	-52(%rbp), %edi
	cltd
	idivl	%edi
	movl	%ecx, %esi
	movl	%eax, %edi
	call	min
	movl	%eax, -40(%rbp)
	movl	-52(%rbp), %eax
	imull	-40(%rbp), %eax
	movl	%eax, %ebx
	movl	-60(%rbp), %eax
	subl	-40(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	max
	movl	-48(%rbp), %edx
	imull	%edx, %eax
	leal	(%rbx,%rax), %edx
	movl	-56(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L16
	movl	$0, -40(%rbp)
	jmp	.L16
.L32:
	nop
	jmp	.L16
.L33:
	nop
	jmp	.L16
.L34:
	nop
.L16:
	cmpl	$0, -40(%rbp)
	jne	.L27
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L8
.L27:
	movl	-56(%rbp), %edx
	movl	-52(%rbp), %eax
	imull	-40(%rbp), %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	-48(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%eax, %edx
	movl	-40(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	leaq	-60(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	jne	.L28
	jmp	.L10
.L31:
	nop
.L10:
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	max
	.type	max, @function
max:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L2
	movl	-4(%rbp), %eax
	jmp	.L3
.L2:
	movl	-8(%rbp), %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	max, .-max
	.globl	min
	.type	min, @function
min:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L5
	movl	-4(%rbp), %eax
	jmp	.L6
.L5:
	movl	-8(%rbp), %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	min, .-min
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"NA"
.LC2:
	.string	"%d %d\n"
.LC3:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	jmp	.L8
.L28:
	movl	-60(%rbp), %eax
	testl	%eax, %eax
	je	.L31
	leaq	-44(%rbp), %rsi
	leaq	-48(%rbp), %rcx
	leaq	-52(%rbp), %rdx
	leaq	-56(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -40(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -36(%rbp)
	movl	$1, -32(%rbp)
	movl	-36(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -28(%rbp)
	movl	-52(%rbp), %eax
	imull	-28(%rbp), %eax
	movl	%eax, %ebx
	movl	-60(%rbp), %eax
	subl	-28(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	max
	movl	-48(%rbp), %edx
	imull	%edx, %eax
	leal	(%rbx,%rax), %edx
	movl	-56(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L11
	movl	-44(%rbp), %eax
	movl	%eax, -40(%rbp)
	jmp	.L12
.L15:
	movl	-52(%rbp), %eax
	imull	-40(%rbp), %eax
	movl	%eax, %ebx
	movl	-60(%rbp), %eax
	subl	-40(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	max
	movl	-48(%rbp), %edx
	imull	%edx, %eax
	leal	(%rbx,%rax), %edx
	movl	-56(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L32
	subl	$1, -40(%rbp)
.L12:
	movl	-40(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jge	.L15
	jmp	.L16
.L11:
	movl	-52(%rbp), %edx
	movl	-48(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L17
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
	jmp	.L18
.L21:
	movl	-52(%rbp), %eax
	imull	-40(%rbp), %eax
	movl	%eax, %ebx
	movl	-60(%rbp), %eax
	subl	-40(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	max
	movl	-48(%rbp), %edx
	imull	%edx, %eax
	leal	(%rbx,%rax), %edx
	movl	-56(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L33
	subl	$1, -40(%rbp)
.L18:
	cmpl	$0, -40(%rbp)
	jg	.L21
	jmp	.L16
.L17:
	movl	-52(%rbp), %eax
	imull	-28(%rbp), %eax
	movl	%eax, %edx
	movl	-56(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L22
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
	jmp	.L23
.L26:
	movl	-52(%rbp), %eax
	imull	-40(%rbp), %eax
	movl	%eax, %ebx
	movl	-60(%rbp), %eax
	subl	-40(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	max
	movl	-48(%rbp), %edx
	imull	%edx, %eax
	leal	(%rbx,%rax), %edx
	movl	-56(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L34
	subl	$1, -40(%rbp)
.L23:
	cmpl	$0, -40(%rbp)
	jg	.L26
	jmp	.L16
.L22:
	movl	-44(%rbp), %ecx
	movl	-56(%rbp), %eax
	movl	-52(%rbp), %edi
	cltd
	idivl	%edi
	movl	%ecx, %esi
	movl	%eax, %edi
	call	min
	movl	%eax, -40(%rbp)
	movl	-52(%rbp), %eax
	imull	-40(%rbp), %eax
	movl	%eax, %ebx
	movl	-60(%rbp), %eax
	subl	-40(%rbp), %eax
	movl	$0, %esi
	movl	%eax, %edi
	call	max
	movl	-48(%rbp), %edx
	imull	%edx, %eax
	leal	(%rbx,%rax), %edx
	movl	-56(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L16
	movl	$0, -40(%rbp)
	jmp	.L16
.L32:
	nop
	jmp	.L16
.L33:
	nop
	jmp	.L16
.L34:
	nop
.L16:
	cmpl	$0, -40(%rbp)
	jne	.L27
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L8
.L27:
	movl	-56(%rbp), %edx
	movl	-52(%rbp), %eax
	imull	-40(%rbp), %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	-48(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%eax, %edx
	movl	-40(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	leaq	-60(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	jne	.L28
	jmp	.L10
.L31:
	nop
.L10:
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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:
