	.file	"extr_l_bsp_q3.c_CountTriangles.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%6d triangles\n"
.LC1:
	.string	"%6d patch tris\n"
	.text
	.p2align 4
	.globl	CountTriangles
	.type	CountTriangles, @function
CountTriangles:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR q3_numDrawSurfaces[rip]
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	test	eax, eax
	jle	.L5
	mov	rsi, QWORD PTR q3_drawSurfaces[rip]
	sub	eax, 1
	xor	ebp, ebp
	xor	r8d, r8d
	lea	rax, [rax+rax*2]
	lea	rcx, 12[rsi]
	lea	rdi, [rcx+rax*4]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L12:
	add	rcx, 12
.L4:
	movsx	rax, DWORD PTR [rsi]
	mov	rdx, rax
	imul	rax, rax, 1431655766
	sar	edx, 31
	shr	rax, 32
	sub	eax, edx
	add	r8d, eax
	mov	eax, DWORD PTR 4[rsi]
	test	eax, eax
	je	.L3
	imul	eax, DWORD PTR 8[rsi]
	lea	ebp, 0[rbp+rax*2]
.L3:
	mov	rsi, rcx
	cmp	rcx, rdi
	jne	.L12
.L2:
	mov	esi, r8d
	lea	rdi, .LC0[rip]
	call	Log_Print@PLT
	mov	esi, ebp
	lea	rdi, .LC1[rip]
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	Log_Print@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	xor	ebp, ebp
	xor	r8d, r8d
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	CountTriangles, .-CountTriangles
	.comm	q3_numDrawSurfaces,4,4
	.comm	q3_drawSurfaces,8,8
	.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_l_bsp_q3.c_CountTriangles.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%6d triangles\012\000"
	.align	2
.LC1:
	.ascii	"%6d patch tris\012\000"
	.text
	.align	2
	.global	CountTriangles
	.syntax unified
	.arm
	.fpu softvfp
	.type	CountTriangles, %function
CountTriangles:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, #0
	ldr	r3, .L12
	mov	r1, r4
	ldr	lr, [r3]
	cmp	lr, #0
	ble	.L2
	ldr	r3, .L12+4
	add	lr, lr, lr, lsl #1
	ldr	r3, [r3]
	ldr	r5, .L12+8
	add	lr, r3, lr, lsl #2
.L4:
	ldr	ip, [r3]
	ldr	r0, [r3, #4]
	smull	r6, r2, r5, ip
	cmp	r0, #0
	sub	r2, r2, ip, asr #31
	add	r1, r1, r2
	ldrne	r2, [r3, #8]
	add	r3, r3, #12
	mulne	r0, r2, r0
	addne	r4, r4, r0, lsl #1
	cmp	r3, lr
	bne	.L4
.L2:
	ldr	r0, .L12+12
	bl	Log_Print
	mov	r1, r4
	pop	{r4, r5, r6, lr}
	ldr	r0, .L12+16
	b	Log_Print
.L13:
	.align	2
.L12:
	.word	q3_numDrawSurfaces
	.word	q3_drawSurfaces
	.word	1431655766
	.word	.LC0
	.word	.LC1
	.size	CountTriangles, .-CountTriangles
	.comm	q3_numDrawSurfaces,4,4
	.comm	q3_drawSurfaces,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
