	.file	"extr_lightmaps_ydnar.c_CompareBSPLuxels.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	CompareBSPLuxels, @function
CompareBSPLuxels:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, ecx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR minLight[rip]
	cmp	QWORD PTR [rax], 0
	jne	.L2
	cmp	QWORD PTR 8[rax], 0
	je	.L33
.L2:
	test	ebp, ebp
	sete	cl
	test	r12d, r12d
	sete	al
	cmp	cl, al
	je	.L3
.L13:
	mov	eax, DWORD PTR qfalse[rip]
.L1:
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	cmp	QWORD PTR 16[rax], 0
	jne	.L2
.L3:
	mov	rax, QWORD PTR [rdx]
	cmp	QWORD PTR [rbx], rax
	jne	.L13
	mov	rax, QWORD PTR 8[rdx]
	cmp	QWORD PTR 8[rbx], rax
	jne	.L13
	mov	rax, QWORD PTR 16[rdx]
	cmp	QWORD PTR 16[rbx], rax
	jne	.L13
	mov	rax, QWORD PTR 24[rbx]
	mov	rcx, QWORD PTR 24[rdx]
	movsx	r13, ebp
	movsx	r14, r12d
	mov	rax, QWORD PTR [rax+r13*8]
	cmp	rax, QWORD PTR [rcx+r14*8]
	jne	.L13
	mov	rcx, QWORD PTR 48[rbx]
	cmp	QWORD PTR [rcx+r13*8], 0
	je	.L13
	mov	rcx, QWORD PTR 48[rdx]
	cmp	QWORD PTR [rcx+r14*8], 0
	je	.L13
	test	rax, rax
	je	.L6
	mov	rax, QWORD PTR 32[rbx]
	mov	QWORD PTR 8[rsp], rdx
	mov	rcx, QWORD PTR [rax+r13*8]
	mov	rax, QWORD PTR 32[rdx]
	mov	rax, QWORD PTR [rax+r14*8]
	movss	xmm0, DWORD PTR [rcx]
	subss	xmm0, DWORD PTR [rax]
	call	fabs@PLT
	mov	rax, QWORD PTR 32[rbx]
	mov	rdx, QWORD PTR 8[rsp]
	movsd	QWORD PTR 16[rsp], xmm0
	mov	rcx, QWORD PTR [rax+r13*8]
	mov	rax, QWORD PTR 32[rdx]
	mov	rax, QWORD PTR [rax+r14*8]
	movss	xmm0, DWORD PTR 4[rcx]
	subss	xmm0, DWORD PTR 4[rax]
	call	fabs@PLT
	mov	rax, QWORD PTR 32[rbx]
	mov	rdx, QWORD PTR 8[rsp]
	movsd	QWORD PTR 24[rsp], xmm0
	mov	rcx, QWORD PTR [rax+r13*8]
	mov	rax, QWORD PTR 32[rdx]
	mov	rax, QWORD PTR [rax+r14*8]
	movss	xmm0, DWORD PTR 8[rcx]
	subss	xmm0, DWORD PTR 8[rax]
	call	fabs@PLT
	movsd	xmm2, QWORD PTR SOLID_EPSILON[rip]
	movsd	xmm1, QWORD PTR 16[rsp]
	comisd	xmm1, xmm2
	ja	.L13
	movsd	xmm5, QWORD PTR 24[rsp]
	comisd	xmm5, xmm2
	ja	.L13
	comisd	xmm0, xmm2
	ja	.L13
.L11:
	mov	eax, DWORD PTR qtrue[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rax, QWORD PTR 40[rdx]
	cmp	QWORD PTR 40[rbx], rax
	jne	.L13
	mov	edx, DWORD PTR 44[rbx]
	test	edx, edx
	jle	.L11
	mov	QWORD PTR 8[rsp], 0x000000000
	xor	r15d, r15d
	mov	QWORD PTR 40[rsp], 0x000000000
.L10:
	mov	eax, DWORD PTR 40[rbx]
	xor	r13d, r13d
	test	eax, eax
	jle	.L18
	.p2align 4,,10
	.p2align 3
.L17:
	movsd	xmm4, QWORD PTR .LC1[rip]
	mov	edx, r15d
	mov	esi, r13d
	mov	edi, ebp
	addsd	xmm4, QWORD PTR 8[rsp]
	movsd	QWORD PTR 8[rsp], xmm4
	call	BSP_LUXEL@PLT
	mov	edx, r15d
	mov	esi, r13d
	mov	edi, r12d
	mov	r14, rax
	call	BSP_LUXEL@PLT
	movss	xmm0, DWORD PTR [r14]
	pxor	xmm6, xmm6
	comiss	xmm6, xmm0
	ja	.L12
	movss	xmm1, DWORD PTR [rax]
	mov	QWORD PTR 16[rsp], rax
	comiss	xmm6, xmm1
	ja	.L12
	subss	xmm0, xmm1
	call	fabs@PLT
	mov	rax, QWORD PTR 16[rsp]
	movsd	QWORD PTR 24[rsp], xmm0
	movss	xmm0, DWORD PTR 4[r14]
	subss	xmm0, DWORD PTR 4[rax]
	call	fabs@PLT
	mov	rax, QWORD PTR 16[rsp]
	movsd	QWORD PTR 32[rsp], xmm0
	movss	xmm0, DWORD PTR 8[r14]
	subss	xmm0, DWORD PTR 8[rax]
	call	fabs@PLT
	movsd	xmm1, QWORD PTR 24[rsp]
	comisd	xmm1, QWORD PTR .LC3[rip]
	ja	.L13
	movsd	xmm2, QWORD PTR 32[rsp]
	comisd	xmm2, QWORD PTR .LC3[rip]
	ja	.L13
	comisd	xmm0, QWORD PTR .LC3[rip]
	ja	.L13
	movsd	xmm3, QWORD PTR LUXEL_COLOR_FRAC[rip]
	movsd	xmm7, QWORD PTR 8[rsp]
	pxor	xmm6, xmm6
	mulsd	xmm2, xmm3
	comisd	xmm7, xmm6
	mulsd	xmm1, xmm3
	addsd	xmm1, QWORD PTR 40[rsp]
	mulsd	xmm3, xmm0
	addsd	xmm1, xmm2
	addsd	xmm3, xmm1
	movsd	QWORD PTR 40[rsp], xmm3
	jbe	.L12
	movapd	xmm0, xmm3
	divsd	xmm0, xmm7
	comisd	xmm0, QWORD PTR LUXEL_TOLERANCE[rip]
	ja	.L13
.L12:
	add	r13d, 1
	cmp	DWORD PTR 40[rbx], r13d
	jg	.L17
.L18:
	add	r15d, 1
	cmp	DWORD PTR 44[rbx], r15d
	jg	.L10
	jmp	.L11
	.cfi_endproc
.LFE0:
	.size	CompareBSPLuxels, .-CompareBSPLuxels
	.comm	qtrue,4,4
	.comm	qfalse,4,4
	.comm	minLight,8,8
	.comm	SOLID_EPSILON,8,8
	.comm	LUXEL_TOLERANCE,8,8
	.comm	LUXEL_COLOR_FRAC,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1072693248
	.align 8
.LC3:
	.long	0
	.long	1074266112
	.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_lightmaps_ydnar.c_CompareBSPLuxels.c"
	.text
	.global	__aeabi_fsub
	.global	__aeabi_dcmplt
	.global	__aeabi_dadd
	.global	__aeabi_fcmplt
	.global	__aeabi_dcmpgt
	.global	__aeabi_dmul
	.global	__aeabi_ddiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	CompareBSPLuxels, %function
CompareBSPLuxels:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	ip, .L38
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	fp, r0
	ldr	r0, [ip]
	mov	r5, r1
	ldr	r1, [r0]
	mov	r8, r3
	cmp	r1, #0
	sub	sp, sp, #44
	bne	.L2
	ldr	r3, [r0, #4]
	cmp	r3, #0
	beq	.L36
.L2:
	clz	r1, r5
	clz	r3, r8
	lsr	r1, r1, #5
	lsr	r3, r3, #5
	cmp	r1, r3
	beq	.L3
.L13:
	ldr	r3, .L38+4
	ldr	r0, [r3]
.L1:
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L36:
	ldr	r3, [r0, #8]
	cmp	r3, #0
	bne	.L2
.L3:
	ldr	r1, [fp]
	ldr	r3, [r2]
	cmp	r1, r3
	bne	.L13
	ldr	r1, [fp, #4]
	ldr	r3, [r2, #4]
	cmp	r1, r3
	bne	.L13
	ldr	r1, [fp, #8]
	ldr	r3, [r2, #8]
	cmp	r1, r3
	bne	.L13
	ldr	r3, [fp, #12]
	ldr	r1, [r2, #12]
	ldr	r3, [r3, r5, lsl #2]
	ldr	r1, [r1, r8, lsl #2]
	cmp	r3, r1
	bne	.L13
	ldr	r1, [fp, #28]
	ldr	r1, [r1, r5, lsl #2]
	cmp	r1, #0
	beq	.L13
	ldr	r1, [r2, #28]
	ldr	r1, [r1, r8, lsl #2]
	cmp	r1, #0
	beq	.L13
	cmp	r3, #0
	bne	.L37
	ldr	r3, [fp, #20]
	ldr	r1, [r2, #20]
	cmp	r3, r1
	bne	.L13
	ldr	r1, [r2, #24]
	ldr	r2, [fp, #24]
	cmp	r2, r1
	bne	.L13
	cmp	r2, #0
	ble	.L11
	mov	ip, #0
	mov	r0, #0
	mov	r1, #0
	str	fp, [sp, #20]
	mov	fp, ip
	str	r0, [sp, #24]
	str	r1, [sp, #28]
	str	r5, [sp, #12]
	str	r8, [sp, #16]
.L10:
	cmp	r3, #0
	movgt	r10, #0
	movgt	r8, r0
	movgt	r9, r1
	ble	.L18
.L17:
	ldr	r3, .L38+8
	mov	r0, r8
	mov	r1, r9
	mov	r2, #0
	bl	__aeabi_dadd
	mov	r2, fp
	mov	r8, r0
	mov	r9, r1
	ldr	r0, [sp, #12]
	mov	r1, r10
	bl	BSP_LUXEL
	mov	r6, r0
	mov	r1, r10
	mov	r2, fp
	ldr	r0, [sp, #16]
	bl	BSP_LUXEL
	ldr	r4, [r6]	@ float
	mov	r7, r0
	mov	r1, #0
	mov	r0, r4
	bl	__aeabi_fcmplt
	cmp	r0, #0
	add	r10, r10, #1
	bne	.L12
	ldr	r5, [r7]	@ float
	mov	r1, #0
	mov	r0, r5
	bl	__aeabi_fcmplt
	cmp	r0, #0
	bne	.L12
	mov	r1, r5
	mov	r0, r4
	bl	__aeabi_fsub
	bl	fabs
	mov	r4, r0
	mov	r5, r1
	ldr	r0, [r6, #4]	@ float
	ldr	r1, [r7, #4]	@ float
	bl	__aeabi_fsub
	bl	fabs
	mov	r2, r0
	mov	r3, r1
	ldr	r0, [r6, #8]	@ float
	ldr	r1, [r7, #8]	@ float
	stm	sp, {r2-r3}
	bl	__aeabi_fsub
	bl	fabs
	mov	r6, r0
	mov	r7, r1
	mov	r2, #0
	mov	r0, r4
	mov	r1, r5
	ldr	r3, .L38+12
	str	r6, [sp, #32]
	str	r7, [sp, #36]
	bl	__aeabi_dcmpgt
	cmp	r0, #0
	bne	.L13
	ldmia	sp, {r0-r1}
	mov	r2, #0
	ldr	r3, .L38+12
	bl	__aeabi_dcmpgt
	cmp	r0, #0
	bne	.L13
	mov	r2, #0
	mov	r0, r6
	mov	r1, r7
	ldr	r3, .L38+12
	bl	__aeabi_dcmpgt
	cmp	r0, #0
	bne	.L13
	ldr	r1, .L38+16
	mov	r2, r4
	ldmia	r1, {r6-r7}
	mov	r3, r5
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_dmul
	add	r3, sp, #24
	ldmia	r3, {r2-r3}
	bl	__aeabi_dadd
	ldmia	sp, {r2-r3}
	mov	r4, r0
	mov	r5, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_dmul
	mov	r2, r4
	mov	r3, r5
	bl	__aeabi_dadd
	add	r3, sp, #32
	ldmia	r3, {r2-r3}
	mov	r4, r0
	mov	r5, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_dmul
	mov	r2, r4
	mov	r3, r5
	bl	__aeabi_dadd
	mov	r4, r0
	mov	r5, r1
	mov	r2, #0
	mov	r3, #0
	mov	r0, r8
	mov	r1, r9
	str	r4, [sp, #24]
	str	r5, [sp, #28]
	bl	__aeabi_dcmpgt
	cmp	r0, #0
	beq	.L12
	mov	r2, r8
	mov	r3, r9
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ddiv
	ldr	r3, .L38+20
	ldmia	r3, {r2-r3}
	bl	__aeabi_dcmpgt
	cmp	r0, #0
	bne	.L13
.L12:
	ldr	r3, [sp, #20]
	ldr	r3, [r3, #20]
	cmp	r3, r10
	bgt	.L17
	mov	r0, r8
	mov	r1, r9
	ldr	r2, [sp, #20]
	ldr	r2, [r2, #24]
.L18:
	add	fp, fp, #1
	cmp	r2, fp
	bgt	.L10
.L11:
	ldr	r3, .L38+24
	ldr	r0, [r3]
	b	.L1
.L37:
	ldr	r3, [r2, #16]
	ldr	r1, [fp, #16]
	ldr	r3, [r3, r8, lsl #2]
	ldr	r1, [r1, r5, lsl #2]
	str	r2, [sp]
	ldr	r0, [r1]	@ float
	ldr	r1, [r3]	@ float
	bl	__aeabi_fsub
	bl	fabs
	mov	r6, r0
	mov	r7, r1
	ldr	r2, [sp]
	ldr	r1, [fp, #16]
	ldr	r3, [r2, #16]
	ldr	r1, [r1, r5, lsl #2]
	ldr	r3, [r3, r8, lsl #2]
	ldr	r0, [r1, #4]	@ float
	ldr	r1, [r3, #4]	@ float
	stm	sp, {r6-r7}
	str	r2, [sp, #12]
	bl	__aeabi_fsub
	bl	fabs
	ldr	r2, [sp, #12]
	mov	r7, r1
	ldr	r3, [r2, #16]
	ldr	r1, [fp, #16]
	ldr	r3, [r3, r8, lsl #2]
	ldr	r2, [r1, r5, lsl #2]
	mov	r6, r0
	ldr	r1, [r3, #8]	@ float
	ldr	r0, [r2, #8]	@ float
	bl	__aeabi_fsub
	bl	fabs
	ldmia	sp, {r2-r3}
	mov	r9, r1
	ldr	r1, .L38+28
	mov	r8, r0
	ldmia	r1, {r4-r5}
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dcmplt
	cmp	r0, #0
	bne	.L13
	mov	r2, r6
	mov	r3, r7
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dcmplt
	cmp	r0, #0
	bne	.L13
	mov	r2, r8
	mov	r3, r9
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dcmplt
	cmp	r0, #0
	beq	.L11
	b	.L13
.L39:
	.align	2
.L38:
	.word	minLight
	.word	qfalse
	.word	1072693248
	.word	1074266112
	.word	LUXEL_COLOR_FRAC
	.word	LUXEL_TOLERANCE
	.word	qtrue
	.word	SOLID_EPSILON
	.size	CompareBSPLuxels, .-CompareBSPLuxels
	.comm	qtrue,4,4
	.comm	qfalse,4,4
	.comm	minLight,4,4
	.comm	SOLID_EPSILON,8,8
	.comm	LUXEL_TOLERANCE,8,8
	.comm	LUXEL_COLOR_FRAC,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
