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>
#include<stdlib.h>
#include<stdint.h>
#include<inttypes.h>

typedef int32_t i32;

#define POS(i, j) ((i) * (m + 1) + (j))

i32 find (i32 a, i32 b, i32 c, i32 d, i32 *dp, i32 m) {
  return dp[POS(c, d)] - dp[POS(c, b - 1)] - dp[POS(a - 1, d)] + dp[POS(a - 1, b - 1)];
}

void run (void) {
  i32 n, m, q;
  scanf ("%" SCNi32 "%" SCNi32 "%" SCNi32, &n, &m, &q);
  i32 *v = (i32 *) calloc ((n + 1) * (m + 1), sizeof (i32));
  i32 *ex = (i32 *) calloc ((n + 1) * (m + 1), sizeof (i32));
  i32 *ey = (i32 *) calloc ((n + 1) * (m + 1), sizeof (i32));
  for (i32 i = 1; i <= n; ++i) {
    for (i32 j = 1; j <= m; ++j) {
      scanf ("%1" SCNi32, v + POS(i, j));
      ex[POS(i, j)] = v[POS(i, j)] & v[POS(i - 1, j)];
      ey[POS(i, j)] = v[POS(i, j)] & v[POS(i, j - 1)];
    }
  }
  for (i32 i = 1; i <= n; ++i) {
    for (i32 j = 1; j <= m; ++j) {
      v[POS(i, j)] += v[POS(i - 1, j)] + v[POS(i, j - 1)] - v[POS(i - 1, j - 1)];
      ex[POS(i, j)] += ex[POS(i - 1, j)] + ex[POS(i, j - 1)] - ex[POS(i - 1, j - 1)];
      ey[POS(i, j)] += ey[POS(i - 1, j)] + ey[POS(i, j - 1)] - ey[POS(i - 1, j - 1)];
    }
  }
  while (q--) {
    i32 a, b, c, d;
    scanf ("%" SCNi32 "%" SCNi32 "%" SCNi32 "%" SCNi32, &a, &b, &c, &d);
    i32 ans = find (a, b, c, d, v, m) - find (a + 1, b, c, d, ex, m) - find (a, b + 1, c, d, ey, m);
    printf ("%" PRIi32 "\n", ans);
  }
}

int main (void) {
  run();
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	find
	.type	find, @function
find:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movq	%r8, -24(%rbp)
	movl	%r9d, -28(%rbp)
	movl	-28(%rbp), %eax
	addl	$1, %eax
	imull	-12(%rbp), %eax
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-28(%rbp), %edx
	addl	$1, %edx
	movl	%edx, %ecx
	imull	-12(%rbp), %ecx
	movl	-8(%rbp), %edx
	subl	$1, %edx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-28(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %ecx
	movl	-16(%rbp), %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	-4(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %edx
	movl	-8(%rbp), %eax
	subl	$1, %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	addl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	find, .-find
	.section	.rodata
.LC0:
	.string	"%i%i%i"
.LC1:
	.string	"%1i"
.LC2:
	.string	"%i%i%i%i"
.LC3:
	.string	"%i\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-88(%rbp), %rcx
	leaq	-92(%rbp), %rdx
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-96(%rbp), %eax
	leal	1(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%edx, %eax
	cltq
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -48(%rbp)
	movl	-96(%rbp), %eax
	leal	1(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%edx, %eax
	cltq
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -40(%rbp)
	movl	-96(%rbp), %eax
	leal	1(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%edx, %eax
	cltq
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -32(%rbp)
	movl	$1, -68(%rbp)
	jmp	.L4
.L7:
	movl	$1, -64(%rbp)
	jmp	.L5
.L6:
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-68(%rbp), %eax
	movl	%eax, %edx
	movl	-64(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-68(%rbp), %eax
	movl	%eax, %edx
	movl	-64(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-68(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %edx
	movl	-64(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-68(%rbp), %eax
	movl	%eax, %esi
	movl	-64(%rbp), %eax
	addl	%esi, %eax
	cltq
	leaq	0(,%rax,4), %rsi
	movq	-40(%rbp), %rax
	addq	%rsi, %rax
	andl	%ecx, %edx
	movl	%edx, (%rax)
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-68(%rbp), %eax
	movl	%eax, %edx
	movl	-64(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-68(%rbp), %eax
	movl	%eax, %edx
	movl	-64(%rbp), %eax
	subl	$1, %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-68(%rbp), %eax
	movl	%eax, %esi
	movl	-64(%rbp), %eax
	addl	%esi, %eax
	cltq
	leaq	0(,%rax,4), %rsi
	movq	-32(%rbp), %rax
	addq	%rsi, %rax
	andl	%ecx, %edx
	movl	%edx, (%rax)
	addl	$1, -64(%rbp)
.L5:
	movl	-92(%rbp), %eax
	cmpl	%eax, -64(%rbp)
	jle	.L6
	addl	$1, -68(%rbp)
.L4:
	movl	-96(%rbp), %eax
	cmpl	%eax, -68(%rbp)
	jle	.L7
	movl	$1, -60(%rbp)
	jmp	.L8
.L11:
	movl	$1, -56(%rbp)
	jmp	.L9
.L10:
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %esi
	movl	-60(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %ecx
	movl	-56(%rbp), %eax
	subl	$1, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-48(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	addl	%eax, %edx
	movl	-60(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %ecx
	movl	-56(%rbp), %eax
	subl	$1, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-48(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	leal	(%rsi,%rcx), %edx
	movl	%edx, (%rax)
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %esi
	movl	-60(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %ecx
	movl	-56(%rbp), %eax
	subl	$1, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	addl	%eax, %edx
	movl	-60(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %ecx
	movl	-56(%rbp), %eax
	subl	$1, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	leal	(%rsi,%rcx), %edx
	movl	%edx, (%rax)
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %esi
	movl	-60(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %ecx
	movl	-56(%rbp), %eax
	subl	$1, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	addl	%eax, %edx
	movl	-60(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %ecx
	movl	-56(%rbp), %eax
	subl	$1, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	leal	(%rsi,%rcx), %edx
	movl	%edx, (%rax)
	addl	$1, -56(%rbp)
.L9:
	movl	-92(%rbp), %eax
	cmpl	%eax, -56(%rbp)
	jle	.L10
	addl	$1, -60(%rbp)
.L8:
	movl	-96(%rbp), %eax
	cmpl	%eax, -60(%rbp)
	jle	.L11
	jmp	.L12
.L13:
	leaq	-72(%rbp), %rsi
	leaq	-76(%rbp), %rcx
	leaq	-80(%rbp), %rdx
	leaq	-84(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-92(%rbp), %r8d
	movl	-72(%rbp), %ecx
	movl	-76(%rbp), %edx
	movl	-80(%rbp), %esi
	movl	-84(%rbp), %eax
	movq	-48(%rbp), %rdi
	movl	%r8d, %r9d
	movq	%rdi, %r8
	movl	%eax, %edi
	call	find
	movl	%eax, %ebx
	movl	-92(%rbp), %r8d
	movl	-72(%rbp), %ecx
	movl	-76(%rbp), %edx
	movl	-80(%rbp), %eax
	movl	-84(%rbp), %esi
	leal	1(%rsi), %edi
	movq	-40(%rbp), %rsi
	movl	%r8d, %r9d
	movq	%rsi, %r8
	movl	%eax, %esi
	call	find
	subl	%eax, %ebx
	movl	-92(%rbp), %r8d
	movl	-72(%rbp), %ecx
	movl	-76(%rbp), %edx
	movl	-80(%rbp), %eax
	leal	1(%rax), %esi
	movl	-84(%rbp), %eax
	movq	-32(%rbp), %rdi
	movl	%r8d, %r9d
	movq	%rdi, %r8
	movl	%eax, %edi
	call	find
	movl	%eax, %edx
	movl	%ebx, %eax
	subl	%edx, %eax
	movl	%eax, -52(%rbp)
	movl	-52(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L12:
	movl	-88(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -88(%rbp)
	testl	%eax, %eax
	jne	.L13
	nop
	movq	-24(%rbp), %rax
	subq	%fs:40, %rax
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	run, .-run
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	call	run
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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
	.p2align 4
	.globl	find
	.type	find, @function
find:
.LFB39:
	.cfi_startproc
	endbr64
	leal	1(%r9), %eax
	leal	-1(%rdi), %r9d
	movl	%esi, %r10d
	movl	%ecx, %esi
	imull	%eax, %r9d
	leal	-1(%r10), %ecx
	imull	%eax, %edx
	leal	(%rdx,%rsi), %eax
	addl	%ecx, %edx
	addl	%r9d, %esi
	addl	%r9d, %ecx
	movslq	%edx, %rdx
	movslq	%esi, %rsi
	movslq	%ecx, %rcx
	cltq
	movl	(%r8,%rax,4), %eax
	subl	(%r8,%rdx,4), %eax
	subl	(%r8,%rsi,4), %eax
	addl	(%r8,%rcx,4), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	find, .-find
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%i%i%i"
.LC1:
	.string	"%1i"
.LC2:
	.string	"%i%i%i%i"
.LC3:
	.string	"%i\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	52(%rsp), %rcx
	leaq	48(%rsp), %rdx
	leaq	44(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	48(%rsp), %r8d
	movl	44(%rsp), %r15d
	movl	$4, %esi
	leal	1(%r8), %r13d
	leal	1(%r15), %ebp
	movl	%r8d, 8(%rsp)
	imull	%r13d, %ebp
	movslq	%ebp, %rbp
	movq	%rbp, %rdi
	call	calloc@PLT
	movq	%rbp, %rdi
	movl	$4, %esi
	movq	%rax, %r12
	call	calloc@PLT
	movq	%rbp, %rdi
	movl	$4, %esi
	movq	%rax, %rbx
	call	calloc@PLT
	testl	%r15d, %r15d
	movl	8(%rsp), %r8d
	movq	%rax, %rbp
	jle	.L5
	movl	$1, %r14d
	movq	%rbx, 8(%rsp)
	movl	%r14d, %ebx
	.p2align 4,,10
	.p2align 3
.L4:
	testl	%r8d, %r8d
	jle	.L29
	leal	-1(%rbx), %r15d
	movl	$1, %r14d
	.p2align 4,,10
	.p2align 3
.L6:
	imull	%ebx, %r13d
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	addl	%r14d, %r13d
	movslq	%r13d, %r13
	leaq	(%r12,%r13,4), %rsi
	call	__isoc99_scanf@PLT
	movl	48(%rsp), %r8d
	leal	1(%r8), %r13d
	movl	%r13d, %edi
	movl	%r13d, %eax
	imull	%ebx, %edi
	imull	%r15d, %eax
	leal	(%rdi,%r14), %ecx
	addl	%r14d, %eax
	movslq	%ecx, %rcx
	cltq
	movl	(%r12,%rcx,4), %esi
	movl	(%r12,%rax,4), %edx
	andl	%esi, %edx
	movl	%edx, %eax
	movq	8(%rsp), %rdx
	movl	%eax, (%rdx,%rcx,4)
	leal	-1(%rdi,%r14), %eax
	addl	$1, %r14d
	cltq
	andl	(%r12,%rax,4), %esi
	movl	%esi, 0(%rbp,%rcx,4)
	cmpl	%r14d, %r8d
	jge	.L6
	movl	44(%rsp), %r15d
	addl	$1, %ebx
	cmpl	%r15d, %ebx
	jle	.L4
	movq	%rdx, %rbx
.L7:
	testl	%r15d, %r15d
	jle	.L5
	testl	%r8d, %r8d
	jle	.L5
	movslq	%r13d, %r11
	movl	$1, %r14d
	xorl	%r13d, %r13d
	leaq	0(,%r11,4), %rax
	movq	%r11, 24(%rsp)
	movq	%rax, 16(%rsp)
	leal	-1(%r8), %eax
	leaq	4(%r12,%rax,4), %r10
	leal	1(%r15), %eax
	xorl	%r15d, %r15d
	movl	%eax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r11, %rdi
	movl	0(%rbp,%r11,4), %esi
	movl	(%rbx,%r11,4), %ecx
	leaq	(%r12,%r13), %rax
	movl	(%r12,%r11,4), %edx
	leaq	(%rbx,%r13), %r9
	leaq	0(%rbp,%r13), %r8
	subq	%r15, %rdi
	.p2align 4,,10
	.p2align 3
.L12:
	addl	4(%rax), %edx
	subl	(%rax), %edx
	addl	4(%rax,%rdi,4), %edx
	addl	4(%r9), %ecx
	addl	4(%r8), %esi
	subl	(%r9), %ecx
	movl	%edx, 4(%rax,%rdi,4)
	addq	$4, %rax
	subl	(%r8), %esi
	addl	4(%r9,%rdi,4), %ecx
	addl	4(%r8,%rdi,4), %esi
	movl	%ecx, 4(%r9,%rdi,4)
	addq	$4, %r9
	movl	%esi, 4(%r8,%rdi,4)
	addq	$4, %r8
	cmpq	%rax, %r10
	jne	.L12
	movq	24(%rsp), %rax
	addl	$1, %r14d
	addq	%rax, %r11
	addq	%rax, %r15
	movq	16(%rsp), %rax
	addq	%rax, %r10
	addq	%rax, %r13
	cmpl	8(%rsp), %r14d
	jne	.L11
.L5:
	movl	52(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 52(%rsp)
	testl	%eax, %eax
	je	.L3
	leaq	64(%rsp), %rax
	leaq	68(%rsp), %r13
	movq	%rax, 24(%rsp)
	leaq	60(%rsp), %rax
	movq	%rax, 16(%rsp)
	leaq	56(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L13:
	movq	24(%rsp), %rcx
	movq	16(%rsp), %rdx
	movq	%r13, %r8
	xorl	%eax, %eax
	movq	8(%rsp), %rsi
	leaq	.LC2(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	48(%rsp), %eax
	movl	56(%rsp), %ecx
	movl	64(%rsp), %edi
	movl	60(%rsp), %esi
	addl	$1, %eax
	subl	$1, %ecx
	movl	68(%rsp), %r8d
	imull	%eax, %ecx
	leal	-1(%rsi), %r14d
	imull	%eax, %edi
	leal	(%r8,%rcx), %r10d
	addl	%ecx, %eax
	leal	(%r14,%rcx), %r15d
	leal	(%r8,%rdi), %r9d
	leal	(%rdi,%r14), %r11d
	movslq	%r10d, %r10
	movslq	%r15d, %r15
	movslq	%r9d, %r9
	movslq	%r11d, %r11
	addl	%eax, %r8d
	addl	%r14d, %eax
	movl	(%r12,%r9,4), %edx
	movslq	%r8d, %r8
	subl	(%r12,%r11,4), %edx
	cltq
	subl	(%r12,%r10,4), %edx
	addl	%esi, %edi
	addl	(%r12,%r15,4), %edx
	addl	%ecx, %esi
	movl	(%rbx,%r9,4), %r15d
	subl	(%rbx,%r11,4), %r15d
	movslq	%edi, %rdi
	movslq	%esi, %rsi
	movl	%r15d, %r11d
	subl	(%rbx,%r8,4), %r11d
	addl	(%rbx,%rax,4), %r11d
	subl	%r11d, %edx
	movl	0(%rbp,%r9,4), %eax
	subl	0(%rbp,%rdi,4), %eax
	movl	$1, %edi
	subl	0(%rbp,%r10,4), %eax
	addl	0(%rbp,%rsi,4), %eax
	leaq	.LC3(%rip), %rsi
	subl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	52(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 52(%rsp)
	testl	%eax, %eax
	jne	.L13
.L3:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$88, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	.p2align 4,,10
	.p2align 3
.L29:
	.cfi_restore_state
	movl	%ebx, %r14d
	movq	8(%rsp), %rbx
	leal	1(%r14), %r9d
	cmpl	%r15d, %r9d
	jle	.L5
	jmp	.L7
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE41:
	.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
	.p2align 4
	.globl	find
	.type	find, @function
find:
.LFB39:
	.cfi_startproc
	endbr64
	leal	1(%r9), %eax
	leal	-1(%rdi), %r9d
	movl	%esi, %r10d
	movl	%ecx, %esi
	imull	%eax, %r9d
	leal	-1(%r10), %ecx
	imull	%eax, %edx
	leal	(%rdx,%rsi), %eax
	addl	%ecx, %edx
	addl	%r9d, %esi
	addl	%r9d, %ecx
	movslq	%edx, %rdx
	movslq	%esi, %rsi
	movslq	%ecx, %rcx
	cltq
	movl	(%r8,%rax,4), %eax
	subl	(%r8,%rdx,4), %eax
	subl	(%r8,%rsi,4), %eax
	addl	(%r8,%rcx,4), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	find, .-find
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%i%i%i"
.LC1:
	.string	"%1i"
.LC2:
	.string	"%i%i%i%i"
.LC3:
	.string	"%i\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	52(%rsp), %rcx
	leaq	48(%rsp), %rdx
	leaq	44(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	48(%rsp), %r8d
	movl	44(%rsp), %r15d
	movl	$4, %esi
	leal	1(%r8), %r13d
	leal	1(%r15), %ebp
	movl	%r8d, 8(%rsp)
	imull	%r13d, %ebp
	movslq	%ebp, %rbp
	movq	%rbp, %rdi
	call	calloc@PLT
	movq	%rbp, %rdi
	movl	$4, %esi
	movq	%rax, %r12
	call	calloc@PLT
	movq	%rbp, %rdi
	movl	$4, %esi
	movq	%rax, %rbx
	call	calloc@PLT
	testl	%r15d, %r15d
	movl	8(%rsp), %r8d
	movq	%rax, %rbp
	jle	.L5
	movl	$1, %r14d
	movq	%rbx, 8(%rsp)
	movl	%r14d, %ebx
	.p2align 4,,10
	.p2align 3
.L4:
	testl	%r8d, %r8d
	jle	.L29
	leal	-1(%rbx), %r15d
	movl	$1, %r14d
	.p2align 4,,10
	.p2align 3
.L6:
	imull	%ebx, %r13d
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	addl	%r14d, %r13d
	movslq	%r13d, %r13
	leaq	(%r12,%r13,4), %rsi
	call	__isoc99_scanf@PLT
	movl	48(%rsp), %r8d
	leal	1(%r8), %r13d
	movl	%r13d, %edi
	movl	%r13d, %eax
	imull	%ebx, %edi
	imull	%r15d, %eax
	leal	(%rdi,%r14), %ecx
	addl	%r14d, %eax
	movslq	%ecx, %rcx
	cltq
	movl	(%r12,%rcx,4), %esi
	movl	(%r12,%rax,4), %edx
	andl	%esi, %edx
	movl	%edx, %eax
	movq	8(%rsp), %rdx
	movl	%eax, (%rdx,%rcx,4)
	leal	-1(%rdi,%r14), %eax
	addl	$1, %r14d
	cltq
	andl	(%r12,%rax,4), %esi
	movl	%esi, 0(%rbp,%rcx,4)
	cmpl	%r14d, %r8d
	jge	.L6
	movl	44(%rsp), %r15d
	addl	$1, %ebx
	cmpl	%r15d, %ebx
	jle	.L4
	movq	%rdx, %rbx
.L7:
	testl	%r15d, %r15d
	jle	.L5
	testl	%r8d, %r8d
	jle	.L5
	movslq	%r13d, %r11
	movl	$1, %r14d
	xorl	%r13d, %r13d
	leaq	0(,%r11,4), %rax
	movq	%r11, 24(%rsp)
	movq	%rax, 16(%rsp)
	leal	-1(%r8), %eax
	leaq	4(%r12,%rax,4), %r10
	leal	1(%r15), %eax
	xorl	%r15d, %r15d
	movl	%eax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r11, %rdi
	movl	0(%rbp,%r11,4), %esi
	movl	(%rbx,%r11,4), %ecx
	leaq	(%r12,%r13), %rax
	movl	(%r12,%r11,4), %edx
	leaq	(%rbx,%r13), %r9
	leaq	0(%rbp,%r13), %r8
	subq	%r15, %rdi
	.p2align 4,,10
	.p2align 3
.L12:
	addl	4(%rax), %edx
	subl	(%rax), %edx
	addl	4(%rax,%rdi,4), %edx
	addl	4(%r9), %ecx
	addl	4(%r8), %esi
	subl	(%r9), %ecx
	movl	%edx, 4(%rax,%rdi,4)
	addq	$4, %rax
	subl	(%r8), %esi
	addl	4(%r9,%rdi,4), %ecx
	addl	4(%r8,%rdi,4), %esi
	movl	%ecx, 4(%r9,%rdi,4)
	addq	$4, %r9
	movl	%esi, 4(%r8,%rdi,4)
	addq	$4, %r8
	cmpq	%rax, %r10
	jne	.L12
	movq	24(%rsp), %rax
	addl	$1, %r14d
	addq	%rax, %r11
	addq	%rax, %r15
	movq	16(%rsp), %rax
	addq	%rax, %r10
	addq	%rax, %r13
	cmpl	8(%rsp), %r14d
	jne	.L11
.L5:
	movl	52(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 52(%rsp)
	testl	%eax, %eax
	je	.L3
	leaq	64(%rsp), %rax
	leaq	68(%rsp), %r13
	movq	%rax, 24(%rsp)
	leaq	60(%rsp), %rax
	movq	%rax, 16(%rsp)
	leaq	56(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L13:
	movq	24(%rsp), %rcx
	movq	16(%rsp), %rdx
	movq	%r13, %r8
	xorl	%eax, %eax
	movq	8(%rsp), %rsi
	leaq	.LC2(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	48(%rsp), %eax
	movl	56(%rsp), %ecx
	movl	64(%rsp), %edi
	movl	60(%rsp), %esi
	addl	$1, %eax
	subl	$1, %ecx
	movl	68(%rsp), %r8d
	imull	%eax, %ecx
	leal	-1(%rsi), %r14d
	imull	%eax, %edi
	leal	(%r8,%rcx), %r10d
	addl	%ecx, %eax
	leal	(%r14,%rcx), %r15d
	leal	(%r8,%rdi), %r9d
	leal	(%rdi,%r14), %r11d
	movslq	%r10d, %r10
	movslq	%r15d, %r15
	movslq	%r9d, %r9
	movslq	%r11d, %r11
	addl	%eax, %r8d
	addl	%r14d, %eax
	movl	(%r12,%r9,4), %edx
	movslq	%r8d, %r8
	subl	(%r12,%r11,4), %edx
	cltq
	subl	(%r12,%r10,4), %edx
	addl	%esi, %edi
	addl	(%r12,%r15,4), %edx
	addl	%ecx, %esi
	movl	(%rbx,%r9,4), %r15d
	subl	(%rbx,%r11,4), %r15d
	movslq	%edi, %rdi
	movslq	%esi, %rsi
	movl	%r15d, %r11d
	subl	(%rbx,%r8,4), %r11d
	addl	(%rbx,%rax,4), %r11d
	subl	%r11d, %edx
	movl	0(%rbp,%r9,4), %eax
	subl	0(%rbp,%rdi,4), %eax
	movl	$1, %edi
	subl	0(%rbp,%r10,4), %eax
	addl	0(%rbp,%rsi,4), %eax
	leaq	.LC3(%rip), %rsi
	subl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	52(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 52(%rsp)
	testl	%eax, %eax
	jne	.L13
.L3:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$88, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	.p2align 4,,10
	.p2align 3
.L29:
	.cfi_restore_state
	movl	%ebx, %r14d
	movq	8(%rsp), %rbx
	leal	1(%r14), %r9d
	cmpl	%r15d, %r9d
	jle	.L5
	jmp	.L7
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE41:
	.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>
#include<stdlib.h>
#include<stdint.h>
#include<inttypes.h>

typedef int32_t i32;

#define POS(i, j) ((i) * (m + 1) + (j))

i32 find (i32 a, i32 b, i32 c, i32 d, i32 *dp, i32 m) {
  return dp[POS(c, d)] - dp[POS(c, b - 1)] - dp[POS(a - 1, d)] + dp[POS(a - 1, b - 1)];
}

void run (void) {
  i32 n, m, q;
  scanf ("%" SCNi32 "%" SCNi32 "%" SCNi32, &n, &m, &q);
  i32 *v = (i32 *) calloc ((n + 1) * (m + 1), sizeof (i32));
  i32 *ex = (i32 *) calloc ((n + 1) * (m + 1), sizeof (i32));
  i32 *ey = (i32 *) calloc ((n + 1) * (m + 1), sizeof (i32));
  for (i32 i = 1; i <= n; ++i) {
    for (i32 j = 1; j <= m; ++j) {
      scanf ("%1" SCNi32, v + POS(i, j));
      ex[POS(i, j)] = v[POS(i, j)] & v[POS(i - 1, j)];
      ey[POS(i, j)] = v[POS(i, j)] & v[POS(i, j - 1)];
    }
  }
  for (i32 i = 1; i <= n; ++i) {
    for (i32 j = 1; j <= m; ++j) {
      v[POS(i, j)] += v[POS(i - 1, j)] + v[POS(i, j - 1)] - v[POS(i - 1, j - 1)];
      ex[POS(i, j)] += ex[POS(i - 1, j)] + ex[POS(i, j - 1)] - ex[POS(i - 1, j - 1)];
      ey[POS(i, j)] += ey[POS(i - 1, j)] + ey[POS(i, j - 1)] - ey[POS(i - 1, j - 1)];
    }
  }
  while (q--) {
    i32 a, b, c, d;
    scanf ("%" SCNi32 "%" SCNi32 "%" SCNi32 "%" SCNi32, &a, &b, &c, &d);
    i32 ans = find (a, b, c, d, v, m) - find (a + 1, b, c, d, ex, m) - find (a, b + 1, c, d, ey, m);
    printf ("%" PRIi32 "\n", ans);
  }
}

int main (void) {
  run();
  return 0;
}

3 4 4
1101
0110
1101
1 1 3 4
1 1 3 1
2 2 3 4
1 2 3 4
 5 5 6
11010
01110
10101
11101
01010
1 1 5 5
1 2 4 5
2 3 3 5
3 3 3 3
3 1 3 5
1 1 3 4
 5 5 6
11010
01110
10101
11101
01010
1 1 5 5
1 2 4 5
2 3 3 5
5 3 3 3
3 1 3 5
1 1 3 4
 3 4 4
1101
0110
1101
1 1 3 4
2 1 3 1
2 2 3 4
1 2 2 4
 3 4 4
1101
0110
1101
1 1 3 4
1 1 3 1
2 2 3 4
2 2 3 4
 5 5 6
11010
01110
10101
10101
01010
1 1 5 5
1 2 4 5
2 3 3 5
3 3 3 2
3 1 3 5
1 1 3 4
 5 5 6
11010
01110
10101
11001
01010
1 1 5 5
2 2 4 5
2 4 3 5
5 3 3 3
3 1 3 5
1 1 3 4
 3 4 4
1101
0110
1101
2 1 3 4
2 1 3 1
2 2 3 4
1 2 2 4
 3 4 4
1101
1110
1101
1 1 3 4
1 1 3 1
2 2 3 4
2 2 3 4
 5 5 6
11010
01110
10101
11001
01010
1 1 5 5
2 4 4 5
2 4 3 5
5 3 3 3
3 1 3 5
1 1 3 4

3
2
2
3
 3
2
2
1
3
2
 3
2
2
0
3
2
 3
1
2
2
 3
2
2
2
 5
2
2
0
3
2
 4
3
2
0
3
2
 2
1
2
2
 1
1
2
2
 4
2
2
0
3
2

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>
#include<stdlib.h>
#include<stdint.h>
#include<inttypes.h>

typedef int32_t i32;

#define POS(i, j) ((i) * (m + 1) + (j))

i32 find (i32 a, i32 b, i32 c, i32 d, i32 *dp, i32 m) {
  return dp[POS(c, d)] - dp[POS(c, b - 1)] - dp[POS(a - 1, d)] + dp[POS(a - 1, b - 1)];
}

void run (void) {
  i32 n, m, q;
  scanf ("%" SCNi32 "%" SCNi32 "%" SCNi32, &n, &m, &q);
  i32 *v = (i32 *) calloc ((n + 1) * (m + 1), sizeof (i32));
  i32 *ex = (i32 *) calloc ((n + 1) * (m + 1), sizeof (i32));
  i32 *ey = (i32 *) calloc ((n + 1) * (m + 1), sizeof (i32));
  for (i32 i = 1; i <= n; ++i) {
    for (i32 j = 1; j <= m; ++j) {
      scanf ("%1" SCNi32, v + POS(i, j));
      ex[POS(i, j)] = v[POS(i, j)] & v[POS(i - 1, j)];
      ey[POS(i, j)] = v[POS(i, j)] & v[POS(i, j - 1)];
    }
  }
  for (i32 i = 1; i <= n; ++i) {
    for (i32 j = 1; j <= m; ++j) {
      v[POS(i, j)] += v[POS(i - 1, j)] + v[POS(i, j - 1)] - v[POS(i - 1, j - 1)];
      ex[POS(i, j)] += ex[POS(i - 1, j)] + ex[POS(i, j - 1)] - ex[POS(i - 1, j - 1)];
      ey[POS(i, j)] += ey[POS(i - 1, j)] + ey[POS(i, j - 1)] - ey[POS(i - 1, j - 1)];
    }
  }
  while (q--) {
    i32 a, b, c, d;
    scanf ("%" SCNi32 "%" SCNi32 "%" SCNi32 "%" SCNi32, &a, &b, &c, &d);
    i32 ans = find (a, b, c, d, v, m) - find (a + 1, b, c, d, ex, m) - find (a, b + 1, c, d, ey, m);
    printf ("%" PRIi32 "\n", ans);
  }
}

int main (void) {
  run();
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	find
	.type	find, @function
find:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movq	%r8, -24(%rbp)
	movl	%r9d, -28(%rbp)
	movl	-28(%rbp), %eax
	addl	$1, %eax
	imull	-12(%rbp), %eax
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-28(%rbp), %edx
	addl	$1, %edx
	movl	%edx, %ecx
	imull	-12(%rbp), %ecx
	movl	-8(%rbp), %edx
	subl	$1, %edx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-28(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %ecx
	movl	-16(%rbp), %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	-4(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %edx
	movl	-8(%rbp), %eax
	subl	$1, %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	addl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	find, .-find
	.section	.rodata
.LC0:
	.string	"%i%i%i"
.LC1:
	.string	"%1i"
.LC2:
	.string	"%i%i%i%i"
.LC3:
	.string	"%i\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-88(%rbp), %rcx
	leaq	-92(%rbp), %rdx
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-96(%rbp), %eax
	leal	1(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%edx, %eax
	cltq
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -48(%rbp)
	movl	-96(%rbp), %eax
	leal	1(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%edx, %eax
	cltq
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -40(%rbp)
	movl	-96(%rbp), %eax
	leal	1(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%edx, %eax
	cltq
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -32(%rbp)
	movl	$1, -68(%rbp)
	jmp	.L4
.L7:
	movl	$1, -64(%rbp)
	jmp	.L5
.L6:
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-68(%rbp), %eax
	movl	%eax, %edx
	movl	-64(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-68(%rbp), %eax
	movl	%eax, %edx
	movl	-64(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-68(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %edx
	movl	-64(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-68(%rbp), %eax
	movl	%eax, %esi
	movl	-64(%rbp), %eax
	addl	%esi, %eax
	cltq
	leaq	0(,%rax,4), %rsi
	movq	-40(%rbp), %rax
	addq	%rsi, %rax
	andl	%ecx, %edx
	movl	%edx, (%rax)
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-68(%rbp), %eax
	movl	%eax, %edx
	movl	-64(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-68(%rbp), %eax
	movl	%eax, %edx
	movl	-64(%rbp), %eax
	subl	$1, %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-68(%rbp), %eax
	movl	%eax, %esi
	movl	-64(%rbp), %eax
	addl	%esi, %eax
	cltq
	leaq	0(,%rax,4), %rsi
	movq	-32(%rbp), %rax
	addq	%rsi, %rax
	andl	%ecx, %edx
	movl	%edx, (%rax)
	addl	$1, -64(%rbp)
.L5:
	movl	-92(%rbp), %eax
	cmpl	%eax, -64(%rbp)
	jle	.L6
	addl	$1, -68(%rbp)
.L4:
	movl	-96(%rbp), %eax
	cmpl	%eax, -68(%rbp)
	jle	.L7
	movl	$1, -60(%rbp)
	jmp	.L8
.L11:
	movl	$1, -56(%rbp)
	jmp	.L9
.L10:
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %esi
	movl	-60(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %ecx
	movl	-56(%rbp), %eax
	subl	$1, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-48(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	addl	%eax, %edx
	movl	-60(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %ecx
	movl	-56(%rbp), %eax
	subl	$1, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-48(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	leal	(%rsi,%rcx), %edx
	movl	%edx, (%rax)
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %esi
	movl	-60(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %ecx
	movl	-56(%rbp), %eax
	subl	$1, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	addl	%eax, %edx
	movl	-60(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %ecx
	movl	-56(%rbp), %eax
	subl	$1, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	leal	(%rsi,%rcx), %edx
	movl	%edx, (%rax)
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %esi
	movl	-60(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %ecx
	movl	-56(%rbp), %eax
	subl	$1, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	addl	%eax, %edx
	movl	-60(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %ecx
	movl	-56(%rbp), %eax
	subl	$1, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	leal	(%rsi,%rcx), %edx
	movl	%edx, (%rax)
	addl	$1, -56(%rbp)
.L9:
	movl	-92(%rbp), %eax
	cmpl	%eax, -56(%rbp)
	jle	.L10
	addl	$1, -60(%rbp)
.L8:
	movl	-96(%rbp), %eax
	cmpl	%eax, -60(%rbp)
	jle	.L11
	jmp	.L12
.L13:
	leaq	-72(%rbp), %rsi
	leaq	-76(%rbp), %rcx
	leaq	-80(%rbp), %rdx
	leaq	-84(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-92(%rbp), %r8d
	movl	-72(%rbp), %ecx
	movl	-76(%rbp), %edx
	movl	-80(%rbp), %esi
	movl	-84(%rbp), %eax
	movq	-48(%rbp), %rdi
	movl	%r8d, %r9d
	movq	%rdi, %r8
	movl	%eax, %edi
	call	find
	movl	%eax, %ebx
	movl	-92(%rbp), %r8d
	movl	-72(%rbp), %ecx
	movl	-76(%rbp), %edx
	movl	-80(%rbp), %eax
	movl	-84(%rbp), %esi
	leal	1(%rsi), %edi
	movq	-40(%rbp), %rsi
	movl	%r8d, %r9d
	movq	%rsi, %r8
	movl	%eax, %esi
	call	find
	subl	%eax, %ebx
	movl	-92(%rbp), %r8d
	movl	-72(%rbp), %ecx
	movl	-76(%rbp), %edx
	movl	-80(%rbp), %eax
	leal	1(%rax), %esi
	movl	-84(%rbp), %eax
	movq	-32(%rbp), %rdi
	movl	%r8d, %r9d
	movq	%rdi, %r8
	movl	%eax, %edi
	call	find
	movl	%eax, %edx
	movl	%ebx, %eax
	subl	%edx, %eax
	movl	%eax, -52(%rbp)
	movl	-52(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L12:
	movl	-88(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -88(%rbp)
	testl	%eax, %eax
	jne	.L13
	nop
	movq	-24(%rbp), %rax
	subq	%fs:40, %rax
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	run, .-run
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	call	run
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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.
val
	.file	"temp.c"
	.text
	.globl	find
	.type	find, @function
find:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movq	%r8, -24(%rbp)
	movl	%r9d, -28(%rbp)
	movl	-28(%rbp), %eax
	addl	$1, %eax
	imull	-12(%rbp), %eax
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-28(%rbp), %edx
	addl	$1, %edx
	movl	%edx, %ecx
	imull	-12(%rbp), %ecx
	movl	-8(%rbp), %edx
	subl	$1, %edx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-28(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %ecx
	movl	-16(%rbp), %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	-4(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %edx
	movl	-8(%rbp), %eax
	subl	$1, %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	addl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	find, .-find
	.section	.rodata
.LC0:
	.string	"%i%i%i"
.LC1:
	.string	"%1i"
.LC2:
	.string	"%i%i%i%i"
.LC3:
	.string	"%i\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-88(%rbp), %rcx
	leaq	-92(%rbp), %rdx
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-96(%rbp), %eax
	leal	1(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%edx, %eax
	cltq
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -48(%rbp)
	movl	-96(%rbp), %eax
	leal	1(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%edx, %eax
	cltq
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -40(%rbp)
	movl	-96(%rbp), %eax
	leal	1(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%edx, %eax
	cltq
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -32(%rbp)
	movl	$1, -68(%rbp)
	jmp	.L4
.L7:
	movl	$1, -64(%rbp)
	jmp	.L5
.L6:
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-68(%rbp), %eax
	movl	%eax, %edx
	movl	-64(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-68(%rbp), %eax
	movl	%eax, %edx
	movl	-64(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-68(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %edx
	movl	-64(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-68(%rbp), %eax
	movl	%eax, %esi
	movl	-64(%rbp), %eax
	addl	%esi, %eax
	cltq
	leaq	0(,%rax,4), %rsi
	movq	-40(%rbp), %rax
	addq	%rsi, %rax
	andl	%ecx, %edx
	movl	%edx, (%rax)
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-68(%rbp), %eax
	movl	%eax, %edx
	movl	-64(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-68(%rbp), %eax
	movl	%eax, %edx
	movl	-64(%rbp), %eax
	subl	$1, %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-68(%rbp), %eax
	movl	%eax, %esi
	movl	-64(%rbp), %eax
	addl	%esi, %eax
	cltq
	leaq	0(,%rax,4), %rsi
	movq	-32(%rbp), %rax
	addq	%rsi, %rax
	andl	%ecx, %edx
	movl	%edx, (%rax)
	addl	$1, -64(%rbp)
.L5:
	movl	-92(%rbp), %eax
	cmpl	%eax, -64(%rbp)
	jle	.L6
	addl	$1, -68(%rbp)
.L4:
	movl	-96(%rbp), %eax
	cmpl	%eax, -68(%rbp)
	jle	.L7
	movl	$1, -60(%rbp)
	jmp	.L8
.L11:
	movl	$1, -56(%rbp)
	jmp	.L9
.L10:
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %esi
	movl	-60(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %ecx
	movl	-56(%rbp), %eax
	subl	$1, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-48(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	addl	%eax, %edx
	movl	-60(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %ecx
	movl	-56(%rbp), %eax
	subl	$1, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-48(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	leal	(%rsi,%rcx), %edx
	movl	%edx, (%rax)
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %esi
	movl	-60(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %ecx
	movl	-56(%rbp), %eax
	subl	$1, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	addl	%eax, %edx
	movl	-60(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %ecx
	movl	-56(%rbp), %eax
	subl	$1, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	leal	(%rsi,%rcx), %edx
	movl	%edx, (%rax)
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %esi
	movl	-60(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %ecx
	movl	-56(%rbp), %eax
	subl	$1, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	addl	%eax, %edx
	movl	-60(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	%eax, %ecx
	movl	-56(%rbp), %eax
	subl	$1, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	-92(%rbp), %eax
	addl	$1, %eax
	imull	-60(%rbp), %eax
	movl	%eax, %edx
	movl	-56(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	leal	(%rsi,%rcx), %edx
	movl	%edx, (%rax)
	addl	$1, -56(%rbp)
.L9:
	movl	-92(%rbp), %eax
	cmpl	%eax, -56(%rbp)
	jle	.L10
	addl	$1, -60(%rbp)
.L8:
	movl	-96(%rbp), %eax
	cmpl	%eax, -60(%rbp)
	jle	.L11
	jmp	.L12
.L13:
	leaq	-72(%rbp), %rsi
	leaq	-76(%rbp), %rcx
	leaq	-80(%rbp), %rdx
	leaq	-84(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-92(%rbp), %r8d
	movl	-72(%rbp), %ecx
	movl	-76(%rbp), %edx
	movl	-80(%rbp), %esi
	movl	-84(%rbp), %eax
	movq	-48(%rbp), %rdi
	movl	%r8d, %r9d
	movq	%rdi, %r8
	movl	%eax, %edi
	call	find
	movl	%eax, %ebx
	movl	-92(%rbp), %r8d
	movl	-72(%rbp), %ecx
	movl	-76(%rbp), %edx
	movl	-80(%rbp), %eax
	movl	-84(%rbp), %esi
	leal	1(%rsi), %edi
	movq	-40(%rbp), %rsi
	movl	%r8d, %r9d
	movq	%rsi, %r8
	movl	%eax, %esi
	call	find
	subl	%eax, %ebx
	movl	-92(%rbp), %r8d
	movl	-72(%rbp), %ecx
	movl	-76(%rbp), %edx
	movl	-80(%rbp), %eax
	leal	1(%rax), %esi
	movl	-84(%rbp), %eax
	movq	-32(%rbp), %rdi
	movl	%r8d, %r9d
	movq	%rdi, %r8
	movl	%eax, %edi
	call	find
	movl	%eax, %edx
	movl	%ebx, %eax
	subl	%edx, %eax
	movl	%eax, -52(%rbp)
	movl	-52(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L12:
	movl	-88(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -88(%rbp)
	testl	%eax, %eax
	jne	.L13
	nop
	movq	-24(%rbp), %rax
	subq	%fs:40, %rax
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	run, .-run
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	call	run
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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:
