	.file	"extr_visflow.c_RecursivePassagePortalFlow.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	RecursivePassagePortalFlow
	.type	RecursivePassagePortalFlow, @function
RecursivePassagePortalFlow:
.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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 184
	.cfi_def_cfa_offset 240
	mov	r15, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 168[rsp], rax
	xor	eax, eax
	lea	rax, 80[rsp]
	mov	QWORD PTR 104[rsp], 0
	mov	QWORD PTR 16[rsp], rax
	sal	r15, 4
	add	r15, QWORD PTR leafs[rip]
	mov	QWORD PTR 24[rdx], rax
	mov	rax, QWORD PTR 72[rdx]
	mov	QWORD PTR 160[rsp], r15
	mov	QWORD PTR 136[rsp], 0
	add	rax, 1
	mov	QWORD PTR 152[rsp], rax
	mov	eax, DWORD PTR [r15]
	test	eax, eax
	jle	.L1
	mov	rax, QWORD PTR [rsi]
	mov	QWORD PTR [rsp], rdx
	mov	r13, rsi
	xor	r12d, r12d
	mov	rbp, QWORD PTR 72[rdi]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR 24[rsp], rax
.L17:
	mov	rax, QWORD PTR 8[r15]
	mov	r14, QWORD PTR [rax+r12*8]
	mov	rcx, QWORD PTR 64[r14]
	test	rcx, rcx
	jne	.L3
	mov	rbx, r14
	sub	rbx, QWORD PTR portals[rip]
	mov	r9, QWORD PTR 8[rbp]
	movabs	rax, -3689348814741910323
	sar	rbx, 4
	imul	rbx, rax
	mov	rax, QWORD PTR [rsp]
	mov	rsi, QWORD PTR 8[rax]
	mov	r8d, ebx
	and	ebx, 7
	sar	r8d, 3
	movsx	r8, r8d
	lea	rax, 0[0+r8*4]
	mov	QWORD PTR 8[rsp], rax
	mov	eax, DWORD PTR [rsi+r8*4]
	bt	eax, ebx
	jc	.L44
	mov	rbp, r9
.L3:
	add	r12, 1
	cmp	DWORD PTR [r15], r12d
	jg	.L17
.L1:
	mov	rax, QWORD PTR 168[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L45
	add	rsp, 184
	.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
.L44:
	.cfi_restore_state
	mov	rdi, QWORD PTR 88[rsp]
	mov	edx, DWORD PTR portalbytes[rip]
	mov	QWORD PTR 56[rsp], r8
	mov	QWORD PTR 48[rsp], r9
	mov	rbp, QWORD PTR 0[rbp]
	mov	QWORD PTR 40[rsp], rcx
	mov	QWORD PTR 32[rsp], rdi
	call	memcpy@PLT
	mov	rdi, QWORD PTR 32[rsp]
	mov	rcx, QWORD PTR 40[rsp]
	mov	rax, QWORD PTR stat_done[rip]
	cmp	QWORD PTR 8[r14], rax
	mov	r9, QWORD PTR 48[rsp]
	mov	r8, QWORD PTR 56[rsp]
	je	.L46
	mov	esi, DWORD PTR portallongs[rip]
	mov	r10, QWORD PTR 48[r14]
	test	esi, esi
	jle	.L7
.L5:
	mov	DWORD PTR 32[rsp], ebx
	mov	r11, QWORD PTR 24[rsp]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdx, QWORD PTR [rdi+rax*8]
	mov	rbx, rbp
	add	rbp, 8
	test	rdx, rdx
	je	.L8
	and	rdx, QWORD PTR [rbx]
	and	rdx, QWORD PTR [r10+rax*8]
	mov	QWORD PTR [rdi+rax*8], rdx
	mov	rbx, QWORD PTR [r11+rax*8]
	not	rbx
	and	rdx, rbx
	or	rcx, rdx
.L8:
	add	rax, 1
	cmp	esi, eax
	jg	.L9
	mov	ebx, DWORD PTR 32[rsp]
	test	rcx, rcx
	jne	.L6
.L7:
	mov	rax, QWORD PTR 0[r13]
	mov	rbp, r9
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax+r8*4]
	bt	eax, ebx
	jc	.L3
.L6:
	mov	rax, QWORD PTR 20[r14]
	mov	esi, DWORD PTR 24[r14]
	mov	QWORD PTR 32[rsp], r9
	mov	edx, DWORD PTR 76[rsp]
	mov	edi, DWORD PTR vec3_origin[rip]
	mov	QWORD PTR 144[rsp], rax
	call	VectorSubtract@PLT
	movss	xmm0, DWORD PTR 20[r14]
	mov	rax, QWORD PTR 96[rsp]
	movabs	rcx, 4294967297
	xorps	xmm0, XMMWORD PTR .LC0[rip]
	mov	QWORD PTR 136[rsp], r14
	mov	QWORD PTR 104[rsp], 0
	movss	DWORD PTR 72[rsp], xmm0
	mov	DWORD PTR 8[rax], 1
	mov	QWORD PTR [rax], rcx
	mov	esi, DWORD PTR 12[r13]
	mov	edi, DWORD PTR 40[r14]
	call	DotProduct@PLT
	movss	xmm1, DWORD PTR 16[r14]
	subss	xmm0, DWORD PTR 8[r13]
	mov	r9, QWORD PTR 32[rsp]
	movaps	xmm2, xmm1
	xorps	xmm2, XMMWORD PTR .LC0[rip]
	mov	rbp, r9
	comiss	xmm2, xmm0
	ja	.L3
	comiss	xmm0, xmm1
	mov	rdi, QWORD PTR 32[r14]
	jbe	.L40
	mov	QWORD PTR 112[rsp], rdi
.L12:
	mov	rax, QWORD PTR 0[r13]
	mov	esi, DWORD PTR 24[r14]
	mov	QWORD PTR 32[rsp], r9
	mov	edi, DWORD PTR 12[rax]
	call	DotProduct@PLT
	mov	rax, QWORD PTR 0[r13]
	subss	xmm0, DWORD PTR 20[r14]
	mov	r9, QWORD PTR 32[rsp]
	movss	xmm1, DWORD PTR 8[rax]
	mov	rbp, r9
	comiss	xmm0, xmm1
	ja	.L3
	xorps	xmm1, XMMWORD PTR .LC0[rip]
	mov	rax, QWORD PTR [rsp]
	comiss	xmm1, xmm0
	mov	rdi, QWORD PTR 40[rax]
	jbe	.L41
	mov	QWORD PTR 120[rsp], rdi
.L15:
	mov	rax, QWORD PTR [rsp]
	mov	QWORD PTR 32[rsp], r9
	mov	rsi, QWORD PTR 32[rax]
	test	rsi, rsi
	je	.L47
	mov	rdx, QWORD PTR 112[rsp]
	mov	r8, QWORD PTR 16[rsp]
	mov	ecx, DWORD PTR qfalse[rip]
	mov	rdi, QWORD PTR 120[rsp]
	call	ClipToSeperators@PLT
	mov	r9, QWORD PTR 32[rsp]
	mov	QWORD PTR 112[rsp], rax
	mov	rdx, rax
	mov	rbp, r9
	test	rax, rax
	je	.L3
	mov	rax, QWORD PTR [rsp]
	mov	r8, QWORD PTR 16[rsp]
	mov	ecx, DWORD PTR qtrue[rip]
	mov	rsi, QWORD PTR 120[rsp]
	mov	rdi, QWORD PTR 32[rax]
	call	ClipToSeperators@PLT
	mov	QWORD PTR 112[rsp], rax
	test	rax, rax
	je	.L3
	mov	rax, QWORD PTR 0[r13]
	mov	rcx, QWORD PTR 8[rsp]
	mov	esi, 1
	mov	rdi, r14
	mov	rdx, QWORD PTR 16[rsp]
	add	rcx, QWORD PTR [rax]
	mov	rax, rcx
	mov	ecx, ebx
	sal	esi, cl
	or	DWORD PTR [rax], esi
	mov	rsi, r13
	call	RecursivePassagePortalFlow
	mov	QWORD PTR 104[rsp], 0
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L46:
	mov	esi, DWORD PTR portallongs[rip]
	mov	r10, QWORD PTR 56[r14]
	test	esi, esi
	jg	.L5
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L41:
	mov	rsi, QWORD PTR 16[rsp]
	lea	rdx, 72[rsp]
	mov	QWORD PTR 32[rsp], r9
	call	VisChopWinding@PLT
	mov	r9, QWORD PTR 32[rsp]
	test	rax, rax
	mov	QWORD PTR 120[rsp], rax
	jne	.L15
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L40:
	mov	rsi, QWORD PTR 16[rsp]
	lea	rdx, 8[r13]
	mov	QWORD PTR 32[rsp], r9
	call	VisChopWinding@PLT
	mov	r9, QWORD PTR 32[rsp]
	test	rax, rax
	mov	QWORD PTR 112[rsp], rax
	jne	.L12
	jmp	.L3
.L47:
	mov	rax, QWORD PTR 0[r13]
	mov	rcx, QWORD PTR 8[rsp]
	mov	rsi, r13
	mov	rdi, r14
	mov	edx, 1
	add	rcx, QWORD PTR [rax]
	mov	rax, rcx
	mov	ecx, ebx
	sal	edx, cl
	or	DWORD PTR [rax], edx
	mov	rdx, QWORD PTR 16[rsp]
	call	RecursivePassagePortalFlow
	mov	r9, QWORD PTR 32[rsp]
	mov	rbp, r9
	jmp	.L3
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	RecursivePassagePortalFlow, .-RecursivePassagePortalFlow
	.comm	vec3_origin,4,4
	.comm	stat_done,8,8
	.comm	qtrue,4,4
	.comm	qfalse,4,4
	.comm	portals,8,8
	.comm	portallongs,4,4
	.comm	portalbytes,4,4
	.comm	leafs,8,8
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	2147483648
	.long	0
	.long	0
	.long	0
	.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_visflow.c_RecursivePassagePortalFlow.c"
	.text
	.global	__aeabi_fsub
	.global	__aeabi_fcmpgt
	.global	__aeabi_fcmplt
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	RecursivePassagePortalFlow
	.syntax unified
	.arm
	.fpu softvfp
	.type	RecursivePassagePortalFlow, %function
RecursivePassagePortalFlow:
	@ args = 0, pretend = 0, frame = 88
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r9, r2
	mov	r5, #0
	ldr	r2, .L48
	ldr	r3, [r0]
	ldr	r7, [r2]
	sub	sp, sp, #100
	ldr	r2, [r7, r3, lsl #3]
	add	r7, r7, r3, lsl #3
	ldr	r3, [r9, #40]
	cmp	r2, r5
	ldr	r2, .L48+4
	add	r3, r3, #1
	str	r1, [sp, #16]
	ldr	r2, [r2]
	str	r2, [sp, #92]
	mov	r2,#0
	str	r3, [sp, #84]
	add	r3, sp, #44
	str	r7, [sp, #88]
	str	r3, [r9, #12]
	str	r5, [sp, #56]
	str	r5, [sp, #72]
	ble	.L1
	ldr	r3, [r1]
	ldr	ip, [r0, #40]
	ldr	r3, [r3]
	str	r9, [sp, #12]
	str	r3, [sp, #20]
.L17:
	ldr	r3, [r7, #4]
	ldr	r6, [r3, r5, lsl #2]
	ldr	r10, [r6, #36]
	cmp	r10, #0
	bne	.L3
	ldr	r3, .L48+8
	ldr	r9, [ip, #4]
	ldr	r4, [r3]
	ldr	r3, [sp, #12]
	sub	r4, r6, r4
	asr	r4, r4, #2
	ldr	r1, [r3, #4]
	rsb	r3, r4, r4, lsl #5
	add	r3, r4, r3, lsl #5
	add	r3, r3, r3, lsl #3
	rsb	r3, r3, r3, lsl #15
	add	r4, r4, r3, lsl #2
	rsb	r4, r4, #0
	asr	r8, r4, #3
	ldr	r3, [r1, r8, lsl #2]
	and	r4, r4, #7
	asr	r3, r3, r4
	tst	r3, #1
	bne	.L42
.L27:
	mov	ip, r9
.L3:
	ldr	r3, [r7]
	add	r5, r5, #1
	cmp	r3, r5
	bgt	.L17
.L1:
	ldr	r3, .L48+4
	ldr	r2, [r3]
	ldr	r3, [sp, #92]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L43
	add	sp, sp, #100
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L42:
	ldr	r3, [sp, #48]
	ldr	fp, [ip]
	mov	r0, r3
	ldr	r3, .L48+12
	ldr	r2, [r3]
	bl	memcpy
	ldr	r2, .L48+16
	ldr	r1, [r6, #4]
	ldr	r2, [r2]
	mov	r3, r0
	cmp	r1, r2
	ldr	r2, .L48+20
	beq	.L44
	ldr	r1, [r2]
	ldr	r0, [r6, #28]
	cmp	r1, #0
	ble	.L7
.L5:
	mov	r2, #0
	rsb	ip, r3, #4
	ldr	lr, [sp, #20]
	add	fp, ip, fp
	str	r4, [sp, #24]
	sub	ip, r3, #4
	str	r5, [sp, #28]
.L9:
	add	r4, fp, ip
	ldr	r3, [ip, #4]!
	cmp	r3, #0
	beq	.L8
	ldr	r5, [r0, r2, lsl #2]
	ldr	r4, [r4]
	and	r3, r3, r5
	and	r3, r3, r4
	str	r3, [ip]
	ldr	r4, [lr, r2, lsl #2]
	bic	r3, r3, r4
	orr	r10, r10, r3
.L8:
	add	r2, r2, #1
	cmp	r1, r2
	bgt	.L9
	cmp	r10, #0
	ldr	r4, [sp, #24]
	ldr	r5, [sp, #28]
	bne	.L6
.L7:
	ldr	r3, [sp, #16]
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r3, [r3, r8, lsl #2]
	asr	r3, r3, r4
	tst	r3, #1
	bne	.L27
.L6:
	ldr	r1, [r6, #16]
	ldr	r0, [r6, #12]
	add	r3, sp, #76
	stm	r3, {r0, r1}
	ldr	r3, .L48+24
	ldr	r2, [sp, #40]
	ldr	r1, [r6, #16]
	ldr	r0, [r3]
	bl	VectorSubtract
	mov	r2, #1
	mov	r0, #0
	ldr	r1, [r6, #12]
	ldr	r3, [sp, #52]
	ldr	r10, [sp, #16]
	add	r1, r1, #-2147483648
	str	r0, [sp, #56]
	str	r6, [sp, #72]
	str	r1, [sp, #36]	@ float
	str	r2, [r3, #4]
	str	r2, [r3]
	str	r2, [r3, #8]
	ldr	r1, [r10, #8]
	ldr	r0, [r6, #24]
	bl	DotProduct
	ldr	r1, [r10, #4]	@ float
	bl	__aeabi_fsub
	ldr	fp, [r6, #8]	@ float
	mov	r1, r0
	mov	r10, r0
	add	r0, fp, #-2147483648
	bl	__aeabi_fcmpgt
	cmp	r0, #0
	bne	.L27
	mov	r1, r10
	mov	r0, fp
	bl	__aeabi_fcmplt
	cmp	r0, #0
	ldr	r0, [r6, #20]
	strne	r0, [sp, #60]
	beq	.L45
.L12:
	ldr	fp, [sp, #16]
	ldr	r1, [r6, #16]
	ldr	r3, [fp]
	ldr	r0, [r3, #8]
	bl	DotProduct
	ldr	r1, [r6, #12]	@ float
	bl	__aeabi_fsub
	ldr	r3, [fp]
	mov	r1, r0
	ldr	fp, [r3, #4]	@ float
	mov	r10, r0
	mov	r0, fp
	bl	__aeabi_fcmplt
	cmp	r0, #0
	bne	.L27
	mov	r1, r10
	add	r0, fp, #-2147483648
	bl	__aeabi_fcmpgt
	ldr	r3, [sp, #12]
	cmp	r0, #0
	ldr	r0, [r3, #20]
	strne	r0, [sp, #64]
	beq	.L46
.L15:
	ldr	r3, [sp, #12]
	ldr	r1, [r3, #16]
	cmp	r1, #0
	beq	.L47
	add	r3, sp, #44
	str	r3, [sp]
	ldr	r3, .L48+28
	ldr	r2, [sp, #60]
	ldr	r3, [r3]
	ldr	r0, [sp, #64]
	bl	ClipToSeperators
	cmp	r0, #0
	mov	r2, r0
	str	r0, [sp, #60]
	beq	.L27
	add	r3, sp, #44
	str	r3, [sp]
	ldr	r0, [sp, #12]
	ldr	r3, .L48+32
	ldr	r1, [sp, #64]
	ldr	r3, [r3]
	ldr	r0, [r0, #16]
	bl	ClipToSeperators
	cmp	r0, #0
	str	r0, [sp, #60]
	beq	.L27
	mov	ip, #1
	ldr	lr, [sp, #16]
	mov	r0, r6
	ldr	r3, [lr]
	add	r2, sp, #44
	ldr	r1, [r3]
	ldr	r3, [r1, r8, lsl #2]
	orr	r4, r3, ip, lsl r4
	str	r4, [r1, r8, lsl #2]
	mov	r1, lr
	bl	RecursivePassagePortalFlow
	mov	r3, #0
	mov	ip, r9
	str	r3, [sp, #56]
	b	.L3
.L44:
	ldr	r1, [r2]
	ldr	r0, [r6, #32]
	cmp	r1, #0
	bgt	.L5
	b	.L7
.L46:
	add	r2, sp, #36
	add	r1, sp, #44
	bl	VisChopWinding
	cmp	r0, #0
	str	r0, [sp, #64]
	bne	.L15
	b	.L27
.L45:
	ldr	r3, [sp, #16]
	add	r1, sp, #44
	add	r2, r3, #4
	bl	VisChopWinding
	cmp	r0, #0
	str	r0, [sp, #60]
	bne	.L12
	b	.L27
.L47:
	mov	ip, #1
	ldr	lr, [sp, #16]
	mov	r0, r6
	ldr	r3, [lr]
	add	r2, sp, #44
	ldr	r1, [r3]
	ldr	r3, [r1, r8, lsl #2]
	orr	r4, r3, ip, lsl r4
	str	r4, [r1, r8, lsl #2]
	mov	r1, lr
	bl	RecursivePassagePortalFlow
	mov	ip, r9
	b	.L3
.L43:
	bl	__stack_chk_fail
.L49:
	.align	2
.L48:
	.word	leafs
	.word	.LC0
	.word	portals
	.word	portalbytes
	.word	stat_done
	.word	portallongs
	.word	vec3_origin
	.word	qfalse
	.word	qtrue
	.size	RecursivePassagePortalFlow, .-RecursivePassagePortalFlow
	.comm	vec3_origin,4,4
	.comm	stat_done,4,4
	.comm	qtrue,4,4
	.comm	qfalse,4,4
	.comm	portals,4,4
	.comm	portallongs,4,4
	.comm	portalbytes,4,4
	.comm	leafs,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
