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

```c
L,R,c[555][555],s;main(n){for(scanf("%*d%d%*d",&n);~scanf("%d%d",&L,&R);s=0)for(n--;n<0?R/L||!printf("%d\n",s):R<501;)n<0?s+=c[L++][R]:c[L][R++]++;}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	L
	.bss
	.align 4
	.type	L, @object
	.size	L, 4
L:
	.zero	4
	.globl	R
	.align 4
	.type	R, @object
	.size	R, 4
R:
	.zero	4
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 1232100
c:
	.zero	1232100
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%*d%d%*d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.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
	movl	%edi, -4(%rbp)
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	jmp	.L2
.L11:
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L3
.L10:
	movl	-4(%rbp), %eax
	testl	%eax, %eax
	jns	.L4
	movl	L(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, L(%rip)
	movl	R(%rip), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$555, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	s(%rip), %eax
	addl	%edx, %eax
	movl	%eax, s(%rip)
	jmp	.L3
.L4:
	movl	L(%rip), %edx
	movl	R(%rip), %eax
	leal	1(%rax), %ecx
	movl	%ecx, R(%rip)
	movslq	%eax, %rsi
	movslq	%edx, %rcx
	imulq	$555, %rcx, %rcx
	addq	%rsi, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	c(%rip), %rcx
	movl	(%rsi,%rcx), %ecx
	addl	$1, %ecx
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$555, %rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L3:
	movl	-4(%rbp), %eax
	testl	%eax, %eax
	jns	.L5
	movl	R(%rip), %eax
	movl	L(%rip), %edi
	cltd
	idivl	%edi
	testl	%eax, %eax
	jne	.L6
	movl	s(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	testl	%eax, %eax
	jne	.L7
.L6:
	movl	$1, %eax
	jmp	.L8
.L7:
	movl	$0, %eax
.L8:
	andl	$1, %eax
	jmp	.L9
.L5:
	movl	R(%rip), %eax
	cmpl	$500, %eax
	setle	%al
.L9:
	testb	%al, %al
	jne	.L10
	movl	$0, s(%rip)
.L2:
	leaq	R(%rip), %rax
	movq	%rax, %rdx
	leaq	L(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L11
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%*d%d%*d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.section	.text.unlikely,"ax",@progbits
.LCOLDB3:
	.section	.text.startup,"ax",@progbits
.LHOTB3:
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	leaq	c(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	4(%r15), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	R(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	L(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC2(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC1(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	scanf@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L21
	movl	12(%rsp), %eax
	movl	R(%rip), %ecx
	leal	-1(%rax), %edi
	movl	%edi, 12(%rsp)
.L3:
	testl	%edi, %edi
	js	.L22
	cmpl	$500, %ecx
	jg	.L13
	movslq	L(%rip), %rax
	leal	1(%rcx), %edx
	movslq	%ecx, %rcx
	movl	%edx, R(%rip)
	imulq	$555, %rax, %rax
	addq	%rax, %rcx
	addl	$1, (%r15,%rcx,4)
	cmpl	$500, %edx
	jle	.L15
.L13:
	movl	$0, s(%rip)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L22:
	movl	%ecx, %eax
	movl	L(%rip), %esi
	cltd
	idivl	%esi
	testl	%eax, %eax
	je	.L23
	movslq	%esi, %rax
	movslq	%ecx, %rdx
	imulq	$555, %rax, %rax
	addq	%rdx, %rax
	movl	(%r15,%rax,4), %eax
.L10:
	addl	$1, %esi
	addl	%eax, s(%rip)
	movl	%esi, L(%rip)
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L23:
	movl	s(%rip), %esi
	movq	%rbx, %rdi
	call	printf@PLT
	testl	%eax, %eax
	jne	.L13
	movslq	L(%rip), %rdx
	movslq	R(%rip), %rax
	movl	12(%rsp), %edi
	movq	%rdx, %rsi
	imulq	$555, %rdx, %rdx
	movq	%rax, %rcx
	addq	%rax, %rdx
	movl	(%r15,%rdx,4), %eax
	testl	%edi, %edi
	js	.L10
	addl	$1, %ecx
	addl	$1, %eax
	movl	%ecx, R(%rip)
	movl	%eax, (%r15,%rdx,4)
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L21:
	addq	$24, %rsp
	.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
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB0:
.L15:
	.cfi_def_cfa_offset 80
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	movl	$501, R(%rip)
	movslq	%edx, %rcx
	addq	%rcx, %rax
	movl	$500, %ecx
	subl	%edx, %ecx
	leaq	(%r15,%rax,4), %rsi
	addq	%rcx, %rax
	leaq	(%r14,%rax,4), %rax
.L5:
	addl	$1, (%rsi)
	addq	$4, %rsi
	cmpq	%rsi, %rax
	jne	.L5
	jmp	.L13
	.cfi_endproc
.LFE0:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE3:
	.section	.text.startup
.LHOTE3:
	.globl	s
	.bss
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 1232100
c:
	.zero	1232100
	.globl	R
	.align 4
	.type	R, @object
	.size	R, 4
R:
	.zero	4
	.globl	L
	.align 4
	.type	L, @object
	.size	L, 4
L:
	.zero	4
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%*d%d%*d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.section	.text.unlikely,"ax",@progbits
.LCOLDB3:
	.section	.text.startup,"ax",@progbits
.LHOTB3:
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	leaq	c(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	4(%r15), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	R(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	L(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC2(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC1(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	scanf@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L21
	movl	12(%rsp), %eax
	movl	R(%rip), %ecx
	leal	-1(%rax), %edi
	movl	%edi, 12(%rsp)
.L3:
	testl	%edi, %edi
	js	.L22
	cmpl	$500, %ecx
	jg	.L13
	movslq	L(%rip), %rax
	leal	1(%rcx), %edx
	movslq	%ecx, %rcx
	movl	%edx, R(%rip)
	imulq	$555, %rax, %rax
	addq	%rax, %rcx
	addl	$1, (%r15,%rcx,4)
	cmpl	$500, %edx
	jle	.L15
.L13:
	movl	$0, s(%rip)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L22:
	movl	%ecx, %eax
	movl	L(%rip), %esi
	cltd
	idivl	%esi
	testl	%eax, %eax
	je	.L23
	movslq	%esi, %rax
	movslq	%ecx, %rdx
	imulq	$555, %rax, %rax
	addq	%rdx, %rax
	movl	(%r15,%rax,4), %eax
.L10:
	addl	$1, %esi
	addl	%eax, s(%rip)
	movl	%esi, L(%rip)
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L23:
	movl	s(%rip), %esi
	movq	%rbx, %rdi
	call	printf@PLT
	testl	%eax, %eax
	jne	.L13
	movslq	L(%rip), %rdx
	movslq	R(%rip), %rax
	movl	12(%rsp), %edi
	movq	%rdx, %rsi
	imulq	$555, %rdx, %rdx
	movq	%rax, %rcx
	addq	%rax, %rdx
	movl	(%r15,%rdx,4), %eax
	testl	%edi, %edi
	js	.L10
	addl	$1, %ecx
	addl	$1, %eax
	movl	%ecx, R(%rip)
	movl	%eax, (%r15,%rdx,4)
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L21:
	addq	$24, %rsp
	.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
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB0:
.L15:
	.cfi_def_cfa_offset 80
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	movl	$501, R(%rip)
	movslq	%edx, %rcx
	addq	%rcx, %rax
	movl	$500, %ecx
	subl	%edx, %ecx
	leaq	(%r15,%rax,4), %rsi
	addq	%rcx, %rax
	leaq	(%r14,%rax,4), %rax
.L5:
	addl	$1, (%rsi)
	addq	$4, %rsi
	cmpq	%rsi, %rax
	jne	.L5
	jmp	.L13
	.cfi_endproc
.LFE0:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE3:
	.section	.text.startup
.LHOTE3:
	.globl	s
	.bss
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 1232100
c:
	.zero	1232100
	.globl	R
	.align 4
	.type	R, @object
	.size	R, 4
R:
	.zero	4
	.globl	L
	.align 4
	.type	L, @object
	.size	L, 4
L:
	.zero	4
	.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:

L,R,c[555][555],s;main(n){for(scanf("%*d%d%*d",&n);~scanf("%d%d",&L,&R);s=0)for(n--;n<0?R/L||!printf("%d\n",s):R<501;)n<0?s+=c[L++][R]:c[L][R++]++;}
10 3 2
1 5
2 8
7 10
1 7
3 3
 10 3 2
1 10
2 8
7 10
1 7
3 10
 10 10 10
1 6
2 9
4 5
4 7
4 7
5 8
6 6
6 7
7 9
10 10
1 8
1 9
1 10
2 8
2 7
2 10
3 8
3 9
3 10
1 10
 10 3 2
1 5
2 8
7 10
1 2
3 3
 10 3 2
1 10
3 8
7 10
1 7
3 10
 10 3 2
1 10
5 8
7 10
1 10
3 10
 10 3 2
1 5
2 8
7 10
1 7
5 10
 10 10 10
1 6
2 9
4 5
4 7
4 7
5 8
6 6
6 7
7 9
10 10
1 8
1 9
1 10
2 8
2 7
2 10
3 8
3 9
3 10
2 10
 10 10 10
1 6
2 9
4 5
1 7
4 7
5 8
6 6
6 7
7 9
10 10
1 8
1 9
1 10
2 8
2 7
2 10
3 8
3 9
3 10
2 10
 10 3 1
1 5
2 8
0 10
1 2
3 3

1
0
 0
1
 7
9
10
6
5
9
6
7
8
10
 0
0
 0
2
 3
2
 1
1
 7
9
10
6
5
9
6
7
8
9
 7
9
10
5
4
8
5
6
7
8
 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
L,R,c[555][555],s;main(n){for(scanf("%*d%d%*d",&n);~scanf("%d%d",&L,&R);s=0)for(n--;n<0?R/L||!printf("%d\n",s):R<501;)n<0?s+=c[L++][R]:c[L][R++]++;}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	L
	.bss
	.align 4
	.type	L, @object
	.size	L, 4
L:
	.zero	4
	.globl	R
	.align 4
	.type	R, @object
	.size	R, 4
R:
	.zero	4
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 1232100
c:
	.zero	1232100
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%*d%d%*d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.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
	movl	%edi, -4(%rbp)
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	jmp	.L2
.L11:
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L3
.L10:
	movl	-4(%rbp), %eax
	testl	%eax, %eax
	jns	.L4
	movl	L(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, L(%rip)
	movl	R(%rip), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$555, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	s(%rip), %eax
	addl	%edx, %eax
	movl	%eax, s(%rip)
	jmp	.L3
.L4:
	movl	L(%rip), %edx
	movl	R(%rip), %eax
	leal	1(%rax), %ecx
	movl	%ecx, R(%rip)
	movslq	%eax, %rsi
	movslq	%edx, %rcx
	imulq	$555, %rcx, %rcx
	addq	%rsi, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	c(%rip), %rcx
	movl	(%rsi,%rcx), %ecx
	addl	$1, %ecx
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$555, %rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L3:
	movl	-4(%rbp), %eax
	testl	%eax, %eax
	jns	.L5
	movl	R(%rip), %eax
	movl	L(%rip), %edi
	cltd
	idivl	%edi
	testl	%eax, %eax
	jne	.L6
	movl	s(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	testl	%eax, %eax
	jne	.L7
.L6:
	movl	$1, %eax
	jmp	.L8
.L7:
	movl	$0, %eax
.L8:
	andl	$1, %eax
	jmp	.L9
.L5:
	movl	R(%rip), %eax
	cmpl	$500, %eax
	setle	%al
.L9:
	testb	%al, %al
	jne	.L10
	movl	$0, s(%rip)
.L2:
	leaq	R(%rip), %rax
	movq	%rax, %rdx
	leaq	L(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L11
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	L
	.bss
	.align 4
	.type	L, @object
	.size	L, 4
L:
	.zero	4
	.globl	R
	.align 4
	.type	R, @object
	.size	R, 4
R:
	.zero	4
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 1232100
c:
	.zero	1232100
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%*d%d%*d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.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
	movl	%edi, -4(%rbp)
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	jmp	.L2
.L11:
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L3
.L10:
	movl	-4(%rbp), %eax
	testl	%eax, %eax
	jns	.L4
	movl	L(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, L(%rip)
	movl	R(%rip), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$555, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	s(%rip), %eax
	addl	%edx, %eax
	movl	%eax, s(%rip)
	jmp	.L3
.L4:
	movl	L(%rip), %edx
	movl	R(%rip), %eax
	leal	1(%rax), %ecx
	movl	%ecx, R(%rip)
	movslq	%eax, %rsi
	movslq	%edx, %rcx
	imulq	$555, %rcx, %rcx
	addq	%rsi, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	c(%rip), %rcx
	movl	(%rsi,%rcx), %ecx
	addl	$1, %ecx
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$555, %rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L3:
	movl	-4(%rbp), %eax
	testl	%eax, %eax
	jns	.L5
	movl	R(%rip), %eax
	movl	L(%rip), %edi
	cltd
	idivl	%edi
	testl	%eax, %eax
	jne	.L6
	movl	s(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	testl	%eax, %eax
	jne	.L7
.L6:
	movl	$1, %eax
	jmp	.L8
.L7:
	movl	$0, %eax
.L8:
	andl	$1, %eax
	jmp	.L9
.L5:
	movl	R(%rip), %eax
	cmpl	$500, %eax
	setle	%al
.L9:
	testb	%al, %al
	jne	.L10
	movl	$0, s(%rip)
.L2:
	leaq	R(%rip), %rax
	movq	%rax, %rdx
	leaq	L(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L11
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
