	.file	"extr_patch.c_ExpandMaxIterations.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ExpandMaxIterations, @function
ExpandMaxIterations:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	mov	r14, rcx
	push	r13
	push	r12
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	mov	r12, r8
	push	rbx
	sub	rsp, 104
	.cfi_offset 3, -56
	mov	QWORD PTR -128[rbp], rdi
	mov	rdi, rdx
	mov	DWORD PTR -88[rbp], esi
	mov	rcx, rsp
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MAX_EXPANDED_AXIS[rip]
	lea	rax, 15[0+rax*8]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L50:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L50
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L51
.L4:
	lea	r13, 7[rsp]
	mov	rbx, r13
	and	r13, -8
	shr	rbx, 3
	mov	rax, QWORD PTR 0[0+rbx*8]
	mov	rsi, rax
	mov	QWORD PTR -112[rbp], rax
	call	VectorCopy@PLT
	mov	rax, QWORD PTR 8[0+rbx*8]
	mov	rdi, r14
	xor	r14d, r14d
	mov	rsi, rax
	mov	QWORD PTR -120[rbp], rax
	call	VectorCopy@PLT
	mov	rax, QWORD PTR 16[0+rbx*8]
	mov	rdi, r12
	mov	ebx, 3
	mov	rsi, rax
	mov	QWORD PTR -136[rbp], rax
	call	VectorCopy@PLT
	lea	rcx, -8[r13]
	mov	QWORD PTR -80[rbp], r13
	mov	eax, 2
	mov	QWORD PTR -104[rbp], rcx
	.p2align 4,,10
	.p2align 3
.L13:
	lea	edx, 2[rbx]
	cmp	edx, DWORD PTR MAX_EXPANDED_AXIS[rip]
	mov	DWORD PTR -84[rbp], edx
	jge	.L46
	mov	rdi, QWORD PTR -80[rbp]
	movsx	rdx, r14d
	cdqe
	lea	rcx, [rdi+rdx*8]
	mov	r12, QWORD PTR [rdi+rax*8]
	xor	eax, eax
	mov	r13, QWORD PTR 8[rcx]
	mov	r15, QWORD PTR [rcx]
	mov	QWORD PTR -96[rbp], rcx
.L6:
	movss	xmm0, DWORD PTR 0[r13+rax]
	movss	xmm2, DWORD PTR [r15+rax]
	movss	xmm1, DWORD PTR [r12+rax]
	add	rax, 4
	addss	xmm0, xmm0
	addss	xmm0, xmm2
	addss	xmm0, xmm1
	mulss	xmm0, DWORD PTR .LC0[rip]
	movss	DWORD PTR -4[rax], xmm0
	cmp	rax, 12
	jne	.L6
	xor	r9d, r9d
	xor	r10d, r10d
	mov	rdi, r13
	mov	rdx, r9
	mov	rsi, r10
	mov	QWORD PTR -72[rbp], r9
	call	VectorSubtract@PLT
	mov	r9, QWORD PTR -72[rbp]
	mov	rdi, r9
	call	VectorLength@PLT
	pxor	xmm1, xmm1
	cvtsi2ss	xmm1, DWORD PTR -88[rbp]
	comiss	xmm1, xmm0
	jbe	.L44
	mov	eax, r14d
	add	r14d, 2
.L9:
	add	eax, 4
	cmp	eax, ebx
	jl	.L13
	mov	r13, QWORD PTR -80[rbp]
	cmp	ebx, 1
	jle	.L25
.L5:
	lea	edi, -2[rbx]
	mov	rsi, QWORD PTR -112[rbp]
	mov	rdx, QWORD PTR -120[rbp]
	mov	rcx, r13
	shr	edi
	movss	xmm2, DWORD PTR .LC1[rip]
	mov	r8, QWORD PTR -136[rbp]
	sal	rdi, 4
	add	rdi, r13
	.p2align 4,,10
	.p2align 3
.L17:
	xor	eax, eax
.L15:
	movss	xmm1, DWORD PTR [rdx+rax]
	movss	xmm0, DWORD PTR [r8+rax]
	addss	xmm0, xmm1
	addss	xmm1, DWORD PTR [rsi+rax]
	mulss	xmm0, xmm2
	mulss	xmm1, xmm2
	addss	xmm0, xmm1
	movss	DWORD PTR [rax], xmm1
	mulss	xmm0, xmm2
	movss	DWORD PTR [rdx+rax], xmm0
	add	rax, 4
	cmp	rax, 12
	jne	.L15
	cmp	rdi, rcx
	je	.L16
	mov	rdx, QWORD PTR 24[rcx]
	mov	r8, QWORD PTR 32[rcx]
	add	rcx, 16
	mov	rsi, QWORD PTR [rcx]
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L44:
	xor	eax, eax
.L7:
	movss	xmm1, DWORD PTR 0[r13+rax]
	movss	xmm0, DWORD PTR [r15+rax]
	addss	xmm0, xmm1
	addss	xmm1, DWORD PTR [r12+rax]
	add	rax, 4
	mulss	xmm0, DWORD PTR .LC1[rip]
	mulss	xmm1, DWORD PTR .LC1[rip]
	addss	xmm0, xmm1
	mulss	xmm0, DWORD PTR .LC1[rip]
	movss	DWORD PTR -4[rax], xmm0
	cmp	rax, 12
	jne	.L7
	lea	eax, 3[r14]
	cmp	ebx, eax
	jl	.L12
	movsx	rax, ebx
	mov	rcx, QWORD PTR -80[rbp]
	sub	ebx, 3
	sal	rax, 3
	sub	ebx, r14d
	sal	rbx, 3
	lea	r15, [rcx+rax]
	add	rax, QWORD PTR -104[rbp]
	sub	rax, rbx
	mov	rbx, rax
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rsi, QWORD PTR 8[r15]
	mov	rdi, QWORD PTR -8[r15]
	sub	r15, 8
	call	VectorCopy@PLT
	cmp	rbx, r15
	jne	.L11
.L12:
	mov	rsi, r13
	xor	edi, edi
	call	VectorCopy@PLT
	xor	r10d, r10d
	mov	rsi, r12
	mov	rdi, r10
	call	VectorCopy@PLT
	mov	rax, QWORD PTR -96[rbp]
	xor	edi, edi
	mov	rsi, QWORD PTR 24[rax]
	call	VectorCopy@PLT
	mov	ebx, DWORD PTR -84[rbp]
	lea	eax, -2[r14]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L47:
	mov	ebx, DWORD PTR -80[rbp]
.L25:
	mov	eax, ebx
	xor	edx, edx
	sar	eax
	cmp	ebx, 3
	jle	.L27
	.p2align 4,,10
	.p2align 3
.L28:
	sar	eax
	add	edx, 1
	cmp	eax, 1
	jne	.L28
.L27:
	mov	rax, QWORD PTR -128[rbp]
	cmp	DWORD PTR [rax], edx
	jge	.L1
	mov	DWORD PTR [rax], edx
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L52
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	cmp	ebx, 2
	jle	.L25
	mov	rsi, QWORD PTR -112[rbp]
	mov	r15, QWORD PTR -120[rbp]
	mov	DWORD PTR -80[rbp], ebx
	xor	r12d, r12d
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L53:
	xor	r14d, r14d
	mov	rsi, r14
	mov	rdi, r14
	call	DotProduct@PLT
	comiss	xmm0, DWORD PTR .LC3[rip]
	jnb	.L22
.L21:
	add	r12, 1
	lea	eax, 2[r12]
	cmp	DWORD PTR -80[rbp], eax
	jle	.L47
	mov	rsi, r15
	mov	r15, QWORD PTR 8[r13+r12*8]
.L26:
	xor	r14d, r14d
	mov	rdi, r15
	mov	rdx, r14
	call	VectorSubtract@PLT
	mov	rsi, r14
	mov	rdi, r14
	call	VectorNormalize@PLT
	mov	rdi, QWORD PTR 16[r13+r12*8]
	mov	rdx, r14
	mov	rsi, r15
	movss	DWORD PTR -72[rbp], xmm0
	call	VectorSubtract@PLT
	mov	rsi, r14
	mov	rdi, r14
	call	VectorNormalize@PLT
	movss	xmm4, DWORD PTR .LC2[rip]
	comiss	xmm4, DWORD PTR -72[rbp]
	ja	.L22
	movss	xmm6, DWORD PTR .LC2[rip]
	comiss	xmm6, xmm0
	jbe	.L53
.L22:
	lea	eax, 2[r12]
	cmp	DWORD PTR -80[rbp], eax
	jle	.L24
	mov	eax, DWORD PTR -80[rbp]
	lea	r14, 0[r13+r12*8]
	mov	rbx, r15
	sub	eax, 3
	sub	eax, r12d
	add	rax, r12
	lea	rax, 8[r13+rax*8]
	mov	QWORD PTR -72[rbp], rax
	.p2align 4,,10
	.p2align 3
.L23:
	mov	rsi, rbx
	mov	rbx, QWORD PTR 16[r14]
	add	r14, 8
	mov	rdi, rbx
	call	VectorCopy@PLT
	cmp	QWORD PTR -72[rbp], r14
	jne	.L23
.L24:
	sub	DWORD PTR -80[rbp], 1
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L46:
	mov	r13, QWORD PTR -80[rbp]
	jmp	.L5
.L51:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L52:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ExpandMaxIterations, .-ExpandMaxIterations
	.comm	MAX_EXPANDED_AXIS,4,4
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC0:
	.long	1048576000
	.align 4
.LC1:
	.long	1056964608
	.align 4
.LC2:
	.long	1031798784
	.align 4
.LC3:
	.long	1065353216
	.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_patch.c_ExpandMaxIterations.c"
	.text
	.global	__aeabi_fsub
	.global	__aeabi_fadd
	.global	__aeabi_fmul
	.global	__aeabi_i2f
	.global	__aeabi_fcmpgt
	.global	__aeabi_fcmplt
	.global	__aeabi_fcmpge
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ExpandMaxIterations, %function
ExpandMaxIterations:
	@ args = 4, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #108
	ldr	ip, .L45
	mov	lr, r0
	ldr	ip, [ip]
	mov	r4, r3
	lsl	ip, ip, #2
	add	ip, ip, #7
	bic	ip, ip, #7
	sub	sp, sp, ip
	mov	r6, sp
	mov	ip, r1
	ldr	r3, [r6]
	mov	r0, r2
	mov	r1, r3
	str	r3, [fp, #-132]
	ldr	r3, .L45+4
	str	lr, [fp, #-136]
	str	ip, [fp, #-124]
	str	r6, [fp, #-88]
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	ldr	r5, [fp, #4]
	bl	VectorCopy
	ldr	r3, [r6, #4]
	mov	r0, r4
	mov	r1, r3
	str	r3, [fp, #-128]
	bl	VectorCopy
	ldr	r3, [r6, #8]
	mov	r0, r5
	mov	r1, r3
	str	r3, [fp, #-140]
	bl	VectorCopy
	mov	r3, #3
	mov	r2, #0
	str	r3, [fp, #-48]
	mov	r8, #1056964608
	mov	r3, #2
	str	r2, [fp, #-76]
.L11:
	ldr	r2, .L45
	ldr	r1, [fp, #-48]
	ldr	r2, [r2]
	add	r1, r1, #2
	cmp	r1, r2
	str	r1, [fp, #-92]
	bge	.L2
	mvn	r10, #3
	ldr	r2, [fp, #-88]
	ldr	r0, [fp, #-76]
	ldr	ip, [r2, r3, lsl #2]
	add	r1, r2, r0, lsl #2
	ldr	r3, [r1, #4]
	mov	r9, r10
	add	r5, r3, r10
	str	r3, [fp, #-84]
	add	r3, r3, #8
	str	r3, [fp, #-64]
	mov	r3, r10
	ldr	r2, [r2, r0, lsl #2]
	str	r1, [fp, #-108]
	str	r2, [fp, #-100]
	add	r1, ip, r10
	add	r2, r2, r10
	str	r10, [fp, #-112]
	str	ip, [fp, #-104]
	str	r5, [fp, #-72]
	str	r1, [fp, #-120]
	str	r2, [fp, #-96]
	str	r1, [fp, #-52]
	str	r10, [fp, #-68]
	str	r10, [fp, #-116]
.L3:
	ldr	r7, [r2, #4]!	@ float
	ldr	r4, [r5, #4]!	@ float
	mov	r1, r7
	mov	r0, r4
	str	r2, [fp, #-56]
	str	r2, [fp, #-80]
	str	r3, [fp, #-60]
	bl	__aeabi_fsub
	ldr	r3, [fp, #-52]
	mov	r1, r4
	ldr	r6, [r3, #4]!	@ float
	str	r0, [r9, #4]!	@ float
	mov	r0, r6
	str	r3, [fp, #-52]
	bl	__aeabi_fsub
	mov	r1, r4
	str	r0, [r10, #4]!	@ float
	mov	r0, r4
	bl	__aeabi_fadd
	mov	r1, r7
	bl	__aeabi_fadd
	mov	r1, r6
	bl	__aeabi_fadd
	mov	r1, #1048576000
	bl	__aeabi_fmul
	ldr	r3, [fp, #-64]
	ldr	r2, [fp, #-56]
	cmp	r5, r3
	ldr	r3, [fp, #-60]
	str	r0, [r3, #4]!	@ float
	bne	.L3
	mov	r4, #0
	ldr	r0, [fp, #-84]
	mov	r1, r4
	mov	r2, r4
	bl	VectorSubtract
	mov	r0, r4
	bl	VectorLength
	mov	r4, r0
	ldr	r0, [fp, #-124]
	bl	__aeabi_i2f
	mov	r1, r4
	bl	__aeabi_fcmpgt
	cmp	r0, #0
	beq	.L39
	ldr	r2, [fp, #-76]
	mov	r3, r2
	add	r2, r2, #2
	str	r2, [fp, #-76]
.L6:
	ldr	r2, [fp, #-48]
	add	r3, r3, #4
	cmp	r3, r2
	blt	.L11
	cmp	r2, #1
	ble	.L24
.L2:
	ldr	r3, [fp, #-88]
	mov	r6, #1056964608
	str	r3, [fp, #-64]
	mov	r3, #1
	ldr	r7, [fp, #-132]
	ldr	r10, [fp, #-128]
	ldr	r2, [fp, #-140]
	str	r3, [fp, #-60]
.L15:
	mvn	r9, #3
	add	r2, r2, r9
	add	r3, r10, #8
	add	r5, r10, r9
	mov	r8, r9
	mov	r10, r2
	add	r7, r7, r9
	str	r3, [fp, #-56]
.L13:
	ldr	r3, [r5, #4]!	@ float
	ldr	r1, [r10, #4]!	@ float
	mov	r0, r3
	str	r3, [fp, #-52]
	bl	__aeabi_fadd
	mov	r1, r6
	bl	__aeabi_fmul
	mov	r4, r0
	ldr	r3, [fp, #-52]
	ldr	r1, [r7, #4]!	@ float
	mov	r0, r3
	str	r4, [r9, #4]!	@ float
	bl	__aeabi_fadd
	mov	r1, r6
	bl	__aeabi_fmul
	mov	r1, r0
	mov	r0, r4
	str	r1, [r8, #4]!	@ float
	bl	__aeabi_fadd
	mov	r1, r6
	bl	__aeabi_fmul
	ldr	r3, [fp, #-56]
	str	r0, [r5]	@ float
	cmp	r3, r5
	bne	.L13
	ldr	r3, [fp, #-60]
	ldr	r2, [fp, #-48]
	add	r3, r3, #2
	cmp	r3, r2
	str	r3, [fp, #-60]
	bge	.L14
	ldr	r3, [fp, #-64]
	ldr	r10, [r3, #12]
	ldr	r2, [r3, #16]
	ldr	r7, [r3, #8]!
	str	r3, [fp, #-64]
	b	.L15
.L24:
	ldr	r3, [fp, #-48]
	mov	r2, #0
	cmp	r3, #3
	asr	r3, r3, #1
	ble	.L25
.L26:
	asr	r3, r3, #1
	cmp	r3, #1
	add	r2, r2, #1
	bne	.L26
.L25:
	ldr	r1, [fp, #-136]
	ldr	r3, [r1]
	cmp	r3, r2
	ldr	r3, .L45+4
	strlt	r2, [r1]
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L43
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L39:
	ldr	r3, [fp, #-100]
	ldr	r7, [fp, #-112]
	add	r4, r3, #8
	str	r4, [fp, #-52]
	ldr	r9, [fp, #-116]
	ldr	r4, [fp, #-96]
	ldr	r10, [fp, #-120]
.L7:
	ldr	r3, [fp, #-72]
	ldr	r1, [r4, #4]!	@ float
	ldr	r6, [r3, #4]!	@ float
	mov	r0, r6
	str	r3, [fp, #-72]
	bl	__aeabi_fadd
	mov	r1, r8
	bl	__aeabi_fmul
	mov	r5, r0
	ldr	r3, [fp, #-68]
	ldr	r1, [r10, #4]!	@ float
	str	r5, [r3, #4]!	@ float
	mov	r0, r6
	str	r3, [fp, #-68]
	bl	__aeabi_fadd
	mov	r1, r8
	bl	__aeabi_fmul
	mov	r1, r0
	mov	r0, r5
	str	r1, [r9, #4]!	@ float
	bl	__aeabi_fadd
	mov	r1, r8
	bl	__aeabi_fmul
	ldr	r3, [fp, #-52]
	str	r0, [r7, #4]!	@ float
	cmp	r4, r3
	bne	.L7
	ldr	r3, [fp, #-48]
	add	r5, r3, #1
	ldr	r3, [fp, #-76]
	add	r4, r3, #3
	cmp	r5, r4
	ldrgt	r3, [fp, #-88]
	addgt	r6, r3, r5, lsl #2
	ble	.L10
.L9:
	ldr	r1, [r6]
	ldr	r0, [r6, #-8]
	sub	r5, r5, #1
	bl	VectorCopy
	cmp	r4, r5
	sub	r6, r6, #4
	bne	.L9
.L10:
	ldr	r1, [fp, #-84]
	mov	r0, #0
	bl	VectorCopy
	ldr	r1, [fp, #-104]
	mov	r0, #0
	bl	VectorCopy
	ldr	r3, [fp, #-108]
	mov	r0, #0
	ldr	r1, [r3, #12]
	ldr	r3, [fp, #-92]
	str	r3, [fp, #-48]
	bl	VectorCopy
	ldr	r3, [fp, #-76]
	sub	r3, r3, #2
	b	.L6
.L14:
	ldr	r3, [fp, #-48]
	cmp	r3, #2
	ble	.L24
	ldr	r3, [fp, #-88]
	mov	r6, #2
	add	r3, r3, #4
	mov	r9, #1031798784
	ldr	r7, [fp, #-128]
	ldr	r1, [fp, #-132]
	str	r3, [fp, #-52]
	b	.L23
.L44:
	mov	r1, #0
	mov	r0, r1
	bl	DotProduct
	mov	r1, #1065353216
	bl	__aeabi_fcmpge
	cmp	r0, #0
	bne	.L20
.L19:
	ldr	r3, [fp, #-48]
	add	r6, r6, #1
	cmp	r3, r6
	mov	r1, r7
	ble	.L24
	ldr	r7, [fp, #-56]
.L23:
	mov	r4, #0
	mov	r0, r7
	mov	r2, r4
	bl	VectorSubtract
	mov	r1, r4
	mov	r0, r4
	bl	VectorNormalize
	mov	r5, r4
	ldr	r3, [fp, #-52]
	mov	r4, r0
	ldr	r0, [r3, #4]!
	mov	r2, r5
	mov	r1, r7
	str	r3, [fp, #-52]
	str	r0, [fp, #-56]
	bl	VectorSubtract
	mov	r1, r5
	mov	r0, r5
	bl	VectorNormalize
	mov	r3, r0
	mov	r1, r9
	mov	r0, r4
	mov	r4, r3
	bl	__aeabi_fcmplt
	cmp	r0, r5
	bne	.L20
	mov	r0, r4
	mov	r1, r9
	bl	__aeabi_fcmplt
	cmp	r0, #0
	beq	.L44
.L20:
	ldr	r3, [fp, #-48]
	cmp	r3, r6
	ble	.L22
	mov	r8, r7
	mov	r4, #0
	ldr	r3, [fp, #-48]
	ldr	r10, [fp, #-52]
	sub	r5, r3, r6
.L21:
	mov	r1, r8
	ldr	r8, [r10], #4
	add	r4, r4, #1
	mov	r0, r8
	bl	VectorCopy
	cmp	r5, r4
	bne	.L21
.L22:
	ldr	r3, [fp, #-48]
	sub	r3, r3, #1
	str	r3, [fp, #-48]
	b	.L19
.L43:
	bl	__stack_chk_fail
.L46:
	.align	2
.L45:
	.word	MAX_EXPANDED_AXIS
	.word	.LC0
	.size	ExpandMaxIterations, .-ExpandMaxIterations
	.comm	MAX_EXPANDED_AXIS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
