	.file	"extr_tr_shade.c_RB_StageIteratorGeneric.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"--- RB_StageIteratorGeneric( %s ) ---\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"glLockArraysEXT\n"
.LC2:
	.string	"glUnlockArraysEXT\n"
	.text
	.p2align 4
	.globl	RB_StageIteratorGeneric
	.type	RB_StageIteratorGeneric, @function
RB_StageIteratorGeneric:
.LFB0:
	.cfi_startproc
	endbr64
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	xor	eax, eax
	call	RB_DeformTessGeometry@PLT
	mov	rax, QWORD PTR r_logFile[rip]
	cmp	QWORD PTR [rax], 0
	jne	.L13
.L2:
	mov	rax, QWORD PTR tess[rip+8]
	mov	edi, DWORD PTR 40[rax]
	call	GL_Cull@PLT
	mov	rax, QWORD PTR tess[rip+8]
	cmp	QWORD PTR 16[rax], 0
	jne	.L14
.L3:
	cmp	DWORD PTR tess[rip], 1
	mov	edi, DWORD PTR GL_COLOR_ARRAY[rip]
	jg	.L4
	mov	rax, QWORD PTR tess[rip+8]
	cmp	QWORD PTR 32[rax], 0
	je	.L5
.L4:
	mov	eax, DWORD PTR qfalse[rip]
	mov	DWORD PTR setArraysOnce[rip], eax
	call	qglDisableClientState@PLT
	mov	edi, DWORD PTR GL_TEXTURE_COORD_ARRAY[rip]
	call	qglDisableClientState@PLT
.L6:
	mov	ecx, DWORD PTR tess[rip+36]
	mov	esi, DWORD PTR GL_FLOAT[rip]
	mov	edx, 16
	mov	edi, 3
	call	qglVertexPointer@PLT
	mov	esi, DWORD PTR tess[rip+32]
	xor	edi, edi
	call	qglLockArraysEXT@PLT
	lea	rdi, .LC1[rip]
	call	GLimp_LogComment@PLT
	mov	eax, DWORD PTR setArraysOnce[rip]
	test	eax, eax
	je	.L15
.L7:
	lea	rdi, tess[rip]
	call	RB_IterateStagesGeneric@PLT
	cmp	QWORD PTR tess[rip+24], 0
	je	.L8
	mov	rax, QWORD PTR tess[rip+8]
	mov	rcx, QWORD PTR SS_OPAQUE[rip]
	cmp	QWORD PTR [rax], rcx
	jle	.L16
.L8:
	cmp	QWORD PTR tess[rip+16], 0
	je	.L9
	mov	rax, QWORD PTR tess[rip+8]
	cmp	QWORD PTR 24[rax], 0
	jne	.L17
.L9:
	xor	eax, eax
	call	qglUnlockArraysEXT@PLT
	lea	rdi, .LC2[rip]
	call	GLimp_LogComment@PLT
	mov	rax, QWORD PTR tess[rip+8]
	cmp	QWORD PTR 16[rax], 0
	jne	.L18
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	edx, DWORD PTR SURF_NODLIGHT[rip]
	or	edx, DWORD PTR SURF_SKY[rip]
	test	DWORD PTR 8[rax], edx
	jne	.L8
	xor	eax, eax
	call	ProjectDlightTexture@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edi, DWORD PTR GL_TEXTURE_COORD_ARRAY[rip]
	call	qglEnableClientState@PLT
	mov	edi, DWORD PTR GL_COLOR_ARRAY[rip]
	call	qglEnableClientState@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L18:
	mov	edi, DWORD PTR GL_POLYGON_OFFSET_FILL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	qglDisable@PLT
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	edi, DWORD PTR GL_POLYGON_OFFSET_FILL[rip]
	call	qglEnable@PLT
	mov	rax, QWORD PTR r_offsetUnits[rip]
	mov	esi, DWORD PTR [rax]
	mov	rax, QWORD PTR r_offsetFactor[rip]
	mov	edi, DWORD PTR [rax]
	call	qglPolygonOffset@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rax, QWORD PTR tess[rip+8]
	lea	rdi, .LC0[rip]
	mov	esi, DWORD PTR 44[rax]
	call	va@PLT
	mov	rdi, rax
	call	GLimp_LogComment@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	mov	eax, DWORD PTR qtrue[rip]
	mov	DWORD PTR setArraysOnce[rip], eax
	call	qglEnableClientState@PLT
	mov	ecx, DWORD PTR tess[rip+48]
	mov	esi, DWORD PTR GL_UNSIGNED_BYTE[rip]
	xor	edx, edx
	mov	edi, 4
	call	qglColorPointer@PLT
	mov	edi, DWORD PTR GL_TEXTURE_COORD_ARRAY[rip]
	call	qglEnableClientState@PLT
	mov	rax, QWORD PTR tess[rip+40]
	mov	esi, DWORD PTR GL_FLOAT[rip]
	xor	edx, edx
	mov	edi, 2
	mov	ecx, DWORD PTR [rax]
	call	qglTexCoordPointer@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L17:
	xor	eax, eax
	call	RB_FogPass@PLT
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	RB_StageIteratorGeneric, .-RB_StageIteratorGeneric
	.comm	tess,56,32
	.comm	setArraysOnce,4,4
	.comm	r_offsetUnits,8,8
	.comm	r_offsetFactor,8,8
	.comm	r_logFile,8,8
	.comm	qtrue,4,4
	.comm	qfalse,4,4
	.comm	SURF_SKY,4,4
	.comm	SURF_NODLIGHT,4,4
	.comm	SS_OPAQUE,8,8
	.comm	GL_UNSIGNED_BYTE,4,4
	.comm	GL_TEXTURE_COORD_ARRAY,4,4
	.comm	GL_POLYGON_OFFSET_FILL,4,4
	.comm	GL_FLOAT,4,4
	.comm	GL_COLOR_ARRAY,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_shade.c_RB_StageIteratorGeneric.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"--- RB_StageIteratorGeneric( %s ) ---\012\000"
	.align	2
.LC1:
	.ascii	"glLockArraysEXT\012\000"
	.align	2
.LC2:
	.ascii	"glUnlockArraysEXT\012\000"
	.text
	.align	2
	.global	RB_StageIteratorGeneric
	.syntax unified
	.arm
	.fpu softvfp
	.type	RB_StageIteratorGeneric, %function
RB_StageIteratorGeneric:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	bl	RB_DeformTessGeometry
	ldr	r3, .L32
	ldr	r4, .L32+4
	ldr	r3, [r3]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L25
.L2:
	ldr	r3, [r4, #4]
	ldr	r0, [r3, #20]
	bl	GL_Cull
	ldr	r3, [r4, #4]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L28
.L3:
	ldr	r3, [r4]
	ldr	r6, .L32+8
	cmp	r3, #1
	ldr	r0, [r6]
	bgt	.L4
	ldr	r3, [r4, #4]
	ldr	r9, [r3, #16]
	cmp	r9, #0
	beq	.L5
.L4:
	ldr	r3, .L32+12
	ldr	r5, .L32+16
	ldr	r3, [r3]
	ldr	r7, .L32+20
	str	r3, [r5]
	bl	qglDisableClientState
	ldr	r0, [r7]
	bl	qglDisableClientState
	ldr	r8, .L32+24
.L6:
	ldr	r3, [r4, #20]
	mov	r2, #16
	ldr	r1, [r8]
	mov	r0, #3
	bl	qglVertexPointer
	ldr	r1, [r4, #16]
	mov	r0, #0
	bl	qglLockArraysEXT
	ldr	r0, .L32+28
	bl	GLimp_LogComment
	ldr	r3, [r5]
	cmp	r3, #0
	beq	.L29
.L7:
	ldr	r0, .L32+4
	bl	RB_IterateStagesGeneric
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L8
	ldr	r3, [r4, #4]
	ldr	r2, .L32+32
	ldr	r1, [r3]
	ldr	r2, [r2]
	cmp	r1, r2
	ble	.L30
.L8:
	ldr	r3, [r4, #8]
	cmp	r3, #0
	beq	.L9
	ldr	r3, [r4, #4]
	ldr	r3, [r3, #12]
	cmp	r3, #0
	bne	.L31
.L9:
	bl	qglUnlockArraysEXT
	ldr	r0, .L32+36
	bl	GLimp_LogComment
	ldr	r3, [r4, #4]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
	ldr	r3, .L32+40
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r0, [r3]
	b	qglDisable
.L30:
	ldr	r1, .L32+44
	ldr	r2, .L32+48
	ldr	r0, [r1]
	ldr	r2, [r2]
	ldr	r1, [r3, #4]
	orr	r3, r2, r0
	tst	r3, r1
	bne	.L8
	bl	ProjectDlightTexture
	b	.L8
.L29:
	ldr	r0, [r7]
	bl	qglEnableClientState
	ldr	r0, [r6]
	bl	qglEnableClientState
	b	.L7
.L28:
	ldr	r3, .L32+40
	ldr	r0, [r3]
	bl	qglEnable
	ldr	r2, .L32+52
	ldr	r3, .L32+56
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	qglPolygonOffset
	b	.L3
.L25:
	ldr	r3, [r4, #4]
	ldr	r0, .L32+60
	ldr	r1, [r3, #24]
	bl	va
	bl	GLimp_LogComment
	b	.L2
.L5:
	ldr	r3, .L32+64
	ldr	r5, .L32+16
	ldr	r3, [r3]
	ldr	r7, .L32+20
	str	r3, [r5]
	bl	qglEnableClientState
	ldr	r3, .L32+68
	mov	r2, r9
	ldr	r1, [r3]
	mov	r0, #4
	ldr	r3, [r4, #28]
	bl	qglColorPointer
	ldr	r0, [r7]
	bl	qglEnableClientState
	ldr	r8, .L32+24
	ldr	r3, [r4, #24]
	mov	r2, r9
	ldr	r3, [r3]
	ldr	r1, [r8]
	mov	r0, #2
	bl	qglTexCoordPointer
	b	.L6
.L31:
	bl	RB_FogPass
	b	.L9
.L33:
	.align	2
.L32:
	.word	r_logFile
	.word	tess
	.word	GL_COLOR_ARRAY
	.word	qfalse
	.word	setArraysOnce
	.word	GL_TEXTURE_COORD_ARRAY
	.word	GL_FLOAT
	.word	.LC1
	.word	SS_OPAQUE
	.word	.LC2
	.word	GL_POLYGON_OFFSET_FILL
	.word	SURF_SKY
	.word	SURF_NODLIGHT
	.word	r_offsetUnits
	.word	r_offsetFactor
	.word	.LC0
	.word	qtrue
	.word	GL_UNSIGNED_BYTE
	.size	RB_StageIteratorGeneric, .-RB_StageIteratorGeneric
	.comm	tess,32,4
	.comm	setArraysOnce,4,4
	.comm	r_offsetUnits,4,4
	.comm	r_offsetFactor,4,4
	.comm	r_logFile,4,4
	.comm	qtrue,4,4
	.comm	qfalse,4,4
	.comm	SURF_SKY,4,4
	.comm	SURF_NODLIGHT,4,4
	.comm	SS_OPAQUE,4,4
	.comm	GL_UNSIGNED_BYTE,4,4
	.comm	GL_TEXTURE_COORD_ARRAY,4,4
	.comm	GL_POLYGON_OFFSET_FILL,4,4
	.comm	GL_FLOAT,4,4
	.comm	GL_COLOR_ARRAY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
