	.file	"extr_tr_marks.c_R_BoxSurfaces_r.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	R_BoxSurfaces_r
	.type	R_BoxSurfaces_r, @function
R_BoxSurfaces_r:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, r8d
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, r9
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	cmp	DWORD PTR [rdi], -1
	mov	QWORD PTR [rsp], rcx
	jne	.L2
.L6:
	mov	rdx, QWORD PTR 24[rbx]
	mov	esi, r14d
	mov	edi, r13d
	call	BoxOnPlaneSide@PLT
	cmp	eax, 1
	je	.L27
	mov	rdi, QWORD PTR 16[rbx]
	cmp	eax, 2
	jne	.L5
	mov	rbx, QWORD PTR 8[rdi]
.L4:
	cmp	DWORD PTR [rbx], -1
	je	.L6
.L2:
	mov	eax, DWORD PTR 4[rbx]
	mov	rbp, QWORD PTR 8[rbx]
	test	eax, eax
	je	.L1
	sub	eax, 1
	lea	rcx, 8[rbp+rax*8]
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L29:
	mov	eax, DWORD PTR 4[rdx]
	test	DWORD PTR CONTENTS_FOG[rip], eax
	jne	.L25
	mov	r10, QWORD PTR 8[rbx]
	mov	rdx, QWORD PTR [r10]
	cmp	rdx, QWORD PTR SF_FACE[rip]
	je	.L28
	cmp	rdx, QWORD PTR SF_GRID[rip]
	mov	rax, QWORD PTR tr[rip]
	je	.L16
.L24:
	mov	QWORD PTR [rbx], rax
	.p2align 4,,10
	.p2align 3
.L18:
	add	rbp, 8
	cmp	rcx, rbp
	je	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	cmp	DWORD PTR [r12], r15d
	jge	.L1
	mov	rbx, QWORD PTR 0[rbp]
	mov	eax, DWORD PTR SURF_NOIMPACT[rip]
	or	eax, DWORD PTR SURF_NOMARKS[rip]
	mov	rdx, QWORD PTR 16[rbx]
	test	DWORD PTR [rdx], eax
	je	.L29
.L25:
	mov	rax, QWORD PTR tr[rip]
	add	rbp, 8
	mov	QWORD PTR [rbx], rax
	cmp	rcx, rbp
	jne	.L17
.L1:
	add	rsp, 24
	.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
.L28:
	.cfi_restore_state
	mov	rdx, r10
	mov	esi, r14d
	mov	edi, r13d
	mov	QWORD PTR 8[rsp], rcx
	call	BoxOnPlaneSide@PLT
	mov	rcx, QWORD PTR 8[rsp]
	sub	eax, 1
	cmp	eax, 1
	jbe	.L25
	mov	rax, QWORD PTR 8[rbx]
	mov	esi, DWORD PTR 80[rsp]
	mov	QWORD PTR 8[rsp], rcx
	mov	edi, DWORD PTR [rax]
	call	DotProduct@PLT
	comisd	xmm0, QWORD PTR .LC0[rip]
	mov	rcx, QWORD PTR 8[rsp]
	mov	rax, QWORD PTR tr[rip]
	ja	.L24
	.p2align 4,,10
	.p2align 3
.L16:
	cmp	QWORD PTR [rbx], rax
	je	.L18
	movsx	rdx, DWORD PTR [r12]
	mov	rsi, QWORD PTR 8[rbx]
	mov	QWORD PTR [rbx], rax
	mov	rdi, QWORD PTR [rsp]
	mov	rax, rdx
	add	eax, 1
	mov	QWORD PTR [rdi+rdx*8], rsi
	mov	DWORD PTR [r12], eax
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L27:
	mov	rax, QWORD PTR 16[rbx]
	mov	rbx, QWORD PTR [rax]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	sub	rsp, 8
	.cfi_def_cfa_offset 88
	mov	rdi, QWORD PTR [rdi]
	mov	edx, r14d
	mov	r9, r12
	mov	eax, DWORD PTR 88[rsp]
	mov	r8d, r15d
	mov	esi, r13d
	push	rax
	.cfi_def_cfa_offset 96
	mov	rcx, QWORD PTR 16[rsp]
	call	R_BoxSurfaces_r
	mov	rax, QWORD PTR 16[rbx]
	mov	rbx, QWORD PTR 8[rax]
	pop	rax
	.cfi_def_cfa_offset 88
	pop	rdx
	.cfi_def_cfa_offset 80
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	R_BoxSurfaces_r, .-R_BoxSurfaces_r
	.comm	tr,8,8
	.comm	SURF_NOMARKS,4,4
	.comm	SURF_NOIMPACT,4,4
	.comm	SF_GRID,8,8
	.comm	SF_FACE,8,8
	.comm	CONTENTS_FOG,4,4
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	-1075838976
	.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_tr_marks.c_R_BoxSurfaces_r.c"
	.text
	.global	__aeabi_dcmpgt
	.align	2
	.global	R_BoxSurfaces_r
	.syntax unified
	.arm
	.fpu softvfp
	.type	R_BoxSurfaces_r, %function
R_BoxSurfaces_r:
	@ args = 12, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	ldr	r0, [r0]
	sub	sp, sp, #36
	cmn	r0, #1
	mov	fp, r2
	ldr	r6, [sp, #76]
	str	r1, [sp, #24]
	str	r3, [sp, #20]
	bne	.L2
	mov	r5, r1
	mov	r7, r3
.L6:
	mov	r1, fp
	mov	r0, r5
	ldr	r2, [r4, #16]
	bl	BoxOnPlaneSide
	cmp	r0, #1
	beq	.L28
	cmp	r0, #2
	ldr	r3, [r4, #12]
	beq	.L25
	ldr	r2, [sp, #80]
	ldr	r0, [r3]
	str	r2, [sp, #8]
	ldr	r2, [sp, #72]
	mov	r3, r7
	str	r2, [sp]
	mov	r1, r5
	mov	r2, fp
	str	r6, [sp, #4]
	bl	R_BoxSurfaces_r
	ldr	r3, [r4, #12]
.L25:
	ldr	r4, [r3, #4]
.L4:
	ldr	r3, [r4]
	cmn	r3, #1
	beq	.L6
.L2:
	ldmib	r4, {r5, r7}
	cmp	r5, #0
	beq	.L1
	str	fp, [sp, #28]
	ldr	r9, .L31
	ldr	r8, .L31+4
	ldr	r10, .L31+8
	ldr	fp, [sp, #72]
	sub	r7, r7, #4
	b	.L17
.L30:
	ldr	r3, .L31+12
	ldr	r2, [r2, #4]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L26
	ldr	r3, .L31+16
	ldr	r2, [r4, #4]
	ldr	r1, [r3]
	ldr	r3, [r2]
	cmp	r3, r1
	beq	.L29
	ldr	r1, .L31+20
	ldr	r2, [r10]
	ldr	r1, [r1]
	cmp	r3, r1
	strne	r2, [r4]
	beq	.L16
.L18:
	subs	r5, r5, #1
	beq	.L1
.L17:
	ldr	r3, [r6]
	cmp	r3, fp
	bge	.L1
	ldr	r4, [r7, #4]!
	ldr	r3, [r9]
	ldr	r2, [r4, #8]
	ldr	r0, [r8]
	ldr	r1, [r2]
	orr	r3, r3, r0
	tst	r3, r1
	beq	.L30
.L26:
	ldr	r3, [r10]
	subs	r5, r5, #1
	str	r3, [r4]
	bne	.L17
.L1:
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L29:
	ldr	r1, [sp, #28]
	ldr	r0, [sp, #24]
	bl	BoxOnPlaneSide
	sub	r0, r0, #1
	cmp	r0, #1
	bls	.L26
	ldr	r3, [r4, #4]
	ldr	r1, [sp, #80]
	ldr	r0, [r3]
	bl	DotProduct
	mov	r2, #0
	ldr	r3, .L31+24
	bl	__aeabi_dcmpgt
	cmp	r0, #0
	bne	.L26
	ldr	r2, [r10]
.L16:
	ldr	r3, [r4]
	cmp	r3, r2
	beq	.L18
	ldr	r3, [r6]
	ldr	r1, [r4, #4]
	ldr	r0, [sp, #20]
	str	r2, [r4]
	add	r2, r3, #1
	str	r1, [r0, r3, lsl #2]
	str	r2, [r6]
	b	.L18
.L28:
	ldr	r3, [r4, #12]
	ldr	r4, [r3]
	b	.L4
.L32:
	.align	2
.L31:
	.word	SURF_NOIMPACT
	.word	SURF_NOMARKS
	.word	tr
	.word	CONTENTS_FOG
	.word	SF_FACE
	.word	SF_GRID
	.word	-1075838976
	.size	R_BoxSurfaces_r, .-R_BoxSurfaces_r
	.comm	tr,4,4
	.comm	SURF_NOMARKS,4,4
	.comm	SURF_NOIMPACT,4,4
	.comm	SF_GRID,4,4
	.comm	SF_FACE,4,4
	.comm	CONTENTS_FOG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
