	.file	"985387.c"
	.intel_syntax noprefix
	.text
	.globl	mallocRes
	.type	mallocRes, @function
mallocRes:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 72
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	QWORD PTR -56[rbp], rdx
	mov	QWORD PTR -64[rbp], rcx
	mov	QWORD PTR -72[rbp], r8
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -44[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rcx, QWORD PTR -56[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -28[rbp], 0
	jmp	.L2
.L3:
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cdqe
	sal	rax, 2
	mov	edx, DWORD PTR -28[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -24[rbp]
	lea	rbx, [rcx+rdx]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rcx, rax
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rsi, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rsi
	mov	rax, QWORD PTR [rax]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	add	DWORD PTR -28[rbp], 1
.L2:
	mov	rax, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -28[rbp], eax
	jl	.L3
	mov	rax, QWORD PTR -24[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	mallocRes, .-mallocRes
	.globl	findSolution
	.type	findSolution, @function
findSolution:
.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, 64
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	QWORD PTR -56[rbp], rdx
	mov	QWORD PTR -64[rbp], rcx
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR [rax], 0
	mov	DWORD PTR -20[rbp], 1
	jmp	.L6
.L15:
	mov	eax, DWORD PTR -20[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	esi, 1
	mov	edi, eax
	call	rdx
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	esi, 1000
	mov	edi, eax
	call	rdx
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jg	.L17
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L18
	mov	DWORD PTR -16[rbp], 1
	mov	DWORD PTR -12[rbp], 1000
	jmp	.L11
.L14:
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, DWORD PTR -16[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	edx, eax
	mov	eax, DWORD PTR -16[rbp]
	add	eax, edx
	mov	DWORD PTR -8[rbp], eax
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rcx, QWORD PTR -40[rbp]
	mov	esi, edx
	mov	edi, eax
	call	rcx
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jne	.L12
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, staticResColSize.1[rip]
	mov	DWORD PTR [rdx+rax], 2
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	lea	rcx, 0[0+rax*8]
	lea	rdx, staticRes.0[rip]
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	lea	rcx, 0[0+rax*8]
	lea	rdx, staticRes.0[rip+4]
	mov	eax, DWORD PTR -8[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR [rax], edx
	jmp	.L10
.L12:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jge	.L13
	mov	eax, DWORD PTR -8[rbp]
	add	eax, 1
	mov	DWORD PTR -16[rbp], eax
	jmp	.L11
.L13:
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, 1
	mov	DWORD PTR -12[rbp], eax
.L11:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jle	.L14
	jmp	.L10
.L18:
	nop
.L10:
	add	DWORD PTR -20[rbp], 1
.L6:
	cmp	DWORD PTR -20[rbp], 1000
	jle	.L15
	jmp	.L8
.L17:
	nop
.L8:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rcx, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	mov	r8, rcx
	mov	rcx, rdx
	lea	rdx, staticResColSize.1[rip]
	mov	esi, eax
	lea	rdi, staticRes.0[rip]
	call	mallocRes
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	findSolution, .-findSolution
	.local	staticResColSize.1
	.comm	staticResColSize.1,4000,32
	.local	staticRes.0
	.comm	staticRes.0,8000,32
	.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	"985387.c"
	.text
	.align	2
	.global	mallocRes
	.syntax unified
	.arm
	.fpu softvfp
	.type	mallocRes, %function
mallocRes:
	@ args = 4, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-28]
	str	r2, [r3]
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #4]
	str	r2, [r3]
	ldr	r3, [fp, #4]
	ldr	r0, [r3]
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r1, [fp, #-32]
	bl	memcpy
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L2
.L3:
	ldr	r3, [fp, #4]
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r4, r2, r3
	mov	r0, r1
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r0, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-24]
	add	r1, r2, r3
	ldr	r3, [fp, #4]
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r2, r3
	bl	memcpy
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L2:
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L3
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	mallocRes, .-mallocRes
	.align	2
	.global	findSolution
	.syntax unified
	.arm
	.fpu softvfp
	.type	findSolution, %function
findSolution:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	str	r2, [fp, #-40]
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-40]
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #1
	str	r3, [fp, #-24]
	b	.L6
.L15:
	ldr	r3, [fp, #-32]
	mov	r1, #1
	ldr	r0, [fp, #-24]
	blx	r3
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-32]
	mov	r1, #1000
	ldr	r0, [fp, #-24]
	blx	r3
	str	r0, [fp, #-16]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	bgt	.L17
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	blt	.L18
	mov	r3, #1
	str	r3, [fp, #-20]
	mov	r3, #1000
	str	r3, [fp, #-16]
	b	.L11
.L14:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-20]
	add	r3, r3, r2
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-32]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-24]
	blx	r3
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	bne	.L12
	ldr	r3, [fp, #-40]
	ldr	r3, [r3]
	ldr	r2, .L19
	mov	r1, #2
	str	r1, [r2, r3, lsl #2]
	ldr	r3, [fp, #-40]
	ldr	r3, [r3]
	ldr	r1, .L19+4
	ldr	r2, [fp, #-24]
	str	r2, [r1, r3, lsl #3]
	ldr	r3, [fp, #-40]
	ldr	r3, [r3]
	ldr	r2, .L19+4
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-40]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-40]
	str	r2, [r3]
	b	.L10
.L12:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	bge	.L13
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	b	.L11
.L13:
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-16]
.L11:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	ble	.L14
	b	.L10
.L18:
	nop
.L10:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L6:
	ldr	r3, [fp, #-24]
	cmp	r3, #1000
	ble	.L15
	b	.L8
.L17:
	nop
.L8:
	ldr	r3, [fp, #-40]
	ldr	r1, [r3]
	ldr	r3, [fp, #-44]
	str	r3, [sp]
	ldr	r3, [fp, #-40]
	ldr	r2, .L19
	ldr	r0, .L19+4
	bl	mallocRes
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	staticResColSize.4980
	.word	staticRes.4979
	.size	findSolution, .-findSolution
	.local	staticResColSize.4980
	.comm	staticResColSize.4980,4000,4
	.local	staticRes.4979
	.comm	staticRes.4979,8000,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
