	.file	"345911.c"
	.intel_syntax noprefix
	.text
	.globl	minHeightShelves
	.type	minHeightShelves, @function
minHeightShelves:
.LFB0:
	.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, 104
	.cfi_offset 3, -24
	mov	QWORD PTR -88[rbp], rdi
	mov	DWORD PTR -92[rbp], esi
	mov	QWORD PTR -104[rbp], rdx
	mov	DWORD PTR -96[rbp], ecx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	mov	eax, DWORD PTR -92[rbp]
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -40[rbp], rdx
	movsx	rdx, eax
	mov	r10, rdx
	mov	r11d, 0
	movsx	rdx, eax
	mov	r8, rdx
	mov	r9d, 0
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	edi, 16
	mov	edx, 0
	div	rdi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L2:
	cmp	rsp, rdx
	je	.L3
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L2
.L3:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L4
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L4:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR -92[rbp]
	sub	eax, 1
	mov	DWORD PTR -52[rbp], eax
	mov	rax, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax], edx
	mov	DWORD PTR -56[rbp], 1
	jmp	.L5
.L12:
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -48[rbp], eax
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -56[rbp]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -32[rbp]
	movsx	rdx, edx
	mov	edx, DWORD PTR [rax+rdx*4]
	mov	eax, DWORD PTR -44[rbp]
	lea	ecx, [rdx+rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -56[rbp]
	movsx	rdx, edx
	mov	DWORD PTR [rax+rdx*4], ecx
	mov	eax, DWORD PTR -56[rbp]
	sub	eax, 1
	mov	DWORD PTR -60[rbp], eax
	mov	eax, DWORD PTR -48[rbp]
	mov	DWORD PTR -64[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	mov	DWORD PTR -68[rbp], eax
	jmp	.L6
.L10:
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	add	DWORD PTR -64[rbp], eax
	mov	eax, DWORD PTR -64[rbp]
	cmp	eax, DWORD PTR -96[rbp]
	jg	.L15
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	add	rax, 4
	mov	eax, DWORD PTR [rax]
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, DWORD PTR -68[rbp]
	movq	rax, xmm2
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	fmax@PLT
	cvttsd2si	eax, xmm0
	mov	DWORD PTR -68[rbp], eax
	cmp	DWORD PTR -60[rbp], 0
	jle	.L8
	mov	eax, DWORD PTR -60[rbp]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -32[rbp]
	movsx	rdx, edx
	mov	edx, DWORD PTR [rax+rdx*4]
	mov	eax, DWORD PTR -68[rbp]
	add	eax, edx
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -56[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	pxor	xmm3, xmm3
	cvtsi2sd	xmm3, eax
	movq	rax, xmm3
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	fmin@PLT
	cvttsd2si	ecx, xmm0
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -56[rbp]
	movsx	rdx, edx
	mov	DWORD PTR [rax+rdx*4], ecx
.L8:
	sub	DWORD PTR -60[rbp], 1
.L6:
	cmp	DWORD PTR -60[rbp], 0
	jns	.L10
	jmp	.L9
.L15:
	nop
.L9:
	cmp	DWORD PTR -60[rbp], 0
	js	.L11
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -60[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	add	DWORD PTR -68[rbp], eax
.L11:
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, DWORD PTR -68[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -56[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	pxor	xmm4, xmm4
	cvtsi2sd	xmm4, eax
	movq	rax, xmm4
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	fmin@PLT
	cvttsd2si	ecx, xmm0
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -56[rbp]
	movsx	rdx, edx
	mov	DWORD PTR [rax+rdx*4], ecx
	add	DWORD PTR -56[rbp], 1
.L5:
	mov	eax, DWORD PTR -56[rbp]
	cmp	eax, DWORD PTR -52[rbp]
	jle	.L12
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -52[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	rsp, rbx
	mov	rsi, QWORD PTR -24[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	minHeightShelves, .-minHeightShelves
	.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	"345911.c"
	.text
	.global	__aeabi_i2d
	.global	__aeabi_d2iz
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	minHeightShelves
	.syntax unified
	.arm
	.fpu softvfp
	.type	minHeightShelves, %function
minHeightShelves:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #60
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	str	r2, [fp, #-72]
	str	r3, [fp, #-76]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	mov	r3, sp
	mov	r6, r3
	ldr	ip, [fp, #-68]
	sub	r3, ip, #1
	str	r3, [fp, #-44]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-68]
	sub	r3, r3, #1
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-64]
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-40]
	str	r2, [r3]
	mov	r3, #1
	str	r3, [fp, #-48]
	b	.L2
.L9:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-48]
	sub	r2, r3, #1
	ldr	r3, [fp, #-40]
	ldr	r2, [r3, r2, lsl #2]
	ldr	r3, [fp, #-28]
	add	r1, r2, r3
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-48]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-48]
	sub	r3, r3, #1
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-60]
	b	.L3
.L7:
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, [fp, #-56]
	add	r3, r2, r3
	str	r3, [fp, #-56]
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-76]
	cmp	r2, r3
	bgt	.L12
	ldr	r0, [fp, #-60]
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldr	r3, [r3]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	fmax
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	ble	.L5
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-48]
	ldr	r3, [r3, r2, lsl #2]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r3, [fp, #-52]
	sub	r2, r3, #1
	ldr	r3, [fp, #-40]
	ldr	r2, [r3, r2, lsl #2]
	ldr	r3, [fp, #-60]
	add	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	fmin
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r1, r0
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-48]
	str	r1, [r3, r2, lsl #2]
.L5:
	ldr	r3, [fp, #-52]
	sub	r3, r3, #1
	str	r3, [fp, #-52]
.L3:
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	bge	.L7
	b	.L6
.L12:
	nop
.L6:
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	blt	.L8
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-52]
	ldr	r3, [r3, r2, lsl #2]
	ldr	r2, [fp, #-60]
	add	r3, r2, r3
	str	r3, [fp, #-60]
.L8:
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-48]
	ldr	r3, [r3, r2, lsl #2]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r0, [fp, #-60]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	fmin
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r1, r0
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-48]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L2:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	ble	.L9
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-36]
	ldr	r3, [r3, r2, lsl #2]
	mov	sp, r6
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC0
	.size	minHeightShelves, .-minHeightShelves
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
