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 main()
{
  int n, a, b;
  int i, j, high, mid, x, y, z;
  int m;
  int max = -1;
  int low = 1;
  int h[100001] = {};
  scanf("%d %d %d", &n, &a, &b);

  for(i=0; i<n; i++)
  {
    scanf("%d", &h[i]);
    if(max < h[i])
    {
      max = h[i];
    }
  }

  high = max / b;

  while(low <= high)
  {
    mid = (low + high) / 2;
    z = 0;
    m = mid;
    for(j=0; j<n; j++)
    {
      x = h[j] - mid * b;
      if(x > 0)
      {
        y = x / (a-b);
        if(x % (a-b) != 0) y++;
        m = m - y++;
          if(m < 0)
          {
            z = 1;
            break;
          }
      }
    }
    if(z == 1)
    {
      low = mid + 1;
    }
    else
    {
      high = mid - 1;
    }
  }

  printf("%d\n", low);

  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2768, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$-1, -400032(%rbp)
	movl	$1, -400028(%rbp)
	leaq	-400016(%rbp), %rax
	movl	$400004, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-400060(%rbp), %rcx
	leaq	-400064(%rbp), %rdx
	leaq	-400068(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400056(%rbp)
	jmp	.L2
.L4:
	leaq	-400016(%rbp), %rdx
	movl	-400056(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-400056(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, -400032(%rbp)
	jge	.L3
	movl	-400056(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	movl	%eax, -400032(%rbp)
.L3:
	addl	$1, -400056(%rbp)
.L2:
	movl	-400068(%rbp), %eax
	cmpl	%eax, -400056(%rbp)
	jl	.L4
	movl	-400060(%rbp), %esi
	movl	-400032(%rbp), %eax
	cltd
	idivl	%esi
	movl	%eax, -400048(%rbp)
	jmp	.L5
.L12:
	movl	-400028(%rbp), %edx
	movl	-400048(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -400024(%rbp)
	movl	$0, -400040(%rbp)
	movl	-400024(%rbp), %eax
	movl	%eax, -400036(%rbp)
	movl	$0, -400052(%rbp)
	jmp	.L6
.L10:
	movl	-400052(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %edx
	movl	-400060(%rbp), %eax
	imull	-400024(%rbp), %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -400020(%rbp)
	cmpl	$0, -400020(%rbp)
	jle	.L7
	movl	-400064(%rbp), %eax
	movl	-400060(%rbp), %ecx
	subl	%ecx, %eax
	movl	%eax, %edi
	movl	-400020(%rbp), %eax
	cltd
	idivl	%edi
	movl	%eax, -400044(%rbp)
	movl	-400064(%rbp), %eax
	movl	-400060(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-400020(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, %eax
	testl	%eax, %eax
	je	.L8
	addl	$1, -400044(%rbp)
.L8:
	movl	-400044(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -400044(%rbp)
	subl	%eax, -400036(%rbp)
	cmpl	$0, -400036(%rbp)
	jns	.L7
	movl	$1, -400040(%rbp)
	jmp	.L9
.L7:
	addl	$1, -400052(%rbp)
.L6:
	movl	-400068(%rbp), %eax
	cmpl	%eax, -400052(%rbp)
	jl	.L10
.L9:
	cmpl	$1, -400040(%rbp)
	jne	.L11
	movl	-400024(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -400028(%rbp)
	jmp	.L5
.L11:
	movl	-400024(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -400048(%rbp)
.L5:
	movl	-400028(%rbp), %eax
	cmpl	-400048(%rbp), %eax
	jle	.L12
	movl	-400028(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397360
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2720, %rsp
	.cfi_def_cfa_offset 400080
	movl	$400004, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 400024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	12(%rsp), %rcx
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebp
	testl	%ebp, %ebp
	jle	.L13
	xorl	%r12d, %r12d
	movl	$-1, %r14d
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%rbx,%r12,4), %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%rbx,%r12,4), %eax
	movl	4(%rsp), %ebp
	cmpl	%eax, %r14d
	cmovl	%eax, %r14d
	addq	$1, %r12
	cmpl	%r12d, %ebp
	jg	.L3
.L2:
	movl	%r14d, %eax
	movl	12(%rsp), %r13d
	cltd
	idivl	%r13d
	movl	%eax, %r14d
	testl	%eax, %eax
	jle	.L14
	movl	8(%rsp), %edi
	leal	-1(%rbp), %eax
	movl	$1, %r12d
	leaq	20(%rsp,%rax,4), %r9
	subl	%r13d, %edi
	.p2align 4,,10
	.p2align 3
.L10:
	leal	(%r14,%r12), %r11d
	sarl	%r11d
	testl	%ebp, %ebp
	jle	.L5
	movl	%r13d, %r8d
	movq	%rbx, %rcx
	movl	%r11d, %esi
	imull	%r11d, %r8d
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rcx), %eax
	subl	%r8d, %eax
	testl	%eax, %eax
	jle	.L6
	cltd
	idivl	%edi
	cmpl	$1, %edx
	sbbl	$-1, %eax
	subl	%eax, %esi
	js	.L8
.L6:
	addq	$4, %rcx
	cmpq	%rcx, %r9
	jne	.L9
.L5:
	leal	-1(%r11), %r14d
.L11:
	cmpl	%r12d, %r14d
	jge	.L10
.L4:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$400032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	leal	1(%r11), %r12d
	jmp	.L11
.L13:
	orl	$-1, %r14d
	jmp	.L2
.L14:
	movl	$1, %r12d
	jmp	.L4
.L23:
	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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397360
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2720, %rsp
	.cfi_def_cfa_offset 400080
	movl	$400004, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 400024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	12(%rsp), %rcx
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ebp
	testl	%ebp, %ebp
	jle	.L13
	xorl	%r12d, %r12d
	movl	$-1, %r14d
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%rbx,%r12,4), %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%rbx,%r12,4), %eax
	movl	4(%rsp), %ebp
	cmpl	%eax, %r14d
	cmovl	%eax, %r14d
	addq	$1, %r12
	cmpl	%r12d, %ebp
	jg	.L3
.L2:
	movl	%r14d, %eax
	movl	12(%rsp), %r13d
	cltd
	idivl	%r13d
	movl	%eax, %r14d
	testl	%eax, %eax
	jle	.L14
	movl	8(%rsp), %edi
	leal	-1(%rbp), %eax
	movl	$1, %r12d
	leaq	20(%rsp,%rax,4), %r9
	subl	%r13d, %edi
	.p2align 4,,10
	.p2align 3
.L10:
	leal	(%r14,%r12), %r11d
	sarl	%r11d
	testl	%ebp, %ebp
	jle	.L5
	movl	%r13d, %r8d
	movq	%rbx, %rcx
	movl	%r11d, %esi
	imull	%r11d, %r8d
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rcx), %eax
	subl	%r8d, %eax
	testl	%eax, %eax
	jle	.L6
	cltd
	idivl	%edi
	cmpl	$1, %edx
	sbbl	$-1, %eax
	subl	%eax, %esi
	js	.L8
.L6:
	addq	$4, %rcx
	cmpq	%rcx, %r9
	jne	.L9
.L5:
	leal	-1(%r11), %r14d
.L11:
	cmpl	%r12d, %r14d
	jge	.L10
.L4:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$400032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	leal	1(%r11), %r12d
	jmp	.L11
.L13:
	orl	$-1, %r14d
	jmp	.L2
.L14:
	movl	$1, %r12d
	jmp	.L4
.L23:
	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:

#include <stdio.h>

int main()
{
  int n, a, b;
  int i, j, high, mid, x, y, z;
  int m;
  int max = -1;
  int low = 1;
  int h[100001] = {};
  scanf("%d %d %d", &n, &a, &b);

  for(i=0; i<n; i++)
  {
    scanf("%d", &h[i]);
    if(max < h[i])
    {
      max = h[i];
    }
  }

  high = max / b;

  while(low <= high)
  {
    mid = (low + high) / 2;
    z = 0;
    m = mid;
    for(j=0; j<n; j++)
    {
      x = h[j] - mid * b;
      if(x > 0)
      {
        y = x / (a-b);
        if(x % (a-b) != 0) y++;
        m = m - y++;
          if(m < 0)
          {
            z = 1;
            break;
          }
      }
    }
    if(z == 1)
    {
      low = mid + 1;
    }
    else
    {
      high = mid - 1;
    }
  }

  printf("%d\n", low);

  return 0;
}

5 2 1
187174154
900000000
1000000000
1000000000
1000000000
 4 5 3
8
7
6
2
 2 10 4
20
37
 5 2 1
187174154
900000000
1000000000
1000000000
1100000000
 2 17 4
20
37
 5 2 1
187174154
900000000
1000000000
1000000001
1100000000
 5 2 1
187174154
900000000
1000000000
1000000101
1100000000
 2 11 7
20
37
 5 2 1
105611412
900000000
1010000000
1000000101
1100000000
 5 3 1
105611412
900000000
1010000000
1000000101
1100000000

780000000
 2
 5
 800000000
 3
 800000001
 800000021
 4
 802000021
 668333351

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 main()
{
  int n, a, b;
  int i, j, high, mid, x, y, z;
  int m;
  int max = -1;
  int low = 1;
  int h[100001] = {};
  scanf("%d %d %d", &n, &a, &b);

  for(i=0; i<n; i++)
  {
    scanf("%d", &h[i]);
    if(max < h[i])
    {
      max = h[i];
    }
  }

  high = max / b;

  while(low <= high)
  {
    mid = (low + high) / 2;
    z = 0;
    m = mid;
    for(j=0; j<n; j++)
    {
      x = h[j] - mid * b;
      if(x > 0)
      {
        y = x / (a-b);
        if(x % (a-b) != 0) y++;
        m = m - y++;
          if(m < 0)
          {
            z = 1;
            break;
          }
      }
    }
    if(z == 1)
    {
      low = mid + 1;
    }
    else
    {
      high = mid - 1;
    }
  }

  printf("%d\n", low);

  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2768, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$-1, -400032(%rbp)
	movl	$1, -400028(%rbp)
	leaq	-400016(%rbp), %rax
	movl	$400004, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-400060(%rbp), %rcx
	leaq	-400064(%rbp), %rdx
	leaq	-400068(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400056(%rbp)
	jmp	.L2
.L4:
	leaq	-400016(%rbp), %rdx
	movl	-400056(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-400056(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, -400032(%rbp)
	jge	.L3
	movl	-400056(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	movl	%eax, -400032(%rbp)
.L3:
	addl	$1, -400056(%rbp)
.L2:
	movl	-400068(%rbp), %eax
	cmpl	%eax, -400056(%rbp)
	jl	.L4
	movl	-400060(%rbp), %esi
	movl	-400032(%rbp), %eax
	cltd
	idivl	%esi
	movl	%eax, -400048(%rbp)
	jmp	.L5
.L12:
	movl	-400028(%rbp), %edx
	movl	-400048(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -400024(%rbp)
	movl	$0, -400040(%rbp)
	movl	-400024(%rbp), %eax
	movl	%eax, -400036(%rbp)
	movl	$0, -400052(%rbp)
	jmp	.L6
.L10:
	movl	-400052(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %edx
	movl	-400060(%rbp), %eax
	imull	-400024(%rbp), %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -400020(%rbp)
	cmpl	$0, -400020(%rbp)
	jle	.L7
	movl	-400064(%rbp), %eax
	movl	-400060(%rbp), %ecx
	subl	%ecx, %eax
	movl	%eax, %edi
	movl	-400020(%rbp), %eax
	cltd
	idivl	%edi
	movl	%eax, -400044(%rbp)
	movl	-400064(%rbp), %eax
	movl	-400060(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-400020(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, %eax
	testl	%eax, %eax
	je	.L8
	addl	$1, -400044(%rbp)
.L8:
	movl	-400044(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -400044(%rbp)
	subl	%eax, -400036(%rbp)
	cmpl	$0, -400036(%rbp)
	jns	.L7
	movl	$1, -400040(%rbp)
	jmp	.L9
.L7:
	addl	$1, -400052(%rbp)
.L6:
	movl	-400068(%rbp), %eax
	cmpl	%eax, -400052(%rbp)
	jl	.L10
.L9:
	cmpl	$1, -400040(%rbp)
	jne	.L11
	movl	-400024(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -400028(%rbp)
	jmp	.L5
.L11:
	movl	-400024(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -400048(%rbp)
.L5:
	movl	-400028(%rbp), %eax
	cmpl	-400048(%rbp), %eax
	jle	.L12
	movl	-400028(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2768, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$-1, -400032(%rbp)
	movl	$1, -400028(%rbp)
	leaq	-400016(%rbp), %rax
	movl	$400004, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-400060(%rbp), %rcx
	leaq	-400064(%rbp), %rdx
	leaq	-400068(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400056(%rbp)
	jmp	.L2
.L4:
	leaq	-400016(%rbp), %rdx
	movl	-400056(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-400056(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, -400032(%rbp)
	jge	.L3
	movl	-400056(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	movl	%eax, -400032(%rbp)
.L3:
	addl	$1, -400056(%rbp)
.L2:
	movl	-400068(%rbp), %eax
	cmpl	%eax, -400056(%rbp)
	jl	.L4
	movl	-400060(%rbp), %esi
	movl	-400032(%rbp), %eax
	cltd
	idivl	%esi
	movl	%eax, -400048(%rbp)
	jmp	.L5
.L12:
	movl	-400028(%rbp), %edx
	movl	-400048(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -400024(%rbp)
	movl	$0, -400040(%rbp)
	movl	-400024(%rbp), %eax
	movl	%eax, -400036(%rbp)
	movl	$0, -400052(%rbp)
	jmp	.L6
.L10:
	movl	-400052(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %edx
	movl	-400060(%rbp), %eax
	imull	-400024(%rbp), %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -400020(%rbp)
	cmpl	$0, -400020(%rbp)
	jle	.L7
	movl	-400064(%rbp), %eax
	movl	-400060(%rbp), %ecx
	subl	%ecx, %eax
	movl	%eax, %edi
	movl	-400020(%rbp), %eax
	cltd
	idivl	%edi
	movl	%eax, -400044(%rbp)
	movl	-400064(%rbp), %eax
	movl	-400060(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-400020(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, %eax
	testl	%eax, %eax
	je	.L8
	addl	$1, -400044(%rbp)
.L8:
	movl	-400044(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -400044(%rbp)
	subl	%eax, -400036(%rbp)
	cmpl	$0, -400036(%rbp)
	jns	.L7
	movl	$1, -400040(%rbp)
	jmp	.L9
.L7:
	addl	$1, -400052(%rbp)
.L6:
	movl	-400068(%rbp), %eax
	cmpl	%eax, -400052(%rbp)
	jl	.L10
.L9:
	cmpl	$1, -400040(%rbp)
	jne	.L11
	movl	-400024(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -400028(%rbp)
	jmp	.L5
.L11:
	movl	-400024(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -400048(%rbp)
.L5:
	movl	-400028(%rbp), %eax
	cmpl	-400048(%rbp), %eax
	jle	.L12
	movl	-400028(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
