Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>

int main()
{
  short rate_before,rate_after;
  int price_before,i,a,b,max;
  int n,m,p,q,r;

  // i,p = ?¨???????????????????                                                       
  // n,r = ????¨???????????????????                                                     
  // a,b = ????¨???????????????????                                                     

  while(1){
    max = 0;
    scanf("%hd %hd %d",&rate_before,&rate_after,&price_before);

    if(rate_before == 0 && rate_after == 0 && price_before == 0){
      break;
    }

    for(i = 1;i <= price_before/2;i++){
      n = i * (100+rate_before) / 100;
      m = price_before - n;
      p = m * 100 / (100+rate_before);

      while(1){
	p++;
	q = p * (100+rate_before) / 100;
	if(n + q != price_before){
          p--;
          break;
	}
      }

      r = p * (100+rate_before) / 100;                                                  

     if(n + r == price_before){                                              
      a = i * (100+rate_after) / 100;
      b = p * (100+rate_after) / 100;
      if(a+b > max){
	max = a + b;
      }
     }                                                                       
    }
    printf("%d\n",max);
  }

  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%hd %hd %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	18(%rsp), %rax
	leaq	20(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	xorl	%eax, %eax
	movq	%rbx, %rcx
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movswl	16(%rsp), %eax
	movswl	18(%rsp), %edx
	movl	20(%rsp), %r8d
	movl	%eax, %edi
	orw	%dx, %di
	jne	.L6
	testl	%r8d, %r8d
	je	.L16
.L6:
	movl	%r8d, %r12d
	xorl	%r13d, %r13d
	shrl	$31, %r12d
	addl	%r8d, %r12d
	sarl	%r12d
	cmpl	$1, %r8d
	jle	.L4
	leal	100(%rdx), %ebp
	leal	100(%rax), %edi
	xorl	%r13d, %r13d
	movl	$1, %r10d
	movl	%ebp, %r11d
	movl	%edi, %r9d
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	%r9d, %rsi
	movl	%r9d, %eax
	imulq	$1374389535, %rsi, %rsi
	sarl	$31, %eax
	sarq	$37, %rsi
	subl	%eax, %esi
	movl	%r8d, %eax
	subl	%esi, %eax
	imull	$100, %eax, %eax
	cltd
	idivl	%edi
	leal	1(%rax), %ecx
	imull	%edi, %ecx
	.p2align 4,,10
	.p2align 3
.L7:
	movslq	%ecx, %rdx
	movl	%ecx, %r15d
	movl	%eax, %r14d
	addl	%edi, %ecx
	imulq	$1374389535, %rdx, %rdx
	sarl	$31, %r15d
	addl	$1, %eax
	sarq	$37, %rdx
	subl	%r15d, %edx
	addl	%esi, %edx
	cmpl	%r8d, %edx
	je	.L7
	movl	%r14d, %edx
	imull	%edi, %edx
	movslq	%edx, %rax
	sarl	$31, %edx
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%edx, %eax
	addl	%esi, %eax
	cmpl	%r8d, %eax
	jne	.L8
	imull	%ebp, %r14d
	movl	%r11d, %ecx
	sarl	$31, %ecx
	movslq	%r14d, %rax
	sarl	$31, %r14d
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%r14d, %eax
	movl	%eax, %edx
	movslq	%r11d, %rax
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%ecx, %eax
	addl	%edx, %eax
	cmpl	%eax, %r13d
	cmovl	%eax, %r13d
.L8:
	addl	$1, %r10d
	addl	%edi, %r9d
	addl	%ebp, %r11d
	cmpl	%r10d, %r12d
	jge	.L9
.L4:
	movl	%r13d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L10
.L16:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	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
.L17:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%hd %hd %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	18(%rsp), %rax
	leaq	20(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	xorl	%eax, %eax
	movq	%rbx, %rcx
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movswl	16(%rsp), %eax
	movswl	18(%rsp), %edx
	movl	20(%rsp), %r8d
	movl	%eax, %edi
	orw	%dx, %di
	jne	.L6
	testl	%r8d, %r8d
	je	.L16
.L6:
	movl	%r8d, %r12d
	xorl	%r13d, %r13d
	shrl	$31, %r12d
	addl	%r8d, %r12d
	sarl	%r12d
	cmpl	$1, %r8d
	jle	.L4
	leal	100(%rdx), %ebp
	leal	100(%rax), %edi
	xorl	%r13d, %r13d
	movl	$1, %r10d
	movl	%ebp, %r11d
	movl	%edi, %r9d
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	%r9d, %rsi
	movl	%r9d, %eax
	imulq	$1374389535, %rsi, %rsi
	sarl	$31, %eax
	sarq	$37, %rsi
	subl	%eax, %esi
	movl	%r8d, %eax
	subl	%esi, %eax
	imull	$100, %eax, %eax
	cltd
	idivl	%edi
	leal	1(%rax), %ecx
	imull	%edi, %ecx
	.p2align 4,,10
	.p2align 3
.L7:
	movslq	%ecx, %rdx
	movl	%ecx, %r15d
	movl	%eax, %r14d
	addl	%edi, %ecx
	imulq	$1374389535, %rdx, %rdx
	sarl	$31, %r15d
	addl	$1, %eax
	sarq	$37, %rdx
	subl	%r15d, %edx
	addl	%esi, %edx
	cmpl	%r8d, %edx
	je	.L7
	movl	%r14d, %edx
	imull	%edi, %edx
	movslq	%edx, %rax
	sarl	$31, %edx
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%edx, %eax
	addl	%esi, %eax
	cmpl	%r8d, %eax
	jne	.L8
	imull	%ebp, %r14d
	movl	%r11d, %ecx
	sarl	$31, %ecx
	movslq	%r14d, %rax
	sarl	$31, %r14d
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%r14d, %eax
	movl	%eax, %edx
	movslq	%r11d, %rax
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%ecx, %eax
	addl	%edx, %eax
	cmpl	%eax, %r13d
	cmovl	%eax, %r13d
.L8:
	addl	$1, %r10d
	addl	%edi, %r9d
	addl	%ebp, %r11d
	cmpl	%r10d, %r12d
	jge	.L9
.L4:
	movl	%r13d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L10
.L16:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	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
.L17:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%hd %hd %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	18(%rsp), %rax
	leaq	20(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	xorl	%eax, %eax
	movq	%rbx, %rcx
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movswl	16(%rsp), %eax
	movswl	18(%rsp), %edx
	movl	20(%rsp), %r8d
	movl	%eax, %edi
	orw	%dx, %di
	jne	.L6
	testl	%r8d, %r8d
	je	.L16
.L6:
	movl	%r8d, %r12d
	xorl	%r13d, %r13d
	shrl	$31, %r12d
	addl	%r8d, %r12d
	sarl	%r12d
	cmpl	$1, %r8d
	jle	.L4
	leal	100(%rdx), %ebp
	leal	100(%rax), %edi
	xorl	%r13d, %r13d
	movl	$1, %r10d
	movl	%ebp, %r11d
	movl	%edi, %r9d
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	%r9d, %rsi
	movl	%r9d, %eax
	imulq	$1374389535, %rsi, %rsi
	sarl	$31, %eax
	sarq	$37, %rsi
	subl	%eax, %esi
	movl	%r8d, %eax
	subl	%esi, %eax
	imull	$100, %eax, %eax
	cltd
	idivl	%edi
	leal	1(%rax), %ecx
	imull	%edi, %ecx
	.p2align 4,,10
	.p2align 3
.L7:
	movslq	%ecx, %rdx
	movl	%ecx, %r15d
	movl	%eax, %r14d
	addl	%edi, %ecx
	imulq	$1374389535, %rdx, %rdx
	sarl	$31, %r15d
	addl	$1, %eax
	sarq	$37, %rdx
	subl	%r15d, %edx
	addl	%esi, %edx
	cmpl	%r8d, %edx
	je	.L7
	movl	%r14d, %edx
	imull	%edi, %edx
	movslq	%edx, %rax
	sarl	$31, %edx
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%edx, %eax
	addl	%esi, %eax
	cmpl	%r8d, %eax
	jne	.L8
	imull	%ebp, %r14d
	movl	%r11d, %ecx
	sarl	$31, %ecx
	movslq	%r14d, %rax
	sarl	$31, %r14d
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%r14d, %eax
	movl	%eax, %edx
	movslq	%r11d, %rax
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%ecx, %eax
	addl	%edx, %eax
	cmpl	%eax, %r13d
	cmovl	%eax, %r13d
.L8:
	addl	$1, %r10d
	addl	%edi, %r9d
	addl	%ebp, %r11d
	cmpl	%r10d, %r12d
	jge	.L9
.L4:
	movl	%r13d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L10
.L16:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	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
.L17:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```
```c
#include<stdio.h>

int main()
{
  short rate_before,rate_after;
  int price_before,i,a,b,max;
  int n,m,p,q,r;

  // i,p = ?¨???????????????????                                                       
  // n,r = ????¨???????????????????                                                     
  // a,b = ????¨???????????????????                                                     

  while(1){
    max = 0;
    scanf("%hd %hd %d",&rate_before,&rate_after,&price_before);

    if(rate_before == 0 && rate_after == 0 && price_before == 0){
      break;
    }

    for(i = 1;i <= price_before/2;i++){
      n = i * (100+rate_before) / 100;
      m = price_before - n;
      p = m * 100 / (100+rate_before);

      while(1){
	p++;
	q = p * (100+rate_before) / 100;
	if(n + q != price_before){
          p--;
          break;
	}
      }

      r = p * (100+rate_before) / 100;                                                  

     if(n + r == price_before){                                              
      a = i * (100+rate_after) / 100;
      b = p * (100+rate_after) / 100;
      if(a+b > max){
	max = a + b;
      }
     }                                                                       
    }
    printf("%d\n",max);
  }

  return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>

int main()
{
  short rate_before,rate_after;
  int price_before,i,a,b,max;
  int n,m,p,q,r;

  // i,p = ?¨???????????????????                                                       
  // n,r = ????¨???????????????????                                                     
  // a,b = ????¨???????????????????                                                     

  while(1){
    max = 0;
    scanf("%hd %hd %d",&rate_before,&rate_after,&price_before);

    if(rate_before == 0 && rate_after == 0 && price_before == 0){
      break;
    }

    for(i = 1;i <= price_before/2;i++){
      n = i * (100+rate_before) / 100;
      m = price_before - n;
      p = m * 100 / (100+rate_before);

      while(1){
	p++;
	q = p * (100+rate_before) / 100;
	if(n + q != price_before){
          p--;
          break;
	}
      }

      r = p * (100+rate_before) / 100;                                                  

     if(n + r == price_before){                                              
      a = i * (100+rate_after) / 100;
      b = p * (100+rate_after) / 100;
      if(a+b > max){
	max = a + b;
      }
     }                                                                       
    }
    printf("%d\n",max);
  }

  return 0;
}```

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.
Optimized Assembly Code:

5 8 105
8 5 105
1 2 24
4 98 24
12 13 26
1 22 23
1 13 201
13 16 112
2 24 50
1 82 61
1 84 125
1 99 999
99 1 999
98 99 999
1 99 11
99 1 12
0 0 0
 5 8 105
8 5 105
1 2 24
4 98 24
12 5 26
1 22 23
1 13 201
13 16 112
2 24 50
1 82 61
1 84 125
1 99 999
99 1 999
98 99 999
1 99 11
99 1 12
0 0 0
 5 8 105
8 5 105
1 2 24
99 98 24
12 13 26
1 22 23
1 19 201
13 16 112
2 24 50
1 82 61
1 84 125
1 99 999
99 1 999
98 99 999
1 99 11
99 1 12
0 0 0
 5 8 105
8 5 105
1 2 24
4 98 24
12 5 26
1 22 23
1 13 201
13 13 112
2 24 50
1 82 61
1 84 125
1 99 999
99 1 999
98 99 999
1 99 11
99 1 12
0 0 0
 5 8 105
8 5 105
1 2 24
4 98 24
12 5 26
1 22 23
1 13 201
13 13 112
3 24 50
1 82 61
1 84 125
1 99 999
99 2 999
98 99 999
1 99 11
99 1 12
0 0 0
 5 8 105
8 5 105
1 2 24
99 98 24
11 13 26
2 22 23
1 19 201
13 16 112
2 24 50
1 82 61
1 84 125
1 99 999
99 1 999
98 99 999
2 99 11
99 1 12
0 0 0
 5 8 105
8 5 105
1 2 24
4 98 24
12 5 26
1 22 23
1 13 201
13 13 112
3 24 50
2 82 61
1 84 125
1 99 999
99 2 999
98 99 999
1 99 11
99 1 12
0 0 0
 5 8 105
8 5 105
1 2 24
99 98 24
11 13 26
2 22 23
1 19 201
13 16 112
2 24 50
1 82 61
1 84 125
1 2 999
99 1 999
98 99 999
2 99 11
99 1 12
0 0 0
 5 8 105
8 5 105
1 2 24
4 98 24
12 5 26
1 22 23
1 13 201
13 13 28
3 24 50
2 82 61
1 84 125
1 99 999
99 2 999
98 99 999
1 99 11
99 1 12
0 0 0
 5 8 105
8 5 105
1 2 24
99 98 24
11 13 26
2 22 23
1 19 201
13 16 112
2 24 14
1 82 61
1 84 125
1 2 999
99 1 999
98 99 999
2 99 11
99 1 12
0 0 0

109
103
24
46
26
27
225
116
62
111
230
1972
508
1004
20
7
 109
103
24
46
25
27
225
116
62
111
230
1972
508
1004
20
7
 109
103
24
24
26
27
237
116
62
111
230
1972
508
1004
20
7
 109
103
24
46
25
27
225
112
62
111
230
1972
508
1004
20
7
 109
103
24
46
25
27
225
112
62
111
230
1972
513
1004
20
7
 109
103
24
24
28
27
237
116
62
111
230
1972
508
1004
20
7
 109
103
24
46
25
27
225
112
62
110
230
1972
513
1004
20
7
 109
103
24
24
28
27
237
116
62
111
230
1009
508
1004
20
7
 109
103
24
46
25
27
225
28
62
110
230
1972
513
1004
20
7
 109
103
24
24
28
27
237
116
17
111
230
1009
508
1004
20
7

Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>

int main()
{
  short rate_before,rate_after;
  int price_before,i,a,b,max;
  int n,m,p,q,r;

  // i,p = ?¨???????????????????                                                       
  // n,r = ????¨???????????????????                                                     
  // a,b = ????¨???????????????????                                                     

  while(1){
    max = 0;
    scanf("%hd %hd %d",&rate_before,&rate_after,&price_before);

    if(rate_before == 0 && rate_after == 0 && price_before == 0){
      break;
    }

    for(i = 1;i <= price_before/2;i++){
      n = i * (100+rate_before) / 100;
      m = price_before - n;
      p = m * 100 / (100+rate_before);

      while(1){
	p++;
	q = p * (100+rate_before) / 100;
	if(n + q != price_before){
          p--;
          break;
	}
      }

      r = p * (100+rate_before) / 100;                                                  

     if(n + r == price_before){                                              
      a = i * (100+rate_after) / 100;
      b = p * (100+rate_after) / 100;
      if(a+b > max){
	max = a + b;
      }
     }                                                                       
    }
    printf("%d\n",max);
  }

  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%hd %hd %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	18(%rsp), %rax
	leaq	20(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	xorl	%eax, %eax
	movq	%rbx, %rcx
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movswl	16(%rsp), %eax
	movswl	18(%rsp), %edx
	movl	20(%rsp), %r8d
	movl	%eax, %edi
	orw	%dx, %di
	jne	.L6
	testl	%r8d, %r8d
	je	.L16
.L6:
	movl	%r8d, %r12d
	xorl	%r13d, %r13d
	shrl	$31, %r12d
	addl	%r8d, %r12d
	sarl	%r12d
	cmpl	$1, %r8d
	jle	.L4
	leal	100(%rdx), %ebp
	leal	100(%rax), %edi
	xorl	%r13d, %r13d
	movl	$1, %r10d
	movl	%ebp, %r11d
	movl	%edi, %r9d
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	%r9d, %rsi
	movl	%r9d, %eax
	imulq	$1374389535, %rsi, %rsi
	sarl	$31, %eax
	sarq	$37, %rsi
	subl	%eax, %esi
	movl	%r8d, %eax
	subl	%esi, %eax
	imull	$100, %eax, %eax
	cltd
	idivl	%edi
	leal	1(%rax), %ecx
	imull	%edi, %ecx
	.p2align 4,,10
	.p2align 3
.L7:
	movslq	%ecx, %rdx
	movl	%ecx, %r15d
	movl	%eax, %r14d
	addl	%edi, %ecx
	imulq	$1374389535, %rdx, %rdx
	sarl	$31, %r15d
	addl	$1, %eax
	sarq	$37, %rdx
	subl	%r15d, %edx
	addl	%esi, %edx
	cmpl	%r8d, %edx
	je	.L7
	movl	%r14d, %edx
	imull	%edi, %edx
	movslq	%edx, %rax
	sarl	$31, %edx
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%edx, %eax
	addl	%esi, %eax
	cmpl	%r8d, %eax
	jne	.L8
	imull	%ebp, %r14d
	movl	%r11d, %ecx
	sarl	$31, %ecx
	movslq	%r14d, %rax
	sarl	$31, %r14d
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%r14d, %eax
	movl	%eax, %edx
	movslq	%r11d, %rax
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%ecx, %eax
	addl	%edx, %eax
	cmpl	%eax, %r13d
	cmovl	%eax, %r13d
.L8:
	addl	$1, %r10d
	addl	%edi, %r9d
	addl	%ebp, %r11d
	cmpl	%r10d, %r12d
	jge	.L9
.L4:
	movl	%r13d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L10
.L16:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	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
.L17:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%hd %hd %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	18(%rsp), %rax
	leaq	20(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	xorl	%eax, %eax
	movq	%rbx, %rcx
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movswl	16(%rsp), %eax
	movswl	18(%rsp), %edx
	movl	20(%rsp), %r8d
	movl	%eax, %edi
	orw	%dx, %di
	jne	.L6
	testl	%r8d, %r8d
	je	.L16
.L6:
	movl	%r8d, %r12d
	xorl	%r13d, %r13d
	shrl	$31, %r12d
	addl	%r8d, %r12d
	sarl	%r12d
	cmpl	$1, %r8d
	jle	.L4
	leal	100(%rdx), %ebp
	leal	100(%rax), %edi
	xorl	%r13d, %r13d
	movl	$1, %r10d
	movl	%ebp, %r11d
	movl	%edi, %r9d
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	%r9d, %rsi
	movl	%r9d, %eax
	imulq	$1374389535, %rsi, %rsi
	sarl	$31, %eax
	sarq	$37, %rsi
	subl	%eax, %esi
	movl	%r8d, %eax
	subl	%esi, %eax
	imull	$100, %eax, %eax
	cltd
	idivl	%edi
	leal	1(%rax), %ecx
	imull	%edi, %ecx
	.p2align 4,,10
	.p2align 3
.L7:
	movslq	%ecx, %rdx
	movl	%ecx, %r15d
	movl	%eax, %r14d
	addl	%edi, %ecx
	imulq	$1374389535, %rdx, %rdx
	sarl	$31, %r15d
	addl	$1, %eax
	sarq	$37, %rdx
	subl	%r15d, %edx
	addl	%esi, %edx
	cmpl	%r8d, %edx
	je	.L7
	movl	%r14d, %edx
	imull	%edi, %edx
	movslq	%edx, %rax
	sarl	$31, %edx
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%edx, %eax
	addl	%esi, %eax
	cmpl	%r8d, %eax
	jne	.L8
	imull	%ebp, %r14d
	movl	%r11d, %ecx
	sarl	$31, %ecx
	movslq	%r14d, %rax
	sarl	$31, %r14d
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%r14d, %eax
	movl	%eax, %edx
	movslq	%r11d, %rax
	imulq	$1374389535, %rax, %rax
	sarq	$37, %rax
	subl	%ecx, %eax
	addl	%edx, %eax
	cmpl	%eax, %r13d
	cmovl	%eax, %r13d
.L8:
	addl	$1, %r10d
	addl	%edi, %r9d
	addl	%ebp, %r11d
	cmpl	%r10d, %r12d
	jge	.L9
.L4:
	movl	%r13d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L10
.L16:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	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
.L17:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```