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(void){

  long a,b,m;
  scanf("%ld %ld %ld", &a, &b, &m);
  long a_price[a], b_price[b], x[m], y[m], c[m];
  for (long i = 0; i < a; i++) {
    scanf("%ld", &a_price[i]);
  }
  for (long i = 0; i < b; i++) {
    scanf("%ld", &b_price[i]);
  }
  for (long i = 0; i < m; i++) {
    scanf("%ld %ld %ld", &x[i], &y[i], &c[i]);
  }

  long without_m;
  long min = a_price[0];
  for (long i = 1; i < a; i++) {
    if (a_price[i] < min) {
      min = a_price[i];
    }
  }
  without_m = min;
  min = b_price[0];
  for (long i = 1; i < b; i++) {
    if (b_price[i] < min) {
      min = b_price[i];
    }
  }
  without_m += min;

  long price;
  min = without_m;
  for (long i = 0; i < m; i++) {
    price = a_price[x[i]-1]+b_price[y[i]-1]-c[i];
    if (price < min) {
      min = price;
    }
  }
  printf("%ld\n", min);

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld %ld %ld"
.LC1:
	.string	"%ld"
.LC2:
	.string	"%ld\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$328, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-216(%rbp), %rcx
	leaq	-224(%rbp), %rdx
	leaq	-232(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-232(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -152(%rbp)
	movq	%rdx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%rdx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L2:
	cmpq	%rcx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L4
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -144(%rbp)
	movq	-224(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -136(%rbp)
	movq	%rdx, %rax
	movq	%rax, -256(%rbp)
	movq	$0, -248(%rbp)
	movq	%rdx, %rax
	movq	%rax, -272(%rbp)
	movq	$0, -264(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L5:
	cmpq	%rcx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L7
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -128(%rbp)
	movq	-216(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -120(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -288(%rbp)
	movq	$0, -280(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -304(%rbp)
	movq	$0, -296(%rbp)
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L8:
	cmpq	%rdx, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L10
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L10:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -112(%rbp)
	movq	-216(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -104(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -320(%rbp)
	movq	$0, -312(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -336(%rbp)
	movq	$0, -328(%rbp)
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L11:
	cmpq	%rdx, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L13
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L13:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -96(%rbp)
	movq	-216(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -88(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -352(%rbp)
	movq	$0, -344(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -368(%rbp)
	movq	$0, -360(%rbp)
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L14:
	cmpq	%rdx, %rsp
	je	.L15
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L14
.L15:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L16
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L16:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -80(%rbp)
	movq	$0, -208(%rbp)
	jmp	.L17
.L18:
	movq	-208(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-144(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -208(%rbp)
.L17:
	movq	-232(%rbp), %rax
	cmpq	%rax, -208(%rbp)
	jl	.L18
	movq	$0, -200(%rbp)
	jmp	.L19
.L20:
	movq	-200(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-128(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -200(%rbp)
.L19:
	movq	-224(%rbp), %rax
	cmpq	%rax, -200(%rbp)
	jl	.L20
	movq	$0, -192(%rbp)
	jmp	.L21
.L22:
	movq	-192(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-80(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movq	-192(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-96(%rbp), %rax
	addq	%rax, %rdx
	movq	-192(%rbp), %rax
	leaq	0(,%rax,8), %rsi
	movq	-112(%rbp), %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -192(%rbp)
.L21:
	movq	-216(%rbp), %rax
	cmpq	%rax, -192(%rbp)
	jl	.L22
	movq	-144(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -184(%rbp)
	movq	$1, -176(%rbp)
	jmp	.L23
.L25:
	movq	-144(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, -184(%rbp)
	jle	.L24
	movq	-144(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -184(%rbp)
.L24:
	addq	$1, -176(%rbp)
.L23:
	movq	-232(%rbp), %rax
	cmpq	%rax, -176(%rbp)
	jl	.L25
	movq	-184(%rbp), %rax
	movq	%rax, -72(%rbp)
	movq	-128(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -184(%rbp)
	movq	$1, -168(%rbp)
	jmp	.L26
.L28:
	movq	-128(%rbp), %rax
	movq	-168(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, -184(%rbp)
	jle	.L27
	movq	-128(%rbp), %rax
	movq	-168(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -184(%rbp)
.L27:
	addq	$1, -168(%rbp)
.L26:
	movq	-224(%rbp), %rax
	cmpq	%rax, -168(%rbp)
	jl	.L28
	movq	-184(%rbp), %rax
	addq	%rax, -72(%rbp)
	movq	-72(%rbp), %rax
	movq	%rax, -184(%rbp)
	movq	$0, -160(%rbp)
	jmp	.L29
.L31:
	movq	-112(%rbp), %rax
	movq	-160(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	leaq	-1(%rax), %rdx
	movq	-144(%rbp), %rax
	movq	(%rax,%rdx,8), %rcx
	movq	-96(%rbp), %rax
	movq	-160(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	leaq	-1(%rax), %rdx
	movq	-128(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	addq	%rax, %rcx
	movq	-80(%rbp), %rax
	movq	-160(%rbp), %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rax
	cmpq	-184(%rbp), %rax
	jge	.L30
	movq	-64(%rbp), %rax
	movq	%rax, -184(%rbp)
.L30:
	addq	$1, -160(%rbp)
.L29:
	movq	-216(%rbp), %rax
	cmpq	%rax, -160(%rbp)
	jl	.L31
	movq	-184(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	"%ld %ld %ld"
.LC1:
	.string	"%ld"
.LC2:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-64(%rbp), %rcx
	leaq	-72(%rbp), %rdx
	pushq	%r13
	leaq	-80(%rbp), %rsi
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-80(%rbp), %rcx
	movq	%rsp, %rsi
	leaq	15(,%rcx,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L3
.L58:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L58
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L59
.L4:
	leaq	7(%rsp), %rbx
	movq	%rsp, %rsi
	movq	%rbx, %rax
	andq	$-8, %rbx
	shrq	$3, %rax
	movq	%rax, -120(%rbp)
	movq	-72(%rbp), %rax
	leaq	15(,%rax,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rsi
.L5:
	cmpq	%rsi, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L59:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L6:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L60
.L7:
	leaq	7(%rsp), %r13
	movq	%rsp, %rsi
	movq	%r13, %rax
	andq	$-8, %r13
	shrq	$3, %rax
	movq	%rax, -128(%rbp)
	movq	-64(%rbp), %rax
	leaq	15(,%rax,8), %rax
	movq	%rax, %rdi
	movq	%rax, %rdx
	andq	$-4096, %rdi
	andq	$-16, %rdx
	subq	%rdi, %rsi
.L8:
	cmpq	%rsi, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L60:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L7
.L9:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L10
	orq	$0, -8(%rsp,%rdx)
.L10:
	movq	%rax, %rdi
	movq	%rax, %rdx
	movq	%rsp, %rsi
	movq	%rsp, %r14
	andq	$-4096, %rdi
	andq	$-16, %rdx
	subq	%rdi, %rsi
.L11:
	cmpq	%rsi, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L13
	orq	$0, -8(%rsp,%rdx)
.L13:
	movq	%rax, %rdx
	movq	%rsp, %rsi
	andq	$-4096, %rax
	movq	%rsp, %r15
	andq	$-16, %rdx
	subq	%rax, %rsi
.L14:
	cmpq	%rsi, %rsp
	je	.L15
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L14
.L15:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	je	.L16
	orq	$0, -8(%rsp,%rax)
.L16:
	movq	%rsp, -88(%rbp)
	testq	%rcx, %rcx
	jle	.L21
	movq	%rbx, %rcx
	xorl	%edx, %edx
	movq	%rbx, -96(%rbp)
	leaq	.LC1(%rip), %r12
	movq	%r13, -104(%rbp)
	movq	%rdx, %rbx
	movq	%rcx, %r13
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	addq	$8, %r13
	cmpq	%rbx, -80(%rbp)
	jg	.L20
	movq	-96(%rbp), %rbx
	movq	-104(%rbp), %r13
.L21:
	xorl	%edx, %edx
	cmpq	$0, -72(%rbp)
	leaq	.LC1(%rip), %r12
	jle	.L19
	movq	%r13, -104(%rbp)
	movq	%rbx, -96(%rbp)
	movq	%rdx, %rbx
	.p2align 4,,10
	.p2align 3
.L24:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	addq	$8, %r13
	cmpq	%rbx, -72(%rbp)
	jg	.L24
	movq	-96(%rbp), %rbx
	movq	-104(%rbp), %r13
.L19:
	movq	-64(%rbp), %rsi
	testq	%rsi, %rsi
	jle	.L23
	movq	-88(%rbp), %rcx
	movq	%r14, -112(%rbp)
	xorl	%r12d, %r12d
	movq	%rbx, -96(%rbp)
	movq	%r13, -104(%rbp)
	movq	%rcx, %rbx
	movq	%r15, %r13
	.p2align 4,,10
	.p2align 3
.L25:
	movq	%r14, %rsi
	movq	%rbx, %rcx
	movq	%r13, %rdx
	xorl	%eax, %eax
	addq	$1, %r12
	addq	$8, %r14
	addq	$8, %r13
	addq	$8, %rbx
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rsi
	cmpq	%r12, %rsi
	jg	.L25
	movq	-96(%rbp), %rbx
	movq	-104(%rbp), %r13
	movq	-112(%rbp), %r14
.L23:
	movq	-120(%rbp), %rax
	movq	-80(%rbp), %rdi
	movq	0(,%rax,8), %rdx
	cmpq	$1, %rdi
	jle	.L26
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L27:
	movq	(%rbx,%rax,8), %rcx
	cmpq	%rcx, %rdx
	cmovg	%rcx, %rdx
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L27
.L26:
	movq	-128(%rbp), %rax
	movq	-72(%rbp), %r8
	movq	0(,%rax,8), %rcx
	cmpq	$1, %r8
	jle	.L28
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L29:
	movq	0(%r13,%rax,8), %rdi
	cmpq	%rdi, %rcx
	cmovg	%rdi, %rcx
	addq	$1, %rax
	cmpq	%r8, %rax
	jne	.L29
.L28:
	addq	%rcx, %rdx
	testq	%rsi, %rsi
	jle	.L30
	movq	-88(%rbp), %r8
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L31:
	movq	(%r14,%rcx,8), %rdi
	movq	(%r15,%rcx,8), %rax
	movq	-8(%r13,%rax,8), %rax
	addq	-8(%rbx,%rdi,8), %rax
	subq	(%r8,%rcx,8), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	addq	$1, %rcx
	cmpq	%rsi, %rcx
	jne	.L31
.L30:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L61
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L61:
	.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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld %ld %ld"
.LC1:
	.string	"%ld"
.LC2:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-64(%rbp), %rcx
	leaq	-72(%rbp), %rdx
	pushq	%r13
	leaq	-80(%rbp), %rsi
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-80(%rbp), %rcx
	movq	%rsp, %rsi
	leaq	15(,%rcx,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L3
.L58:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L58
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L59
.L4:
	leaq	7(%rsp), %rbx
	movq	%rsp, %rsi
	movq	%rbx, %rax
	andq	$-8, %rbx
	shrq	$3, %rax
	movq	%rax, -120(%rbp)
	movq	-72(%rbp), %rax
	leaq	15(,%rax,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rsi
.L5:
	cmpq	%rsi, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L59:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L6:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L60
.L7:
	leaq	7(%rsp), %r13
	movq	%rsp, %rsi
	movq	%r13, %rax
	andq	$-8, %r13
	shrq	$3, %rax
	movq	%rax, -128(%rbp)
	movq	-64(%rbp), %rax
	leaq	15(,%rax,8), %rax
	movq	%rax, %rdi
	movq	%rax, %rdx
	andq	$-4096, %rdi
	andq	$-16, %rdx
	subq	%rdi, %rsi
.L8:
	cmpq	%rsi, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L60:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L7
.L9:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L10
	orq	$0, -8(%rsp,%rdx)
.L10:
	movq	%rax, %rdi
	movq	%rax, %rdx
	movq	%rsp, %rsi
	movq	%rsp, %r14
	andq	$-4096, %rdi
	andq	$-16, %rdx
	subq	%rdi, %rsi
.L11:
	cmpq	%rsi, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L13
	orq	$0, -8(%rsp,%rdx)
.L13:
	movq	%rax, %rdx
	movq	%rsp, %rsi
	andq	$-4096, %rax
	movq	%rsp, %r15
	andq	$-16, %rdx
	subq	%rax, %rsi
.L14:
	cmpq	%rsi, %rsp
	je	.L15
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L14
.L15:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	je	.L16
	orq	$0, -8(%rsp,%rax)
.L16:
	movq	%rsp, -88(%rbp)
	testq	%rcx, %rcx
	jle	.L21
	movq	%rbx, %rcx
	xorl	%edx, %edx
	movq	%rbx, -96(%rbp)
	leaq	.LC1(%rip), %r12
	movq	%r13, -104(%rbp)
	movq	%rdx, %rbx
	movq	%rcx, %r13
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	addq	$8, %r13
	cmpq	%rbx, -80(%rbp)
	jg	.L20
	movq	-96(%rbp), %rbx
	movq	-104(%rbp), %r13
.L21:
	xorl	%edx, %edx
	cmpq	$0, -72(%rbp)
	leaq	.LC1(%rip), %r12
	jle	.L19
	movq	%r13, -104(%rbp)
	movq	%rbx, -96(%rbp)
	movq	%rdx, %rbx
	.p2align 4,,10
	.p2align 3
.L24:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	addq	$8, %r13
	cmpq	%rbx, -72(%rbp)
	jg	.L24
	movq	-96(%rbp), %rbx
	movq	-104(%rbp), %r13
.L19:
	movq	-64(%rbp), %rsi
	testq	%rsi, %rsi
	jle	.L23
	movq	-88(%rbp), %rcx
	movq	%r14, -112(%rbp)
	xorl	%r12d, %r12d
	movq	%rbx, -96(%rbp)
	movq	%r13, -104(%rbp)
	movq	%rcx, %rbx
	movq	%r15, %r13
	.p2align 4,,10
	.p2align 3
.L25:
	movq	%r14, %rsi
	movq	%rbx, %rcx
	movq	%r13, %rdx
	xorl	%eax, %eax
	addq	$1, %r12
	addq	$8, %r14
	addq	$8, %r13
	addq	$8, %rbx
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rsi
	cmpq	%r12, %rsi
	jg	.L25
	movq	-96(%rbp), %rbx
	movq	-104(%rbp), %r13
	movq	-112(%rbp), %r14
.L23:
	movq	-120(%rbp), %rax
	movq	-80(%rbp), %rdi
	movq	0(,%rax,8), %rdx
	cmpq	$1, %rdi
	jle	.L26
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L27:
	movq	(%rbx,%rax,8), %rcx
	cmpq	%rcx, %rdx
	cmovg	%rcx, %rdx
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L27
.L26:
	movq	-128(%rbp), %rax
	movq	-72(%rbp), %r8
	movq	0(,%rax,8), %rcx
	cmpq	$1, %r8
	jle	.L28
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L29:
	movq	0(%r13,%rax,8), %rdi
	cmpq	%rdi, %rcx
	cmovg	%rdi, %rcx
	addq	$1, %rax
	cmpq	%r8, %rax
	jne	.L29
.L28:
	addq	%rcx, %rdx
	testq	%rsi, %rsi
	jle	.L30
	movq	-88(%rbp), %r8
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L31:
	movq	(%r14,%rcx,8), %rdi
	movq	(%r15,%rcx,8), %rax
	movq	-8(%r13,%rax,8), %rax
	addq	-8(%rbx,%rdi,8), %rax
	subq	(%r8,%rcx,8), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	addq	$1, %rcx
	cmpq	%rsi, %rcx
	jne	.L31
.L30:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L61
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L61:
	.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:

#include <stdio.h>

int main(void){

  long a,b,m;
  scanf("%ld %ld %ld", &a, &b, &m);
  long a_price[a], b_price[b], x[m], y[m], c[m];
  for (long i = 0; i < a; i++) {
    scanf("%ld", &a_price[i]);
  }
  for (long i = 0; i < b; i++) {
    scanf("%ld", &b_price[i]);
  }
  for (long i = 0; i < m; i++) {
    scanf("%ld %ld %ld", &x[i], &y[i], &c[i]);
  }

  long without_m;
  long min = a_price[0];
  for (long i = 1; i < a; i++) {
    if (a_price[i] < min) {
      min = a_price[i];
    }
  }
  without_m = min;
  min = b_price[0];
  for (long i = 1; i < b; i++) {
    if (b_price[i] < min) {
      min = b_price[i];
    }
  }
  without_m += min;

  long price;
  min = without_m;
  for (long i = 0; i < m; i++) {
    price = a_price[x[i]-1]+b_price[y[i]-1]-c[i];
    if (price < min) {
      min = price;
    }
  }
  printf("%ld\n", min);

  return 0;
}
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

6
 4
 6
 5
 17
 16
 13
 3
 2
 1

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(void){

  long a,b,m;
  scanf("%ld %ld %ld", &a, &b, &m);
  long a_price[a], b_price[b], x[m], y[m], c[m];
  for (long i = 0; i < a; i++) {
    scanf("%ld", &a_price[i]);
  }
  for (long i = 0; i < b; i++) {
    scanf("%ld", &b_price[i]);
  }
  for (long i = 0; i < m; i++) {
    scanf("%ld %ld %ld", &x[i], &y[i], &c[i]);
  }

  long without_m;
  long min = a_price[0];
  for (long i = 1; i < a; i++) {
    if (a_price[i] < min) {
      min = a_price[i];
    }
  }
  without_m = min;
  min = b_price[0];
  for (long i = 1; i < b; i++) {
    if (b_price[i] < min) {
      min = b_price[i];
    }
  }
  without_m += min;

  long price;
  min = without_m;
  for (long i = 0; i < m; i++) {
    price = a_price[x[i]-1]+b_price[y[i]-1]-c[i];
    if (price < min) {
      min = price;
    }
  }
  printf("%ld\n", min);

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld %ld %ld"
.LC1:
	.string	"%ld"
.LC2:
	.string	"%ld\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$328, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-216(%rbp), %rcx
	leaq	-224(%rbp), %rdx
	leaq	-232(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-232(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -152(%rbp)
	movq	%rdx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%rdx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L2:
	cmpq	%rcx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L4
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -144(%rbp)
	movq	-224(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -136(%rbp)
	movq	%rdx, %rax
	movq	%rax, -256(%rbp)
	movq	$0, -248(%rbp)
	movq	%rdx, %rax
	movq	%rax, -272(%rbp)
	movq	$0, -264(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L5:
	cmpq	%rcx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L7
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -128(%rbp)
	movq	-216(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -120(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -288(%rbp)
	movq	$0, -280(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -304(%rbp)
	movq	$0, -296(%rbp)
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L8:
	cmpq	%rdx, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L10
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L10:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -112(%rbp)
	movq	-216(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -104(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -320(%rbp)
	movq	$0, -312(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -336(%rbp)
	movq	$0, -328(%rbp)
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L11:
	cmpq	%rdx, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L13
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L13:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -96(%rbp)
	movq	-216(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -88(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -352(%rbp)
	movq	$0, -344(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -368(%rbp)
	movq	$0, -360(%rbp)
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L14:
	cmpq	%rdx, %rsp
	je	.L15
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L14
.L15:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L16
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L16:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -80(%rbp)
	movq	$0, -208(%rbp)
	jmp	.L17
.L18:
	movq	-208(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-144(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -208(%rbp)
.L17:
	movq	-232(%rbp), %rax
	cmpq	%rax, -208(%rbp)
	jl	.L18
	movq	$0, -200(%rbp)
	jmp	.L19
.L20:
	movq	-200(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-128(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -200(%rbp)
.L19:
	movq	-224(%rbp), %rax
	cmpq	%rax, -200(%rbp)
	jl	.L20
	movq	$0, -192(%rbp)
	jmp	.L21
.L22:
	movq	-192(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-80(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movq	-192(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-96(%rbp), %rax
	addq	%rax, %rdx
	movq	-192(%rbp), %rax
	leaq	0(,%rax,8), %rsi
	movq	-112(%rbp), %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -192(%rbp)
.L21:
	movq	-216(%rbp), %rax
	cmpq	%rax, -192(%rbp)
	jl	.L22
	movq	-144(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -184(%rbp)
	movq	$1, -176(%rbp)
	jmp	.L23
.L25:
	movq	-144(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, -184(%rbp)
	jle	.L24
	movq	-144(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -184(%rbp)
.L24:
	addq	$1, -176(%rbp)
.L23:
	movq	-232(%rbp), %rax
	cmpq	%rax, -176(%rbp)
	jl	.L25
	movq	-184(%rbp), %rax
	movq	%rax, -72(%rbp)
	movq	-128(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -184(%rbp)
	movq	$1, -168(%rbp)
	jmp	.L26
.L28:
	movq	-128(%rbp), %rax
	movq	-168(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, -184(%rbp)
	jle	.L27
	movq	-128(%rbp), %rax
	movq	-168(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -184(%rbp)
.L27:
	addq	$1, -168(%rbp)
.L26:
	movq	-224(%rbp), %rax
	cmpq	%rax, -168(%rbp)
	jl	.L28
	movq	-184(%rbp), %rax
	addq	%rax, -72(%rbp)
	movq	-72(%rbp), %rax
	movq	%rax, -184(%rbp)
	movq	$0, -160(%rbp)
	jmp	.L29
.L31:
	movq	-112(%rbp), %rax
	movq	-160(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	leaq	-1(%rax), %rdx
	movq	-144(%rbp), %rax
	movq	(%rax,%rdx,8), %rcx
	movq	-96(%rbp), %rax
	movq	-160(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	leaq	-1(%rax), %rdx
	movq	-128(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	addq	%rax, %rcx
	movq	-80(%rbp), %rax
	movq	-160(%rbp), %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rax
	cmpq	-184(%rbp), %rax
	jge	.L30
	movq	-64(%rbp), %rax
	movq	%rax, -184(%rbp)
.L30:
	addq	$1, -160(%rbp)
.L29:
	movq	-216(%rbp), %rax
	cmpq	%rax, -160(%rbp)
	jl	.L31
	movq	-184(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	"%ld %ld %ld"
.LC1:
	.string	"%ld"
.LC2:
	.string	"%ld\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$328, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-216(%rbp), %rcx
	leaq	-224(%rbp), %rdx
	leaq	-232(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-232(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -152(%rbp)
	movq	%rdx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%rdx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L2:
	cmpq	%rcx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L4
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -144(%rbp)
	movq	-224(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -136(%rbp)
	movq	%rdx, %rax
	movq	%rax, -256(%rbp)
	movq	$0, -248(%rbp)
	movq	%rdx, %rax
	movq	%rax, -272(%rbp)
	movq	$0, -264(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L5:
	cmpq	%rcx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L7
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -128(%rbp)
	movq	-216(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -120(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -288(%rbp)
	movq	$0, -280(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -304(%rbp)
	movq	$0, -296(%rbp)
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L8:
	cmpq	%rdx, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L10
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L10:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -112(%rbp)
	movq	-216(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -104(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -320(%rbp)
	movq	$0, -312(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -336(%rbp)
	movq	$0, -328(%rbp)
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L11:
	cmpq	%rdx, %rsp
	je	.L12
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L11
.L12:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L13
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L13:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -96(%rbp)
	movq	-216(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -88(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -352(%rbp)
	movq	$0, -344(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -368(%rbp)
	movq	$0, -360(%rbp)
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L14:
	cmpq	%rdx, %rsp
	je	.L15
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L14
.L15:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L16
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L16:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -80(%rbp)
	movq	$0, -208(%rbp)
	jmp	.L17
.L18:
	movq	-208(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-144(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -208(%rbp)
.L17:
	movq	-232(%rbp), %rax
	cmpq	%rax, -208(%rbp)
	jl	.L18
	movq	$0, -200(%rbp)
	jmp	.L19
.L20:
	movq	-200(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-128(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -200(%rbp)
.L19:
	movq	-224(%rbp), %rax
	cmpq	%rax, -200(%rbp)
	jl	.L20
	movq	$0, -192(%rbp)
	jmp	.L21
.L22:
	movq	-192(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-80(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movq	-192(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-96(%rbp), %rax
	addq	%rax, %rdx
	movq	-192(%rbp), %rax
	leaq	0(,%rax,8), %rsi
	movq	-112(%rbp), %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -192(%rbp)
.L21:
	movq	-216(%rbp), %rax
	cmpq	%rax, -192(%rbp)
	jl	.L22
	movq	-144(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -184(%rbp)
	movq	$1, -176(%rbp)
	jmp	.L23
.L25:
	movq	-144(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, -184(%rbp)
	jle	.L24
	movq	-144(%rbp), %rax
	movq	-176(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -184(%rbp)
.L24:
	addq	$1, -176(%rbp)
.L23:
	movq	-232(%rbp), %rax
	cmpq	%rax, -176(%rbp)
	jl	.L25
	movq	-184(%rbp), %rax
	movq	%rax, -72(%rbp)
	movq	-128(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -184(%rbp)
	movq	$1, -168(%rbp)
	jmp	.L26
.L28:
	movq	-128(%rbp), %rax
	movq	-168(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, -184(%rbp)
	jle	.L27
	movq	-128(%rbp), %rax
	movq	-168(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -184(%rbp)
.L27:
	addq	$1, -168(%rbp)
.L26:
	movq	-224(%rbp), %rax
	cmpq	%rax, -168(%rbp)
	jl	.L28
	movq	-184(%rbp), %rax
	addq	%rax, -72(%rbp)
	movq	-72(%rbp), %rax
	movq	%rax, -184(%rbp)
	movq	$0, -160(%rbp)
	jmp	.L29
.L31:
	movq	-112(%rbp), %rax
	movq	-160(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	leaq	-1(%rax), %rdx
	movq	-144(%rbp), %rax
	movq	(%rax,%rdx,8), %rcx
	movq	-96(%rbp), %rax
	movq	-160(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	leaq	-1(%rax), %rdx
	movq	-128(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	addq	%rax, %rcx
	movq	-80(%rbp), %rax
	movq	-160(%rbp), %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rax
	cmpq	-184(%rbp), %rax
	jge	.L30
	movq	-64(%rbp), %rax
	movq	%rax, -184(%rbp)
.L30:
	addq	$1, -160(%rbp)
.L29:
	movq	-216(%rbp), %rax
	cmpq	%rax, -160(%rbp)
	jl	.L31
	movq	-184(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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:
