Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
long M=1e9+7,m[1<<18],h,w,a,s;p(a,b)long a,b;{return b?p(a*a%M,b/2)*(b%2?a:1)%M:1;}main(i){for(*m=1;i<1<<18;)m[i]=m[i-1]*i++%M;for(scanf("%d%d%d%d",&h,&w,&a,&i);i<w;)s=(s+m[h-a-1+i]*p(m[h-a-1],M-2)%M*p(m[i],M-2)%M*m[a+w-i-2]%M*p(m[a-1],M-2)%M*p(m[w-1-i++],M-2)%M)%M;printf("%d",s);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	M
	.data
	.align 8
	.type	M, @object
	.size	M, 8
M:
	.quad	1000000007
	.globl	m
	.bss
	.align 32
	.type	m, @object
	.size	m, 2097152
m:
	.zero	2097152
	.globl	h
	.align 8
	.type	h, @object
	.size	h, 8
h:
	.zero	8
	.globl	w
	.align 8
	.type	w, @object
	.size	w, 8
w:
	.zero	8
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	s
	.align 8
	.type	s, @object
	.size	s, 8
s:
	.zero	8
	.text
	.globl	p
	.type	p, @function
p:
.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)
	movq	%rsi, -16(%rbp)
	cmpq	$0, -16(%rbp)
	je	.L2
	movq	-16(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rsi
	movq	-8(%rbp), %rax
	imulq	%rax, %rax
	movq	M(%rip), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	p
	movslq	%eax, %rdx
	movq	-16(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L3
	movq	-8(%rbp), %rax
	jmp	.L4
.L3:
	movl	$1, %eax
.L4:
	imulq	%rdx, %rax
	movq	M(%rip), %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	p, .-p
	.section	.rodata
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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	$24, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	movq	$1, m(%rip)
	jmp	.L8
.L9:
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	m(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -20(%rbp)
	cltq
	imulq	%rcx, %rax
	movq	M(%rip), %rsi
	movl	-20(%rbp), %ecx
	cqto
	idivq	%rsi
	movq	%rdx, %rsi
	movslq	%ecx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	m(%rip), %rax
	movq	%rsi, (%rdx,%rax)
.L8:
	movl	-20(%rbp), %eax
	cmpl	$262143, %eax
	jle	.L9
	leaq	-20(%rbp), %rax
	movq	%rax, %r8
	leaq	a(%rip), %rax
	movq	%rax, %rcx
	leaq	w(%rip), %rax
	movq	%rax, %rdx
	leaq	h(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	jmp	.L10
.L11:
	movq	h(%rip), %rax
	movq	a(%rip), %rdx
	subq	%rdx, %rax
	leaq	-1(%rax), %rdx
	movl	-20(%rbp), %eax
	cltq
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	m(%rip), %rax
	movq	(%rdx,%rax), %rbx
	movq	M(%rip), %rax
	leaq	-2(%rax), %rdx
	movq	h(%rip), %rax
	movq	a(%rip), %rcx
	subq	%rcx, %rax
	subq	$1, %rax
	leaq	0(,%rax,8), %rcx
	leaq	m(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	p
	cltq
	imulq	%rbx, %rax
	movq	M(%rip), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rbx
	movq	M(%rip), %rax
	leaq	-2(%rax), %rdx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	m(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	p
	cltq
	imulq	%rbx, %rax
	movq	M(%rip), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rsi
	movq	a(%rip), %rdx
	movq	w(%rip), %rax
	addq	%rax, %rdx
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	subq	$2, %rax
	leaq	0(,%rax,8), %rdx
	leaq	m(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	%rsi, %rax
	movq	M(%rip), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rbx
	movq	M(%rip), %rax
	leaq	-2(%rax), %rdx
	movq	a(%rip), %rax
	subq	$1, %rax
	leaq	0(,%rax,8), %rcx
	leaq	m(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	p
	cltq
	imulq	%rbx, %rax
	movq	M(%rip), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rbx
	movq	M(%rip), %rax
	leaq	-2(%rax), %rdx
	movq	w(%rip), %rax
	leaq	-1(%rax), %rsi
	movl	-20(%rbp), %eax
	leal	1(%rax), %ecx
	movl	%ecx, -20(%rbp)
	movslq	%eax, %rcx
	movq	%rsi, %rax
	subq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	m(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	p
	cltq
	imulq	%rbx, %rax
	movq	M(%rip), %rcx
	cqto
	idivq	%rcx
	movq	s(%rip), %rax
	addq	%rdx, %rax
	movq	M(%rip), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	movq	%rax, s(%rip)
.L10:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	w(%rip), %rax
	cmpq	%rax, %rdx
	jl	.L11
	movq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	p.part.0, @function
p.part.0:
.LFB2:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rsi, %rdx
	movl	$1, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	shrq	$63, %rdx
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	addq	%rsi, %rdx
	movq	%rdi, %r13
	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
	movq	%rsi, %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	sarq	%rdx
	movq	M(%rip), %r12
	jne	.L26
.L2:
	andl	$1, %ebx
	je	.L7
	imulq	%r13, %rax
.L7:
	cqto
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	idivq	%r12
	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
	movl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	movq	%rdi, %rax
	movq	%rdx, %rbp
	imulq	%rdi, %rax
	cqto
	idivq	%r12
	testq	%rsi, %rsi
	movl	$1, %eax
	movq	%rdx, %r15
	leaq	3(%rsi), %rdx
	cmovns	%rsi, %rdx
	sarq	$2, %rdx
	movq	%rdx, %r14
	jne	.L27
.L3:
	andl	$1, %ebp
	je	.L6
	imulq	%r15, %rax
.L6:
	cqto
	idivq	%r12
	movslq	%edx, %rax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L27:
	movq	%r15, %rax
	leaq	7(%rsi), %rsi
	imulq	%r15, %rax
	cqto
	idivq	%r12
	testq	%rbx, %rbx
	movl	$1, %eax
	cmovns	%rbx, %rsi
	sarq	$3, %rsi
	movq	%rdx, %rcx
	jne	.L28
.L4:
	andl	$1, %r14d
	je	.L5
	imulq	%rcx, %rax
.L5:
	cqto
	idivq	%r12
	movslq	%edx, %rax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L28:
	movq	%rdx, %rax
	movq	%rdx, 8(%rsp)
	imulq	%rdx, %rax
	cqto
	idivq	%r12
	xorl	%eax, %eax
	movq	%rdx, %rdi
	call	p.part.0
	movq	8(%rsp), %rcx
	cltq
	jmp	.L4
	.cfi_endproc
.LFE2:
	.size	p.part.0, .-p.part.0
	.p2align 4
	.globl	p
	.type	p, @function
p:
.LFB0:
	.cfi_startproc
	endbr64
	testq	%rsi, %rsi
	jne	.L55
	movl	$1, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L55:
	movq	%rsi, %rdx
	movq	M(%rip), %r11
	movq	%rdi, %r9
	movq	%rsi, %r8
	shrq	$63, %rdx
	movl	$1, %eax
	addq	%rsi, %rdx
	sarq	%rdx
	movq	%rdx, %r10
	jne	.L56
	andl	$1, %r8d
	je	.L51
	imulq	%rdi, %rax
.L51:
	cqto
	idivq	%r11
	movl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L56:
	movq	%rdi, %rax
	leaq	3(%rsi), %rsi
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	imulq	%rdi, %rax
	cqto
	idivq	%r11
	testq	%r8, %r8
	movl	$1, %eax
	cmovns	%r8, %rsi
	sarq	$2, %rsi
	movq	%rdx, %rbx
	jne	.L57
.L32:
	andl	$1, %r10d
	je	.L33
	imulq	%rbx, %rax
.L33:
	cqto
	idivq	%r11
	andl	$1, %r8d
	movslq	%edx, %rax
	je	.L34
	imulq	%r9, %rax
.L34:
	cqto
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	idivq	%r11
	movl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L57:
	.cfi_restore_state
	movq	%rdx, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r11
	xorl	%eax, %eax
	movq	%rdx, %rdi
	call	p.part.0
	cltq
	jmp	.L32
	.cfi_endproc
.LFE0:
	.size	p, .-p
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$120, %rsp
	.cfi_def_cfa_offset 176
	movq	$1, m(%rip)
	movl	%edi, 108(%rsp)
	cmpl	$262143, %edi
	jg	.L59
	movslq	%edi, %r10
	leaq	m(%rip), %rbx
	movl	%edi, %r9d
	movq	M(%rip), %rsi
	leaq	0(,%r10,8), %rax
	movq	%r10, %rcx
	leaq	8(%rbx), %rdi
	leaq	-8(%rbx,%rax), %rdx
	addq	%rbx, %rax
	cmpl	$262141, %r9d
	jg	.L60
	movl	$262141, %r8d
	leaq	2(%r10), %rbx
	movq	(%rdx), %r11
	movq	(%rax), %rcx
	subq	%r9, %r8
	andl	$4294967294, %r8d
	addq	%rbx, %r8
	jmp	.L61
	.p2align 4,,10
	.p2align 3
.L118:
	addq	$2, %rbx
.L61:
	movq	%r11, %rax
	leal	2(%r10), %r9d
	imulq	%r10, %rax
	cqto
	idivq	%rsi
	leaq	1(%r10), %rax
	imulq	%rcx, %rax
	movq	%rdx, %r11
	cqto
	idivq	%rsi
	movq	%r11, %xmm0
	movq	%rdx, %xmm1
	movq	%rdx, %rcx
	punpcklqdq	%xmm1, %xmm0
	movups	%xmm0, (%rdi,%r10,8)
	movq	%rbx, %r10
	cmpq	%rbx, %r8
	jne	.L118
	movslq	%r9d, %rcx
.L60:
	leaq	-8+m(%rip), %r8
	.p2align 4,,10
	.p2align 3
.L62:
	movq	(%r8,%rcx,8), %rax
	imulq	%rcx, %rax
	cqto
	idivq	%rsi
	movq	%rdx, (%rdi,%rcx,8)
	addq	$1, %rcx
	cmpl	$262143, %ecx
	jle	.L62
	movl	$262144, 108(%rsp)
.L59:
	leaq	w(%rip), %rdx
	leaq	108(%rsp), %r8
	xorl	%eax, %eax
	leaq	a(%rip), %rcx
	leaq	h(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	call	scanf@PLT
	movslq	108(%rsp), %rdx
	movq	w(%rip), %r11
	movq	%rdx, %r10
	movq	%r11, (%rsp)
	cmpq	%r11, %rdx
	jge	.L63
	movq	a(%rip), %rax
	movq	M(%rip), %r8
	leaq	m(%rip), %r14
	movq	h(%rip), %r15
	movq	s(%rip), %r9
	leaq	-2(%r8), %rbp
	subq	%rax, %r15
	movq	%rbp, %rcx
	movq	-8(%r14,%r15,8), %rsi
	shrq	$63, %rcx
	addq	%rbp, %rcx
	movq	%rsi, %rbx
	movq	%rcx, %rdi
	movq	%rsi, 56(%rsp)
	leaq	1(%r8), %rcx
	imulq	%rsi, %rbx
	movq	%rbp, %rsi
	sarq	%rdi
	andl	$1, %esi
	testq	%rbp, %rbp
	movq	%rdi, 8(%rsp)
	cmovns	%rbp, %rcx
	movq	%rsi, 16(%rsp)
	leaq	5(%r8), %rsi
	movq	%rbx, 72(%rsp)
	movq	%rcx, %rbx
	leaq	(%rax,%r11), %rcx
	sarq	$2, %rbx
	testq	%rbp, %rbp
	cmovns	%rbp, %rsi
	movq	%rbx, 32(%rsp)
	andl	$1, %ebx
	andl	$1, %edi
	movq	%rbx, 64(%rsp)
	addl	$1, %r10d
	leaq	-1(%rax), %rbx
	subq	%rdx, %rcx
	negq	%rax
	movq	%rbx, 40(%rsp)
	sarq	$3, %rsi
	movslq	%r10d, %r10
	movq	%rdi, 24(%rsp)
	leaq	-16(%r14,%rcx,8), %r11
	leaq	(%r14,%rdx,8), %rbx
	movq	%rax, 48(%rsp)
	jmp	.L90
	.p2align 4,,10
	.p2align 3
.L64:
	movq	%r14, %rdx
	movl	%r10d, 108(%rsp)
	shrq	$63, %rdx
	leaq	(%r14,%rdx), %rax
	andl	$1, %eax
	subq	%rdx, %rax
	imulq	(%r11), %rax
	movq	%rax, %rcx
	shrq	$63, %rcx
	addq	%rcx, %rax
	andl	$1, %eax
	subq	%rcx, %rax
.L92:
	cqto
	subq	$8, %r11
	addq	$8, %rbx
	idivq	%r8
	leaq	(%rdx,%r9), %rax
	cqto
	idivq	%r8
	leaq	1(%r10), %rax
	movq	%rdx, s(%rip)
	movq	%rdx, %r9
	cmpq	%r10, (%rsp)
	je	.L91
	movq	%rax, %r10
.L90:
	movq	-8(%rbx,%r15,8), %r14
	movl	%r10d, %r12d
	testq	%rbp, %rbp
	je	.L64
	cmpq	$0, 8(%rsp)
	jne	.L139
	cmpq	$0, 16(%rsp)
	je	.L140
	movq	56(%rsp), %rax
	movq	40(%rsp), %rdi
	cqto
	idivq	%r8
	movslq	%edx, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r8
	movq	(%rbx), %rax
	movq	%rdx, %rcx
	cqto
	idivq	%r8
	movq	%rcx, %rax
	movslq	%edx, %rdx
	imulq	%rdx, %rax
	cqto
	idivq	%r8
	movq	(%r11), %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r8
	leaq	m(%rip), %rax
	movq	(%rax,%rdi,8), %r13
	movq	%rdx, %r14
.L78:
	movq	%r13, %rax
	movl	%r12d, 108(%rsp)
	cqto
	idivq	%r8
	movslq	%edx, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r8
	movq	48(%rsp), %rax
	movq	8(%r11,%rax,8), %r12
	movl	$1, %eax
	movq	%rdx, %r13
.L84:
	imulq	%r12, %rax
.L89:
	cqto
	idivq	%r8
	movslq	%edx, %rax
	imulq	%r13, %rax
	jmp	.L92
.L63:
	movq	s(%rip), %r9
.L91:
	movq	%r9, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	addq	$120, %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
.L140:
	.cfi_restore_state
	movl	$1, %eax
	cqto
	idivq	%r8
	movq	%rdx, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r8
	movl	$1, %eax
	movq	%rdx, %r14
.L76:
	cqto
	movq	40(%rsp), %rdi
	idivq	%r8
	movq	%rdx, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r8
	movq	(%r11), %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r8
	leaq	m(%rip), %rax
	cmpq	$0, 8(%rsp)
	movq	(%rax,%rdi,8), %r13
	movl	$1, %eax
	movq	%rdx, %r14
	jne	.L77
.L79:
	cqto
	movl	%r12d, 108(%rsp)
	idivq	%r8
	movq	%rdx, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r8
	movq	48(%rsp), %rax
	movq	8(%r11,%rax,8), %r12
	cmpq	$0, 8(%rsp)
	movl	$1, %eax
	movq	%rdx, %r13
	je	.L89
.L96:
	movq	%r12, %rax
	imulq	%r12, %rax
	cqto
	idivq	%r8
	cmpq	$0, 32(%rsp)
	movq	%rdx, %r14
	movl	$1, %edx
	jne	.L141
.L85:
	cmpq	$0, 24(%rsp)
	movslq	%edx, %rax
	movl	$1, %edx
	cmove	%rdx, %r14
	imulq	%r14, %rax
	cqto
	idivq	%r8
	cmpq	$0, 16(%rsp)
	movslq	%edx, %rax
	je	.L89
	jmp	.L84
	.p2align 4,,10
	.p2align 3
.L139:
	movq	72(%rsp), %rax
	cqto
	idivq	%r8
	cmpq	$0, 32(%rsp)
	movq	%rdx, %r13
	movl	$1, %edx
	jne	.L142
.L66:
	cmpq	$0, 24(%rsp)
	movslq	%edx, %rax
	movl	$1, %edx
	cmove	%rdx, %r13
	imulq	%r13, %rax
	cqto
	idivq	%r8
	cmpq	$0, 16(%rsp)
	movslq	%edx, %rdi
	jne	.L70
	movq	%rdi, %rax
	movq	(%rbx), %rcx
	cqto
	idivq	%r8
	movq	%rdx, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r8
	movq	%rcx, %rax
	imulq	%rcx, %rax
	movq	%rdx, %r14
	cqto
	idivq	%r8
	movq	%rdx, %r13
.L95:
	cmpq	$0, 32(%rsp)
	movl	$1, %edx
	jne	.L143
.L72:
	cmpq	$0, 24(%rsp)
	movslq	%edx, %rax
	movl	$1, %edx
	cmove	%rdx, %r13
	imulq	%r13, %rax
	cqto
	idivq	%r8
	cmpq	$0, 16(%rsp)
	movslq	%edx, %rax
	je	.L76
	imulq	%rcx, %rax
	movq	40(%rsp), %rdi
	cqto
	idivq	%r8
	movslq	%edx, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r8
	movq	(%r11), %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r8
	leaq	m(%rip), %rax
	cmpq	$0, 8(%rsp)
	movq	(%rax,%rdi,8), %r13
	movq	%rdx, %r14
	je	.L78
.L77:
	movq	%r13, %rax
	imulq	%r13, %rax
	cqto
	idivq	%r8
	cmpq	$0, 32(%rsp)
	movq	%rdx, %rcx
	movl	$1, %edx
	jne	.L144
.L80:
	cmpq	$0, 24(%rsp)
	movslq	%edx, %rax
	movl	$1, %edx
	cmove	%rdx, %rcx
	imulq	%rcx, %rax
	cqto
	idivq	%r8
	cmpq	$0, 16(%rsp)
	movslq	%edx, %rax
	je	.L79
	imulq	%r13, %rax
	movl	%r12d, 108(%rsp)
	cqto
	idivq	%r8
	movslq	%edx, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r8
	movq	48(%rsp), %rax
	movq	8(%r11,%rax,8), %r12
	cmpq	$0, 8(%rsp)
	movq	%rdx, %r13
	jne	.L96
	movl	$1, %eax
	jmp	.L84
.L70:
	movq	(%rbx), %rcx
	movq	%rcx, %rax
	imulq	%rcx, %rax
	cqto
	idivq	%r8
	movq	56(%rsp), %rax
	imulq	%rdi, %rax
	movq	%rdx, %r13
	cqto
	idivq	%r8
	movslq	%edx, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r8
	movq	%rdx, %r14
	jmp	.L95
.L142:
	movq	%r13, %rax
	imulq	%r13, %rax
	cqto
	idivq	%r8
	movl	$1, %eax
	movq	%rdx, %rcx
	testq	%rsi, %rsi
	jne	.L145
.L67:
	cmpq	$0, 64(%rsp)
	movl	$1, %edx
	cltq
	cmove	%rdx, %rcx
	imulq	%rcx, %rax
	cqto
	idivq	%r8
	jmp	.L66
.L143:
	movq	%r13, %rax
	imulq	%r13, %rax
	cqto
	idivq	%r8
	movl	$1, %eax
	movq	%rdx, 80(%rsp)
	testq	%rsi, %rsi
	jne	.L146
.L73:
	cmpq	$0, 64(%rsp)
	movl	$1, %edx
	cltq
	cmovne	80(%rsp), %rdx
	imulq	%rdx, %rax
	cqto
	idivq	%r8
	jmp	.L72
.L144:
	movq	%rcx, %rax
	imulq	%rcx, %rax
	cqto
	idivq	%r8
	movl	$1, %eax
	movq	%rdx, 80(%rsp)
	testq	%rsi, %rsi
	jne	.L147
.L81:
	cmpq	$0, 64(%rsp)
	movl	$1, %edx
	cltq
	cmovne	80(%rsp), %rdx
	imulq	%rdx, %rax
	cqto
	idivq	%r8
	jmp	.L80
.L141:
	movq	%r14, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r8
	movl	$1, %eax
	movq	%rdx, %rcx
	testq	%rsi, %rsi
	jne	.L148
.L86:
	cmpq	$0, 64(%rsp)
	movl	$1, %edx
	cltq
	cmove	%rdx, %rcx
	imulq	%rcx, %rax
	cqto
	idivq	%r8
	jmp	.L85
.L148:
	movq	%rdx, %rax
	movq	%rdx, 88(%rsp)
	imulq	%rdx, %rax
	movq	%rsi, 80(%rsp)
	cqto
	idivq	%r8
	xorl	%eax, %eax
	movq	%rdx, %rdi
	call	p.part.0
	movq	88(%rsp), %rcx
	movq	80(%rsp), %rsi
	jmp	.L86
.L147:
	movq	%rdx, %rax
	movq	%rcx, 96(%rsp)
	imulq	%rdx, %rax
	movq	%rsi, 88(%rsp)
	cqto
	idivq	%r8
	xorl	%eax, %eax
	movq	%rdx, %rdi
	call	p.part.0
	movq	96(%rsp), %rcx
	movq	88(%rsp), %rsi
	jmp	.L81
.L146:
	movq	%rdx, %rax
	movq	%rcx, 96(%rsp)
	imulq	%rdx, %rax
	movq	%rsi, 88(%rsp)
	cqto
	idivq	%r8
	xorl	%eax, %eax
	movq	%rdx, %rdi
	call	p.part.0
	movq	96(%rsp), %rcx
	movq	88(%rsp), %rsi
	jmp	.L73
.L145:
	movq	%rdx, %rax
	movq	%rdx, 88(%rsp)
	imulq	%rdx, %rax
	movq	%rsi, 80(%rsp)
	cqto
	idivq	%r8
	xorl	%eax, %eax
	movq	%rdx, %rdi
	call	p.part.0
	movq	88(%rsp), %rcx
	movq	80(%rsp), %rsi
	jmp	.L67
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	s
	.bss
	.align 8
	.type	s, @object
	.size	s, 8
s:
	.zero	8
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	w
	.align 8
	.type	w, @object
	.size	w, 8
w:
	.zero	8
	.globl	h
	.align 8
	.type	h, @object
	.size	h, 8
h:
	.zero	8
	.globl	m
	.align 32
	.type	m, @object
	.size	m, 2097152
m:
	.zero	2097152
	.globl	M
	.data
	.align 8
	.type	M, @object
	.size	M, 8
M:
	.quad	1000000007
	.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	p.part.0, @function
p.part.0:
.LFB2:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rsi, %rdx
	movl	$1, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	shrq	$63, %rdx
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	addq	%rsi, %rdx
	movq	%rdi, %r13
	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
	movq	%rsi, %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	sarq	%rdx
	movq	M(%rip), %r12
	jne	.L26
.L2:
	andl	$1, %ebx
	je	.L7
	imulq	%r13, %rax
.L7:
	cqto
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	idivq	%r12
	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
	movl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	movq	%rdi, %rax
	movq	%rdx, %rbp
	imulq	%rdi, %rax
	cqto
	idivq	%r12
	testq	%rsi, %rsi
	movl	$1, %eax
	movq	%rdx, %r15
	leaq	3(%rsi), %rdx
	cmovns	%rsi, %rdx
	sarq	$2, %rdx
	movq	%rdx, %r14
	jne	.L27
.L3:
	andl	$1, %ebp
	je	.L6
	imulq	%r15, %rax
.L6:
	cqto
	idivq	%r12
	movslq	%edx, %rax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L27:
	movq	%r15, %rax
	leaq	7(%rsi), %rsi
	imulq	%r15, %rax
	cqto
	idivq	%r12
	testq	%rbx, %rbx
	movl	$1, %eax
	cmovns	%rbx, %rsi
	sarq	$3, %rsi
	movq	%rdx, %rcx
	jne	.L28
.L4:
	andl	$1, %r14d
	je	.L5
	imulq	%rcx, %rax
.L5:
	cqto
	idivq	%r12
	movslq	%edx, %rax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L28:
	movq	%rdx, %rax
	movq	%rdx, 8(%rsp)
	imulq	%rdx, %rax
	cqto
	idivq	%r12
	xorl	%eax, %eax
	movq	%rdx, %rdi
	call	p.part.0
	movq	8(%rsp), %rcx
	cltq
	jmp	.L4
	.cfi_endproc
.LFE2:
	.size	p.part.0, .-p.part.0
	.p2align 4
	.globl	p
	.type	p, @function
p:
.LFB0:
	.cfi_startproc
	endbr64
	testq	%rsi, %rsi
	jne	.L55
	movl	$1, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L55:
	movq	%rsi, %rdx
	movq	M(%rip), %r11
	movq	%rdi, %r9
	movq	%rsi, %r8
	shrq	$63, %rdx
	movl	$1, %eax
	addq	%rsi, %rdx
	sarq	%rdx
	movq	%rdx, %r10
	jne	.L56
	andl	$1, %r8d
	je	.L51
	imulq	%rdi, %rax
.L51:
	cqto
	idivq	%r11
	movl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L56:
	movq	%rdi, %rax
	leaq	3(%rsi), %rsi
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	imulq	%rdi, %rax
	cqto
	idivq	%r11
	testq	%r8, %r8
	movl	$1, %eax
	cmovns	%r8, %rsi
	sarq	$2, %rsi
	movq	%rdx, %rbx
	jne	.L57
.L32:
	andl	$1, %r10d
	je	.L33
	imulq	%rbx, %rax
.L33:
	cqto
	idivq	%r11
	andl	$1, %r8d
	movslq	%edx, %rax
	je	.L34
	imulq	%r9, %rax
.L34:
	cqto
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	idivq	%r11
	movl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L57:
	.cfi_restore_state
	movq	%rdx, %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r11
	xorl	%eax, %eax
	movq	%rdx, %rdi
	call	p.part.0
	cltq
	jmp	.L32
	.cfi_endproc
.LFE0:
	.size	p, .-p
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$120, %rsp
	.cfi_def_cfa_offset 176
	movq	$1, m(%rip)
	movl	%edi, 108(%rsp)
	cmpl	$262143, %edi
	jg	.L59
	movslq	%edi, %r10
	leaq	m(%rip), %rbx
	movl	%edi, %r9d
	movq	M(%rip), %rsi
	leaq	0(,%r10,8), %rax
	movq	%r10, %rcx
	leaq	8(%rbx), %rdi
	leaq	-8(%rbx,%rax), %rdx
	addq	%rbx, %rax
	cmpl	$262141, %r9d
	jg	.L60
	movl	$262141, %r8d
	leaq	2(%r10), %rbx
	movq	(%rdx), %r11
	movq	(%rax), %rcx
	subq	%r9, %r8
	andl	$4294967294, %r8d
	addq	%rbx, %r8
	jmp	.L61
	.p2align 4,,10
	.p2align 3
.L118:
	addq	$2, %rbx
.L61:
	movq	%r11, %rax
	leal	2(%r10), %r9d
	imulq	%r10, %rax
	cqto
	idivq	%rsi
	leaq	1(%r10), %rax
	imulq	%rcx, %rax
	movq	%rdx, %r11
	cqto
	idivq	%rsi
	movq	%r11, %xmm0
	movq	%rdx, %xmm1
	movq	%rdx, %rcx
	punpcklqdq	%xmm1, %xmm0
	movups	%xmm0, (%rdi,%r10,8)
	movq	%rbx, %r10
	cmpq	%rbx, %r8
	jne	.L118
	movslq	%r9d, %rcx
.L60:
	leaq	-8+m(%rip), %r8
	.p2align 4,,10
	.p2align 3
.L62:
	movq	(%r8,%rcx,8), %rax
	imulq	%rcx, %rax
	cqto
	idivq	%rsi
	movq	%rdx, (%rdi,%rcx,8)
	addq	$1, %rcx
	cmpl	$262143, %ecx
	jle	.L62
	movl	$262144, 108(%rsp)
.L59:
	leaq	w(%rip), %rdx
	leaq	108(%rsp), %r8
	xorl	%eax, %eax
	leaq	a(%rip), %rcx
	leaq	h(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	call	scanf@PLT
	movslq	108(%rsp), %rdx
	movq	w(%rip), %r11
	movq	%rdx, %r10
	movq	%r11, (%rsp)
	cmpq	%r11, %rdx
	jge	.L63
	movq	a(%rip), %rax
	movq	M(%rip), %r8
	leaq	m(%rip), %r14
	movq	h(%rip), %r15
	movq	s(%rip), %r9
	leaq	-2(%r8), %rbp
	subq	%rax, %r15
	movq	%rbp, %rcx
	movq	-8(%r14,%r15,8), %rsi
	shrq	$63, %rcx
	addq	%rbp, %rcx
	movq	%rsi, %rbx
	movq	%rcx, %rdi
	movq	%rsi, 56(%rsp)
	leaq	1(%r8), %rcx
	imulq	%rsi, %rbx
	movq	%rbp, %rsi
	sarq	%rdi
	andl	$1, %esi
	testq	%rbp, %rbp
	movq	%rdi, 8(%rsp)
	cmovns	%rbp, %rcx
	movq	%rsi, 16(%rsp)
	leaq	5(%r8), %rsi
	movq	%rbx, 72(%rsp)
	movq	%rcx, %rbx
	leaq	(%rax,%r11), %rcx
	sarq	$2, %rbx
	testq	%rbp, %rbp
	cmovns	%rbp, %rsi
	movq	%rbx, 32(%rsp)
	andl	$1, %ebx
	andl	$1, %edi
	movq	%rbx, 64(%rsp)
	addl	$1, %r10d
	leaq	-1(%rax), %rbx
	subq	%rdx, %rcx
	negq	%rax
	movq	%rbx, 40(%rsp)
	sarq	$3, %rsi
	movslq	%r10d, %r10
	movq	%rdi, 24(%rsp)
	leaq	-16(%r14,%rcx,8), %r11
	leaq	(%r14,%rdx,8), %rbx
	movq	%rax, 48(%rsp)
	jmp	.L90
	.p2align 4,,10
	.p2align 3
.L64:
	movq	%r14, %rdx
	movl	%r10d, 108(%rsp)
	shrq	$63, %rdx
	leaq	(%r14,%rdx), %rax
	andl	$1, %eax
	subq	%rdx, %rax
	imulq	(%r11), %rax
	movq	%rax, %rcx
	shrq	$63, %rcx
	addq	%rcx, %rax
	andl	$1, %eax
	subq	%rcx, %rax
.L92:
	cqto
	subq	$8, %r11
	addq	$8, %rbx
	idivq	%r8
	leaq	(%rdx,%r9), %rax
	cqto
	idivq	%r8
	leaq	1(%r10), %rax
	movq	%rdx, s(%rip)
	movq	%rdx, %r9
	cmpq	%r10, (%rsp)
	je	.L91
	movq	%rax, %r10
.L90:
	movq	-8(%rbx,%r15,8), %r14
	movl	%r10d, %r12d
	testq	%rbp, %rbp
	je	.L64
	cmpq	$0, 8(%rsp)
	jne	.L139
	cmpq	$0, 16(%rsp)
	je	.L140
	movq	56(%rsp), %rax
	movq	40(%rsp), %rdi
	cqto
	idivq	%r8
	movslq	%edx, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r8
	movq	(%rbx), %rax
	movq	%rdx, %rcx
	cqto
	idivq	%r8
	movq	%rcx, %rax
	movslq	%edx, %rdx
	imulq	%rdx, %rax
	cqto
	idivq	%r8
	movq	(%r11), %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r8
	leaq	m(%rip), %rax
	movq	(%rax,%rdi,8), %r13
	movq	%rdx, %r14
.L78:
	movq	%r13, %rax
	movl	%r12d, 108(%rsp)
	cqto
	idivq	%r8
	movslq	%edx, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r8
	movq	48(%rsp), %rax
	movq	8(%r11,%rax,8), %r12
	movl	$1, %eax
	movq	%rdx, %r13
.L84:
	imulq	%r12, %rax
.L89:
	cqto
	idivq	%r8
	movslq	%edx, %rax
	imulq	%r13, %rax
	jmp	.L92
.L63:
	movq	s(%rip), %r9
.L91:
	movq	%r9, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	addq	$120, %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
.L140:
	.cfi_restore_state
	movl	$1, %eax
	cqto
	idivq	%r8
	movq	%rdx, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r8
	movl	$1, %eax
	movq	%rdx, %r14
.L76:
	cqto
	movq	40(%rsp), %rdi
	idivq	%r8
	movq	%rdx, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r8
	movq	(%r11), %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r8
	leaq	m(%rip), %rax
	cmpq	$0, 8(%rsp)
	movq	(%rax,%rdi,8), %r13
	movl	$1, %eax
	movq	%rdx, %r14
	jne	.L77
.L79:
	cqto
	movl	%r12d, 108(%rsp)
	idivq	%r8
	movq	%rdx, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r8
	movq	48(%rsp), %rax
	movq	8(%r11,%rax,8), %r12
	cmpq	$0, 8(%rsp)
	movl	$1, %eax
	movq	%rdx, %r13
	je	.L89
.L96:
	movq	%r12, %rax
	imulq	%r12, %rax
	cqto
	idivq	%r8
	cmpq	$0, 32(%rsp)
	movq	%rdx, %r14
	movl	$1, %edx
	jne	.L141
.L85:
	cmpq	$0, 24(%rsp)
	movslq	%edx, %rax
	movl	$1, %edx
	cmove	%rdx, %r14
	imulq	%r14, %rax
	cqto
	idivq	%r8
	cmpq	$0, 16(%rsp)
	movslq	%edx, %rax
	je	.L89
	jmp	.L84
	.p2align 4,,10
	.p2align 3
.L139:
	movq	72(%rsp), %rax
	cqto
	idivq	%r8
	cmpq	$0, 32(%rsp)
	movq	%rdx, %r13
	movl	$1, %edx
	jne	.L142
.L66:
	cmpq	$0, 24(%rsp)
	movslq	%edx, %rax
	movl	$1, %edx
	cmove	%rdx, %r13
	imulq	%r13, %rax
	cqto
	idivq	%r8
	cmpq	$0, 16(%rsp)
	movslq	%edx, %rdi
	jne	.L70
	movq	%rdi, %rax
	movq	(%rbx), %rcx
	cqto
	idivq	%r8
	movq	%rdx, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r8
	movq	%rcx, %rax
	imulq	%rcx, %rax
	movq	%rdx, %r14
	cqto
	idivq	%r8
	movq	%rdx, %r13
.L95:
	cmpq	$0, 32(%rsp)
	movl	$1, %edx
	jne	.L143
.L72:
	cmpq	$0, 24(%rsp)
	movslq	%edx, %rax
	movl	$1, %edx
	cmove	%rdx, %r13
	imulq	%r13, %rax
	cqto
	idivq	%r8
	cmpq	$0, 16(%rsp)
	movslq	%edx, %rax
	je	.L76
	imulq	%rcx, %rax
	movq	40(%rsp), %rdi
	cqto
	idivq	%r8
	movslq	%edx, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r8
	movq	(%r11), %rax
	imulq	%rdx, %rax
	cqto
	idivq	%r8
	leaq	m(%rip), %rax
	cmpq	$0, 8(%rsp)
	movq	(%rax,%rdi,8), %r13
	movq	%rdx, %r14
	je	.L78
.L77:
	movq	%r13, %rax
	imulq	%r13, %rax
	cqto
	idivq	%r8
	cmpq	$0, 32(%rsp)
	movq	%rdx, %rcx
	movl	$1, %edx
	jne	.L144
.L80:
	cmpq	$0, 24(%rsp)
	movslq	%edx, %rax
	movl	$1, %edx
	cmove	%rdx, %rcx
	imulq	%rcx, %rax
	cqto
	idivq	%r8
	cmpq	$0, 16(%rsp)
	movslq	%edx, %rax
	je	.L79
	imulq	%r13, %rax
	movl	%r12d, 108(%rsp)
	cqto
	idivq	%r8
	movslq	%edx, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r8
	movq	48(%rsp), %rax
	movq	8(%r11,%rax,8), %r12
	cmpq	$0, 8(%rsp)
	movq	%rdx, %r13
	jne	.L96
	movl	$1, %eax
	jmp	.L84
.L70:
	movq	(%rbx), %rcx
	movq	%rcx, %rax
	imulq	%rcx, %rax
	cqto
	idivq	%r8
	movq	56(%rsp), %rax
	imulq	%rdi, %rax
	movq	%rdx, %r13
	cqto
	idivq	%r8
	movslq	%edx, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r8
	movq	%rdx, %r14
	jmp	.L95
.L142:
	movq	%r13, %rax
	imulq	%r13, %rax
	cqto
	idivq	%r8
	movl	$1, %eax
	movq	%rdx, %rcx
	testq	%rsi, %rsi
	jne	.L145
.L67:
	cmpq	$0, 64(%rsp)
	movl	$1, %edx
	cltq
	cmove	%rdx, %rcx
	imulq	%rcx, %rax
	cqto
	idivq	%r8
	jmp	.L66
.L143:
	movq	%r13, %rax
	imulq	%r13, %rax
	cqto
	idivq	%r8
	movl	$1, %eax
	movq	%rdx, 80(%rsp)
	testq	%rsi, %rsi
	jne	.L146
.L73:
	cmpq	$0, 64(%rsp)
	movl	$1, %edx
	cltq
	cmovne	80(%rsp), %rdx
	imulq	%rdx, %rax
	cqto
	idivq	%r8
	jmp	.L72
.L144:
	movq	%rcx, %rax
	imulq	%rcx, %rax
	cqto
	idivq	%r8
	movl	$1, %eax
	movq	%rdx, 80(%rsp)
	testq	%rsi, %rsi
	jne	.L147
.L81:
	cmpq	$0, 64(%rsp)
	movl	$1, %edx
	cltq
	cmovne	80(%rsp), %rdx
	imulq	%rdx, %rax
	cqto
	idivq	%r8
	jmp	.L80
.L141:
	movq	%r14, %rax
	imulq	%r14, %rax
	cqto
	idivq	%r8
	movl	$1, %eax
	movq	%rdx, %rcx
	testq	%rsi, %rsi
	jne	.L148
.L86:
	cmpq	$0, 64(%rsp)
	movl	$1, %edx
	cltq
	cmove	%rdx, %rcx
	imulq	%rcx, %rax
	cqto
	idivq	%r8
	jmp	.L85
.L148:
	movq	%rdx, %rax
	movq	%rdx, 88(%rsp)
	imulq	%rdx, %rax
	movq	%rsi, 80(%rsp)
	cqto
	idivq	%r8
	xorl	%eax, %eax
	movq	%rdx, %rdi
	call	p.part.0
	movq	88(%rsp), %rcx
	movq	80(%rsp), %rsi
	jmp	.L86
.L147:
	movq	%rdx, %rax
	movq	%rcx, 96(%rsp)
	imulq	%rdx, %rax
	movq	%rsi, 88(%rsp)
	cqto
	idivq	%r8
	xorl	%eax, %eax
	movq	%rdx, %rdi
	call	p.part.0
	movq	96(%rsp), %rcx
	movq	88(%rsp), %rsi
	jmp	.L81
.L146:
	movq	%rdx, %rax
	movq	%rcx, 96(%rsp)
	imulq	%rdx, %rax
	movq	%rsi, 88(%rsp)
	cqto
	idivq	%r8
	xorl	%eax, %eax
	movq	%rdx, %rdi
	call	p.part.0
	movq	96(%rsp), %rcx
	movq	88(%rsp), %rsi
	jmp	.L73
.L145:
	movq	%rdx, %rax
	movq	%rdx, 88(%rsp)
	imulq	%rdx, %rax
	movq	%rsi, 80(%rsp)
	cqto
	idivq	%r8
	xorl	%eax, %eax
	movq	%rdx, %rdi
	call	p.part.0
	movq	88(%rsp), %rcx
	movq	80(%rsp), %rsi
	jmp	.L67
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	s
	.bss
	.align 8
	.type	s, @object
	.size	s, 8
s:
	.zero	8
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	w
	.align 8
	.type	w, @object
	.size	w, 8
w:
	.zero	8
	.globl	h
	.align 8
	.type	h, @object
	.size	h, 8
h:
	.zero	8
	.globl	m
	.align 32
	.type	m, @object
	.size	m, 2097152
m:
	.zero	2097152
	.globl	M
	.data
	.align 8
	.type	M, @object
	.size	M, 8
M:
	.quad	1000000007
	.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:

long M=1e9+7,m[1<<18],h,w,a,s;p(a,b)long a,b;{return b?p(a*a%M,b/2)*(b%2?a:1)%M:1;}main(i){for(*m=1;i<1<<18;)m[i]=m[i-1]*i++%M;for(scanf("%d%d%d%d",&h,&w,&a,&i);i<w;)s=(s+m[h-a-1+i]*p(m[h-a-1],M-2)%M*p(m[i],M-2)%M*m[a+w-i-2]%M*p(m[a-1],M-2)%M*p(m[w-1-i++],M-2)%M)%M;printf("%d",s);}
10 7 6 4
 10 8 6 4
 17 8 6 4
 17 8 6 6
 2 4 1 1
 100000 100000 99999 72298
 100000 100000 43938 55555
 10 13 6 4
 17 8 5 6
 3 4 1 1

0 0 0 0 0 0 0 0 0 0
Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
long M=1e9+7,m[1<<18],h,w,a,s;p(a,b)long a,b;{return b?p(a*a%M,b/2)*(b%2?a:1)%M:1;}main(i){for(*m=1;i<1<<18;)m[i]=m[i-1]*i++%M;for(scanf("%d%d%d%d",&h,&w,&a,&i);i<w;)s=(s+m[h-a-1+i]*p(m[h-a-1],M-2)%M*p(m[i],M-2)%M*m[a+w-i-2]%M*p(m[a-1],M-2)%M*p(m[w-1-i++],M-2)%M)%M;printf("%d",s);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	M
	.data
	.align 8
	.type	M, @object
	.size	M, 8
M:
	.quad	1000000007
	.globl	m
	.bss
	.align 32
	.type	m, @object
	.size	m, 2097152
m:
	.zero	2097152
	.globl	h
	.align 8
	.type	h, @object
	.size	h, 8
h:
	.zero	8
	.globl	w
	.align 8
	.type	w, @object
	.size	w, 8
w:
	.zero	8
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	s
	.align 8
	.type	s, @object
	.size	s, 8
s:
	.zero	8
	.text
	.globl	p
	.type	p, @function
p:
.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)
	movq	%rsi, -16(%rbp)
	cmpq	$0, -16(%rbp)
	je	.L2
	movq	-16(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rsi
	movq	-8(%rbp), %rax
	imulq	%rax, %rax
	movq	M(%rip), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	p
	movslq	%eax, %rdx
	movq	-16(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L3
	movq	-8(%rbp), %rax
	jmp	.L4
.L3:
	movl	$1, %eax
.L4:
	imulq	%rdx, %rax
	movq	M(%rip), %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	p, .-p
	.section	.rodata
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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	$24, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	movq	$1, m(%rip)
	jmp	.L8
.L9:
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	m(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -20(%rbp)
	cltq
	imulq	%rcx, %rax
	movq	M(%rip), %rsi
	movl	-20(%rbp), %ecx
	cqto
	idivq	%rsi
	movq	%rdx, %rsi
	movslq	%ecx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	m(%rip), %rax
	movq	%rsi, (%rdx,%rax)
.L8:
	movl	-20(%rbp), %eax
	cmpl	$262143, %eax
	jle	.L9
	leaq	-20(%rbp), %rax
	movq	%rax, %r8
	leaq	a(%rip), %rax
	movq	%rax, %rcx
	leaq	w(%rip), %rax
	movq	%rax, %rdx
	leaq	h(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	jmp	.L10
.L11:
	movq	h(%rip), %rax
	movq	a(%rip), %rdx
	subq	%rdx, %rax
	leaq	-1(%rax), %rdx
	movl	-20(%rbp), %eax
	cltq
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	m(%rip), %rax
	movq	(%rdx,%rax), %rbx
	movq	M(%rip), %rax
	leaq	-2(%rax), %rdx
	movq	h(%rip), %rax
	movq	a(%rip), %rcx
	subq	%rcx, %rax
	subq	$1, %rax
	leaq	0(,%rax,8), %rcx
	leaq	m(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	p
	cltq
	imulq	%rbx, %rax
	movq	M(%rip), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rbx
	movq	M(%rip), %rax
	leaq	-2(%rax), %rdx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	m(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	p
	cltq
	imulq	%rbx, %rax
	movq	M(%rip), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rsi
	movq	a(%rip), %rdx
	movq	w(%rip), %rax
	addq	%rax, %rdx
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	subq	$2, %rax
	leaq	0(,%rax,8), %rdx
	leaq	m(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	%rsi, %rax
	movq	M(%rip), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rbx
	movq	M(%rip), %rax
	leaq	-2(%rax), %rdx
	movq	a(%rip), %rax
	subq	$1, %rax
	leaq	0(,%rax,8), %rcx
	leaq	m(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	p
	cltq
	imulq	%rbx, %rax
	movq	M(%rip), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rbx
	movq	M(%rip), %rax
	leaq	-2(%rax), %rdx
	movq	w(%rip), %rax
	leaq	-1(%rax), %rsi
	movl	-20(%rbp), %eax
	leal	1(%rax), %ecx
	movl	%ecx, -20(%rbp)
	movslq	%eax, %rcx
	movq	%rsi, %rax
	subq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	m(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	p
	cltq
	imulq	%rbx, %rax
	movq	M(%rip), %rcx
	cqto
	idivq	%rcx
	movq	s(%rip), %rax
	addq	%rdx, %rax
	movq	M(%rip), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	movq	%rax, s(%rip)
.L10:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	w(%rip), %rax
	cmpq	%rax, %rdx
	jl	.L11
	movq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	M
	.data
	.align 8
	.type	M, @object
	.size	M, 8
M:
	.quad	1000000007
	.globl	m
	.bss
	.align 32
	.type	m, @object
	.size	m, 2097152
m:
	.zero	2097152
	.globl	h
	.align 8
	.type	h, @object
	.size	h, 8
h:
	.zero	8
	.globl	w
	.align 8
	.type	w, @object
	.size	w, 8
w:
	.zero	8
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	s
	.align 8
	.type	s, @object
	.size	s, 8
s:
	.zero	8
	.text
	.globl	p
	.type	p, @function
p:
.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)
	movq	%rsi, -16(%rbp)
	cmpq	$0, -16(%rbp)
	je	.L2
	movq	-16(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rsi
	movq	-8(%rbp), %rax
	imulq	%rax, %rax
	movq	M(%rip), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	p
	movslq	%eax, %rdx
	movq	-16(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L3
	movq	-8(%rbp), %rax
	jmp	.L4
.L3:
	movl	$1, %eax
.L4:
	imulq	%rdx, %rax
	movq	M(%rip), %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	p, .-p
	.section	.rodata
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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	$24, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	movq	$1, m(%rip)
	jmp	.L8
.L9:
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	m(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -20(%rbp)
	cltq
	imulq	%rcx, %rax
	movq	M(%rip), %rsi
	movl	-20(%rbp), %ecx
	cqto
	idivq	%rsi
	movq	%rdx, %rsi
	movslq	%ecx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	m(%rip), %rax
	movq	%rsi, (%rdx,%rax)
.L8:
	movl	-20(%rbp), %eax
	cmpl	$262143, %eax
	jle	.L9
	leaq	-20(%rbp), %rax
	movq	%rax, %r8
	leaq	a(%rip), %rax
	movq	%rax, %rcx
	leaq	w(%rip), %rax
	movq	%rax, %rdx
	leaq	h(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	jmp	.L10
.L11:
	movq	h(%rip), %rax
	movq	a(%rip), %rdx
	subq	%rdx, %rax
	leaq	-1(%rax), %rdx
	movl	-20(%rbp), %eax
	cltq
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	m(%rip), %rax
	movq	(%rdx,%rax), %rbx
	movq	M(%rip), %rax
	leaq	-2(%rax), %rdx
	movq	h(%rip), %rax
	movq	a(%rip), %rcx
	subq	%rcx, %rax
	subq	$1, %rax
	leaq	0(,%rax,8), %rcx
	leaq	m(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	p
	cltq
	imulq	%rbx, %rax
	movq	M(%rip), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rbx
	movq	M(%rip), %rax
	leaq	-2(%rax), %rdx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	m(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	p
	cltq
	imulq	%rbx, %rax
	movq	M(%rip), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rsi
	movq	a(%rip), %rdx
	movq	w(%rip), %rax
	addq	%rax, %rdx
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	subq	$2, %rax
	leaq	0(,%rax,8), %rdx
	leaq	m(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	%rsi, %rax
	movq	M(%rip), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rbx
	movq	M(%rip), %rax
	leaq	-2(%rax), %rdx
	movq	a(%rip), %rax
	subq	$1, %rax
	leaq	0(,%rax,8), %rcx
	leaq	m(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	p
	cltq
	imulq	%rbx, %rax
	movq	M(%rip), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rbx
	movq	M(%rip), %rax
	leaq	-2(%rax), %rdx
	movq	w(%rip), %rax
	leaq	-1(%rax), %rsi
	movl	-20(%rbp), %eax
	leal	1(%rax), %ecx
	movl	%ecx, -20(%rbp)
	movslq	%eax, %rcx
	movq	%rsi, %rax
	subq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	m(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	p
	cltq
	imulq	%rbx, %rax
	movq	M(%rip), %rcx
	cqto
	idivq	%rcx
	movq	s(%rip), %rax
	addq	%rdx, %rax
	movq	M(%rip), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	movq	%rax, s(%rip)
.L10:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	w(%rip), %rax
	cmpq	%rax, %rdx
	jl	.L11
	movq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
