	.file	"extr_meshbuilder.c_d3drm_array_reserve.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	d3drm_array_reserve
	.type	d3drm_array_reserve, @function
d3drm_array_reserve:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	edi, DWORD PTR [rsi]
	cmp	edi, edx
	jge	.L12
	mov	eax, -1
	mov	ebp, edx
	mov	r12d, ecx
	cdq
	idiv	ecx
	cmp	ebp, eax
	jle	.L4
.L7:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, DWORD PTR FALSE[rip]
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	r13, rsi
	mov	esi, 4
	call	max@PLT
	mov	ebx, eax
	cmp	ebp, eax
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	add	ebx, ebx
	cmp	ebp, ebx
	jg	.L6
.L5:
	mov	esi, r12d
	mov	rdi, QWORD PTR [r14]
	imul	esi, ebx
	call	heap_realloc@PLT
	test	rax, rax
	je	.L7
	mov	QWORD PTR [r14], rax
	mov	DWORD PTR 0[r13], ebx
.L12:
	pop	rbx
	.cfi_def_cfa_offset 40
	mov	eax, DWORD PTR TRUE[rip]
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	d3drm_array_reserve, .-d3drm_array_reserve
	.comm	TRUE,4,4
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_meshbuilder.c_d3drm_array_reserve.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.global	d3drm_array_reserve
	.syntax unified
	.arm
	.fpu softvfp
	.type	d3drm_array_reserve, %function
d3drm_array_reserve:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r4, [r1]
	cmp	r4, r2
	bge	.L13
	mov	r6, r1
	mov	r8, r0
	mov	r1, r3
	mvn	r0, #0
	mov	r5, r2
	mov	r7, r3
	bl	__aeabi_idiv
	cmp	r5, r0
	ble	.L4
.L7:
	ldr	r3, .L14
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	mov	r0, r4
	mov	r1, #4
	bl	max
	cmp	r5, r0
	mov	r4, r0
	ble	.L5
.L6:
	lsl	r4, r4, #1
	cmp	r5, r4
	bgt	.L6
.L5:
	mul	r1, r7, r4
	ldr	r0, [r8]
	bl	heap_realloc
	cmp	r0, #0
	beq	.L7
	ldr	r3, .L14+4
	str	r0, [r8]
	str	r4, [r6]
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	ldr	r3, .L14+4
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L15:
	.align	2
.L14:
	.word	FALSE
	.word	TRUE
	.size	d3drm_array_reserve, .-d3drm_array_reserve
	.comm	TRUE,4,4
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
