	.file	"extr_tr_mesh.c_R_ComputeFogNum.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	R_ComputeFogNum
	.type	R_ComputeFogNum, @function
R_ComputeFogNum:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR tr[rip+8]
	test	DWORD PTR RDF_NOWORLDMODEL[rip], eax
	je	.L14
	xor	r10d, r10d
	mov	eax, r10d
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xor	edx, edx
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	movsx	rbp, DWORD PTR [rsi]
	sal	rbp, 4
	add	rbp, QWORD PTR [rdi]
	mov	edi, DWORD PTR 4[rsi]
	mov	r8d, DWORD PTR 8[rbp]
	mov	esi, r8d
	call	VectorAdd@PLT
	mov	rdx, QWORD PTR tr[rip]
	mov	eax, DWORD PTR [rdx]
	cmp	eax, 1
	jle	.L2
	lea	r11d, -2[rax]
	mov	rbx, QWORD PTR 8[rdx]
	mov	rcx, QWORD PTR 0[rbp]
	mov	edi, 1
	add	r11, 2
	.p2align 4,,10
	.p2align 3
.L6:
	mov	r8, QWORD PTR [rbx+rdi*8]
	mov	r10d, edi
	xor	eax, eax
	mov	r9, QWORD PTR 8[r8]
.L4:
	mov	rdx, QWORD PTR [rax]
	mov	rsi, rdx
	sub	rsi, rcx
	cmp	rsi, QWORD PTR [r9+rax]
	jge	.L3
	mov	rsi, QWORD PTR [r8]
	add	rdx, rcx
	cmp	rdx, QWORD PTR [rsi+rax]
	jle	.L3
	add	rax, 8
	cmp	rax, 24
	jne	.L4
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r10d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	add	rdi, 1
	cmp	r11, rdi
	jne	.L6
.L2:
	add	rsp, 8
	.cfi_def_cfa_offset 24
	xor	r10d, r10d
	mov	eax, r10d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	R_ComputeFogNum, .-R_ComputeFogNum
	.comm	tr,16,16
	.comm	RDF_NOWORLDMODEL,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_tr_mesh.c_R_ComputeFogNum.c"
	.text
	.align	2
	.global	R_ComputeFogNum
	.syntax unified
	.arm
	.fpu softvfp
	.type	R_ComputeFogNum, %function
R_ComputeFogNum:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r4, .L13
	ldr	r3, .L13+4
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L12
.L2:
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	ldr	r5, [r0]
	ldr	r6, [r1]
	ldr	r0, [r1, #4]
	add	r3, r5, r6, lsl #3
	ldr	r1, [r3, #4]
	mov	r2, #0
	bl	VectorAdd
	ldr	r3, [r4]
	ldr	r10, [r3]
	cmp	r10, #1
	ble	.L2
	mov	r7, #0
	mov	r0, #1
	ldr	ip, [r5, r6, lsl #3]
	ldr	r9, [r3, #4]
	sub	fp, r7, #4
	add	r8, r7, #8
	rsb	r7, r7, #4
.L6:
	mov	r2, fp
	ldr	r6, [r9, #4]!
	ldr	r1, [r6, #4]
	sub	r1, r1, #4
.L4:
	add	r5, r7, r2
	ldr	r3, [r2, #4]!
	ldr	lr, [r1, #4]!
	sub	r4, r3, ip
	cmp	r4, lr
	add	r3, r3, ip
	bge	.L3
	ldr	lr, [r6]
	ldr	lr, [lr, r5]
	cmp	r3, lr
	ble	.L3
	cmp	r2, r8
	bne	.L4
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	add	r0, r0, #1
	cmp	r10, r0
	bne	.L6
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	.align	2
.L13:
	.word	tr
	.word	RDF_NOWORLDMODEL
	.size	R_ComputeFogNum, .-R_ComputeFogNum
	.comm	tr,8,4
	.comm	RDF_NOWORLDMODEL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
