	.file	"660027.c"
	.intel_syntax noprefix
	.text
	.globl	coins
	.bss
	.align 32
	.type	coins, @object
	.size	coins, 404
coins:
	.zero	404
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 2020404
dp:
	.zero	2020404
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -44[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -32[rbp], 0
	jmp	.L2
.L15:
	lea	rdx, -36[rbp]
	lea	rax, -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -28[rbp], 0
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, coins[rip]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -28[rbp], 1
.L3:
	mov	eax, DWORD PTR -36[rbp]
	cmp	DWORD PTR -28[rbp], eax
	jl	.L4
	mov	DWORD PTR -24[rbp], 0
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	imul	rax, rax, 20004
	lea	rdx, dp[rip]
	mov	DWORD PTR [rax+rdx], 1
	add	DWORD PTR -24[rbp], 1
.L5:
	mov	eax, DWORD PTR -36[rbp]
	cmp	DWORD PTR -24[rbp], eax
	jle	.L6
	mov	DWORD PTR -20[rbp], 0
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, dp[rip]
	mov	DWORD PTR [rdx+rax], 0
	add	DWORD PTR -20[rbp], 1
.L7:
	mov	eax, DWORD PTR -40[rbp]
	cmp	DWORD PTR -20[rbp], eax
	jle	.L8
	mov	DWORD PTR -16[rbp], 1
	jmp	.L9
.L14:
	mov	DWORD PTR -12[rbp], 1
	jmp	.L10
.L13:
	mov	eax, DWORD PTR -16[rbp]
	sub	eax, 1
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, coins[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	DWORD PTR -12[rbp], eax
	jge	.L11
	mov	eax, DWORD PTR -16[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -12[rbp]
	movsx	rcx, eax
	movsx	rax, edx
	imul	rax, rax, 5001
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, dp[rip]
	mov	eax, DWORD PTR [rdx+rax]
	jmp	.L12
.L11:
	mov	eax, DWORD PTR -16[rbp]
	sub	eax, 1
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, coins[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, edx
	movsx	rdx, eax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	imul	rax, rax, 5001
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, dp[rip]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -16[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -12[rbp]
	movsx	rsi, eax
	movsx	rax, edx
	imul	rax, rax, 5001
	add	rax, rsi
	lea	rdx, 0[0+rax*4]
	lea	rax, dp[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	edx, [rcx+rax]
	movsx	rax, edx
	imul	rax, rax, 1152921497
	shr	rax, 32
	sar	eax, 28
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	imul	ecx, eax, 1000000007
	mov	eax, edx
	sub	eax, ecx
.L12:
	mov	edx, DWORD PTR -12[rbp]
	movsx	rcx, edx
	mov	edx, DWORD PTR -16[rbp]
	movsx	rdx, edx
	imul	rdx, rdx, 5001
	add	rdx, rcx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, dp[rip]
	mov	DWORD PTR [rcx+rdx], eax
	add	DWORD PTR -12[rbp], 1
.L10:
	mov	eax, DWORD PTR -40[rbp]
	cmp	DWORD PTR -12[rbp], eax
	jle	.L13
	add	DWORD PTR -16[rbp], 1
.L9:
	mov	eax, DWORD PTR -36[rbp]
	cmp	DWORD PTR -16[rbp], eax
	jle	.L14
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, DWORD PTR -40[rbp]
	movsx	rdx, edx
	cdqe
	imul	rax, rax, 5001
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, dp[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -32[rbp], 1
.L2:
	mov	eax, DWORD PTR -44[rbp]
	cmp	DWORD PTR -32[rbp], eax
	jl	.L15
	mov	eax, 0
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"660027.c"
	.text
	.global	coins
	.bss
	.align	2
	.type	coins, %object
	.size	coins, 404
coins:
	.space	404
	.global	dp
	.align	2
	.type	dp, %object
	.size	dp, 2020404
dp:
	.space	2020404
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.align	2
.LC1:
	.ascii	"%d %d\000"
	.align	2
.LC2:
	.ascii	"%d\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, .L18+4
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L2
.L15:
	sub	r2, fp, #36
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, .L18+8
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L3
.L4:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, .L18+12
	add	r3, r3, r2
	mov	r1, r3
	ldr	r0, .L18+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L3:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	blt	.L4
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L5
.L6:
	ldr	r2, .L18+16
	ldr	r3, [fp, #-24]
	ldr	r1, .L18+20
	mul	r3, r1, r3
	add	r3, r2, r3
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L5:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	ble	.L6
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L7
.L8:
	ldr	r2, .L18+16
	ldr	r3, [fp, #-20]
	mov	r1, #0
	str	r1, [r2, r3, lsl #2]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L7:
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	ble	.L8
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L9
.L14:
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L10
.L13:
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	ldr	r2, .L18+12
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L11
	ldr	r3, [fp, #-16]
	sub	r2, r3, #1
	ldr	r0, .L18+16
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r1, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #3
	add	r3, r3, r2
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	ldr	r2, [r0, r3, lsl #2]
	b	.L12
.L11:
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	ldr	r2, .L18+12
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-12]
	sub	r1, r2, r3
	ldr	ip, .L18+16
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r0, r3, #2
	add	r3, r3, r0
	lsl	r3, r3, #3
	add	r3, r3, r2
	add	r3, r3, r1
	ldr	r1, [ip, r3, lsl #2]
	ldr	r3, [fp, #-16]
	sub	r2, r3, #1
	ldr	ip, .L18+16
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r0, r3, #2
	add	r3, r3, r0
	lsl	r3, r3, #3
	add	r3, r3, r2
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	ldr	r3, [ip, r3, lsl #2]
	add	r3, r1, r3
	ldr	r2, .L18+24
	smull	r1, r2, r3, r2
	asr	r1, r2, #28
	asr	r2, r3, #31
	sub	r2, r1, r2
	ldr	r1, .L18+28
	mul	r2, r1, r2
	sub	r2, r3, r2
.L12:
	ldr	ip, .L18+16
	ldr	r1, [fp, #-16]
	mov	r3, r1
	lsl	r3, r3, #5
	sub	r3, r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r0, r3, #2
	add	r3, r3, r0
	lsl	r3, r3, #3
	add	r3, r3, r1
	ldr	r1, [fp, #-12]
	add	r3, r3, r1
	str	r2, [ip, r3, lsl #2]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L10:
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	ble	.L13
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L9:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	ble	.L14
	ldr	r2, [fp, #-36]
	ldr	r1, [fp, #-40]
	ldr	ip, .L18+16
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r0, r3, #2
	add	r3, r3, r0
	lsl	r3, r3, #3
	add	r3, r3, r2
	add	r3, r3, r1
	ldr	r3, [ip, r3, lsl #2]
	mov	r1, r3
	ldr	r0, .L18+32
	bl	printf
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L2:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	blt	.L15
	mov	r3, #0
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	coins
	.word	dp
	.word	20004
	.word	1152921497
	.word	1000000007
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
