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(){
  int A,B,M;
  int a[100002],b[100002];
  int min_a=200000,min_b=200000,min;
  scanf("%d %d %d",&A,&B,&M);
  for(int i=1;i<=A;i++){
    scanf("%d",a+i);
    if(a[i]<min_a) min_a=a[i];
  }
  for(int i=1;i<=B;i++){
    scanf("%d",b+i);
    if(b[i]<min_b) min_b=b[i];
  }
  min=min_a+min_b;
  int x,y,c;
  for(int i=1;i<=M;i++){
    scanf("%d %d %d",&x,&y,&c);
    if(a[x]+b[y]-c<min) min=a[x]+b[y]-c;
  }
  printf("%d\n",min);
  return 0;
}```

Assembly Code:

```assembly
	.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	%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
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1352, %rsp
	.cfi_def_cfa_offset 800128
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800056(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L9
	movl	$1, %ebp
	movl	$200000, %r12d
	leaq	32(%rsp), %r14
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%r14,%rbp,4), %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r14,%rbp,4), %eax
	cmpl	%eax, %r12d
	cmovg	%eax, %r12d
	addq	$1, %rbp
	cmpl	%ebp, 8(%rsp)
	jge	.L3
.L2:
	movl	12(%rsp), %edx
	testl	%edx, %edx
	jle	.L10
	movl	$1, %ebp
	movl	$200000, %r14d
	leaq	.LC1(%rip), %r13
	leaq	400048(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	(%r15,%rbp,4), %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r15,%rbp,4), %eax
	cmpl	%eax, %r14d
	cmovg	%eax, %r14d
	addq	$1, %rbp
	cmpl	%ebp, 12(%rsp)
	jge	.L5
.L4:
	movl	16(%rsp), %eax
	addl	%r12d, %r14d
	testl	%eax, %eax
	jle	.L6
	movl	$1, %r15d
	leaq	28(%rsp), %r13
	leaq	24(%rsp), %r12
	leaq	20(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r12, %rdx
	xorl	%eax, %eax
	movq	%r13, %rcx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rdx
	movslq	24(%rsp), %rax
	movl	400048(%rsp,%rax,4), %eax
	addl	32(%rsp,%rdx,4), %eax
	subl	28(%rsp), %eax
	cmpl	%eax, %r14d
	cmovg	%eax, %r14d
	addl	$1, %r15d
	cmpl	%r15d, 16(%rsp)
	jge	.L7
.L6:
	xorl	%eax, %eax
	movl	%r14d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	800056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$800072, %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
.L9:
	.cfi_restore_state
	movl	$200000, %r12d
	jmp	.L2
.L10:
	movl	$200000, %r14d
	jmp	.L4
.L16:
	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	"%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	%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
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1352, %rsp
	.cfi_def_cfa_offset 800128
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800056(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L9
	movl	$1, %ebp
	movl	$200000, %r12d
	leaq	32(%rsp), %r14
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%r14,%rbp,4), %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r14,%rbp,4), %eax
	cmpl	%eax, %r12d
	cmovg	%eax, %r12d
	addq	$1, %rbp
	cmpl	%ebp, 8(%rsp)
	jge	.L3
.L2:
	movl	12(%rsp), %edx
	testl	%edx, %edx
	jle	.L10
	movl	$1, %ebp
	movl	$200000, %r14d
	leaq	.LC1(%rip), %r13
	leaq	400048(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	(%r15,%rbp,4), %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r15,%rbp,4), %eax
	cmpl	%eax, %r14d
	cmovg	%eax, %r14d
	addq	$1, %rbp
	cmpl	%ebp, 12(%rsp)
	jge	.L5
.L4:
	movl	16(%rsp), %eax
	addl	%r12d, %r14d
	testl	%eax, %eax
	jle	.L6
	movl	$1, %r15d
	leaq	28(%rsp), %r13
	leaq	24(%rsp), %r12
	leaq	20(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r12, %rdx
	xorl	%eax, %eax
	movq	%r13, %rcx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rdx
	movslq	24(%rsp), %rax
	movl	400048(%rsp,%rax,4), %eax
	addl	32(%rsp,%rdx,4), %eax
	subl	28(%rsp), %eax
	cmpl	%eax, %r14d
	cmovg	%eax, %r14d
	addl	$1, %r15d
	cmpl	%r15d, 16(%rsp)
	jge	.L7
.L6:
	xorl	%eax, %eax
	movl	%r14d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	800056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$800072, %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
.L9:
	.cfi_restore_state
	movl	$200000, %r12d
	jmp	.L2
.L10:
	movl	$200000, %r14d
	jmp	.L4
.L16:
	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	"%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	%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
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1352, %rsp
	.cfi_def_cfa_offset 800128
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800056(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L9
	movl	$1, %ebp
	movl	$200000, %r12d
	leaq	32(%rsp), %r14
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%r14,%rbp,4), %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r14,%rbp,4), %eax
	cmpl	%eax, %r12d
	cmovg	%eax, %r12d
	addq	$1, %rbp
	cmpl	%ebp, 8(%rsp)
	jge	.L3
.L2:
	movl	12(%rsp), %edx
	testl	%edx, %edx
	jle	.L10
	movl	$1, %ebp
	movl	$200000, %r14d
	leaq	.LC1(%rip), %r13
	leaq	400048(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	(%r15,%rbp,4), %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r15,%rbp,4), %eax
	cmpl	%eax, %r14d
	cmovg	%eax, %r14d
	addq	$1, %rbp
	cmpl	%ebp, 12(%rsp)
	jge	.L5
.L4:
	movl	16(%rsp), %eax
	addl	%r12d, %r14d
	testl	%eax, %eax
	jle	.L6
	movl	$1, %r15d
	leaq	28(%rsp), %r13
	leaq	24(%rsp), %r12
	leaq	20(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r12, %rdx
	xorl	%eax, %eax
	movq	%r13, %rcx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rdx
	movslq	24(%rsp), %rax
	movl	400048(%rsp,%rax,4), %eax
	addl	32(%rsp,%rdx,4), %eax
	subl	28(%rsp), %eax
	cmpl	%eax, %r14d
	cmovg	%eax, %r14d
	addl	$1, %r15d
	cmpl	%r15d, 16(%rsp)
	jge	.L7
.L6:
	xorl	%eax, %eax
	movl	%r14d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	800056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$800072, %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
.L9:
	.cfi_restore_state
	movl	$200000, %r12d
	jmp	.L2
.L10:
	movl	$200000, %r14d
	jmp	.L4
.L16:
	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(){
  int A,B,M;
  int a[100002],b[100002];
  int min_a=200000,min_b=200000,min;
  scanf("%d %d %d",&A,&B,&M);
  for(int i=1;i<=A;i++){
    scanf("%d",a+i);
    if(a[i]<min_a) min_a=a[i];
  }
  for(int i=1;i<=B;i++){
    scanf("%d",b+i);
    if(b[i]<min_b) min_b=b[i];
  }
  min=min_a+min_b;
  int x,y,c;
  for(int i=1;i<=M;i++){
    scanf("%d %d %d",&x,&y,&c);
    if(a[x]+b[y]-c<min) min=a[x]+b[y]-c;
  }
  printf("%d\n",min);
  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(){
  int A,B,M;
  int a[100002],b[100002];
  int min_a=200000,min_b=200000,min;
  scanf("%d %d %d",&A,&B,&M);
  for(int i=1;i<=A;i++){
    scanf("%d",a+i);
    if(a[i]<min_a) min_a=a[i];
  }
  for(int i=1;i<=B;i++){
    scanf("%d",b+i);
    if(b[i]<min_b) min_b=b[i];
  }
  min=min_a+min_b;
  int x,y,c;
  for(int i=1;i<=M;i++){
    scanf("%d %d %d",&x,&y,&c);
    if(a[x]+b[y]-c<min) min=a[x]+b[y]-c;
  }
  printf("%d\n",min);
  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:

1 1 2
10
10
1 0 5
1 1 10
 2 2 1
3 1
3 5
2 2 2
 2 3 1
3 3
3 6 3
1 2 1
 2 2 1
3 2
3 8
2 2 2
 1 1 2
17
10
1 0 0
1 1 10
 1 1 0
10
6
1 0 0
1 1 10
 1 1 2
17
10
1 0 0
1 1 14
 2 4 0
3 5
3 6 0
0 2 1
 2 4 0
2 1
1 5
1 2 2
 2 4 0
2 1
0 5
1 2 2

5
 4
 6
 5
 17
 16
 13
 3
 2
 1

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(){
  int A,B,M;
  int a[100002],b[100002];
  int min_a=200000,min_b=200000,min;
  scanf("%d %d %d",&A,&B,&M);
  for(int i=1;i<=A;i++){
    scanf("%d",a+i);
    if(a[i]<min_a) min_a=a[i];
  }
  for(int i=1;i<=B;i++){
    scanf("%d",b+i);
    if(b[i]<min_b) min_b=b[i];
  }
  min=min_a+min_b;
  int x,y,c;
  for(int i=1;i<=M;i++){
    scanf("%d %d %d",&x,&y,&c);
    if(a[x]+b[y]-c<min) min=a[x]+b[y]-c;
  }
  printf("%d\n",min);
  return 0;
}```

Assembly Code:

```assembly
	.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	%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
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1352, %rsp
	.cfi_def_cfa_offset 800128
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800056(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L9
	movl	$1, %ebp
	movl	$200000, %r12d
	leaq	32(%rsp), %r14
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%r14,%rbp,4), %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r14,%rbp,4), %eax
	cmpl	%eax, %r12d
	cmovg	%eax, %r12d
	addq	$1, %rbp
	cmpl	%ebp, 8(%rsp)
	jge	.L3
.L2:
	movl	12(%rsp), %edx
	testl	%edx, %edx
	jle	.L10
	movl	$1, %ebp
	movl	$200000, %r14d
	leaq	.LC1(%rip), %r13
	leaq	400048(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	(%r15,%rbp,4), %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r15,%rbp,4), %eax
	cmpl	%eax, %r14d
	cmovg	%eax, %r14d
	addq	$1, %rbp
	cmpl	%ebp, 12(%rsp)
	jge	.L5
.L4:
	movl	16(%rsp), %eax
	addl	%r12d, %r14d
	testl	%eax, %eax
	jle	.L6
	movl	$1, %r15d
	leaq	28(%rsp), %r13
	leaq	24(%rsp), %r12
	leaq	20(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r12, %rdx
	xorl	%eax, %eax
	movq	%r13, %rcx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rdx
	movslq	24(%rsp), %rax
	movl	400048(%rsp,%rax,4), %eax
	addl	32(%rsp,%rdx,4), %eax
	subl	28(%rsp), %eax
	cmpl	%eax, %r14d
	cmovg	%eax, %r14d
	addl	$1, %r15d
	cmpl	%r15d, 16(%rsp)
	jge	.L7
.L6:
	xorl	%eax, %eax
	movl	%r14d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	800056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$800072, %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
.L9:
	.cfi_restore_state
	movl	$200000, %r12d
	jmp	.L2
.L10:
	movl	$200000, %r14d
	jmp	.L4
.L16:
	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	"%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	%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
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1352, %rsp
	.cfi_def_cfa_offset 800128
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800056(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L9
	movl	$1, %ebp
	movl	$200000, %r12d
	leaq	32(%rsp), %r14
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%r14,%rbp,4), %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r14,%rbp,4), %eax
	cmpl	%eax, %r12d
	cmovg	%eax, %r12d
	addq	$1, %rbp
	cmpl	%ebp, 8(%rsp)
	jge	.L3
.L2:
	movl	12(%rsp), %edx
	testl	%edx, %edx
	jle	.L10
	movl	$1, %ebp
	movl	$200000, %r14d
	leaq	.LC1(%rip), %r13
	leaq	400048(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	(%r15,%rbp,4), %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r15,%rbp,4), %eax
	cmpl	%eax, %r14d
	cmovg	%eax, %r14d
	addq	$1, %rbp
	cmpl	%ebp, 12(%rsp)
	jge	.L5
.L4:
	movl	16(%rsp), %eax
	addl	%r12d, %r14d
	testl	%eax, %eax
	jle	.L6
	movl	$1, %r15d
	leaq	28(%rsp), %r13
	leaq	24(%rsp), %r12
	leaq	20(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r12, %rdx
	xorl	%eax, %eax
	movq	%r13, %rcx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rdx
	movslq	24(%rsp), %rax
	movl	400048(%rsp,%rax,4), %eax
	addl	32(%rsp,%rdx,4), %eax
	subl	28(%rsp), %eax
	cmpl	%eax, %r14d
	cmovg	%eax, %r14d
	addl	$1, %r15d
	cmpl	%r15d, 16(%rsp)
	jge	.L7
.L6:
	xorl	%eax, %eax
	movl	%r14d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	800056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$800072, %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
.L9:
	.cfi_restore_state
	movl	$200000, %r12d
	jmp	.L2
.L10:
	movl	$200000, %r14d
	jmp	.L4
.L16:
	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:
```