	.file	"587393.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%d"
.LC3:
	.string	"%d%d%lld%lld"
.LC4:
	.string	"%lld\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, 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -64[rbp]
	lea	rax, -68[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -44[rbp], 1
	jmp	.L2
.L3:
	lea	rax, -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -44[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -68[rbp]
	mov	r8d, edx
	mov	ecx, 1
	mov	edx, 1
	mov	esi, eax
	mov	edi, 1
	call	query
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	sub	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	mov	eax, DWORD PTR -68[rbp]
	mov	ecx, DWORD PTR -44[rbp]
	mov	edx, DWORD PTR -44[rbp]
	mov	r9, rsi
	mov	r8d, ecx
	mov	ecx, edx
	mov	edx, 1
	mov	esi, eax
	mov	edi, 1
	call	add
	add	DWORD PTR -44[rbp], 1
.L2:
	mov	eax, DWORD PTR -68[rbp]
	cmp	DWORD PTR -44[rbp], eax
	jle	.L3
	jmp	.L4
.L6:
	lea	rax, -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -48[rbp]
	cmp	eax, 1
	jne	.L5
	lea	rsi, -24[rbp]
	lea	rcx, -32[rbp]
	lea	rdx, -56[rbp]
	lea	rax, -60[rbp]
	mov	r8, rsi
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rsi, QWORD PTR -32[rbp]
	mov	ecx, DWORD PTR -60[rbp]
	mov	edx, DWORD PTR -60[rbp]
	mov	eax, DWORD PTR -68[rbp]
	mov	r9, rsi
	mov	r8d, ecx
	mov	ecx, edx
	mov	edx, 1
	mov	esi, eax
	mov	edi, 1
	call	add
	mov	rsi, QWORD PTR -24[rbp]
	mov	ecx, DWORD PTR -56[rbp]
	mov	eax, DWORD PTR -60[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -68[rbp]
	mov	r9, rsi
	mov	r8d, ecx
	mov	ecx, edx
	mov	edx, 1
	mov	esi, eax
	mov	edi, 1
	call	add
	mov	eax, DWORD PTR -56[rbp]
	mov	edx, DWORD PTR -60[rbp]
	sub	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	imul	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	neg	rax
	mov	rsi, rax
	mov	eax, DWORD PTR -56[rbp]
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -56[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -68[rbp]
	mov	r9, rsi
	mov	r8d, ecx
	mov	ecx, edx
	mov	edx, 1
	mov	esi, eax
	mov	edi, 1
	call	add
	jmp	.L4
.L5:
	lea	rax, -52[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -52[rbp]
	mov	eax, DWORD PTR -68[rbp]
	mov	r8d, edx
	mov	ecx, 1
	mov	edx, 1
	mov	esi, eax
	mov	edi, 1
	call	query
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
.L4:
	mov	eax, DWORD PTR -64[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -64[rbp], edx
	test	eax, eax
	jne	.L6
	mov	eax, 0
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 3200072
S:
	.zero	3200072
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 3200072
A:
	.zero	3200072
	.text
	.globl	add
	.type	add, @function
add:
.LFB1:
	.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	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	DWORD PTR -28[rbp], edx
	mov	DWORD PTR -32[rbp], ecx
	mov	DWORD PTR -36[rbp], r8d
	mov	QWORD PTR -48[rbp], r9
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jg	.L10
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jg	.L10
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, A[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, A[rip]
	mov	QWORD PTR [rdx+rax], rcx
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, S[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -24[rbp]
	sub	eax, DWORD PTR -20[rbp]
	add	eax, 1
	cdqe
	imul	rax, QWORD PTR -48[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, S[rip]
	mov	QWORD PTR [rdx+rax], rcx
	jmp	.L11
.L10:
	mov	eax, DWORD PTR -24[rbp]
	sub	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	edx, eax
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, A[rip]
	mov	rcx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, A[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	add	rcx, rdx
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, A[rip]
	mov	QWORD PTR [rdx+rax], rcx
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, S[rip]
	mov	rcx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, A[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, DWORD PTR -20[rbp]
	add	eax, 1
	cdqe
	imul	rdx, rax
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	add	rcx, rdx
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, S[rip]
	mov	QWORD PTR [rdx+rax], rcx
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	or	eax, 1
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, A[rip]
	mov	rcx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, A[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	or	eax, 1
	add	rcx, rdx
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, A[rip]
	mov	QWORD PTR [rdx+rax], rcx
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	or	eax, 1
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, S[rip]
	mov	rcx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, A[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -24[rbp]
	sub	eax, DWORD PTR -4[rbp]
	cdqe
	imul	rdx, rax
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	or	eax, 1
	add	rcx, rdx
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, S[rip]
	mov	QWORD PTR [rdx+rax], rcx
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, A[rip]
	mov	QWORD PTR [rdx+rax], 0
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jg	.L12
	mov	eax, DWORD PTR -28[rbp]
	lea	edi, [rax+rax]
	mov	r8, QWORD PTR -48[rbp]
	mov	ecx, DWORD PTR -36[rbp]
	mov	edx, DWORD PTR -32[rbp]
	mov	esi, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	r9, r8
	mov	r8d, ecx
	mov	ecx, edx
	mov	edx, edi
	mov	edi, eax
	call	add
.L12:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jge	.L13
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	or	eax, 1
	mov	esi, eax
	mov	eax, DWORD PTR -4[rbp]
	lea	edi, 1[rax]
	mov	r8, QWORD PTR -48[rbp]
	mov	ecx, DWORD PTR -36[rbp]
	mov	edx, DWORD PTR -32[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	r9, r8
	mov	r8d, ecx
	mov	ecx, edx
	mov	edx, esi
	mov	esi, eax
	call	add
.L13:
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, S[rip]
	mov	rcx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	or	eax, 1
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, S[rip]
	mov	rax, QWORD PTR [rdx+rax]
	add	rcx, rax
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, S[rip]
	mov	QWORD PTR [rdx+rax], rcx
	nop
.L11:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	add, .-add
	.globl	query
	.type	query, @function
query:
.LFB2:
	.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	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	DWORD PTR -28[rbp], edx
	mov	DWORD PTR -32[rbp], ecx
	mov	DWORD PTR -36[rbp], r8d
	mov	QWORD PTR -8[rbp], 0
	cmp	DWORD PTR -32[rbp], 0
	jle	.L15
	cmp	DWORD PTR -36[rbp], 0
	jg	.L16
.L15:
	mov	eax, 0
	jmp	.L17
.L16:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jg	.L18
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jg	.L18
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, S[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L19
.L18:
	mov	eax, DWORD PTR -24[rbp]
	sub	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	edx, eax
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, A[rip]
	mov	rcx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, A[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	add	rcx, rdx
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, A[rip]
	mov	QWORD PTR [rdx+rax], rcx
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, S[rip]
	mov	rcx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, A[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, DWORD PTR -20[rbp]
	add	eax, 1
	cdqe
	imul	rdx, rax
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	add	rcx, rdx
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, S[rip]
	mov	QWORD PTR [rdx+rax], rcx
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	or	eax, 1
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, A[rip]
	mov	rcx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, A[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	or	eax, 1
	add	rcx, rdx
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, A[rip]
	mov	QWORD PTR [rdx+rax], rcx
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	or	eax, 1
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, S[rip]
	mov	rcx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, A[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -24[rbp]
	sub	eax, DWORD PTR -12[rbp]
	cdqe
	imul	rdx, rax
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	or	eax, 1
	add	rcx, rdx
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, S[rip]
	mov	QWORD PTR [rdx+rax], rcx
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, A[rip]
	mov	QWORD PTR [rdx+rax], 0
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jg	.L20
	mov	eax, DWORD PTR -28[rbp]
	lea	edi, [rax+rax]
	mov	ecx, DWORD PTR -36[rbp]
	mov	edx, DWORD PTR -32[rbp]
	mov	esi, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	r8d, ecx
	mov	ecx, edx
	mov	edx, edi
	mov	edi, eax
	call	query
	add	QWORD PTR -8[rbp], rax
.L20:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jge	.L19
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	or	eax, 1
	mov	esi, eax
	mov	eax, DWORD PTR -12[rbp]
	lea	edi, 1[rax]
	mov	ecx, DWORD PTR -36[rbp]
	mov	edx, DWORD PTR -32[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	r8d, ecx
	mov	ecx, edx
	mov	edx, esi
	mov	esi, eax
	call	query
	add	QWORD PTR -8[rbp], rax
.L19:
	mov	rax, QWORD PTR -8[rbp]
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	query, .-query
	.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	"587393.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d%d\000"
	.align	2
.LC1:
	.ascii	"%lld\000"
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.ascii	"%d%d%lld%lld\000"
	.align	2
.LC4:
	.ascii	"%lld\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #88
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	sub	r2, fp, #92
	sub	r3, fp, #96
	mov	r1, r3
	ldr	r0, .L9+4
	bl	__isoc99_scanf
	mov	r3, #1
	str	r3, [fp, #-72]
	b	.L2
.L3:
	sub	r3, fp, #68
	mov	r1, r3
	ldr	r0, .L9+8
	bl	__isoc99_scanf
	ldr	r1, [fp, #-96]
	ldr	r3, [fp, #-72]
	sub	r3, r3, #1
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #1
	mov	r0, #1
	bl	query
	str	r0, [fp, #-44]
	str	r1, [fp, #-40]
	ldr	ip, [fp, #-96]
	sub	r1, fp, #68
	ldmia	r1, {r0-r1}
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	subs	r4, r0, r2
	sbc	r5, r1, r3
	str	r4, [sp, #8]
	str	r5, [sp, #12]
	ldr	r3, [fp, #-72]
	str	r3, [sp]
	ldr	r3, [fp, #-72]
	mov	r2, #1
	mov	r1, ip
	mov	r0, #1
	bl	add
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L2:
	ldr	r3, [fp, #-96]
	ldr	r2, [fp, #-72]
	cmp	r2, r3
	ble	.L3
	b	.L4
.L6:
	sub	r3, fp, #76
	mov	r1, r3
	ldr	r0, .L9+12
	bl	__isoc99_scanf
	ldr	r3, [fp, #-76]
	cmp	r3, #1
	bne	.L5
	sub	r0, fp, #60
	sub	r2, fp, #84
	sub	r1, fp, #88
	sub	r3, fp, #52
	str	r3, [sp]
	mov	r3, r0
	ldr	r0, .L9+16
	bl	__isoc99_scanf
	ldr	r0, [fp, #-96]
	ldr	ip, [fp, #-88]
	ldr	r1, [fp, #-88]
	sub	r3, fp, #60
	ldmia	r3, {r2-r3}
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	str	r1, [sp]
	mov	r3, ip
	mov	r2, #1
	mov	r1, r0
	mov	r0, #1
	bl	add
	ldr	r0, [fp, #-96]
	ldr	r3, [fp, #-88]
	add	ip, r3, #1
	ldr	r1, [fp, #-84]
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	str	r1, [sp]
	mov	r3, ip
	mov	r2, #1
	mov	r1, r0
	mov	r0, #1
	bl	add
	ldr	r8, [fp, #-96]
	ldr	r3, [fp, #-84]
	add	r9, r3, #1
	ldr	r3, [fp, #-84]
	add	ip, r3, #1
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	mov	r4, r3
	asr	r5, r4, #31
	sub	r1, fp, #52
	ldmia	r1, {r0-r1}
	mul	r2, r0, r5
	mul	r3, r4, r1
	add	lr, r2, r3
	umull	r2, r3, r4, r0
	add	r1, lr, r3
	mov	r3, r1
	sub	r1, fp, #60
	ldmia	r1, {r0-r1}
	adds	r6, r2, r0
	adc	r7, r3, r1
	rsbs	r2, r6, #0
	rsc	r3, r7, #0
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	str	ip, [sp]
	mov	r3, r9
	mov	r2, #1
	mov	r1, r8
	mov	r0, #1
	bl	add
	b	.L4
.L5:
	sub	r3, fp, #80
	mov	r1, r3
	ldr	r0, .L9+12
	bl	__isoc99_scanf
	ldr	r1, [fp, #-96]
	ldr	r3, [fp, #-80]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #1
	mov	r0, #1
	bl	query
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L9+20
	bl	printf
.L4:
	ldr	r3, [fp, #-92]
	sub	r2, r3, #1
	str	r2, [fp, #-92]
	cmp	r3, #0
	bne	.L6
	mov	r3, #0
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-32]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.comm	S,3200072,8
	.comm	A,3200072,8
	.align	2
	.global	add
	.syntax unified
	.arm
	.fpu softvfp
	.type	add, %function
add:
	@ args = 16, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #72
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	str	r2, [fp, #-48]
	str	r3, [fp, #-52]
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	bgt	.L12
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #4]
	cmp	r2, r3
	bgt	.L12
	ldr	r2, .L16
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r0-r1}
	add	r3, fp, #12
	ldmia	r3, {r2-r3}
	adds	r4, r0, r2
	adc	r5, r1, r3
	ldr	r2, .L16
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #3
	add	r3, r2, r3
	stm	r3, {r4-r5}
	ldr	r2, .L16+4
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r4-r5}
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-40]
	sub	r3, r2, r3
	add	r3, r3, #1
	mov	r0, r3
	asr	r1, r0, #31
	ldr	r3, [fp, #12]
	mul	r2, r1, r3
	ldr	r3, [fp, #16]
	mul	r3, r0, r3
	add	ip, r2, r3
	ldr	lr, [fp, #12]
	umull	r2, r3, lr, r0
	add	r1, ip, r3
	mov	r3, r1
	adds	r6, r4, r2
	adc	r7, r5, r3
	ldr	r2, .L16+4
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #3
	add	r3, r2, r3
	stm	r3, {r6-r7}
	b	.L13
.L12:
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-40]
	sub	r3, r2, r3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-40]
	add	r3, r3, r2
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #1
	ldr	r2, .L16
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r4-r5}
	ldr	r2, .L16
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	ldr	r1, [fp, #-48]
	lsl	r1, r1, #1
	adds	r8, r4, r2
	adc	r9, r5, r3
	ldr	r2, .L16
	lsl	r3, r1, #3
	add	r3, r2, r3
	stm	r3, {r8-r9}
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #1
	ldr	r2, .L16+4
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r6-r7}
	ldr	r2, .L16
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r4-r5}
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-40]
	sub	r3, r2, r3
	add	r3, r3, #1
	mov	r0, r3
	asr	r1, r0, #31
	mul	r2, r0, r5
	mul	r3, r4, r1
	add	ip, r2, r3
	umull	r2, r3, r4, r0
	add	r1, ip, r3
	mov	r3, r1
	ldr	r1, [fp, #-48]
	lsl	r1, r1, #1
	adds	r0, r6, r2
	str	r0, [fp, #-60]
	adc	r3, r7, r3
	str	r3, [fp, #-56]
	ldr	r2, .L16+4
	lsl	r3, r1, #3
	add	r3, r2, r3
	sub	r2, fp, #60
	ldmia	r2, {r1-r2}
	stm	r3, {r1-r2}
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #1
	orr	r3, r3, #1
	ldr	r2, .L16
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r0-r1}
	ldr	r2, .L16
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	ldr	ip, [fp, #-48]
	lsl	ip, ip, #1
	orr	ip, ip, #1
	adds	lr, r0, r2
	str	lr, [fp, #-68]
	adc	r3, r1, r3
	str	r3, [fp, #-64]
	ldr	r2, .L16
	lsl	r3, ip, #3
	add	r3, r2, r3
	sub	r2, fp, #68
	ldmia	r2, {r1-r2}
	stm	r3, {r1-r2}
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #1
	orr	r3, r3, #1
	ldr	r2, .L16+4
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r6-r7}
	ldr	r2, .L16
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r4-r5}
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-32]
	sub	r3, r2, r3
	mov	r0, r3
	asr	r1, r0, #31
	mul	r2, r0, r5
	mul	r3, r4, r1
	add	ip, r2, r3
	umull	r2, r3, r4, r0
	add	r1, ip, r3
	mov	r3, r1
	ldr	r1, [fp, #-48]
	lsl	r1, r1, #1
	orr	r1, r1, #1
	adds	r0, r6, r2
	str	r0, [fp, #-76]
	adc	r3, r7, r3
	str	r3, [fp, #-72]
	ldr	r2, .L16+4
	lsl	r3, r1, #3
	add	r3, r2, r3
	sub	r2, fp, #76
	ldmia	r2, {r1-r2}
	stm	r3, {r1-r2}
	ldr	r2, .L16
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #3
	add	r1, r2, r3
	mov	r2, #0
	mov	r3, #0
	stm	r1, {r2-r3}
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	bgt	.L14
	ldr	r3, [fp, #-48]
	lsl	r1, r3, #1
	add	r3, fp, #12
	ldmia	r3, {r2-r3}
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	ldr	r3, [fp, #4]
	str	r3, [sp]
	ldr	r3, [fp, #-52]
	mov	r2, r1
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-40]
	bl	add
.L14:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #4]
	cmp	r2, r3
	bge	.L15
	ldr	r3, [fp, #-32]
	add	r0, r3, #1
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #1
	orr	r1, r3, #1
	add	r3, fp, #12
	ldmia	r3, {r2-r3}
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	ldr	r3, [fp, #4]
	str	r3, [sp]
	ldr	r3, [fp, #-52]
	mov	r2, r1
	ldr	r1, [fp, #-44]
	bl	add
.L15:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #1
	ldr	r2, .L16+4
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #1
	orr	r3, r3, #1
	ldr	r2, .L16+4
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	adds	ip, r0, r2
	str	ip, [fp, #-84]
	adc	r3, r1, r3
	str	r3, [fp, #-80]
	ldr	r2, .L16+4
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #3
	add	r3, r2, r3
	sub	r2, fp, #84
	ldmia	r2, {r1-r2}
	stm	r3, {r1-r2}
	nop
.L13:
	nop
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L17:
	.align	2
.L16:
	.word	A
	.word	S
	.size	add, .-add
	.align	2
	.global	query
	.syntax unified
	.arm
	.fpu softvfp
	.type	query, %function
query:
	@ args = 4, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #80
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	str	r2, [fp, #-56]
	str	r3, [fp, #-60]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	ble	.L19
	ldr	r3, [fp, #4]
	cmp	r3, #0
	bgt	.L20
.L19:
	mov	r2, #0
	mov	r3, #0
	b	.L21
.L20:
	ldr	r2, [fp, #-60]
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	bgt	.L22
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #4]
	cmp	r2, r3
	bgt	.L22
	ldr	r2, .L25
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	b	.L23
.L22:
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-48]
	sub	r3, r2, r3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-48]
	add	r3, r3, r2
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #1
	ldr	r2, .L25+4
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r4-r5}
	ldr	r2, .L25+4
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	ldr	r1, [fp, #-56]
	lsl	r1, r1, #1
	adds	r6, r4, r2
	adc	r7, r5, r3
	ldr	r2, .L25+4
	lsl	r3, r1, #3
	add	r3, r2, r3
	stm	r3, {r6-r7}
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #1
	ldr	r2, .L25
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r8-r9}
	ldr	r2, .L25+4
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r6-r7}
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-48]
	sub	r3, r2, r3
	add	r3, r3, #1
	mov	r4, r3
	asr	r5, r4, #31
	mul	r2, r4, r7
	mul	r3, r6, r5
	add	r3, r2, r3
	umull	r0, r1, r6, r4
	add	r3, r3, r1
	mov	r1, r3
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #1
	adds	r2, r8, r0
	str	r2, [fp, #-68]
	adc	r2, r9, r1
	str	r2, [fp, #-64]
	ldr	r2, .L25
	lsl	r3, r3, #3
	add	r3, r2, r3
	sub	r2, fp, #68
	ldmia	r2, {r1-r2}
	stm	r3, {r1-r2}
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #1
	orr	r3, r3, #1
	ldr	r2, .L25+4
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r0-r1}
	ldr	r2, .L25+4
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	ldr	ip, [fp, #-56]
	lsl	ip, ip, #1
	orr	ip, ip, #1
	adds	lr, r0, r2
	str	lr, [fp, #-76]
	adc	r3, r1, r3
	str	r3, [fp, #-72]
	ldr	r2, .L25+4
	lsl	r3, ip, #3
	add	r3, r2, r3
	sub	r2, fp, #76
	ldmia	r2, {r1-r2}
	stm	r3, {r1-r2}
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #1
	orr	r3, r3, #1
	ldr	r2, .L25
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r6-r7}
	ldr	r2, .L25+4
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldmia	r3, {r4-r5}
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-40]
	sub	r3, r2, r3
	mov	r0, r3
	asr	r1, r0, #31
	mul	r2, r0, r5
	mul	r3, r4, r1
	add	ip, r2, r3
	umull	r2, r3, r4, r0
	add	r1, ip, r3
	mov	r3, r1
	ldr	r1, [fp, #-56]
	lsl	r1, r1, #1
	orr	r1, r1, #1
	adds	r0, r6, r2
	str	r0, [fp, #-84]
	adc	r3, r7, r3
	str	r3, [fp, #-80]
	ldr	r2, .L25
	lsl	r3, r1, #3
	add	r3, r2, r3
	sub	r2, fp, #84
	ldmia	r2, {r1-r2}
	stm	r3, {r1-r2}
	ldr	r2, .L25+4
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #3
	add	r1, r2, r3
	mov	r2, #0
	mov	r3, #0
	stm	r1, {r2-r3}
	ldr	r2, [fp, #-60]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	bgt	.L24
	ldr	r3, [fp, #-56]
	lsl	r2, r3, #1
	ldr	r3, [fp, #4]
	str	r3, [sp]
	ldr	r3, [fp, #-60]
	ldr	r1, [fp, #-40]
	ldr	r0, [fp, #-48]
	bl	query
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	adds	ip, r2, r0
	str	ip, [fp, #-92]
	adc	r3, r3, r1
	str	r3, [fp, #-88]
	sub	r4, fp, #92
	ldmia	r4, {r3-r4}
	str	r3, [fp, #-36]
	str	r4, [fp, #-32]
.L24:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #4]
	cmp	r2, r3
	bge	.L23
	ldr	r3, [fp, #-40]
	add	r0, r3, #1
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #1
	orr	r2, r3, #1
	ldr	r3, [fp, #4]
	str	r3, [sp]
	ldr	r3, [fp, #-60]
	ldr	r1, [fp, #-52]
	bl	query
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	adds	ip, r2, r0
	str	ip, [fp, #-100]
	adc	r3, r3, r1
	str	r3, [fp, #-96]
	sub	r4, fp, #100
	ldmia	r4, {r3-r4}
	str	r3, [fp, #-36]
	str	r4, [fp, #-32]
.L23:
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
.L21:
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L26:
	.align	2
.L25:
	.word	S
	.word	A
	.size	query, .-query
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
