	.file	"83291.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -12[rbp], 1
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	solve
	add	DWORD PTR -12[rbp], 1
.L2:
	mov	eax, DWORD PTR -16[rbp]
	cmp	DWORD PTR -12[rbp], eax
	jle	.L3
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC1:
	.string	"%d%d"
.LC2:
	.string	"Case #%d: %d %d\n"
	.text
	.globl	solve
	.type	solve, @function
solve:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 112
	mov	DWORD PTR -100[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -84[rbp]
	lea	rax, -88[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -88[rbp]
	mov	eax, DWORD PTR -84[rbp]
	cmp	edx, eax
	jne	.L7
	mov	eax, DWORD PTR -100[rbp]
	mov	ecx, 0
	mov	edx, 0
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L6
.L7:
	mov	esi, 12
	mov	edi, 1000000
	call	calloc@PLT
	mov	QWORD PTR -64[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR -56[rbp], rax
	mov	DWORD PTR -76[rbp], 1
	jmp	.L9
.L10:
	mov	eax, DWORD PTR -76[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	mov	DWORD PTR 4[rax], 0
	mov	DWORD PTR 8[rax], 0
	add	DWORD PTR -76[rbp], 1
.L9:
	mov	eax, DWORD PTR -88[rbp]
	cmp	DWORD PTR -76[rbp], eax
	jle	.L10
	mov	ecx, DWORD PTR -88[rbp]
	mov	edx, DWORD PTR -88[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	DWORD PTR [rax], 1
	mov	rax, QWORD PTR -64[rbp]
	mov	DWORD PTR 4[rax], ecx
	mov	rax, QWORD PTR -64[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	DWORD PTR -80[rbp], 1
	mov	DWORD PTR -76[rbp], 0
	jmp	.L11
.L14:
	mov	eax, DWORD PTR -80[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -80[rbp], edx
	mov	rdx, QWORD PTR -64[rbp]
	mov	esi, eax
	mov	rdi, rdx
	call	pop_heaproot
	mov	QWORD PTR -44[rbp], rax
	mov	eax, DWORD PTR -36[rbp]
	and	eax, 0
	or	eax, edx
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	mov	ecx, DWORD PTR -44[rbp]
	mov	edx, DWORD PTR -40[rbp]
	add	edx, ecx
	mov	ecx, edx
	shr	ecx, 31
	add	edx, ecx
	sar	edx
	lea	ecx, -1[rdx]
	mov	esi, DWORD PTR -44[rbp]
	mov	edx, DWORD PTR -40[rbp]
	add	edx, esi
	mov	esi, edx
	shr	esi, 31
	add	edx, esi
	sar	edx
	mov	esi, DWORD PTR -44[rbp]
	sub	edx, esi
	mov	DWORD PTR -32[rbp], eax
	mov	DWORD PTR -28[rbp], ecx
	mov	DWORD PTR -24[rbp], edx
	mov	edx, DWORD PTR -44[rbp]
	mov	eax, DWORD PTR -40[rbp]
	add	eax, edx
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	lea	ecx, 1[rax]
	mov	edx, DWORD PTR -40[rbp]
	mov	esi, DWORD PTR -40[rbp]
	mov	edi, DWORD PTR -44[rbp]
	mov	eax, DWORD PTR -40[rbp]
	add	eax, edi
	mov	edi, eax
	shr	edi, 31
	add	eax, edi
	sar	eax
	neg	eax
	add	eax, esi
	mov	DWORD PTR -20[rbp], ecx
	mov	DWORD PTR -16[rbp], edx
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -32[rbp]
	test	eax, eax
	jle	.L12
	mov	edx, DWORD PTR -28[rbp]
	mov	eax, DWORD PTR -32[rbp]
	cmp	edx, eax
	jl	.L12
	mov	eax, DWORD PTR -24[rbp]
	test	eax, eax
	jle	.L12
	mov	esi, DWORD PTR -80[rbp]
	lea	eax, 1[rsi]
	mov	DWORD PTR -80[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	ecx, DWORD PTR -24[rbp]
	mov	rdx, rcx
	mov	rdi, QWORD PTR -64[rbp]
	mov	rcx, rdx
	mov	rdx, rax
	call	add_heap
.L12:
	mov	eax, DWORD PTR -20[rbp]
	test	eax, eax
	jle	.L13
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -20[rbp]
	cmp	edx, eax
	jl	.L13
	mov	eax, DWORD PTR -12[rbp]
	test	eax, eax
	jle	.L13
	mov	esi, DWORD PTR -80[rbp]
	lea	eax, 1[rsi]
	mov	DWORD PTR -80[rbp], eax
	mov	rax, QWORD PTR -20[rbp]
	mov	ecx, DWORD PTR -12[rbp]
	mov	rdx, rcx
	mov	rdi, QWORD PTR -64[rbp]
	mov	rcx, rdx
	mov	rdx, rax
	call	add_heap
.L13:
	add	DWORD PTR -76[rbp], 1
.L11:
	mov	eax, DWORD PTR -84[rbp]
	cmp	DWORD PTR -76[rbp], eax
	jl	.L14
	mov	edx, DWORD PTR -44[rbp]
	mov	eax, DWORD PTR -40[rbp]
	add	eax, edx
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	edx, DWORD PTR -44[rbp]
	sub	eax, edx
	mov	DWORD PTR -72[rbp], eax
	mov	edx, DWORD PTR -40[rbp]
	mov	ecx, DWORD PTR -44[rbp]
	mov	eax, DWORD PTR -40[rbp]
	add	eax, ecx
	mov	ecx, eax
	shr	ecx, 31
	add	eax, ecx
	sar	eax
	neg	eax
	add	eax, edx
	mov	DWORD PTR -68[rbp], eax
	mov	eax, DWORD PTR -68[rbp]
	cmp	DWORD PTR -72[rbp], eax
	cmovle	eax, DWORD PTR -72[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -68[rbp]
	cmp	DWORD PTR -72[rbp], eax
	cmovge	eax, DWORD PTR -72[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L6:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	solve, .-solve
	.globl	comp
	.type	comp, @function
comp:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, rdx
	mov	rdx, rcx
	mov	QWORD PTR -16[rbp], rdi
	mov	DWORD PTR -8[rbp], esi
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR -24[rbp]
	and	eax, 0
	or	eax, edx
	mov	DWORD PTR -24[rbp], eax
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -24[rbp]
	cmp	edx, eax
	jle	.L17
	mov	eax, 1
	jmp	.L18
.L17:
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -24[rbp]
	cmp	edx, eax
	jge	.L19
	mov	eax, -1
	jmp	.L18
.L19:
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -32[rbp]
	cmp	edx, eax
	jge	.L20
	mov	eax, 1
	jmp	.L18
.L20:
	mov	eax, -1
.L18:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	comp, .-comp
	.globl	add_heap
	.type	add_heap, @function
add_heap:
.LFB9:
	.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	rax, rdx
	mov	rdx, rcx
	mov	QWORD PTR -44[rbp], rax
	mov	eax, DWORD PTR -36[rbp]
	and	eax, 0
	or	eax, edx
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR -44[rbp]
	mov	QWORD PTR [rax], rdx
	mov	edx, DWORD PTR -36[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -16[rbp], eax
	jmp	.L22
.L26:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, [rdx+rax]
	mov	eax, DWORD PTR -16[rbp]
	sub	eax, 1
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR [rsi]
	mov	esi, DWORD PTR 8[rsi]
	mov	rdx, rsi
	mov	rdi, QWORD PTR [rcx]
	mov	esi, DWORD PTR 8[rcx]
	mov	rcx, rdx
	mov	rdx, rax
	call	comp
	cmp	eax, -1
	jne	.L27
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	QWORD PTR -12[rbp], rdx
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	sub	eax, 1
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -16[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 2
	mov	rcx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	mov	rcx, QWORD PTR [rdx]
	mov	QWORD PTR [rax], rcx
	mov	edx, DWORD PTR 8[rdx]
	mov	DWORD PTR 8[rax], edx
	mov	eax, DWORD PTR -16[rbp]
	sub	eax, 1
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR -12[rbp]
	mov	QWORD PTR [rax], rdx
	mov	edx, DWORD PTR -4[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	eax, DWORD PTR -16[rbp]
	sub	eax, 1
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -16[rbp], eax
.L22:
	cmp	DWORD PTR -16[rbp], 0
	jg	.L26
	jmp	.L28
.L27:
	nop
.L28:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	add_heap, .-add_heap
	.globl	pop_heaproot
	.type	pop_heaproot, @function
pop_heaproot:
.LFB10:
	.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	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	QWORD PTR -36[rbp], rdx
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -60[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	lea	rdx, -12[rax]
	mov	rax, QWORD PTR -56[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR [rdx]
	mov	QWORD PTR [rax], rcx
	mov	edx, DWORD PTR 8[rdx]
	mov	DWORD PTR 8[rax], edx
	mov	DWORD PTR -44[rbp], 0
	jmp	.L30
.L36:
	mov	eax, DWORD PTR -44[rbp]
	add	eax, 1
	lea	edx, [rax+rax]
	mov	eax, DWORD PTR -60[rbp]
	sub	eax, 1
	cmp	edx, eax
	jge	.L31
	mov	eax, DWORD PTR -44[rbp]
	add	eax, eax
	cdqe
	lea	rdx, 1[rax]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	lea	rsi, [rdx+rax]
	mov	eax, DWORD PTR -44[rbp]
	add	eax, eax
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	lea	rdx, 24[rax]
	mov	rax, QWORD PTR -56[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR [rsi]
	mov	esi, DWORD PTR 8[rsi]
	mov	rdx, rsi
	mov	rdi, QWORD PTR [rcx]
	mov	esi, DWORD PTR 8[rcx]
	mov	rcx, rdx
	mov	rdx, rax
	call	comp
	cmp	eax, 1
	jne	.L31
	mov	eax, DWORD PTR -44[rbp]
	add	eax, 1
	add	eax, eax
	mov	DWORD PTR -40[rbp], eax
	jmp	.L32
.L31:
	mov	eax, DWORD PTR -44[rbp]
	add	eax, eax
	add	eax, 1
	mov	DWORD PTR -40[rbp], eax
.L32:
	mov	eax, DWORD PTR -44[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	lea	rsi, [rdx+rax]
	mov	eax, DWORD PTR -40[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR [rsi]
	mov	esi, DWORD PTR 8[rsi]
	mov	rdx, rsi
	mov	rdi, QWORD PTR [rcx]
	mov	esi, DWORD PTR 8[rcx]
	mov	rcx, rdx
	mov	rdx, rax
	call	comp
	cmp	eax, 1
	jne	.L38
	mov	eax, DWORD PTR -44[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	QWORD PTR -24[rbp], rdx
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -40[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -44[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 2
	mov	rcx, rax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rcx
	mov	rcx, QWORD PTR [rdx]
	mov	QWORD PTR [rax], rcx
	mov	edx, DWORD PTR 8[rdx]
	mov	DWORD PTR 8[rax], edx
	mov	eax, DWORD PTR -40[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	edx, DWORD PTR -16[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	eax, DWORD PTR -40[rbp]
	mov	DWORD PTR -44[rbp], eax
.L30:
	mov	eax, DWORD PTR -44[rbp]
	lea	edx, [rax+rax]
	mov	eax, DWORD PTR -60[rbp]
	sub	eax, 2
	cmp	edx, eax
	jl	.L36
	jmp	.L35
.L38:
	nop
.L35:
	mov	rax, QWORD PTR -36[rbp]
	mov	QWORD PTR -12[rbp], rax
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -12[rbp]
	mov	ecx, DWORD PTR -4[rbp]
	mov	rdx, rcx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	pop_heaproot, .-pop_heaproot
	.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	"83291.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, .L6+4
	bl	__isoc99_scanf
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L2
.L3:
	ldr	r0, [fp, #-12]
	bl	solve
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	ble	.L3
	mov	r3, #0
	ldr	r2, .L6
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L5
	bl	__stack_chk_fail
.L5:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC1
	.word	.LC0
	.size	main, .-main
	.section	.rodata
	.align	2
.LC2:
	.ascii	"%d%d\000"
	.align	2
.LC3:
	.ascii	"Case #%d: %d %d\012\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	solve
	.syntax unified
	.arm
	.fpu softvfp
	.type	solve, %function
solve:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #88
	str	r0, [fp, #-80]
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r2, fp, #72
	sub	r3, fp, #76
	mov	r1, r3
	ldr	r0, .L18+4
	bl	__isoc99_scanf
	ldr	r2, [fp, #-76]
	ldr	r3, [fp, #-72]
	cmp	r2, r3
	bne	.L9
	mov	r3, #0
	mov	r2, #0
	ldr	r1, [fp, #-80]
	ldr	r0, .L18+8
	bl	printf
	b	.L8
.L9:
	mov	r1, #12
	ldr	r0, .L18+12
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	str	r3, [fp, #-56]
	mov	r3, #1
	str	r3, [fp, #-64]
	b	.L11
.L12:
	ldr	r2, [fp, #-64]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-60]
	add	r3, r3, r2
	mov	r2, #0
	str	r2, [r3]
	mov	r2, #0
	str	r2, [r3, #4]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L11:
	ldr	r3, [fp, #-76]
	ldr	r2, [fp, #-64]
	cmp	r2, r3
	ble	.L12
	ldr	r1, [fp, #-76]
	ldr	r2, [fp, #-76]
	ldr	r3, [fp, #-60]
	mov	r0, #1
	str	r0, [r3]
	ldr	r3, [fp, #-60]
	str	r1, [r3, #4]
	ldr	r3, [fp, #-60]
	str	r2, [r3, #8]
	mov	r3, #1
	str	r3, [fp, #-68]
	mov	r3, #0
	str	r3, [fp, #-64]
	b	.L13
.L16:
	ldr	r3, [fp, #-68]
	sub	r2, r3, #1
	str	r2, [fp, #-68]
	sub	r0, fp, #44
	mov	r2, r3
	ldr	r1, [fp, #-60]
	bl	pop_heaproot
	ldr	r1, [fp, #-44]
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-40]
	add	r3, r2, r3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	sub	r2, r3, #1
	ldr	r0, [fp, #-44]
	ldr	r3, [fp, #-40]
	add	r3, r0, r3
	lsr	r0, r3, #31
	add	r3, r0, r3
	asr	r3, r3, #1
	mov	r0, r3
	ldr	r3, [fp, #-44]
	sub	r3, r0, r3
	str	r1, [fp, #-32]
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-40]
	add	r3, r2, r3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	add	r1, r3, #1
	ldr	r2, [fp, #-40]
	ldr	r0, [fp, #-40]
	ldr	ip, [fp, #-44]
	ldr	r3, [fp, #-40]
	add	r3, ip, r3
	lsr	ip, r3, #31
	add	r3, ip, r3
	asr	r3, r3, #1
	rsb	r3, r3, #0
	add	r3, r0, r3
	str	r1, [fp, #-20]
	str	r2, [fp, #-16]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	ble	.L14
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	blt	.L14
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	ble	.L14
	ldr	r1, [fp, #-68]
	add	r3, r1, #1
	str	r3, [fp, #-68]
	ldr	r3, [fp, #-24]
	str	r3, [sp]
	sub	r3, fp, #32
	ldm	r3, {r2, r3}
	ldr	r0, [fp, #-60]
	bl	add_heap
.L14:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	ble	.L15
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L15
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	ble	.L15
	ldr	r1, [fp, #-68]
	add	r3, r1, #1
	str	r3, [fp, #-68]
	ldr	r3, [fp, #-12]
	str	r3, [sp]
	sub	r3, fp, #20
	ldm	r3, {r2, r3}
	ldr	r0, [fp, #-60]
	bl	add_heap
.L15:
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L13:
	ldr	r3, [fp, #-72]
	ldr	r2, [fp, #-64]
	cmp	r2, r3
	blt	.L16
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-40]
	add	r3, r2, r3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-44]
	sub	r3, r2, r3
	str	r3, [fp, #-52]
	ldr	r2, [fp, #-40]
	ldr	r1, [fp, #-44]
	ldr	r3, [fp, #-40]
	add	r3, r1, r3
	lsr	r1, r3, #31
	add	r3, r1, r3
	asr	r3, r3, #1
	rsb	r3, r3, #0
	add	r3, r2, r3
	str	r3, [fp, #-48]
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	movge	r1, r2
	movlt	r1, r3
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	movlt	r3, r2
	movge	r3, r3
	mov	r2, r1
	ldr	r1, [fp, #-80]
	ldr	r0, .L18+8
	bl	printf
.L8:
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC4
	.word	.LC2
	.word	.LC3
	.word	1000000
	.size	solve, .-solve
	.align	2
	.global	comp
	.syntax unified
	.arm
	.fpu softvfp
	.type	comp, %function
comp:
	@ args = 16, pretend = 8, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	sub	sp, sp, #8
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	sub	ip, fp, #16
	stm	ip, {r0, r1, r2}
	str	r3, [fp, #8]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #16]
	cmp	r2, r3
	ble	.L21
	mov	r3, #1
	b	.L22
.L21:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #16]
	cmp	r2, r3
	bge	.L23
	mvn	r3, #0
	b	.L22
.L23:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #8]
	cmp	r2, r3
	bge	.L24
	mov	r3, #1
	b	.L22
.L24:
	mvn	r3, #0
.L22:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	add	sp, sp, #8
	bx	lr
	.size	comp, .-comp
	.align	2
	.global	add_heap
	.syntax unified
	.arm
	.fpu softvfp
	.type	add_heap, %function
add_heap:
	@ args = 12, pretend = 8, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	sub	sp, sp, #8
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	add	r1, fp, #4
	stm	r1, {r2, r3}
	ldr	r2, [fp, #-28]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	mov	ip, r3
	add	r3, fp, #4
	ldm	r3, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-20]
	b	.L26
.L30:
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r2, r3, r2
	ldr	r1, [fp, #-20]
	mov	r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r1
	lsl	r3, r3, #2
	mov	r1, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r1
	mov	ip, sp
	add	r1, r3, #4
	ldm	r1, {r0, r1}
	stm	ip, {r0, r1}
	ldr	r3, [r3]
	ldm	r2, {r0, r1, r2}
	bl	comp
	mov	r3, r0
	cmn	r3, #1
	bne	.L31
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r2, r3, r2
	sub	r3, fp, #16
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r1, r3, r2
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	mov	r2, r1
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	mov	ip, r3
	sub	r3, fp, #16
	ldm	r3, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-20]
.L26:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bgt	.L30
	b	.L32
.L31:
	nop
.L32:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, lr}
	add	sp, sp, #8
	bx	lr
	.size	add_heap, .-add_heap
	.align	2
	.global	pop_heaproot
	.syntax unified
	.arm
	.fpu softvfp
	.type	pop_heaproot, %function
pop_heaproot:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	str	r2, [fp, #-48]
	ldr	r2, [fp, #-44]
	sub	r3, fp, #28
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	ldr	r2, [fp, #-48]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r3, r3, #12
	ldr	r2, [fp, #-44]
	add	r2, r2, r3
	ldr	r3, [fp, #-44]
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L34
.L40:
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	lsl	r2, r3, #1
	ldr	r3, [fp, #-48]
	sub	r3, r3, #1
	cmp	r2, r3
	bge	.L35
	ldr	r3, [fp, #-36]
	add	r2, r3, #1
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	mov	r2, r3
	ldr	r3, [fp, #-44]
	add	r2, r3, r2
	ldr	r1, [fp, #-36]
	mov	r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r1
	lsl	r3, r3, #3
	add	r3, r3, #12
	ldr	r1, [fp, #-44]
	add	r3, r1, r3
	mov	ip, sp
	add	r1, r3, #4
	ldm	r1, {r0, r1}
	stm	ip, {r0, r1}
	ldr	r3, [r3]
	ldm	r2, {r0, r1, r2}
	bl	comp
	mov	r3, r0
	cmp	r3, #1
	bne	.L35
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	lsl	r3, r3, #1
	str	r3, [fp, #-32]
	b	.L36
.L35:
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #1
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L36:
	ldr	r2, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-44]
	add	r2, r3, r2
	ldr	r1, [fp, #-36]
	mov	r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r1
	lsl	r3, r3, #2
	mov	r1, r3
	ldr	r3, [fp, #-44]
	add	r3, r3, r1
	mov	ip, sp
	add	r1, r3, #4
	ldm	r1, {r0, r1}
	stm	ip, {r0, r1}
	ldr	r3, [r3]
	ldm	r2, {r0, r1, r2}
	bl	comp
	mov	r3, r0
	cmp	r3, #1
	bne	.L42
	ldr	r2, [fp, #-36]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-44]
	add	r2, r3, r2
	sub	r3, fp, #16
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	ldr	r2, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-44]
	add	r1, r3, r2
	ldr	r2, [fp, #-36]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-44]
	add	r3, r3, r2
	mov	r2, r1
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	ldr	r2, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-44]
	add	r3, r3, r2
	mov	ip, r3
	sub	r3, fp, #16
	ldm	r3, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-36]
.L34:
	ldr	r3, [fp, #-36]
	lsl	r2, r3, #1
	ldr	r3, [fp, #-48]
	sub	r3, r3, #2
	cmp	r2, r3
	blt	.L40
	b	.L39
.L42:
	nop
.L39:
	ldr	r3, [fp, #-40]
	mov	ip, r3
	sub	r3, fp, #28
	ldm	r3, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
	ldr	r0, [fp, #-40]
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	pop_heaproot, .-pop_heaproot
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
