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 di[100000];
int hi[100000];

#define MIN(a, b) ((a) < (b) ? (a) : (b))

int main(){
  int n, h; scanf("%d%d", &n, &h);
  int i;
  int pos = 0;
  int hp  = h;
  int cnt = 0;

  for(i = 0; i < n - 1; i++)
    scanf("%d%d", di+i, hi+i);

  while(1){
    int mxv = -1;
    int memohp  = 0;
    int memopos = 0;

    // printf("pos: %d, hp: %d\n", pos, hp);

    while(1){
      if(mxv <= MIN(h - hp, hi[pos])){
	mxv     = MIN(h - hp, hi[pos]);
	memohp  = hp;
	memopos = pos;
      }

      if((hp -= di[pos]) > 0){
	++pos;
      }else{
	break;
      }

      if(pos == n - 1){
	printf("%d\n", cnt);
	return 0;
      }
    }

    pos = memopos;
    hp  = MIN(memohp + hi[pos], h);
    cnt++;
  }
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%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
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	leaq	di(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	hi(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	4(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	movl	4(%rsp), %ebx
	leal	-1(%rax), %esi
	testl	%esi, %esi
	jle	.L13
	movq	%r13, %r15
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r15, %rsi
	leaq	(%r12,%rbp,4), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	addq	$1, %rbp
	addq	$4, %r15
	leal	-1(%rax), %esi
	cmpl	%ebp, %esi
	jg	.L3
	movl	4(%rsp), %r8d
.L2:
	xorl	%r11d, %r11d
	xorl	%eax, %eax
.L7:
	xorl	%r10d, %r10d
	xorl	%r9d, %r9d
	movl	$-1, %edi
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$1, %rax
	cmpl	%eax, %esi
	je	.L16
.L6:
	movl	(%r12,%rax,4), %ecx
	movl	%r8d, %edx
	subl	%ebx, %edx
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	cmpl	%edi, %edx
	jl	.L4
	movl	%eax, %r10d
	movl	%ebx, %r9d
	movl	%edx, %edi
.L4:
	subl	0(%r13,%rax,4), %ebx
	testl	%ebx, %ebx
	jg	.L17
	movslq	%r10d, %rax
	addl	(%r12,%rax,4), %r9d
	cmpl	%r8d, %r9d
	movl	%r9d, %ebx
	cmovg	%r8d, %ebx
	addl	$1, %r11d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%eax, %eax
	movl	%r11d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$24, %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
.L13:
	.cfi_restore_state
	movl	%ebx, %r8d
	jmp	.L2
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	hi
	.bss
	.align 32
	.type	hi, @object
	.size	hi, 400000
hi:
	.zero	400000
	.globl	di
	.align 32
	.type	di, @object
	.size	di, 400000
di:
	.zero	400000
	.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	"%d%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
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	leaq	di(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	hi(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	4(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	movl	4(%rsp), %ebx
	leal	-1(%rax), %esi
	testl	%esi, %esi
	jle	.L13
	movq	%r13, %r15
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r15, %rsi
	leaq	(%r12,%rbp,4), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	addq	$1, %rbp
	addq	$4, %r15
	leal	-1(%rax), %esi
	cmpl	%ebp, %esi
	jg	.L3
	movl	4(%rsp), %r8d
.L2:
	xorl	%r11d, %r11d
	xorl	%eax, %eax
.L7:
	xorl	%r10d, %r10d
	xorl	%r9d, %r9d
	movl	$-1, %edi
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$1, %rax
	cmpl	%eax, %esi
	je	.L16
.L6:
	movl	(%r12,%rax,4), %ecx
	movl	%r8d, %edx
	subl	%ebx, %edx
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	cmpl	%edi, %edx
	jl	.L4
	movl	%eax, %r10d
	movl	%ebx, %r9d
	movl	%edx, %edi
.L4:
	subl	0(%r13,%rax,4), %ebx
	testl	%ebx, %ebx
	jg	.L17
	movslq	%r10d, %rax
	addl	(%r12,%rax,4), %r9d
	cmpl	%r8d, %r9d
	movl	%r9d, %ebx
	cmovg	%r8d, %ebx
	addl	$1, %r11d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%eax, %eax
	movl	%r11d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$24, %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
.L13:
	.cfi_restore_state
	movl	%ebx, %r8d
	jmp	.L2
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	hi
	.bss
	.align 32
	.type	hi, @object
	.size	hi, 400000
hi:
	.zero	400000
	.globl	di
	.align 32
	.type	di, @object
	.size	di, 400000
di:
	.zero	400000
	.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	"%d%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
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	leaq	di(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	hi(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	4(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	movl	4(%rsp), %ebx
	leal	-1(%rax), %esi
	testl	%esi, %esi
	jle	.L13
	movq	%r13, %r15
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r15, %rsi
	leaq	(%r12,%rbp,4), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	addq	$1, %rbp
	addq	$4, %r15
	leal	-1(%rax), %esi
	cmpl	%ebp, %esi
	jg	.L3
	movl	4(%rsp), %r8d
.L2:
	xorl	%r11d, %r11d
	xorl	%eax, %eax
.L7:
	xorl	%r10d, %r10d
	xorl	%r9d, %r9d
	movl	$-1, %edi
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$1, %rax
	cmpl	%eax, %esi
	je	.L16
.L6:
	movl	(%r12,%rax,4), %ecx
	movl	%r8d, %edx
	subl	%ebx, %edx
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	cmpl	%edi, %edx
	jl	.L4
	movl	%eax, %r10d
	movl	%ebx, %r9d
	movl	%edx, %edi
.L4:
	subl	0(%r13,%rax,4), %ebx
	testl	%ebx, %ebx
	jg	.L17
	movslq	%r10d, %rax
	addl	(%r12,%rax,4), %r9d
	cmpl	%r8d, %r9d
	movl	%r9d, %ebx
	cmovg	%r8d, %ebx
	addl	$1, %r11d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%eax, %eax
	movl	%r11d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$24, %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
.L13:
	.cfi_restore_state
	movl	%ebx, %r8d
	jmp	.L2
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	hi
	.bss
	.align 32
	.type	hi, @object
	.size	hi, 400000
hi:
	.zero	400000
	.globl	di
	.align 32
	.type	di, @object
	.size	di, 400000
di:
	.zero	400000
	.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 di[100000];
int hi[100000];

#define MIN(a, b) ((a) < (b) ? (a) : (b))

int main(){
  int n, h; scanf("%d%d", &n, &h);
  int i;
  int pos = 0;
  int hp  = h;
  int cnt = 0;

  for(i = 0; i < n - 1; i++)
    scanf("%d%d", di+i, hi+i);

  while(1){
    int mxv = -1;
    int memohp  = 0;
    int memopos = 0;

    // printf("pos: %d, hp: %d\n", pos, hp);

    while(1){
      if(mxv <= MIN(h - hp, hi[pos])){
	mxv     = MIN(h - hp, hi[pos]);
	memohp  = hp;
	memopos = pos;
      }

      if((hp -= di[pos]) > 0){
	++pos;
      }else{
	break;
      }

      if(pos == n - 1){
	printf("%d\n", cnt);
	return 0;
      }
    }

    pos = memopos;
    hp  = MIN(memohp + hi[pos], h);
    cnt++;
  }
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int di[100000];
int hi[100000];

#define MIN(a, b) ((a) < (b) ? (a) : (b))

int main(){
  int n, h; scanf("%d%d", &n, &h);
  int i;
  int pos = 0;
  int hp  = h;
  int cnt = 0;

  for(i = 0; i < n - 1; i++)
    scanf("%d%d", di+i, hi+i);

  while(1){
    int mxv = -1;
    int memohp  = 0;
    int memopos = 0;

    // printf("pos: %d, hp: %d\n", pos, hp);

    while(1){
      if(mxv <= MIN(h - hp, hi[pos])){
	mxv     = MIN(h - hp, hi[pos]);
	memohp  = hp;
	memopos = pos;
      }

      if((hp -= di[pos]) > 0){
	++pos;
      }else{
	break;
      }

      if(pos == n - 1){
	printf("%d\n", cnt);
	return 0;
      }
    }

    pos = memopos;
    hp  = MIN(memohp + hi[pos], h);
    cnt++;
  }
}```

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:

10 10
4 3
2 5
6 1
7 3
6 4
9 6
0 8
4 1
9 4
 10 10
4 3
2 5
6 1
6 3
6 4
9 6
0 8
4 1
9 4
 10 10
4 3
2 3
6 1
3 3
6 4
9 6
0 8
2 1
9 4
 5 10
4 3
2 3
6 1
6 3
6 4
9 6
0 8
4 1
9 4
 10 10
4 3
2 3
1 1
6 3
6 4
9 9
0 8
4 1
9 4
 10 19
4 3
2 3
1 1
6 3
6 4
9 9
0 8
4 1
9 4
 10 19
4 3
2 3
1 1
6 3
3 4
4 13
0 8
4 1
9 4
 10 10
2 3
2 3
6 1
3 4
6 4
9 6
0 10
0 1
9 8
 10 19
4 3
2 3
1 1
6 3
3 4
4 13
0 8
7 1
1 4
 8 19
4 4
0 3
1 1
6 3
3 4
4 13
0 8
1 1
1 4

10
 9
 8
 3
 7
 4
 2
 6
 1
 0

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 di[100000];
int hi[100000];

#define MIN(a, b) ((a) < (b) ? (a) : (b))

int main(){
  int n, h; scanf("%d%d", &n, &h);
  int i;
  int pos = 0;
  int hp  = h;
  int cnt = 0;

  for(i = 0; i < n - 1; i++)
    scanf("%d%d", di+i, hi+i);

  while(1){
    int mxv = -1;
    int memohp  = 0;
    int memopos = 0;

    // printf("pos: %d, hp: %d\n", pos, hp);

    while(1){
      if(mxv <= MIN(h - hp, hi[pos])){
	mxv     = MIN(h - hp, hi[pos]);
	memohp  = hp;
	memopos = pos;
      }

      if((hp -= di[pos]) > 0){
	++pos;
      }else{
	break;
      }

      if(pos == n - 1){
	printf("%d\n", cnt);
	return 0;
      }
    }

    pos = memopos;
    hp  = MIN(memohp + hi[pos], h);
    cnt++;
  }
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%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
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	leaq	di(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	hi(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	4(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	movl	4(%rsp), %ebx
	leal	-1(%rax), %esi
	testl	%esi, %esi
	jle	.L13
	movq	%r13, %r15
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r15, %rsi
	leaq	(%r12,%rbp,4), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	addq	$1, %rbp
	addq	$4, %r15
	leal	-1(%rax), %esi
	cmpl	%ebp, %esi
	jg	.L3
	movl	4(%rsp), %r8d
.L2:
	xorl	%r11d, %r11d
	xorl	%eax, %eax
.L7:
	xorl	%r10d, %r10d
	xorl	%r9d, %r9d
	movl	$-1, %edi
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$1, %rax
	cmpl	%eax, %esi
	je	.L16
.L6:
	movl	(%r12,%rax,4), %ecx
	movl	%r8d, %edx
	subl	%ebx, %edx
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	cmpl	%edi, %edx
	jl	.L4
	movl	%eax, %r10d
	movl	%ebx, %r9d
	movl	%edx, %edi
.L4:
	subl	0(%r13,%rax,4), %ebx
	testl	%ebx, %ebx
	jg	.L17
	movslq	%r10d, %rax
	addl	(%r12,%rax,4), %r9d
	cmpl	%r8d, %r9d
	movl	%r9d, %ebx
	cmovg	%r8d, %ebx
	addl	$1, %r11d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%eax, %eax
	movl	%r11d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$24, %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
.L13:
	.cfi_restore_state
	movl	%ebx, %r8d
	jmp	.L2
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	hi
	.bss
	.align 32
	.type	hi, @object
	.size	hi, 400000
hi:
	.zero	400000
	.globl	di
	.align 32
	.type	di, @object
	.size	di, 400000
di:
	.zero	400000
	.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	"%d%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
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	leaq	di(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	hi(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	4(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	movl	4(%rsp), %ebx
	leal	-1(%rax), %esi
	testl	%esi, %esi
	jle	.L13
	movq	%r13, %r15
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r15, %rsi
	leaq	(%r12,%rbp,4), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	addq	$1, %rbp
	addq	$4, %r15
	leal	-1(%rax), %esi
	cmpl	%ebp, %esi
	jg	.L3
	movl	4(%rsp), %r8d
.L2:
	xorl	%r11d, %r11d
	xorl	%eax, %eax
.L7:
	xorl	%r10d, %r10d
	xorl	%r9d, %r9d
	movl	$-1, %edi
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$1, %rax
	cmpl	%eax, %esi
	je	.L16
.L6:
	movl	(%r12,%rax,4), %ecx
	movl	%r8d, %edx
	subl	%ebx, %edx
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
	cmpl	%edi, %edx
	jl	.L4
	movl	%eax, %r10d
	movl	%ebx, %r9d
	movl	%edx, %edi
.L4:
	subl	0(%r13,%rax,4), %ebx
	testl	%ebx, %ebx
	jg	.L17
	movslq	%r10d, %rax
	addl	(%r12,%rax,4), %r9d
	cmpl	%r8d, %r9d
	movl	%r9d, %ebx
	cmovg	%r8d, %ebx
	addl	$1, %r11d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%eax, %eax
	movl	%r11d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$24, %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
.L13:
	.cfi_restore_state
	movl	%ebx, %r8d
	jmp	.L2
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	hi
	.bss
	.align 32
	.type	hi, @object
	.size	hi, 400000
hi:
	.zero	400000
	.globl	di
	.align 32
	.type	di, @object
	.size	di, 400000
di:
	.zero	400000
	.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:
```