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

```c
long d['~~'];A,x,i,j;main(n){for(scanf("%d%d",&n,&A),d[n*=A]=1;~scanf("%d",&x);i=5e3-i)for(j=2*n;j--;)d[5000-i+j]=d[i+j]+d[j<x-A?:i+j-x+A];printf("%ld",d[i+n]-1);}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC2:
	.string	"%d"
.LC3:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	A(%rip), %rdx
	xorl	%eax, %eax
	leaq	d(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	x(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC2(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	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, (%r12,%rax,8)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L18
	movl	12(%rsp), %edx
	movl	i(%rip), %r10d
	leal	-1(%rdx,%rdx), %eax
	movl	%eax, j(%rip)
	testl	%edx, %edx
	je	.L3
	movl	A(%rip), %r8d
	movl	$5000, %edi
	leal	(%rax,%r10), %edx
	movslq	%r10d, %rsi
	movl	x(%rip), %ecx
	subl	%r10d, %edi
	movslq	%edx, %rdx
	movslq	%edi, %rdi
	addl	%r10d, %r8d
	leaq	(%r12,%rdx,8), %rdx
	movl	%ecx, %r9d
	subq	%rsi, %rdi
	subl	A(%rip), %r9d
	subl	%ecx, %r8d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	leal	(%r8,%rax), %esi
	subl	$1, %eax
	movslq	%esi, %rsi
	addq	(%r12,%rsi,8), %rcx
	movq	%rcx, (%rdx,%rdi,8)
	subq	$8, %rdx
	cmpl	$-1, %eax
	je	.L19
.L7:
	movq	(%rdx), %rcx
	cmpl	%eax, %r9d
	jle	.L20
	addq	8+d(%rip), %rcx
	subl	$1, %eax
	movq	%rcx, (%rdx,%rdi,8)
	subq	$8, %rdx
	cmpl	$-1, %eax
	jne	.L7
.L19:
	movl	$-1, j(%rip)
.L3:
	pxor	%xmm1, %xmm1
	movsd	.LC1(%rip), %xmm0
	cvtsi2sdl	%r10d, %xmm1
	subsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, i(%rip)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L18:
	movl	12(%rsp), %eax
	addl	i(%rip), %eax
	leaq	.LC3(%rip), %rdi
	cltq
	movq	(%r12,%rax,8), %rsi
	xorl	%eax, %eax
	subq	$1, %rsi
	call	printf@PLT
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.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, 259056
d:
	.zero	259056
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1085507584
	.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"
.LC2:
	.string	"%d"
.LC3:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	A(%rip), %rdx
	xorl	%eax, %eax
	leaq	d(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	x(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC2(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	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, (%r12,%rax,8)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L18
	movl	12(%rsp), %edx
	movl	i(%rip), %r10d
	leal	-1(%rdx,%rdx), %eax
	movl	%eax, j(%rip)
	testl	%edx, %edx
	je	.L3
	movl	A(%rip), %r8d
	movl	$5000, %edi
	leal	(%rax,%r10), %edx
	movslq	%r10d, %rsi
	movl	x(%rip), %ecx
	subl	%r10d, %edi
	movslq	%edx, %rdx
	movslq	%edi, %rdi
	addl	%r10d, %r8d
	leaq	(%r12,%rdx,8), %rdx
	movl	%ecx, %r9d
	subq	%rsi, %rdi
	subl	A(%rip), %r9d
	subl	%ecx, %r8d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	leal	(%r8,%rax), %esi
	subl	$1, %eax
	movslq	%esi, %rsi
	addq	(%r12,%rsi,8), %rcx
	movq	%rcx, (%rdx,%rdi,8)
	subq	$8, %rdx
	cmpl	$-1, %eax
	je	.L19
.L7:
	movq	(%rdx), %rcx
	cmpl	%eax, %r9d
	jle	.L20
	addq	8+d(%rip), %rcx
	subl	$1, %eax
	movq	%rcx, (%rdx,%rdi,8)
	subq	$8, %rdx
	cmpl	$-1, %eax
	jne	.L7
.L19:
	movl	$-1, j(%rip)
.L3:
	pxor	%xmm1, %xmm1
	movsd	.LC1(%rip), %xmm0
	cvtsi2sdl	%r10d, %xmm1
	subsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, i(%rip)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L18:
	movl	12(%rsp), %eax
	addl	i(%rip), %eax
	leaq	.LC3(%rip), %rdi
	cltq
	movq	(%r12,%rax,8), %rsi
	xorl	%eax, %eax
	subq	$1, %rsi
	call	printf@PLT
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.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, 259056
d:
	.zero	259056
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1085507584
	.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"
.LC2:
	.string	"%d"
.LC3:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	A(%rip), %rdx
	xorl	%eax, %eax
	leaq	d(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	x(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC2(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	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, (%r12,%rax,8)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L18
	movl	12(%rsp), %edx
	movl	i(%rip), %r10d
	leal	-1(%rdx,%rdx), %eax
	movl	%eax, j(%rip)
	testl	%edx, %edx
	je	.L3
	movl	A(%rip), %r8d
	movl	$5000, %edi
	leal	(%rax,%r10), %edx
	movslq	%r10d, %rsi
	movl	x(%rip), %ecx
	subl	%r10d, %edi
	movslq	%edx, %rdx
	movslq	%edi, %rdi
	addl	%r10d, %r8d
	leaq	(%r12,%rdx,8), %rdx
	movl	%ecx, %r9d
	subq	%rsi, %rdi
	subl	A(%rip), %r9d
	subl	%ecx, %r8d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	leal	(%r8,%rax), %esi
	subl	$1, %eax
	movslq	%esi, %rsi
	addq	(%r12,%rsi,8), %rcx
	movq	%rcx, (%rdx,%rdi,8)
	subq	$8, %rdx
	cmpl	$-1, %eax
	je	.L19
.L7:
	movq	(%rdx), %rcx
	cmpl	%eax, %r9d
	jle	.L20
	addq	8+d(%rip), %rcx
	subl	$1, %eax
	movq	%rcx, (%rdx,%rdi,8)
	subq	$8, %rdx
	cmpl	$-1, %eax
	jne	.L7
.L19:
	movl	$-1, j(%rip)
.L3:
	pxor	%xmm1, %xmm1
	movsd	.LC1(%rip), %xmm0
	cvtsi2sdl	%r10d, %xmm1
	subsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, i(%rip)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L18:
	movl	12(%rsp), %eax
	addl	i(%rip), %eax
	leaq	.LC3(%rip), %rdi
	cltq
	movq	(%r12,%rax,8), %rsi
	xorl	%eax, %eax
	subq	$1, %rsi
	call	printf@PLT
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.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, 259056
d:
	.zero	259056
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1085507584
	.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['~~'];A,x,i,j;main(n){for(scanf("%d%d",&n,&A),d[n*=A]=1;~scanf("%d",&x);i=5e3-i)for(j=2*n;j--;)d[5000-i+j]=d[i+j]+d[j<x-A?:i+j-x+A];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['~~'];A,x,i,j;main(n){for(scanf("%d%d",&n,&A),d[n*=A]=1;~scanf("%d",&x);i=5e3-i)for(j=2*n;j--;)d[5000-i+j]=d[i+j]+d[j<x-A?:i+j-x+A];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 12 8 9
 3 8
9 6 9
 33 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 1 3 3 3 3
 8 5
3 6 2 8 7 2 5 9
 3 8
15 6 9
 33 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 1 3 3 3 3 3 3 3 3 3 3 3 1 3 3 3 3
 8 5
3 6 2 8 7 2 5 16
 33 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 1 0 3 3 3 3 3 3 3 3 3 3 1 3 3 3 3
 8 5
3 6 2 8 3 2 5 16
 8 8
3 6 2 8 3 2 5 16

3 1 4294967295 25 0 2147483647 17 1073741823 7 9
Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
long d['~~'];A,x,i,j;main(n){for(scanf("%d%d",&n,&A),d[n*=A]=1;~scanf("%d",&x);i=5e3-i)for(j=2*n;j--;)d[5000-i+j]=d[i+j]+d[j<x-A?:i+j-x+A];printf("%ld",d[i+n]-1);}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC2:
	.string	"%d"
.LC3:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	A(%rip), %rdx
	xorl	%eax, %eax
	leaq	d(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	x(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC2(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	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, (%r12,%rax,8)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L18
	movl	12(%rsp), %edx
	movl	i(%rip), %r10d
	leal	-1(%rdx,%rdx), %eax
	movl	%eax, j(%rip)
	testl	%edx, %edx
	je	.L3
	movl	A(%rip), %r8d
	movl	$5000, %edi
	leal	(%rax,%r10), %edx
	movslq	%r10d, %rsi
	movl	x(%rip), %ecx
	subl	%r10d, %edi
	movslq	%edx, %rdx
	movslq	%edi, %rdi
	addl	%r10d, %r8d
	leaq	(%r12,%rdx,8), %rdx
	movl	%ecx, %r9d
	subq	%rsi, %rdi
	subl	A(%rip), %r9d
	subl	%ecx, %r8d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	leal	(%r8,%rax), %esi
	subl	$1, %eax
	movslq	%esi, %rsi
	addq	(%r12,%rsi,8), %rcx
	movq	%rcx, (%rdx,%rdi,8)
	subq	$8, %rdx
	cmpl	$-1, %eax
	je	.L19
.L7:
	movq	(%rdx), %rcx
	cmpl	%eax, %r9d
	jle	.L20
	addq	8+d(%rip), %rcx
	subl	$1, %eax
	movq	%rcx, (%rdx,%rdi,8)
	subq	$8, %rdx
	cmpl	$-1, %eax
	jne	.L7
.L19:
	movl	$-1, j(%rip)
.L3:
	pxor	%xmm1, %xmm1
	movsd	.LC1(%rip), %xmm0
	cvtsi2sdl	%r10d, %xmm1
	subsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, i(%rip)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L18:
	movl	12(%rsp), %eax
	addl	i(%rip), %eax
	leaq	.LC3(%rip), %rdi
	cltq
	movq	(%r12,%rax,8), %rsi
	xorl	%eax, %eax
	subq	$1, %rsi
	call	printf@PLT
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.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, 259056
d:
	.zero	259056
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1085507584
	.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"
.LC2:
	.string	"%d"
.LC3:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	A(%rip), %rdx
	xorl	%eax, %eax
	leaq	d(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	x(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC2(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	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, (%r12,%rax,8)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L18
	movl	12(%rsp), %edx
	movl	i(%rip), %r10d
	leal	-1(%rdx,%rdx), %eax
	movl	%eax, j(%rip)
	testl	%edx, %edx
	je	.L3
	movl	A(%rip), %r8d
	movl	$5000, %edi
	leal	(%rax,%r10), %edx
	movslq	%r10d, %rsi
	movl	x(%rip), %ecx
	subl	%r10d, %edi
	movslq	%edx, %rdx
	movslq	%edi, %rdi
	addl	%r10d, %r8d
	leaq	(%r12,%rdx,8), %rdx
	movl	%ecx, %r9d
	subq	%rsi, %rdi
	subl	A(%rip), %r9d
	subl	%ecx, %r8d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	leal	(%r8,%rax), %esi
	subl	$1, %eax
	movslq	%esi, %rsi
	addq	(%r12,%rsi,8), %rcx
	movq	%rcx, (%rdx,%rdi,8)
	subq	$8, %rdx
	cmpl	$-1, %eax
	je	.L19
.L7:
	movq	(%rdx), %rcx
	cmpl	%eax, %r9d
	jle	.L20
	addq	8+d(%rip), %rcx
	subl	$1, %eax
	movq	%rcx, (%rdx,%rdi,8)
	subq	$8, %rdx
	cmpl	$-1, %eax
	jne	.L7
.L19:
	movl	$-1, j(%rip)
.L3:
	pxor	%xmm1, %xmm1
	movsd	.LC1(%rip), %xmm0
	cvtsi2sdl	%r10d, %xmm1
	subsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, i(%rip)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L18:
	movl	12(%rsp), %eax
	addl	i(%rip), %eax
	leaq	.LC3(%rip), %rdi
	cltq
	movq	(%r12,%rax,8), %rsi
	xorl	%eax, %eax
	subq	$1, %rsi
	call	printf@PLT
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.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, 259056
d:
	.zero	259056
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1085507584
	.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:
```