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 X[]={-1,-1,-1,0,0,0,1,1,1};
int Y[]={-1,0,1,-1,0,1,-1,0,1};
int mbk(long long a,int n,int m){return n?(mbk((a*a)%m,n/2,m)*(n%2?a:1))%m:1;}
int inv(int a,int m){return mbk((long long)a,m-2,m);}
int aCb(int a,int b,int m){
  int i;
  long long s=1;
  if(b>a-b)b=a-b;
  for(i=0;i<b;i++)s=(((s*(a-i))%m)*inv(i+1,m))%m;  
  return (int)s;
}
int main(){
  //printf("%d\n",aCb(5,2,107));
  int w,h,a,b,x,y,d[10][2],dx,dy,i,min=10000,s=0;
  scanf("%d %d %d %d",&w,&h,&x,&y);
  for(i=0;i<9;i++){
    d[i][0]=x+w*X[i];
    d[i][1]=y+h*Y[i];
  }
  scanf("%d %d",&x,&y);
  for(i=0;i<9;i++){
    dx=abs(d[i][0]-x);
    dy=abs(d[i][1]-y);
    if(dy+dx<min){
      min=dy+dx;
      s=0;
    }//printf("%d %d %d\n",dy,dx,max);
    if(dy+dx==min)s+=aCb(min,dx,100000007);
    s%=100000007;
  }
  printf("%d\n",s);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	X
	.data
	.align 32
	.type	X, @object
	.size	X, 36
X:
	.long	-1
	.long	-1
	.long	-1
	.long	0
	.long	0
	.long	0
	.long	1
	.long	1
	.long	1
	.globl	Y
	.align 32
	.type	Y, @object
	.size	Y, 36
Y:
	.long	-1
	.long	0
	.long	1
	.long	-1
	.long	0
	.long	1
	.long	-1
	.long	0
	.long	1
	.text
	.globl	mbk
	.type	mbk, @function
mbk:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	%edx, -16(%rbp)
	cmpl	$0, -12(%rbp)
	je	.L2
	movl	-12(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %esi
	movq	-8(%rbp), %rax
	imulq	%rax, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rcx
	movl	-16(%rbp), %eax
	movl	%eax, %edx
	movq	%rcx, %rdi
	call	mbk
	movslq	%eax, %rdx
	movl	-12(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L3
	movq	-8(%rbp), %rax
	jmp	.L4
.L3:
	movl	$1, %eax
.L4:
	imulq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	jmp	.L6
.L2:
	movl	$1, %eax
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	mbk, .-mbk
	.globl	inv
	.type	inv, @function
inv:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %eax
	leal	-2(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	movl	-8(%rbp), %edx
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	mbk
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	inv, .-inv
	.globl	aCb
	.type	aCb, @function
aCb:
.LFB2:
	.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	$40, %rsp
	.cfi_offset 3, -24
	movl	%edi, -36(%rbp)
	movl	%esi, -40(%rbp)
	movl	%edx, -44(%rbp)
	movq	$1, -24(%rbp)
	movl	-36(%rbp), %eax
	subl	-40(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	jle	.L10
	movl	-36(%rbp), %eax
	subl	-40(%rbp), %eax
	movl	%eax, -40(%rbp)
.L10:
	movl	$0, -28(%rbp)
	jmp	.L11
.L12:
	movl	-36(%rbp), %eax
	subl	-28(%rbp), %eax
	cltq
	imulq	-24(%rbp), %rax
	movl	-44(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rbx
	movl	-28(%rbp), %eax
	leal	1(%rax), %edx
	movl	-44(%rbp), %eax
	movl	%eax, %esi
	movl	%edx, %edi
	call	inv
	cltq
	imulq	%rbx, %rax
	movl	-44(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -24(%rbp)
	addl	$1, -28(%rbp)
.L11:
	movl	-28(%rbp), %eax
	cmpl	-40(%rbp), %eax
	jl	.L12
	movq	-24(%rbp), %rax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	aCb, .-aCb
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$144, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$10000, -112(%rbp)
	movl	$0, -108(%rbp)
	leaq	-120(%rbp), %rsi
	leaq	-124(%rbp), %rcx
	leaq	-128(%rbp), %rdx
	leaq	-132(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -116(%rbp)
	jmp	.L15
.L16:
	movl	-116(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-132(%rbp), %eax
	imull	%eax, %edx
	movl	-124(%rbp), %eax
	addl	%eax, %edx
	movl	-116(%rbp), %eax
	cltq
	movl	%edx, -96(%rbp,%rax,8)
	movl	-116(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	Y(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-128(%rbp), %eax
	imull	%eax, %edx
	movl	-120(%rbp), %eax
	addl	%eax, %edx
	movl	-116(%rbp), %eax
	cltq
	movl	%edx, -92(%rbp,%rax,8)
	addl	$1, -116(%rbp)
.L15:
	cmpl	$8, -116(%rbp)
	jle	.L16
	leaq	-120(%rbp), %rdx
	leaq	-124(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -116(%rbp)
	jmp	.L17
.L20:
	movl	-116(%rbp), %eax
	cltq
	movl	-96(%rbp,%rax,8), %eax
	movl	-124(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, -104(%rbp)
	movl	-116(%rbp), %eax
	cltq
	movl	-92(%rbp,%rax,8), %eax
	movl	-120(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, -100(%rbp)
	movl	-100(%rbp), %edx
	movl	-104(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -112(%rbp)
	jle	.L18
	movl	-100(%rbp), %edx
	movl	-104(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -112(%rbp)
	movl	$0, -108(%rbp)
.L18:
	movl	-100(%rbp), %edx
	movl	-104(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -112(%rbp)
	jne	.L19
	movl	-104(%rbp), %ecx
	movl	-112(%rbp), %eax
	movl	$100000007, %edx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	aCb
	addl	%eax, -108(%rbp)
.L19:
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$360287945, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$23, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$100000007, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -108(%rbp)
	addl	$1, -116(%rbp)
.L17:
	cmpl	$8, -116(%rbp)
	jle	.L20
	movl	-108(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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
	.type	mbk.part.0, @function
mbk.part.0:
.LFB27:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%esi, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	shrl	$31, %eax
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	addl	%esi, %eax
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movslq	%edx, %r12
	movl	$1, %edx
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%esi, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	sarl	%eax
	jne	.L26
.L2:
	andl	$1, %ebx
	je	.L7
	imulq	%r13, %rdx
.L7:
	movq	%rdx, %rax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	cqto
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	idivq	%r12
	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
	movl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	movl	%eax, %ebp
	movq	%rdi, %rax
	imulq	%rdi, %rax
	cqto
	idivq	%r12
	testl	%esi, %esi
	leal	3(%rsi), %eax
	cmovns	%esi, %eax
	sarl	$2, %eax
	movl	%eax, %r14d
	movq	%rdx, %r15
	movl	$1, %edx
	jne	.L27
.L3:
	andl	$1, %ebp
	je	.L6
	imulq	%r15, %rdx
.L6:
	movq	%rdx, %rax
	cqto
	idivq	%r12
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L27:
	movq	%r15, %rax
	leal	7(%rsi), %esi
	imulq	%r15, %rax
	cqto
	idivq	%r12
	testl	%ebx, %ebx
	movl	$1, %eax
	cmovns	%ebx, %esi
	sarl	$3, %esi
	movq	%rdx, %rcx
	jne	.L28
.L4:
	andl	$1, %r14d
	je	.L5
	imulq	%rcx, %rax
.L5:
	cqto
	idivq	%r12
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L28:
	movq	%rdx, %rax
	movq	%rdx, 8(%rsp)
	imulq	%rdx, %rax
	cqto
	idivq	%r12
	movq	%rdx, %rdi
	movl	%r12d, %edx
	call	mbk.part.0
	movq	8(%rsp), %rcx
	cltq
	jmp	.L4
	.cfi_endproc
.LFE27:
	.size	mbk.part.0, .-mbk.part.0
	.p2align 4
	.globl	mbk
	.type	mbk, @function
mbk:
.LFB23:
	.cfi_startproc
	endbr64
	testl	%esi, %esi
	jne	.L52
	movl	$1, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L52:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%esi, %eax
	movl	%edx, %r9d
	movq	%rdi, %r10
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	shrl	$31, %eax
	movslq	%edx, %rbx
	movl	%esi, %r8d
	addl	%esi, %eax
	movl	$1, %edx
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	sarl	%eax
	movl	%eax, %r11d
	jne	.L53
.L31:
	andl	$1, %r8d
	je	.L34
	imulq	%r10, %rdx
.L34:
	movq	%rdx, %rax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	cqto
	idivq	%rbx
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	movl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L53:
	.cfi_restore_state
	movq	%rdi, %rax
	leal	3(%rsi), %esi
	imulq	%rdi, %rax
	cqto
	idivq	%rbx
	testl	%r8d, %r8d
	movl	$1, %eax
	cmovns	%r8d, %esi
	sarl	$2, %esi
	movq	%rdx, %rbp
	jne	.L54
.L32:
	andl	$1, %r11d
	je	.L33
	imulq	%rbp, %rax
.L33:
	cqto
	idivq	%rbx
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L54:
	movq	%rdx, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%rbx
	movq	%rdx, %rdi
	movl	%r9d, %edx
	call	mbk.part.0
	cltq
	jmp	.L32
	.cfi_endproc
.LFE23:
	.size	mbk, .-mbk
	.p2align 4
	.globl	inv
	.type	inv, @function
inv:
.LFB24:
	.cfi_startproc
	endbr64
	movl	%esi, %r10d
	subl	$2, %r10d
	jne	.L85
	movl	$1, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L85:
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	%r10d, %eax
	movslq	%edi, %r9
	movl	$1, %edx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	shrl	$31, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	addl	%r10d, %eax
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movslq	%esi, %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	sarl	%eax
	movl	%eax, %r11d
	jne	.L86
.L57:
	andl	$1, %r10d
	je	.L62
	imulq	%r9, %rdx
.L62:
	movq	%rdx, %rax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	cqto
	idivq	%rbx
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	movl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L86:
	.cfi_restore_state
	movq	%r9, %rax
	imulq	%r9, %rax
	cqto
	idivq	%rbx
	testl	%r10d, %r10d
	leal	1(%rsi), %eax
	cmovns	%r10d, %eax
	sarl	$2, %eax
	movl	%eax, %ebp
	movq	%rdx, %r12
	movl	$1, %edx
	jne	.L87
.L58:
	andl	$1, %r11d
	je	.L61
	imulq	%r12, %rdx
.L61:
	movq	%rdx, %rax
	cqto
	idivq	%rbx
	jmp	.L57
	.p2align 4,,10
	.p2align 3
.L87:
	movq	%r12, %rax
	imulq	%r12, %rax
	cqto
	idivq	%rbx
	testl	%r10d, %r10d
	leal	5(%rsi), %eax
	cmovns	%r10d, %eax
	movq	%rdx, %r13
	movl	%eax, %edx
	movl	$1, %eax
	sarl	$3, %edx
	movl	%edx, %r8d
	jne	.L88
.L59:
	andl	$1, %ebp
	je	.L60
	imulq	%r13, %rax
.L60:
	cqto
	idivq	%rbx
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L88:
	movq	%r13, %rax
	imulq	%r13, %rax
	cqto
	idivq	%rbx
	movq	%rdx, %rdi
	movl	%esi, %edx
	movl	%r8d, %esi
	call	mbk.part.0
	cltq
	jmp	.L59
	.cfi_endproc
.LFE24:
	.size	inv, .-inv
	.p2align 4
	.globl	aCb
	.type	aCb, @function
aCb:
.LFB25:
	.cfi_startproc
	endbr64
	movslq	%edi, %r8
	movl	%edx, %r10d
	movl	%r8d, %edx
	subl	%esi, %edx
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	testl	%edx, %edx
	jle	.L133
	leal	-2(%r10), %eax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leal	1(%r10), %r11d
	movslq	%r10d, %r9
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%eax, %ecx
	leal	13(%r10), %esi
	movl	%eax, %edi
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	shrl	$31, %ecx
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	addl	%eax, %ecx
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	sarl	%ecx
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leal	5(%r10), %ebx
	movl	%ecx, %ebp
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	testl	%eax, %eax
	cmovns	%eax, %r11d
	sarl	$2, %r11d
	testl	%eax, %eax
	cmovns	%eax, %ebx
	movl	%r11d, %r12d
	sarl	$3, %ebx
	testl	%eax, %eax
	cmovns	%eax, %esi
	movl	%ebx, %r13d
	andl	$1, %r12d
	andl	$1, %ebp
	andl	$1, %r13d
	andl	$1, %edi
	sarl	$4, %esi
	testl	%eax, %eax
	jne	.L91
	leaq	-1(%r8), %rax
	subl	$1, %edx
	movq	%rax, %rsi
	subq	%rdx, %rsi
	movl	$1, %edx
	jmp	.L92
	.p2align 4,,10
	.p2align 3
.L177:
	subq	$1, %rax
.L92:
	imulq	%rdx, %r8
	movq	%r8, %rcx
	shrq	$63, %rcx
	leaq	(%r8,%rcx), %rdx
	movq	%rax, %r8
	andl	$1, %edx
	subq	%rcx, %rdx
	cmpq	%rsi, %rax
	jne	.L177
.L93:
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%edx, %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
	.p2align 4,,10
	.p2align 3
.L91:
	.cfi_restore_state
	testl	%edi, %edi
	jne	.L94
	testl	%ecx, %ecx
	jne	.L95
	leaq	-1(%r8), %rcx
	leal	-1(%rdx), %eax
	movq	%rcx, %rdi
	subq	%rax, %rdi
	movl	$1, %eax
	cqto
	idivq	%r9
	movq	%r8, %rax
	movq	%rdx, %rsi
	movl	$1, %edx
	jmp	.L96
	.p2align 4,,10
	.p2align 3
.L178:
	subq	$1, %rcx
.L96:
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rdx, %rax
	imulq	%rsi, %rax
	cqto
	idivq	%r9
	movq	%rcx, %rax
	cmpq	%rdi, %rcx
	jne	.L178
	jmp	.L93
	.p2align 4,,10
	.p2align 3
.L94:
	testl	%ecx, %ecx
	jne	.L115
	leal	1(%rdx), %r10d
	movl	$1, %ecx
	movl	$1, %edx
	leaq	1(%r8), %rdi
	.p2align 4,,10
	.p2align 3
.L116:
	movq	%rdi, %rax
	subq	%rcx, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rcx, %rax
	addq	$1, %rcx
	movq	%rdx, %rsi
	cqto
	idivq	%r9
	movq	%rsi, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	cmpq	%rcx, %r10
	jne	.L116
	jmp	.L93
	.p2align 4,,10
	.p2align 3
.L133:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	movl	$1, %eax
	ret
.L115:
	.cfi_def_cfa_offset 96
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	leal	1(%rdx), %r15d
	movl	$1, %r14d
	movl	$1, %edx
	testl	%ebp, %ebp
	jne	.L117
	movl	%ebx, %ecx
	leaq	1(%r8), %rbp
	movl	%r10d, %ebx
	jmp	.L119
	.p2align 4,,10
	.p2align 3
.L179:
	movl	$1, %edx
.L122:
	movq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rdx, %rax
	imulq	%r14, %rax
	addq	$1, %r14
	cqto
	idivq	%r9
	movq	%rdx, %rax
	imulq	%r8, %rax
	cqto
	idivq	%r9
	cmpq	%r14, %r15
	je	.L93
.L119:
	movq	%rbp, %rax
	subq	%r14, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%r14, %rax
	imulq	%r14, %rax
	movq	%rdx, %r8
	cqto
	idivq	%r9
	testl	%r11d, %r11d
	je	.L179
	imulq	%rdx, %rdx
	movq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rdx, %r10
	testl	%ecx, %ecx
	jne	.L120
	movl	$1, %edx
.L125:
	testl	%r12d, %r12d
	je	.L121
	imulq	%r10, %rdx
.L121:
	movq	%rdx, %rax
	cqto
	idivq	%r9
	jmp	.L122
.L95:
	leal	1(%rdx), %r15d
	testl	%ebp, %ebp
	jne	.L97
	movl	%ebx, %ecx
	movl	$1, %ebp
	movl	$1, %edx
	addq	$1, %r8
	movl	%r10d, %ebx
	jmp	.L105
	.p2align 4,,10
	.p2align 3
.L98:
	movq	%rdi, %rax
	addq	$1, %rbp
	cqto
	idivq	%r9
	movq	%rdx, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r9
	cmpq	%rbp, %r15
	je	.L93
.L105:
	movq	%r8, %rax
	movl	$1, %edi
	subq	%rbp, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rbp, %rax
	imulq	%rbp, %rax
	movq	%rdx, %r14
	cqto
	idivq	%r9
	testl	%r11d, %r11d
	je	.L98
	imulq	%rdx, %rdx
	movq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rdx, (%rsp)
	movl	$1, %edx
	testl	%ecx, %ecx
	jne	.L180
.L99:
	testl	%r12d, %r12d
	je	.L104
	imulq	(%rsp), %rdx
.L104:
	movq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rdx, %rdi
	jmp	.L98
.L97:
	movl	$1, %r14d
	movl	$1, %edx
	leaq	1(%r8), %rcx
	jmp	.L107
	.p2align 4,,10
	.p2align 3
.L181:
	movl	$1, %edx
.L110:
	movq	%rdx, %rax
	addq	$1, %r14
	imulq	%r8, %rax
	cqto
	idivq	%r9
	movq	%rdx, %rax
	imulq	%rbp, %rax
	cqto
	idivq	%r9
	cmpq	%r15, %r14
	je	.L93
.L107:
	movq	%rcx, %rax
	subq	%r14, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%r14, %rax
	imulq	%r14, %rax
	movq	%rdx, %rbp
	cqto
	idivq	%r9
	movq	%rdx, %r8
	testl	%r11d, %r11d
	je	.L181
	movq	%rdx, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rdx, (%rsp)
	testl	%ebx, %ebx
	jne	.L108
	movl	$1, %edx
.L113:
	testl	%r12d, %r12d
	je	.L109
	imulq	(%rsp), %rdx
.L109:
	movq	%rdx, %rax
	cqto
	idivq	%r9
	jmp	.L110
.L117:
	leaq	1(%r8), %rcx
	jmp	.L132
	.p2align 4,,10
	.p2align 3
.L127:
	movq	%r8, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rdx, %rax
	imulq	%r14, %rax
	addq	$1, %r14
	cqto
	idivq	%r9
	movq	%rdx, %rax
	imulq	%rbp, %rax
	cqto
	idivq	%r9
	cmpq	%r14, %r15
	je	.L93
.L132:
	movq	%rcx, %rax
	subq	%r14, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%r14, %rax
	imulq	%r14, %rax
	movq	%rdx, %rbp
	cqto
	idivq	%r9
	movq	%rdx, %r8
	movl	$1, %edx
	testl	%r11d, %r11d
	je	.L127
	movq	%r8, %rax
	imulq	%r8, %rax
	cqto
	idivq	%r9
	movq	%rdx, (%rsp)
	movl	$1, %edx
	testl	%ebx, %ebx
	jne	.L182
.L128:
	testl	%r12d, %r12d
	je	.L131
	imulq	(%rsp), %rdx
.L131:
	movq	%rdx, %rax
	cqto
	idivq	%r9
	jmp	.L127
.L182:
	movq	(%rsp), %rdi
	movq	%rdi, %rax
	imulq	%rdi, %rax
	cqto
	idivq	%r9
	movl	$1, %eax
	movq	%rdx, 8(%rsp)
	testl	%esi, %esi
	jne	.L183
.L129:
	testl	%r13d, %r13d
	je	.L130
	imulq	8(%rsp), %rax
.L130:
	cqto
	idivq	%r9
	jmp	.L128
.L120:
	movq	%rdx, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rdx, (%rsp)
	testl	%esi, %esi
	jne	.L123
	movl	$1, %eax
.L126:
	testl	%r13d, %r13d
	je	.L124
	imulq	(%rsp), %rax
.L124:
	cqto
	idivq	%r9
	jmp	.L125
.L108:
	movq	%rdx, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rdx, 8(%rsp)
	testl	%esi, %esi
	jne	.L111
	movl	$1, %eax
.L114:
	testl	%r13d, %r13d
	je	.L112
	imulq	8(%rsp), %rax
.L112:
	cqto
	idivq	%r9
	jmp	.L113
.L180:
	movq	(%rsp), %rdi
	movq	%rdi, %rax
	imulq	%rdi, %rax
	cqto
	idivq	%r9
	movl	$1, %eax
	movq	%rdx, %r10
	testl	%esi, %esi
	jne	.L184
.L100:
	testl	%r13d, %r13d
	je	.L102
	imulq	%r10, %rax
.L102:
	cqto
	idivq	%r9
	jmp	.L99
.L184:
	movq	%rdx, %rax
	movl	%ecx, 20(%rsp)
	imulq	%rdx, %rax
	movl	%esi, 8(%rsp)
	cqto
	idivq	%r9
	movq	%rdx, %rdi
	movl	%ebx, %edx
	call	mbk.part.0
	movl	20(%rsp), %ecx
	movl	8(%rsp), %esi
	cltq
	jmp	.L100
.L111:
	movq	8(%rsp), %rdi
	movq	%rcx, 24(%rsp)
	movl	%esi, 20(%rsp)
	movq	%rdi, %rax
	imulq	%rdi, %rax
	cqto
	idivq	%r9
	movq	%rdx, %rdi
	movl	%r10d, %edx
	call	mbk.part.0
	movl	20(%rsp), %esi
	movq	24(%rsp), %rcx
	cltq
	jmp	.L114
.L123:
	movq	(%rsp), %rdi
	movl	%ecx, 20(%rsp)
	movl	%esi, 8(%rsp)
	movq	%rdi, %rax
	imulq	%rdi, %rax
	cqto
	idivq	%r9
	movq	%rdx, %rdi
	movl	%ebx, %edx
	call	mbk.part.0
	movl	8(%rsp), %esi
	movl	20(%rsp), %ecx
	cltq
	jmp	.L126
.L183:
	movq	%rdx, %rax
	movq	%rcx, 24(%rsp)
	imulq	%rdx, %rax
	movl	%esi, 20(%rsp)
	cqto
	idivq	%r9
	movq	%rdx, %rdi
	movl	%r10d, %edx
	call	mbk.part.0
	movq	24(%rsp), %rcx
	movl	20(%rsp), %esi
	cltq
	jmp	.L129
	.cfi_endproc
.LFE25:
	.size	aCb, .-aCb
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.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	$136, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %r12
	leaq	24(%rsp), %rbp
	movq	%r12, %r8
	leaq	20(%rsp), %rdx
	leaq	16(%rsp), %rsi
	movq	%rbp, %rcx
	leaq	32(%rsp), %r14
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %eax
	movl	20(%rsp), %edx
	movq	%rbp, %rsi
	movdqa	X(%rip), %xmm3
	movd	24(%rsp), %xmm5
	leaq	.LC1(%rip), %rdi
	movdqa	Y(%rip), %xmm8
	movd	%eax, %xmm4
	imull	32+X(%rip), %eax
	pshufd	$0, %xmm4, %xmm0
	movd	%edx, %xmm4
	pshufd	$0, %xmm5, %xmm5
	addl	24(%rsp), %eax
	pshufd	$0, %xmm4, %xmm1
	movdqa	%xmm0, %xmm7
	movd	28(%rsp), %xmm4
	movdqa	%xmm0, %xmm2
	psrlq	$32, %xmm7
	psrlq	$32, %xmm3
	movdqa	%xmm1, %xmm6
	pmuludq	X(%rip), %xmm2
	pmuludq	%xmm7, %xmm3
	psrlq	$32, %xmm6
	pshufd	$8, %xmm2, %xmm2
	pmuludq	16+X(%rip), %xmm0
	psrlq	$32, %xmm8
	pshufd	$0, %xmm4, %xmm4
	pshufd	$8, %xmm0, %xmm0
	pmuludq	%xmm6, %xmm8
	imull	32+Y(%rip), %edx
	addl	28(%rsp), %edx
	pshufd	$8, %xmm3, %xmm3
	punpckldq	%xmm3, %xmm2
	movdqa	%xmm1, %xmm3
	pmuludq	Y(%rip), %xmm3
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm8, %xmm8
	paddd	%xmm5, %xmm2
	pmuludq	16+Y(%rip), %xmm1
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm8, %xmm3
	movdqa	%xmm2, %xmm8
	paddd	%xmm4, %xmm3
	punpckhdq	%xmm3, %xmm2
	punpckldq	%xmm3, %xmm8
	movaps	%xmm2, 48(%rsp)
	movdqa	16+X(%rip), %xmm2
	movaps	%xmm8, 32(%rsp)
	psrlq	$32, %xmm2
	pmuludq	%xmm2, %xmm7
	movdqa	16+Y(%rip), %xmm2
	psrlq	$32, %xmm2
	pmuludq	%xmm2, %xmm6
	pshufd	$8, %xmm7, %xmm7
	punpckldq	%xmm7, %xmm0
	paddd	%xmm5, %xmm0
	movd	%edx, %xmm5
	movq	%r12, %rdx
	xorl	%r12d, %r12d
	pshufd	$8, %xmm6, %xmm6
	movdqa	%xmm0, %xmm2
	punpckldq	%xmm6, %xmm1
	paddd	%xmm4, %xmm1
	punpckhdq	%xmm1, %xmm0
	punpckldq	%xmm1, %xmm2
	movaps	%xmm0, 80(%rsp)
	movd	%eax, %xmm0
	xorl	%eax, %eax
	punpckldq	%xmm5, %xmm0
	movaps	%xmm2, 64(%rsp)
	movq	%xmm0, 96(%rsp)
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	movl	24(%rsp), %r15d
	movl	$10000, %edx
	movabsq	$-6067344547413715707, %r10
	movl	%eax, 4(%rsp)
	leaq	104(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L190:
	movl	(%r14), %eax
	subl	%r15d, %eax
	movl	%eax, %esi
	negl	%esi
	cmovs	%eax, %esi
	movl	4(%r14), %eax
	subl	4(%rsp), %eax
	movl	%eax, %edi
	negl	%edi
	cmovns	%edi, %eax
	leal	(%rsi,%rax), %ebx
	cmpl	%edx, %ebx
	jge	.L197
	xorl	%r12d, %r12d
.L186:
	cmpl	%eax, %esi
	cmovg	%eax, %esi
	testl	%esi, %esi
	jle	.L193
	leal	1(%rsi), %r13d
	movl	$1, %r11d
	leal	1(%rbx), %ebp
	movl	$1, %r9d
	.p2align 4,,10
	.p2align 3
.L189:
	movq	%r11, %rsi
	imulq	%r11, %rsi
	imulq	%rsi, %rsi
	movq	%rsi, %rax
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %r8
	sarq	$26, %r8
	subq	%rax, %r8
	imulq	$100000007, %r8, %rax
	subq	%rax, %rsi
	movq	%rsi, %r8
	imulq	%rsi, %rsi
	movq	%rsi, %rax
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rdi
	sarq	$26, %rdi
	subq	%rax, %rdi
	imulq	$100000007, %rdi, %rax
	movq	%rsi, %rdi
	movl	$6250000, %esi
	subq	%rax, %rdi
	imulq	%rdi, %rdi
	movq	%rdi, %rax
	imulq	%r10
	movq	%rdi, %rax
	sarq	$63, %rax
	addq	%rdi, %rdx
	sarq	$26, %rdx
	subq	%rax, %rdx
	imulq	$100000007, %rdx, %rdx
	subq	%rdx, %rdi
	movl	$100000007, %edx
	call	mbk.part.0
	movslq	%eax, %rsi
	movq	%rsi, %rax
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$26, %rdx
	subq	%rax, %rdx
	imulq	$100000007, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	%r8, %rsi
	movq	%rsi, %rax
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$26, %rdx
	subq	%rax, %rdx
	imulq	$100000007, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	%r11, %rsi
	movq	%rsi, %rax
	movq	%rsi, %rdi
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	movslq	%ebp, %rsi
	subq	%r11, %rsi
	sarq	$26, %rdx
	addq	$1, %r11
	imulq	%r9, %rsi
	subq	%rax, %rdx
	imulq	$100000007, %rdx, %rdx
	movq	%rsi, %rax
	subq	%rdx, %rdi
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$26, %rdx
	subq	%rax, %rdx
	imulq	$100000007, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %r9
	sarq	$26, %r9
	subq	%rax, %r9
	imulq	$100000007, %r9, %rax
	subq	%rax, %rsi
	movq	%rsi, %r9
	cmpq	%r13, %r11
	jne	.L189
.L188:
	addl	%r9d, %r12d
	movl	%ebx, %edx
.L187:
	movslq	%r12d, %rax
	movl	%r12d, %esi
	addq	$8, %r14
	imulq	$360287945, %rax, %rax
	sarl	$31, %esi
	sarq	$55, %rax
	subl	%esi, %eax
	imull	$100000007, %eax, %eax
	subl	%eax, %r12d
	cmpq	%r14, 8(%rsp)
	jne	.L190
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L198
	addq	$136, %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
	.p2align 4,,10
	.p2align 3
.L197:
	.cfi_restore_state
	jne	.L187
	movl	%edx, %eax
	subl	%esi, %eax
	jmp	.L186
.L193:
	movl	$1, %r9d
	jmp	.L188
.L198:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.globl	Y
	.data
	.align 32
	.type	Y, @object
	.size	Y, 36
Y:
	.long	-1
	.long	0
	.long	1
	.long	-1
	.long	0
	.long	1
	.long	-1
	.long	0
	.long	1
	.globl	X
	.align 32
	.type	X, @object
	.size	X, 36
X:
	.long	-1
	.long	-1
	.long	-1
	.long	0
	.long	0
	.long	0
	.long	1
	.long	1
	.long	1
	.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
	.type	mbk.part.0, @function
mbk.part.0:
.LFB27:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%esi, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	shrl	$31, %eax
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	addl	%esi, %eax
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movslq	%edx, %r12
	movl	$1, %edx
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%esi, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	sarl	%eax
	jne	.L26
.L2:
	andl	$1, %ebx
	je	.L7
	imulq	%r13, %rdx
.L7:
	movq	%rdx, %rax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	cqto
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	idivq	%r12
	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
	movl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	movl	%eax, %ebp
	movq	%rdi, %rax
	imulq	%rdi, %rax
	cqto
	idivq	%r12
	testl	%esi, %esi
	leal	3(%rsi), %eax
	cmovns	%esi, %eax
	sarl	$2, %eax
	movl	%eax, %r14d
	movq	%rdx, %r15
	movl	$1, %edx
	jne	.L27
.L3:
	andl	$1, %ebp
	je	.L6
	imulq	%r15, %rdx
.L6:
	movq	%rdx, %rax
	cqto
	idivq	%r12
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L27:
	movq	%r15, %rax
	leal	7(%rsi), %esi
	imulq	%r15, %rax
	cqto
	idivq	%r12
	testl	%ebx, %ebx
	movl	$1, %eax
	cmovns	%ebx, %esi
	sarl	$3, %esi
	movq	%rdx, %rcx
	jne	.L28
.L4:
	andl	$1, %r14d
	je	.L5
	imulq	%rcx, %rax
.L5:
	cqto
	idivq	%r12
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L28:
	movq	%rdx, %rax
	movq	%rdx, 8(%rsp)
	imulq	%rdx, %rax
	cqto
	idivq	%r12
	movq	%rdx, %rdi
	movl	%r12d, %edx
	call	mbk.part.0
	movq	8(%rsp), %rcx
	cltq
	jmp	.L4
	.cfi_endproc
.LFE27:
	.size	mbk.part.0, .-mbk.part.0
	.p2align 4
	.globl	mbk
	.type	mbk, @function
mbk:
.LFB23:
	.cfi_startproc
	endbr64
	testl	%esi, %esi
	jne	.L52
	movl	$1, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L52:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%esi, %eax
	movl	%edx, %r9d
	movq	%rdi, %r10
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	shrl	$31, %eax
	movslq	%edx, %rbx
	movl	%esi, %r8d
	addl	%esi, %eax
	movl	$1, %edx
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	sarl	%eax
	movl	%eax, %r11d
	jne	.L53
.L31:
	andl	$1, %r8d
	je	.L34
	imulq	%r10, %rdx
.L34:
	movq	%rdx, %rax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	cqto
	idivq	%rbx
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	movl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L53:
	.cfi_restore_state
	movq	%rdi, %rax
	leal	3(%rsi), %esi
	imulq	%rdi, %rax
	cqto
	idivq	%rbx
	testl	%r8d, %r8d
	movl	$1, %eax
	cmovns	%r8d, %esi
	sarl	$2, %esi
	movq	%rdx, %rbp
	jne	.L54
.L32:
	andl	$1, %r11d
	je	.L33
	imulq	%rbp, %rax
.L33:
	cqto
	idivq	%rbx
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L54:
	movq	%rdx, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%rbx
	movq	%rdx, %rdi
	movl	%r9d, %edx
	call	mbk.part.0
	cltq
	jmp	.L32
	.cfi_endproc
.LFE23:
	.size	mbk, .-mbk
	.p2align 4
	.globl	inv
	.type	inv, @function
inv:
.LFB24:
	.cfi_startproc
	endbr64
	movl	%esi, %r10d
	subl	$2, %r10d
	jne	.L85
	movl	$1, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L85:
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	%r10d, %eax
	movslq	%edi, %r9
	movl	$1, %edx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	shrl	$31, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	addl	%r10d, %eax
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movslq	%esi, %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	sarl	%eax
	movl	%eax, %r11d
	jne	.L86
.L57:
	andl	$1, %r10d
	je	.L62
	imulq	%r9, %rdx
.L62:
	movq	%rdx, %rax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	cqto
	idivq	%rbx
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	movl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L86:
	.cfi_restore_state
	movq	%r9, %rax
	imulq	%r9, %rax
	cqto
	idivq	%rbx
	testl	%r10d, %r10d
	leal	1(%rsi), %eax
	cmovns	%r10d, %eax
	sarl	$2, %eax
	movl	%eax, %ebp
	movq	%rdx, %r12
	movl	$1, %edx
	jne	.L87
.L58:
	andl	$1, %r11d
	je	.L61
	imulq	%r12, %rdx
.L61:
	movq	%rdx, %rax
	cqto
	idivq	%rbx
	jmp	.L57
	.p2align 4,,10
	.p2align 3
.L87:
	movq	%r12, %rax
	imulq	%r12, %rax
	cqto
	idivq	%rbx
	testl	%r10d, %r10d
	leal	5(%rsi), %eax
	cmovns	%r10d, %eax
	movq	%rdx, %r13
	movl	%eax, %edx
	movl	$1, %eax
	sarl	$3, %edx
	movl	%edx, %r8d
	jne	.L88
.L59:
	andl	$1, %ebp
	je	.L60
	imulq	%r13, %rax
.L60:
	cqto
	idivq	%rbx
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L88:
	movq	%r13, %rax
	imulq	%r13, %rax
	cqto
	idivq	%rbx
	movq	%rdx, %rdi
	movl	%esi, %edx
	movl	%r8d, %esi
	call	mbk.part.0
	cltq
	jmp	.L59
	.cfi_endproc
.LFE24:
	.size	inv, .-inv
	.p2align 4
	.globl	aCb
	.type	aCb, @function
aCb:
.LFB25:
	.cfi_startproc
	endbr64
	movslq	%edi, %r8
	movl	%edx, %r10d
	movl	%r8d, %edx
	subl	%esi, %edx
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	testl	%edx, %edx
	jle	.L133
	leal	-2(%r10), %eax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leal	1(%r10), %r11d
	movslq	%r10d, %r9
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%eax, %ecx
	leal	13(%r10), %esi
	movl	%eax, %edi
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	shrl	$31, %ecx
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	addl	%eax, %ecx
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	sarl	%ecx
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leal	5(%r10), %ebx
	movl	%ecx, %ebp
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	testl	%eax, %eax
	cmovns	%eax, %r11d
	sarl	$2, %r11d
	testl	%eax, %eax
	cmovns	%eax, %ebx
	movl	%r11d, %r12d
	sarl	$3, %ebx
	testl	%eax, %eax
	cmovns	%eax, %esi
	movl	%ebx, %r13d
	andl	$1, %r12d
	andl	$1, %ebp
	andl	$1, %r13d
	andl	$1, %edi
	sarl	$4, %esi
	testl	%eax, %eax
	jne	.L91
	leaq	-1(%r8), %rax
	subl	$1, %edx
	movq	%rax, %rsi
	subq	%rdx, %rsi
	movl	$1, %edx
	jmp	.L92
	.p2align 4,,10
	.p2align 3
.L177:
	subq	$1, %rax
.L92:
	imulq	%rdx, %r8
	movq	%r8, %rcx
	shrq	$63, %rcx
	leaq	(%r8,%rcx), %rdx
	movq	%rax, %r8
	andl	$1, %edx
	subq	%rcx, %rdx
	cmpq	%rsi, %rax
	jne	.L177
.L93:
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%edx, %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
	.p2align 4,,10
	.p2align 3
.L91:
	.cfi_restore_state
	testl	%edi, %edi
	jne	.L94
	testl	%ecx, %ecx
	jne	.L95
	leaq	-1(%r8), %rcx
	leal	-1(%rdx), %eax
	movq	%rcx, %rdi
	subq	%rax, %rdi
	movl	$1, %eax
	cqto
	idivq	%r9
	movq	%r8, %rax
	movq	%rdx, %rsi
	movl	$1, %edx
	jmp	.L96
	.p2align 4,,10
	.p2align 3
.L178:
	subq	$1, %rcx
.L96:
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rdx, %rax
	imulq	%rsi, %rax
	cqto
	idivq	%r9
	movq	%rcx, %rax
	cmpq	%rdi, %rcx
	jne	.L178
	jmp	.L93
	.p2align 4,,10
	.p2align 3
.L94:
	testl	%ecx, %ecx
	jne	.L115
	leal	1(%rdx), %r10d
	movl	$1, %ecx
	movl	$1, %edx
	leaq	1(%r8), %rdi
	.p2align 4,,10
	.p2align 3
.L116:
	movq	%rdi, %rax
	subq	%rcx, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rcx, %rax
	addq	$1, %rcx
	movq	%rdx, %rsi
	cqto
	idivq	%r9
	movq	%rsi, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	cmpq	%rcx, %r10
	jne	.L116
	jmp	.L93
	.p2align 4,,10
	.p2align 3
.L133:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	movl	$1, %eax
	ret
.L115:
	.cfi_def_cfa_offset 96
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	leal	1(%rdx), %r15d
	movl	$1, %r14d
	movl	$1, %edx
	testl	%ebp, %ebp
	jne	.L117
	movl	%ebx, %ecx
	leaq	1(%r8), %rbp
	movl	%r10d, %ebx
	jmp	.L119
	.p2align 4,,10
	.p2align 3
.L179:
	movl	$1, %edx
.L122:
	movq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rdx, %rax
	imulq	%r14, %rax
	addq	$1, %r14
	cqto
	idivq	%r9
	movq	%rdx, %rax
	imulq	%r8, %rax
	cqto
	idivq	%r9
	cmpq	%r14, %r15
	je	.L93
.L119:
	movq	%rbp, %rax
	subq	%r14, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%r14, %rax
	imulq	%r14, %rax
	movq	%rdx, %r8
	cqto
	idivq	%r9
	testl	%r11d, %r11d
	je	.L179
	imulq	%rdx, %rdx
	movq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rdx, %r10
	testl	%ecx, %ecx
	jne	.L120
	movl	$1, %edx
.L125:
	testl	%r12d, %r12d
	je	.L121
	imulq	%r10, %rdx
.L121:
	movq	%rdx, %rax
	cqto
	idivq	%r9
	jmp	.L122
.L95:
	leal	1(%rdx), %r15d
	testl	%ebp, %ebp
	jne	.L97
	movl	%ebx, %ecx
	movl	$1, %ebp
	movl	$1, %edx
	addq	$1, %r8
	movl	%r10d, %ebx
	jmp	.L105
	.p2align 4,,10
	.p2align 3
.L98:
	movq	%rdi, %rax
	addq	$1, %rbp
	cqto
	idivq	%r9
	movq	%rdx, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r9
	cmpq	%rbp, %r15
	je	.L93
.L105:
	movq	%r8, %rax
	movl	$1, %edi
	subq	%rbp, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rbp, %rax
	imulq	%rbp, %rax
	movq	%rdx, %r14
	cqto
	idivq	%r9
	testl	%r11d, %r11d
	je	.L98
	imulq	%rdx, %rdx
	movq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rdx, (%rsp)
	movl	$1, %edx
	testl	%ecx, %ecx
	jne	.L180
.L99:
	testl	%r12d, %r12d
	je	.L104
	imulq	(%rsp), %rdx
.L104:
	movq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rdx, %rdi
	jmp	.L98
.L97:
	movl	$1, %r14d
	movl	$1, %edx
	leaq	1(%r8), %rcx
	jmp	.L107
	.p2align 4,,10
	.p2align 3
.L181:
	movl	$1, %edx
.L110:
	movq	%rdx, %rax
	addq	$1, %r14
	imulq	%r8, %rax
	cqto
	idivq	%r9
	movq	%rdx, %rax
	imulq	%rbp, %rax
	cqto
	idivq	%r9
	cmpq	%r15, %r14
	je	.L93
.L107:
	movq	%rcx, %rax
	subq	%r14, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%r14, %rax
	imulq	%r14, %rax
	movq	%rdx, %rbp
	cqto
	idivq	%r9
	movq	%rdx, %r8
	testl	%r11d, %r11d
	je	.L181
	movq	%rdx, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rdx, (%rsp)
	testl	%ebx, %ebx
	jne	.L108
	movl	$1, %edx
.L113:
	testl	%r12d, %r12d
	je	.L109
	imulq	(%rsp), %rdx
.L109:
	movq	%rdx, %rax
	cqto
	idivq	%r9
	jmp	.L110
.L117:
	leaq	1(%r8), %rcx
	jmp	.L132
	.p2align 4,,10
	.p2align 3
.L127:
	movq	%r8, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rdx, %rax
	imulq	%r14, %rax
	addq	$1, %r14
	cqto
	idivq	%r9
	movq	%rdx, %rax
	imulq	%rbp, %rax
	cqto
	idivq	%r9
	cmpq	%r14, %r15
	je	.L93
.L132:
	movq	%rcx, %rax
	subq	%r14, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%r14, %rax
	imulq	%r14, %rax
	movq	%rdx, %rbp
	cqto
	idivq	%r9
	movq	%rdx, %r8
	movl	$1, %edx
	testl	%r11d, %r11d
	je	.L127
	movq	%r8, %rax
	imulq	%r8, %rax
	cqto
	idivq	%r9
	movq	%rdx, (%rsp)
	movl	$1, %edx
	testl	%ebx, %ebx
	jne	.L182
.L128:
	testl	%r12d, %r12d
	je	.L131
	imulq	(%rsp), %rdx
.L131:
	movq	%rdx, %rax
	cqto
	idivq	%r9
	jmp	.L127
.L182:
	movq	(%rsp), %rdi
	movq	%rdi, %rax
	imulq	%rdi, %rax
	cqto
	idivq	%r9
	movl	$1, %eax
	movq	%rdx, 8(%rsp)
	testl	%esi, %esi
	jne	.L183
.L129:
	testl	%r13d, %r13d
	je	.L130
	imulq	8(%rsp), %rax
.L130:
	cqto
	idivq	%r9
	jmp	.L128
.L120:
	movq	%rdx, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rdx, (%rsp)
	testl	%esi, %esi
	jne	.L123
	movl	$1, %eax
.L126:
	testl	%r13d, %r13d
	je	.L124
	imulq	(%rsp), %rax
.L124:
	cqto
	idivq	%r9
	jmp	.L125
.L108:
	movq	%rdx, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r9
	movq	%rdx, 8(%rsp)
	testl	%esi, %esi
	jne	.L111
	movl	$1, %eax
.L114:
	testl	%r13d, %r13d
	je	.L112
	imulq	8(%rsp), %rax
.L112:
	cqto
	idivq	%r9
	jmp	.L113
.L180:
	movq	(%rsp), %rdi
	movq	%rdi, %rax
	imulq	%rdi, %rax
	cqto
	idivq	%r9
	movl	$1, %eax
	movq	%rdx, %r10
	testl	%esi, %esi
	jne	.L184
.L100:
	testl	%r13d, %r13d
	je	.L102
	imulq	%r10, %rax
.L102:
	cqto
	idivq	%r9
	jmp	.L99
.L184:
	movq	%rdx, %rax
	movl	%ecx, 20(%rsp)
	imulq	%rdx, %rax
	movl	%esi, 8(%rsp)
	cqto
	idivq	%r9
	movq	%rdx, %rdi
	movl	%ebx, %edx
	call	mbk.part.0
	movl	20(%rsp), %ecx
	movl	8(%rsp), %esi
	cltq
	jmp	.L100
.L111:
	movq	8(%rsp), %rdi
	movq	%rcx, 24(%rsp)
	movl	%esi, 20(%rsp)
	movq	%rdi, %rax
	imulq	%rdi, %rax
	cqto
	idivq	%r9
	movq	%rdx, %rdi
	movl	%r10d, %edx
	call	mbk.part.0
	movl	20(%rsp), %esi
	movq	24(%rsp), %rcx
	cltq
	jmp	.L114
.L123:
	movq	(%rsp), %rdi
	movl	%ecx, 20(%rsp)
	movl	%esi, 8(%rsp)
	movq	%rdi, %rax
	imulq	%rdi, %rax
	cqto
	idivq	%r9
	movq	%rdx, %rdi
	movl	%ebx, %edx
	call	mbk.part.0
	movl	8(%rsp), %esi
	movl	20(%rsp), %ecx
	cltq
	jmp	.L126
.L183:
	movq	%rdx, %rax
	movq	%rcx, 24(%rsp)
	imulq	%rdx, %rax
	movl	%esi, 20(%rsp)
	cqto
	idivq	%r9
	movq	%rdx, %rdi
	movl	%r10d, %edx
	call	mbk.part.0
	movq	24(%rsp), %rcx
	movl	20(%rsp), %esi
	cltq
	jmp	.L129
	.cfi_endproc
.LFE25:
	.size	aCb, .-aCb
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.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	$136, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %r12
	leaq	24(%rsp), %rbp
	movq	%r12, %r8
	leaq	20(%rsp), %rdx
	leaq	16(%rsp), %rsi
	movq	%rbp, %rcx
	leaq	32(%rsp), %r14
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %eax
	movl	20(%rsp), %edx
	movq	%rbp, %rsi
	movdqa	X(%rip), %xmm3
	movd	24(%rsp), %xmm5
	leaq	.LC1(%rip), %rdi
	movdqa	Y(%rip), %xmm8
	movd	%eax, %xmm4
	imull	32+X(%rip), %eax
	pshufd	$0, %xmm4, %xmm0
	movd	%edx, %xmm4
	pshufd	$0, %xmm5, %xmm5
	addl	24(%rsp), %eax
	pshufd	$0, %xmm4, %xmm1
	movdqa	%xmm0, %xmm7
	movd	28(%rsp), %xmm4
	movdqa	%xmm0, %xmm2
	psrlq	$32, %xmm7
	psrlq	$32, %xmm3
	movdqa	%xmm1, %xmm6
	pmuludq	X(%rip), %xmm2
	pmuludq	%xmm7, %xmm3
	psrlq	$32, %xmm6
	pshufd	$8, %xmm2, %xmm2
	pmuludq	16+X(%rip), %xmm0
	psrlq	$32, %xmm8
	pshufd	$0, %xmm4, %xmm4
	pshufd	$8, %xmm0, %xmm0
	pmuludq	%xmm6, %xmm8
	imull	32+Y(%rip), %edx
	addl	28(%rsp), %edx
	pshufd	$8, %xmm3, %xmm3
	punpckldq	%xmm3, %xmm2
	movdqa	%xmm1, %xmm3
	pmuludq	Y(%rip), %xmm3
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm8, %xmm8
	paddd	%xmm5, %xmm2
	pmuludq	16+Y(%rip), %xmm1
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm8, %xmm3
	movdqa	%xmm2, %xmm8
	paddd	%xmm4, %xmm3
	punpckhdq	%xmm3, %xmm2
	punpckldq	%xmm3, %xmm8
	movaps	%xmm2, 48(%rsp)
	movdqa	16+X(%rip), %xmm2
	movaps	%xmm8, 32(%rsp)
	psrlq	$32, %xmm2
	pmuludq	%xmm2, %xmm7
	movdqa	16+Y(%rip), %xmm2
	psrlq	$32, %xmm2
	pmuludq	%xmm2, %xmm6
	pshufd	$8, %xmm7, %xmm7
	punpckldq	%xmm7, %xmm0
	paddd	%xmm5, %xmm0
	movd	%edx, %xmm5
	movq	%r12, %rdx
	xorl	%r12d, %r12d
	pshufd	$8, %xmm6, %xmm6
	movdqa	%xmm0, %xmm2
	punpckldq	%xmm6, %xmm1
	paddd	%xmm4, %xmm1
	punpckhdq	%xmm1, %xmm0
	punpckldq	%xmm1, %xmm2
	movaps	%xmm0, 80(%rsp)
	movd	%eax, %xmm0
	xorl	%eax, %eax
	punpckldq	%xmm5, %xmm0
	movaps	%xmm2, 64(%rsp)
	movq	%xmm0, 96(%rsp)
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	movl	24(%rsp), %r15d
	movl	$10000, %edx
	movabsq	$-6067344547413715707, %r10
	movl	%eax, 4(%rsp)
	leaq	104(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L190:
	movl	(%r14), %eax
	subl	%r15d, %eax
	movl	%eax, %esi
	negl	%esi
	cmovs	%eax, %esi
	movl	4(%r14), %eax
	subl	4(%rsp), %eax
	movl	%eax, %edi
	negl	%edi
	cmovns	%edi, %eax
	leal	(%rsi,%rax), %ebx
	cmpl	%edx, %ebx
	jge	.L197
	xorl	%r12d, %r12d
.L186:
	cmpl	%eax, %esi
	cmovg	%eax, %esi
	testl	%esi, %esi
	jle	.L193
	leal	1(%rsi), %r13d
	movl	$1, %r11d
	leal	1(%rbx), %ebp
	movl	$1, %r9d
	.p2align 4,,10
	.p2align 3
.L189:
	movq	%r11, %rsi
	imulq	%r11, %rsi
	imulq	%rsi, %rsi
	movq	%rsi, %rax
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %r8
	sarq	$26, %r8
	subq	%rax, %r8
	imulq	$100000007, %r8, %rax
	subq	%rax, %rsi
	movq	%rsi, %r8
	imulq	%rsi, %rsi
	movq	%rsi, %rax
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rdi
	sarq	$26, %rdi
	subq	%rax, %rdi
	imulq	$100000007, %rdi, %rax
	movq	%rsi, %rdi
	movl	$6250000, %esi
	subq	%rax, %rdi
	imulq	%rdi, %rdi
	movq	%rdi, %rax
	imulq	%r10
	movq	%rdi, %rax
	sarq	$63, %rax
	addq	%rdi, %rdx
	sarq	$26, %rdx
	subq	%rax, %rdx
	imulq	$100000007, %rdx, %rdx
	subq	%rdx, %rdi
	movl	$100000007, %edx
	call	mbk.part.0
	movslq	%eax, %rsi
	movq	%rsi, %rax
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$26, %rdx
	subq	%rax, %rdx
	imulq	$100000007, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	%r8, %rsi
	movq	%rsi, %rax
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$26, %rdx
	subq	%rax, %rdx
	imulq	$100000007, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	%r11, %rsi
	movq	%rsi, %rax
	movq	%rsi, %rdi
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	movslq	%ebp, %rsi
	subq	%r11, %rsi
	sarq	$26, %rdx
	addq	$1, %r11
	imulq	%r9, %rsi
	subq	%rax, %rdx
	imulq	$100000007, %rdx, %rdx
	movq	%rsi, %rax
	subq	%rdx, %rdi
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$26, %rdx
	subq	%rax, %rdx
	imulq	$100000007, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %r9
	sarq	$26, %r9
	subq	%rax, %r9
	imulq	$100000007, %r9, %rax
	subq	%rax, %rsi
	movq	%rsi, %r9
	cmpq	%r13, %r11
	jne	.L189
.L188:
	addl	%r9d, %r12d
	movl	%ebx, %edx
.L187:
	movslq	%r12d, %rax
	movl	%r12d, %esi
	addq	$8, %r14
	imulq	$360287945, %rax, %rax
	sarl	$31, %esi
	sarq	$55, %rax
	subl	%esi, %eax
	imull	$100000007, %eax, %eax
	subl	%eax, %r12d
	cmpq	%r14, 8(%rsp)
	jne	.L190
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L198
	addq	$136, %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
	.p2align 4,,10
	.p2align 3
.L197:
	.cfi_restore_state
	jne	.L187
	movl	%edx, %eax
	subl	%esi, %eax
	jmp	.L186
.L193:
	movl	$1, %r9d
	jmp	.L188
.L198:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.globl	Y
	.data
	.align 32
	.type	Y, @object
	.size	Y, 36
Y:
	.long	-1
	.long	0
	.long	1
	.long	-1
	.long	0
	.long	1
	.long	-1
	.long	0
	.long	1
	.globl	X
	.align 32
	.type	X, @object
	.size	X, 36
X:
	.long	-1
	.long	-1
	.long	-1
	.long	0
	.long	0
	.long	0
	.long	1
	.long	1
	.long	1
	.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 X[]={-1,-1,-1,0,0,0,1,1,1};
int Y[]={-1,0,1,-1,0,1,-1,0,1};
int mbk(long long a,int n,int m){return n?(mbk((a*a)%m,n/2,m)*(n%2?a:1))%m:1;}
int inv(int a,int m){return mbk((long long)a,m-2,m);}
int aCb(int a,int b,int m){
  int i;
  long long s=1;
  if(b>a-b)b=a-b;
  for(i=0;i<b;i++)s=(((s*(a-i))%m)*inv(i+1,m))%m;  
  return (int)s;
}
int main(){
  //printf("%d\n",aCb(5,2,107));
  int w,h,a,b,x,y,d[10][2],dx,dy,i,min=10000,s=0;
  scanf("%d %d %d %d",&w,&h,&x,&y);
  for(i=0;i<9;i++){
    d[i][0]=x+w*X[i];
    d[i][1]=y+h*Y[i];
  }
  scanf("%d %d",&x,&y);
  for(i=0;i<9;i++){
    dx=abs(d[i][0]-x);
    dy=abs(d[i][1]-y);
    if(dy+dx<min){
      min=dy+dx;
      s=0;
    }//printf("%d %d %d\n",dy,dx,max);
    if(dy+dx==min)s+=aCb(min,dx,100000007);
    s%=100000007;
  }
  printf("%d\n",s);
  return 0;
}
500 500 0 0 107 200
 4 1 0 0 1 1
 4 4 1 0 3 3
 2 3 0 0 1 1
 500 500 0 0 107 239
 2 1 0 0 1 1
 678 500 0 0 107 168
 500 500 0 0 200 277
 500 500 1 0 107 239
 678 353 0 0 107 239

68949311
 1
 6
 4
 29183355
 2
 46712821
 1876138
 8735893
 48683066

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 X[]={-1,-1,-1,0,0,0,1,1,1};
int Y[]={-1,0,1,-1,0,1,-1,0,1};
int mbk(long long a,int n,int m){return n?(mbk((a*a)%m,n/2,m)*(n%2?a:1))%m:1;}
int inv(int a,int m){return mbk((long long)a,m-2,m);}
int aCb(int a,int b,int m){
  int i;
  long long s=1;
  if(b>a-b)b=a-b;
  for(i=0;i<b;i++)s=(((s*(a-i))%m)*inv(i+1,m))%m;  
  return (int)s;
}
int main(){
  //printf("%d\n",aCb(5,2,107));
  int w,h,a,b,x,y,d[10][2],dx,dy,i,min=10000,s=0;
  scanf("%d %d %d %d",&w,&h,&x,&y);
  for(i=0;i<9;i++){
    d[i][0]=x+w*X[i];
    d[i][1]=y+h*Y[i];
  }
  scanf("%d %d",&x,&y);
  for(i=0;i<9;i++){
    dx=abs(d[i][0]-x);
    dy=abs(d[i][1]-y);
    if(dy+dx<min){
      min=dy+dx;
      s=0;
    }//printf("%d %d %d\n",dy,dx,max);
    if(dy+dx==min)s+=aCb(min,dx,100000007);
    s%=100000007;
  }
  printf("%d\n",s);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	X
	.data
	.align 32
	.type	X, @object
	.size	X, 36
X:
	.long	-1
	.long	-1
	.long	-1
	.long	0
	.long	0
	.long	0
	.long	1
	.long	1
	.long	1
	.globl	Y
	.align 32
	.type	Y, @object
	.size	Y, 36
Y:
	.long	-1
	.long	0
	.long	1
	.long	-1
	.long	0
	.long	1
	.long	-1
	.long	0
	.long	1
	.text
	.globl	mbk
	.type	mbk, @function
mbk:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	%edx, -16(%rbp)
	cmpl	$0, -12(%rbp)
	je	.L2
	movl	-12(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %esi
	movq	-8(%rbp), %rax
	imulq	%rax, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rcx
	movl	-16(%rbp), %eax
	movl	%eax, %edx
	movq	%rcx, %rdi
	call	mbk
	movslq	%eax, %rdx
	movl	-12(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L3
	movq	-8(%rbp), %rax
	jmp	.L4
.L3:
	movl	$1, %eax
.L4:
	imulq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	jmp	.L6
.L2:
	movl	$1, %eax
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	mbk, .-mbk
	.globl	inv
	.type	inv, @function
inv:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %eax
	leal	-2(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	movl	-8(%rbp), %edx
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	mbk
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	inv, .-inv
	.globl	aCb
	.type	aCb, @function
aCb:
.LFB2:
	.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	$40, %rsp
	.cfi_offset 3, -24
	movl	%edi, -36(%rbp)
	movl	%esi, -40(%rbp)
	movl	%edx, -44(%rbp)
	movq	$1, -24(%rbp)
	movl	-36(%rbp), %eax
	subl	-40(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	jle	.L10
	movl	-36(%rbp), %eax
	subl	-40(%rbp), %eax
	movl	%eax, -40(%rbp)
.L10:
	movl	$0, -28(%rbp)
	jmp	.L11
.L12:
	movl	-36(%rbp), %eax
	subl	-28(%rbp), %eax
	cltq
	imulq	-24(%rbp), %rax
	movl	-44(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rbx
	movl	-28(%rbp), %eax
	leal	1(%rax), %edx
	movl	-44(%rbp), %eax
	movl	%eax, %esi
	movl	%edx, %edi
	call	inv
	cltq
	imulq	%rbx, %rax
	movl	-44(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -24(%rbp)
	addl	$1, -28(%rbp)
.L11:
	movl	-28(%rbp), %eax
	cmpl	-40(%rbp), %eax
	jl	.L12
	movq	-24(%rbp), %rax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	aCb, .-aCb
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$144, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$10000, -112(%rbp)
	movl	$0, -108(%rbp)
	leaq	-120(%rbp), %rsi
	leaq	-124(%rbp), %rcx
	leaq	-128(%rbp), %rdx
	leaq	-132(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -116(%rbp)
	jmp	.L15
.L16:
	movl	-116(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-132(%rbp), %eax
	imull	%eax, %edx
	movl	-124(%rbp), %eax
	addl	%eax, %edx
	movl	-116(%rbp), %eax
	cltq
	movl	%edx, -96(%rbp,%rax,8)
	movl	-116(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	Y(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-128(%rbp), %eax
	imull	%eax, %edx
	movl	-120(%rbp), %eax
	addl	%eax, %edx
	movl	-116(%rbp), %eax
	cltq
	movl	%edx, -92(%rbp,%rax,8)
	addl	$1, -116(%rbp)
.L15:
	cmpl	$8, -116(%rbp)
	jle	.L16
	leaq	-120(%rbp), %rdx
	leaq	-124(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -116(%rbp)
	jmp	.L17
.L20:
	movl	-116(%rbp), %eax
	cltq
	movl	-96(%rbp,%rax,8), %eax
	movl	-124(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, -104(%rbp)
	movl	-116(%rbp), %eax
	cltq
	movl	-92(%rbp,%rax,8), %eax
	movl	-120(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, -100(%rbp)
	movl	-100(%rbp), %edx
	movl	-104(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -112(%rbp)
	jle	.L18
	movl	-100(%rbp), %edx
	movl	-104(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -112(%rbp)
	movl	$0, -108(%rbp)
.L18:
	movl	-100(%rbp), %edx
	movl	-104(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -112(%rbp)
	jne	.L19
	movl	-104(%rbp), %ecx
	movl	-112(%rbp), %eax
	movl	$100000007, %edx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	aCb
	addl	%eax, -108(%rbp)
.L19:
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$360287945, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$23, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$100000007, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -108(%rbp)
	addl	$1, -116(%rbp)
.L17:
	cmpl	$8, -116(%rbp)
	jle	.L20
	movl	-108(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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
	.globl	X
	.data
	.align 32
	.type	X, @object
	.size	X, 36
X:
	.long	-1
	.long	-1
	.long	-1
	.long	0
	.long	0
	.long	0
	.long	1
	.long	1
	.long	1
	.globl	Y
	.align 32
	.type	Y, @object
	.size	Y, 36
Y:
	.long	-1
	.long	0
	.long	1
	.long	-1
	.long	0
	.long	1
	.long	-1
	.long	0
	.long	1
	.text
	.globl	mbk
	.type	mbk, @function
mbk:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	%edx, -16(%rbp)
	cmpl	$0, -12(%rbp)
	je	.L2
	movl	-12(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %esi
	movq	-8(%rbp), %rax
	imulq	%rax, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rcx
	movl	-16(%rbp), %eax
	movl	%eax, %edx
	movq	%rcx, %rdi
	call	mbk
	movslq	%eax, %rdx
	movl	-12(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L3
	movq	-8(%rbp), %rax
	jmp	.L4
.L3:
	movl	$1, %eax
.L4:
	imulq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	jmp	.L6
.L2:
	movl	$1, %eax
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	mbk, .-mbk
	.globl	inv
	.type	inv, @function
inv:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %eax
	leal	-2(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	movl	-8(%rbp), %edx
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	mbk
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	inv, .-inv
	.globl	aCb
	.type	aCb, @function
aCb:
.LFB2:
	.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	$40, %rsp
	.cfi_offset 3, -24
	movl	%edi, -36(%rbp)
	movl	%esi, -40(%rbp)
	movl	%edx, -44(%rbp)
	movq	$1, -24(%rbp)
	movl	-36(%rbp), %eax
	subl	-40(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	jle	.L10
	movl	-36(%rbp), %eax
	subl	-40(%rbp), %eax
	movl	%eax, -40(%rbp)
.L10:
	movl	$0, -28(%rbp)
	jmp	.L11
.L12:
	movl	-36(%rbp), %eax
	subl	-28(%rbp), %eax
	cltq
	imulq	-24(%rbp), %rax
	movl	-44(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rbx
	movl	-28(%rbp), %eax
	leal	1(%rax), %edx
	movl	-44(%rbp), %eax
	movl	%eax, %esi
	movl	%edx, %edi
	call	inv
	cltq
	imulq	%rbx, %rax
	movl	-44(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -24(%rbp)
	addl	$1, -28(%rbp)
.L11:
	movl	-28(%rbp), %eax
	cmpl	-40(%rbp), %eax
	jl	.L12
	movq	-24(%rbp), %rax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	aCb, .-aCb
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$144, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$10000, -112(%rbp)
	movl	$0, -108(%rbp)
	leaq	-120(%rbp), %rsi
	leaq	-124(%rbp), %rcx
	leaq	-128(%rbp), %rdx
	leaq	-132(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -116(%rbp)
	jmp	.L15
.L16:
	movl	-116(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-132(%rbp), %eax
	imull	%eax, %edx
	movl	-124(%rbp), %eax
	addl	%eax, %edx
	movl	-116(%rbp), %eax
	cltq
	movl	%edx, -96(%rbp,%rax,8)
	movl	-116(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	Y(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-128(%rbp), %eax
	imull	%eax, %edx
	movl	-120(%rbp), %eax
	addl	%eax, %edx
	movl	-116(%rbp), %eax
	cltq
	movl	%edx, -92(%rbp,%rax,8)
	addl	$1, -116(%rbp)
.L15:
	cmpl	$8, -116(%rbp)
	jle	.L16
	leaq	-120(%rbp), %rdx
	leaq	-124(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -116(%rbp)
	jmp	.L17
.L20:
	movl	-116(%rbp), %eax
	cltq
	movl	-96(%rbp,%rax,8), %eax
	movl	-124(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, -104(%rbp)
	movl	-116(%rbp), %eax
	cltq
	movl	-92(%rbp,%rax,8), %eax
	movl	-120(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, -100(%rbp)
	movl	-100(%rbp), %edx
	movl	-104(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -112(%rbp)
	jle	.L18
	movl	-100(%rbp), %edx
	movl	-104(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -112(%rbp)
	movl	$0, -108(%rbp)
.L18:
	movl	-100(%rbp), %edx
	movl	-104(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -112(%rbp)
	jne	.L19
	movl	-104(%rbp), %ecx
	movl	-112(%rbp), %eax
	movl	$100000007, %edx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	aCb
	addl	%eax, -108(%rbp)
.L19:
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$360287945, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$23, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$100000007, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -108(%rbp)
	addl	$1, -116(%rbp)
.L17:
	cmpl	$8, -116(%rbp)
	jle	.L20
	movl	-108(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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:
