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

```c
long d[2][5001];A,x,i,j;main(n){for(scanf("%d%d",&n,&A),d[0][n*=A]=1;~scanf("%d",&x);i=!i)for(x-=A,j=2*n+1;j--;)d[!i][j]=d[i][j]+(j<x|j-x>2*n?0:d[i][j-x]);printf("%ld",d[i][n]-1);}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	A(%rip), %rdx
	xorl	%eax, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	x(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	d(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	scanf@PLT
	movl	12(%rsp), %eax
	imull	A(%rip), %eax
	movl	%eax, 12(%rsp)
	cltq
	movq	$1, (%rbx,%rax,8)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L16
	movslq	i(%rip), %r8
	movl	12(%rsp), %eax
	movl	x(%rip), %esi
	subl	A(%rip), %esi
	testl	%r8d, %r8d
	leal	(%rax,%rax), %r10d
	movl	%esi, x(%rip)
	movl	%esi, %r11d
	sete	%r9b
	sete	%r14b
	movslq	%r10d, %rcx
	notl	%r11d
	imulq	$5001, %r8, %rax
	movzbl	%r9b, %r9d
	movzbl	%r14b, %r14d
	imulq	$-40008, %r8, %r8
	imulq	$40008, %r9, %r9
	addq	%rcx, %rax
	leaq	(%rbx,%rax,8), %rdx
	movl	%r10d, %eax
	subl	%esi, %eax
	movslq	%eax, %r13
	subq	%rcx, %r13
	.p2align 4,,10
	.p2align 3
.L6:
	leal	(%rax,%rsi), %edi
	movq	(%rdx), %rcx
	cmpl	%edi, %esi
	leaq	(%r8,%rdx), %rdi
	jg	.L3
	cmpl	%eax, %r10d
	jl	.L3
	addq	(%rdx,%r13,8), %rcx
	subl	$1, %eax
	subq	$8, %rdx
	movq	%rcx, (%rdi,%r9)
	cmpl	%eax, %r11d
	jne	.L6
.L5:
	movl	$-1, j(%rip)
	movl	%r14d, i(%rip)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	subl	$1, %eax
	movq	%rcx, (%rdi,%r9)
	subq	$8, %rdx
	cmpl	%r11d, %eax
	jne	.L6
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	i(%rip), %rax
	movslq	12(%rsp), %rdx
	leaq	.LC2(%rip), %rdi
	imulq	$5001, %rax, %rax
	addq	%rdx, %rax
	movq	(%rbx,%rax,8), %rsi
	xorl	%eax, %eax
	subq	$1, %rsi
	call	printf@PLT
	addq	$16, %rsp
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	j
	.bss
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	A
	.align 4
	.type	A, @object
	.size	A, 4
A:
	.zero	4
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 80016
d:
	.zero	80016
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	A(%rip), %rdx
	xorl	%eax, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	x(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	d(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	scanf@PLT
	movl	12(%rsp), %eax
	imull	A(%rip), %eax
	movl	%eax, 12(%rsp)
	cltq
	movq	$1, (%rbx,%rax,8)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L16
	movslq	i(%rip), %r8
	movl	12(%rsp), %eax
	movl	x(%rip), %esi
	subl	A(%rip), %esi
	testl	%r8d, %r8d
	leal	(%rax,%rax), %r10d
	movl	%esi, x(%rip)
	movl	%esi, %r11d
	sete	%r9b
	sete	%r14b
	movslq	%r10d, %rcx
	notl	%r11d
	imulq	$5001, %r8, %rax
	movzbl	%r9b, %r9d
	movzbl	%r14b, %r14d
	imulq	$-40008, %r8, %r8
	imulq	$40008, %r9, %r9
	addq	%rcx, %rax
	leaq	(%rbx,%rax,8), %rdx
	movl	%r10d, %eax
	subl	%esi, %eax
	movslq	%eax, %r13
	subq	%rcx, %r13
	.p2align 4,,10
	.p2align 3
.L6:
	leal	(%rax,%rsi), %edi
	movq	(%rdx), %rcx
	cmpl	%edi, %esi
	leaq	(%r8,%rdx), %rdi
	jg	.L3
	cmpl	%eax, %r10d
	jl	.L3
	addq	(%rdx,%r13,8), %rcx
	subl	$1, %eax
	subq	$8, %rdx
	movq	%rcx, (%rdi,%r9)
	cmpl	%eax, %r11d
	jne	.L6
.L5:
	movl	$-1, j(%rip)
	movl	%r14d, i(%rip)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	subl	$1, %eax
	movq	%rcx, (%rdi,%r9)
	subq	$8, %rdx
	cmpl	%r11d, %eax
	jne	.L6
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	i(%rip), %rax
	movslq	12(%rsp), %rdx
	leaq	.LC2(%rip), %rdi
	imulq	$5001, %rax, %rax
	addq	%rdx, %rax
	movq	(%rbx,%rax,8), %rsi
	xorl	%eax, %eax
	subq	$1, %rsi
	call	printf@PLT
	addq	$16, %rsp
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	j
	.bss
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	A
	.align 4
	.type	A, @object
	.size	A, 4
A:
	.zero	4
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 80016
d:
	.zero	80016
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
rule
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	A(%rip), %rdx
	xorl	%eax, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	x(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	d(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	scanf@PLT
	movl	12(%rsp), %eax
	imull	A(%rip), %eax
	movl	%eax, 12(%rsp)
	cltq
	movq	$1, (%rbx,%rax,8)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L16
	movslq	i(%rip), %r8
	movl	12(%rsp), %eax
	movl	x(%rip), %esi
	subl	A(%rip), %esi
	testl	%r8d, %r8d
	leal	(%rax,%rax), %r10d
	movl	%esi, x(%rip)
	movl	%esi, %r11d
	sete	%r9b
	sete	%r14b
	movslq	%r10d, %rcx
	notl	%r11d
	imulq	$5001, %r8, %rax
	movzbl	%r9b, %r9d
	movzbl	%r14b, %r14d
	imulq	$-40008, %r8, %r8
	imulq	$40008, %r9, %r9
	addq	%rcx, %rax
	leaq	(%rbx,%rax,8), %rdx
	movl	%r10d, %eax
	subl	%esi, %eax
	movslq	%eax, %r13
	subq	%rcx, %r13
	.p2align 4,,10
	.p2align 3
.L6:
	leal	(%rax,%rsi), %edi
	movq	(%rdx), %rcx
	cmpl	%edi, %esi
	leaq	(%r8,%rdx), %rdi
	jg	.L3
	cmpl	%eax, %r10d
	jl	.L3
	addq	(%rdx,%r13,8), %rcx
	subl	$1, %eax
	subq	$8, %rdx
	movq	%rcx, (%rdi,%r9)
	cmpl	%eax, %r11d
	jne	.L6
.L5:
	movl	$-1, j(%rip)
	movl	%r14d, i(%rip)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	subl	$1, %eax
	movq	%rcx, (%rdi,%r9)
	subq	$8, %rdx
	cmpl	%r11d, %eax
	jne	.L6
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	i(%rip), %rax
	movslq	12(%rsp), %rdx
	leaq	.LC2(%rip), %rdi
	imulq	$5001, %rax, %rax
	addq	%rdx, %rax
	movq	(%rbx,%rax,8), %rsi
	xorl	%eax, %eax
	subq	$1, %rsi
	call	printf@PLT
	addq	$16, %rsp
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	j
	.bss
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	A
	.align 4
	.type	A, @object
	.size	A, 4
A:
	.zero	4
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 80016
d:
	.zero	80016
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
```c
long d[2][5001];A,x,i,j;main(n){for(scanf("%d%d",&n,&A),d[0][n*=A]=1;~scanf("%d",&x);i=!i)for(x-=A,j=2*n+1;j--;)d[!i][j]=d[i][j]+(j<x|j-x>2*n?0:d[i][j-x]);printf("%ld",d[i][n]-1);}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
long d[2][5001];A,x,i,j;main(n){for(scanf("%d%d",&n,&A),d[0][n*=A]=1;~scanf("%d",&x);i=!i)for(x-=A,j=2*n+1;j--;)d[!i][j]=d[i][j]+(j<x|j-x>2*n?0:d[i][j-x]);printf("%ld",d[i][n]-1);}```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

4 8
7 9 8 9

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

```c
long d[2][5001];A,x,i,j;main(n){for(scanf("%d%d",&n,&A),d[0][n*=A]=1;~scanf("%d",&x);i=!i)for(x-=A,j=2*n+1;j--;)d[!i][j]=d[i][j]+(j<x|j-x>2*n?0:d[i][j-x]);printf("%ld",d[i][n]-1);}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	A(%rip), %rdx
	xorl	%eax, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	x(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	d(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	scanf@PLT
	movl	12(%rsp), %eax
	imull	A(%rip), %eax
	movl	%eax, 12(%rsp)
	cltq
	movq	$1, (%rbx,%rax,8)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L16
	movslq	i(%rip), %r8
	movl	12(%rsp), %eax
	movl	x(%rip), %esi
	subl	A(%rip), %esi
	testl	%r8d, %r8d
	leal	(%rax,%rax), %r10d
	movl	%esi, x(%rip)
	movl	%esi, %r11d
	sete	%r9b
	sete	%r14b
	movslq	%r10d, %rcx
	notl	%r11d
	imulq	$5001, %r8, %rax
	movzbl	%r9b, %r9d
	movzbl	%r14b, %r14d
	imulq	$-40008, %r8, %r8
	imulq	$40008, %r9, %r9
	addq	%rcx, %rax
	leaq	(%rbx,%rax,8), %rdx
	movl	%r10d, %eax
	subl	%esi, %eax
	movslq	%eax, %r13
	subq	%rcx, %r13
	.p2align 4,,10
	.p2align 3
.L6:
	leal	(%rax,%rsi), %edi
	movq	(%rdx), %rcx
	cmpl	%edi, %esi
	leaq	(%r8,%rdx), %rdi
	jg	.L3
	cmpl	%eax, %r10d
	jl	.L3
	addq	(%rdx,%r13,8), %rcx
	subl	$1, %eax
	subq	$8, %rdx
	movq	%rcx, (%rdi,%r9)
	cmpl	%eax, %r11d
	jne	.L6
.L5:
	movl	$-1, j(%rip)
	movl	%r14d, i(%rip)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	subl	$1, %eax
	movq	%rcx, (%rdi,%r9)
	subq	$8, %rdx
	cmpl	%r11d, %eax
	jne	.L6
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	i(%rip), %rax
	movslq	12(%rsp), %rdx
	leaq	.LC2(%rip), %rdi
	imulq	$5001, %rax, %rax
	addq	%rdx, %rax
	movq	(%rbx,%rax,8), %rsi
	xorl	%eax, %eax
	subq	$1, %rsi
	call	printf@PLT
	addq	$16, %rsp
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	j
	.bss
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	A
	.align 4
	.type	A, @object
	.size	A, 4
A:
	.zero	4
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 80016
d:
	.zero	80016
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	A(%rip), %rdx
	xorl	%eax, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	x(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	d(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	scanf@PLT
	movl	12(%rsp), %eax
	imull	A(%rip), %eax
	movl	%eax, 12(%rsp)
	cltq
	movq	$1, (%rbx,%rax,8)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L16
	movslq	i(%rip), %r8
	movl	12(%rsp), %eax
	movl	x(%rip), %esi
	subl	A(%rip), %esi
	testl	%r8d, %r8d
	leal	(%rax,%rax), %r10d
	movl	%esi, x(%rip)
	movl	%esi, %r11d
	sete	%r9b
	sete	%r14b
	movslq	%r10d, %rcx
	notl	%r11d
	imulq	$5001, %r8, %rax
	movzbl	%r9b, %r9d
	movzbl	%r14b, %r14d
	imulq	$-40008, %r8, %r8
	imulq	$40008, %r9, %r9
	addq	%rcx, %rax
	leaq	(%rbx,%rax,8), %rdx
	movl	%r10d, %eax
	subl	%esi, %eax
	movslq	%eax, %r13
	subq	%rcx, %r13
	.p2align 4,,10
	.p2align 3
.L6:
	leal	(%rax,%rsi), %edi
	movq	(%rdx), %rcx
	cmpl	%edi, %esi
	leaq	(%r8,%rdx), %rdi
	jg	.L3
	cmpl	%eax, %r10d
	jl	.L3
	addq	(%rdx,%r13,8), %rcx
	subl	$1, %eax
	subq	$8, %rdx
	movq	%rcx, (%rdi,%r9)
	cmpl	%eax, %r11d
	jne	.L6
.L5:
	movl	$-1, j(%rip)
	movl	%r14d, i(%rip)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	subl	$1, %eax
	movq	%rcx, (%rdi,%r9)
	subq	$8, %rdx
	cmpl	%r11d, %eax
	jne	.L6
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	i(%rip), %rax
	movslq	12(%rsp), %rdx
	leaq	.LC2(%rip), %rdi
	imulq	$5001, %rax, %rax
	addq	%rdx, %rax
	movq	(%rbx,%rax,8), %rsi
	xorl	%eax, %eax
	subq	$1, %rsi
	call	printf@PLT
	addq	$16, %rsp
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	j
	.bss
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	A
	.align 4
	.type	A, @object
	.size	A, 4
A:
	.zero	4
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 80016
d:
	.zero	80016
	.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:
```