	.file	"313111.c"
	.intel_syntax noprefix
	.text
	.globl	D
	.bss
	.align 8
	.type	D, @object
	.size	D, 8
D:
	.zero	8
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 72000000
S:
	.zero	72000000
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%lld"
	.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, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -24[rbp]
	lea	rax, -28[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	QWORD PTR D[rip], 1000000009
	mov	QWORD PTR S[rip+24008], 0
	mov	QWORD PTR S[rip], 0
	mov	DWORD PTR -20[rbp], 1
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	imul	rax, rax, 24008
	lea	rdx, S[rip]
	mov	QWORD PTR [rax+rdx], 1
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	imul	rax, rax, 24000
	lea	rdx, S[rip+8]
	mov	QWORD PTR [rax+rdx], 1
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	imul	rax, rax, 24000
	lea	rdx, S[rip]
	mov	QWORD PTR [rax+rdx], 0
	add	DWORD PTR -20[rbp], 1
.L2:
	mov	eax, DWORD PTR -28[rbp]
	cmp	DWORD PTR -20[rbp], eax
	jle	.L3
	mov	DWORD PTR -16[rbp], 2
	jmp	.L4
.L7:
	mov	DWORD PTR -12[rbp], 1
	jmp	.L5
.L6:
	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, 3000
	add	rax, rcx
	lea	rdx, 0[0+rax*8]
	lea	rax, S[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	mov	rcx, rdx
	imul	rcx, rax
	mov	eax, DWORD PTR -16[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, 1
	movsx	rsi, eax
	movsx	rax, edx
	imul	rax, rax, 3000
	add	rax, rsi
	lea	rdx, 0[0+rax*8]
	lea	rax, S[rip]
	mov	rax, QWORD PTR [rdx+rax]
	add	rax, rcx
	mov	rcx, QWORD PTR D[rip]
	cqo
	idiv	rcx
	mov	rcx, rdx
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	imul	rax, rax, 3000
	add	rax, rdx
	lea	rdx, 0[0+rax*8]
	lea	rax, S[rip]
	mov	QWORD PTR [rdx+rax], rcx
	add	DWORD PTR -12[rbp], 1
.L5:
	mov	eax, DWORD PTR -24[rbp]
	cmp	DWORD PTR -12[rbp], eax
	jle	.L6
	add	DWORD PTR -16[rbp], 1
.L4:
	mov	eax, DWORD PTR -28[rbp]
	cmp	DWORD PTR -16[rbp], eax
	jle	.L7
	mov	eax, DWORD PTR -28[rbp]
	mov	edx, DWORD PTR -24[rbp]
	movsx	rdx, edx
	cdqe
	imul	rax, rax, 3000
	add	rax, rdx
	lea	rdx, 0[0+rax*8]
	lea	rax, S[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	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	"313111.c"
	.text
	.comm	D,8,8
	.comm	S,72000000,8
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d %d\000"
	.global	__aeabi_ldivmod
	.align	2
.LC1:
	.ascii	"%lld\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #24
	ldr	r3, .L10+8
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	sub	r2, fp, #40
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, .L10+12
	bl	__isoc99_scanf
	ldr	r1, .L10+16
	adr	r3, .L10
	ldmia	r3, {r2-r3}
	stm	r1, {r2-r3}
	ldr	r3, .L10+20
	add	r3, r3, #23808
	add	r3, r3, #208
	mov	r1, r3
	mov	r2, #0
	mov	r3, #0
	stmdb	r1, {r2-r3}
	ldr	r1, .L10+20
	mov	r2, #0
	mov	r3, #0
	stm	r1, {r2-r3}
	mov	r3, #1
	str	r3, [fp, #-36]
	b	.L2
.L3:
	ldr	r2, .L10+20
	ldr	r3, [fp, #-36]
	ldr	r1, .L10+24
	mul	r3, r1, r3
	add	r1, r2, r3
	mov	r2, #1
	mov	r3, #0
	stm	r1, {r2-r3}
	ldr	r1, .L10+20
	ldr	r2, [fp, #-36]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #6
	mov	r2, r3
	add	r3, r1, r2
	add	r1, r3, #8
	mov	r2, #1
	mov	r3, #0
	stm	r1, {r2-r3}
	ldr	r1, .L10+20
	ldr	r2, [fp, #-36]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #6
	mov	r2, r3
	add	r1, r1, r2
	mov	r2, #0
	mov	r3, #0
	stm	r1, {r2-r3}
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L2:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	ble	.L3
	mov	r3, #2
	str	r3, [fp, #-32]
	b	.L4
.L7:
	mov	r3, #1
	str	r3, [fp, #-28]
	b	.L5
.L6:
	ldr	r3, [fp, #-32]
	sub	r2, r3, #1
	ldr	r1, .L10+20
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #3
	mov	r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldmia	r3, {r4-r5}
	ldr	r3, [fp, #-28]
	mov	r2, r3
	asr	r3, r2, #31
	mul	r0, r2, r5
	mul	r1, r4, r3
	add	ip, r0, r1
	umull	r0, r1, r4, r2
	add	r3, ip, r1
	mov	r1, r3
	ldr	r3, [fp, #-32]
	sub	r2, r3, #1
	ldr	r3, [fp, #-28]
	sub	ip, r3, #1
	ldr	lr, .L10+20
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #3
	mov	r2, r3
	add	r3, r2, ip
	lsl	r3, r3, #3
	add	r3, lr, r3
	ldmia	r3, {r2-r3}
	adds	r6, r0, r2
	adc	r7, r1, r3
	ldr	r3, .L10+16
	ldmia	r3, {r2-r3}
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_ldivmod
	mov	r0, r2
	mov	r1, r3
	ldr	ip, .L10+20
	ldr	r2, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #3
	mov	r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	lsl	r3, r3, #3
	add	r3, ip, r3
	stm	r3, {r0-r1}
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L5:
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	ble	.L6
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L4:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	ble	.L7
	ldr	r2, [fp, #-44]
	ldr	r1, [fp, #-40]
	ldr	r0, .L10+20
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #3
	mov	r2, r3
	add	r3, r2, r1
	lsl	r3, r3, #3
	add	r3, r0, r3
	ldmia	r3, {r2-r3}
	ldr	r0, .L10+28
	bl	printf
	mov	r3, #0
	ldr	r2, .L10+8
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L11:
	.align	3
.L10:
	.word	1000000009
	.word	0
	.word	.LC2
	.word	.LC0
	.word	D
	.word	S
	.word	24008
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
