	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_StageIteratorLightmappedMultitexture ## -- Begin function RB_StageIteratorLightmappedMultitexture
	.p2align	4, 0x90
_RB_StageIteratorLightmappedMultitexture: ## @RB_StageIteratorLightmappedMultitexture
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_r_logFile@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_tess@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	20(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_va
	movq	%rax, %rdi
	callq	_GLimp_LogComment
LBB0_2:
	movq	_tess@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movl	16(%rax), %edi
	callq	_GL_Cull
	movq	_GLS_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_GL_State
	movq	_GL_FLOAT@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	60(%rbx), %ecx
	movl	$3, %edi
	movl	$16, %edx
	callq	_qglVertexPointer
	movq	_GL_COLOR_ARRAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_qglEnableClientState
	movq	_GL_UNSIGNED_BYTE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	56(%rbx), %ecx
	movl	$4, %edi
	xorl	%edx, %edx
	callq	_qglColorPointer
	xorl	%edi, %edi
	callq	_GL_SelectTexture
	movq	_GL_TEXTURE_COORD_ARRAY@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_qglEnableClientState
	movq	48(%rbx), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdi
	callq	_R_BindAnimatedImage
	movl	(%r14), %esi
	movq	40(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	movl	$2, %edi
	movl	$16, %edx
	callq	_qglTexCoordPointer
	movl	$1, %edi
	callq	_GL_SelectTexture
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_qglEnable
	movq	_r_lightmap@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	jne	LBB0_3
## %bb.4:
	movq	_GL_MODULATE@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_GL_REPLACE@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %edi
	callq	_GL_TexEnv
	movq	48(%rbx), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdi
	addq	$4, %rdi
	callq	_R_BindAnimatedImage
	movl	(%r15), %edi
	callq	_qglEnableClientState
	movl	(%r14), %esi
	movq	40(%rbx), %rax
	movq	(%rax), %rax
	movl	4(%rax), %ecx
	movl	$2, %edi
	movl	$16, %edx
	callq	_qglTexCoordPointer
	movl	32(%rbx), %esi
	xorl	%edi, %edi
	callq	_qglLockArraysEXT
	leaq	L_.str.1(%rip), %rdi
	callq	_GLimp_LogComment
	movl	24(%rbx), %esi
	movl	28(%rbx), %edi
	callq	_R_DrawElements
	movl	(%r12), %edi
	callq	_qglDisable
	movl	(%r15), %edi
	callq	_qglDisableClientState
	xorl	%edi, %edi
	callq	_GL_SelectTexture
	cmpq	$0, 16(%rbx)
	je	LBB0_8
## %bb.6:
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	_SS_OPAQUE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	callq	_ProjectDlightTexture
LBB0_8:
	cmpq	$0, 8(%rbx)
	je	LBB0_11
## %bb.9:
	movq	(%rbx), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_11
## %bb.10:
	xorl	%eax, %eax
	callq	_RB_FogPass
LBB0_11:
	xorl	%eax, %eax
	callq	_qglUnlockArraysEXT
	leaq	L_.str.2(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_GLimp_LogComment               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_tess,64,3                      ## @tess
	.comm	_r_logFile,8,3                  ## @r_logFile
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"--- RB_StageIteratorLightmappedMultitexture( %s ) ---\n"

	.comm	_GLS_DEFAULT,4,2                ## @GLS_DEFAULT
	.comm	_GL_FLOAT,4,2                   ## @GL_FLOAT
	.comm	_GL_COLOR_ARRAY,4,2             ## @GL_COLOR_ARRAY
	.comm	_GL_UNSIGNED_BYTE,4,2           ## @GL_UNSIGNED_BYTE
	.comm	_GL_TEXTURE_COORD_ARRAY,4,2     ## @GL_TEXTURE_COORD_ARRAY
	.comm	_GL_TEXTURE_2D,4,2              ## @GL_TEXTURE_2D
	.comm	_r_lightmap,8,3                 ## @r_lightmap
	.comm	_GL_REPLACE,4,2                 ## @GL_REPLACE
	.comm	_GL_MODULATE,4,2                ## @GL_MODULATE
L_.str.1:                               ## @.str.1
	.asciz	"glLockArraysEXT\n"

	.comm	_SS_OPAQUE,8,3                  ## @SS_OPAQUE
L_.str.2:                               ## @.str.2
	.asciz	"glUnlockArraysEXT\n"

	.comm	_GL_FLAT,4,2                    ## @GL_FLAT
	.comm	_GL_SMOOTH,4,2                  ## @GL_SMOOTH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_StageIteratorLightmappedMultitexture ; -- Begin function RB_StageIteratorLightmappedMultitexture
	.p2align	2
_RB_StageIteratorLightmappedMultitexture: ; @RB_StageIteratorLightmappedMultitexture
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x8, _r_logFile@GOTPAGE
Lloh1:
	ldr	x8, [x8, _r_logFile@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh3:
	adrp	x19, _tess@GOTPAGE
Lloh4:
	ldr	x19, [x19, _tess@GOTPAGEOFF]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x19]
	ldr	w1, [x8, #20]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_va
	bl	_GLimp_LogComment
LBB0_2:
	ldr	x8, [x19]
	ldr	w0, [x8, #16]
	bl	_GL_Cull
Lloh7:
	adrp	x8, _GLS_DEFAULT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GLS_DEFAULT@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_GL_State
Lloh10:
	adrp	x20, _GL_FLOAT@GOTPAGE
Lloh11:
	ldr	x20, [x20, _GL_FLOAT@GOTPAGEOFF]
	ldr	w1, [x20]
	ldr	w3, [x19, #60]
	mov	w0, #3
	mov	w2, #16
	bl	_qglVertexPointer
Lloh12:
	adrp	x8, _GL_COLOR_ARRAY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GL_COLOR_ARRAY@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_qglEnableClientState
Lloh15:
	adrp	x8, _GL_UNSIGNED_BYTE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GL_UNSIGNED_BYTE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldr	w3, [x19, #56]
	mov	w0, #4
	mov	w2, #0
	bl	_qglColorPointer
	mov	w0, #0
	bl	_GL_SelectTexture
Lloh18:
	adrp	x21, _GL_TEXTURE_COORD_ARRAY@GOTPAGE
Lloh19:
	ldr	x21, [x21, _GL_TEXTURE_COORD_ARRAY@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_qglEnableClientState
	ldr	x8, [x19, #48]
	ldr	x8, [x8]
	ldr	x0, [x8]
	bl	_R_BindAnimatedImage
	ldr	w1, [x20]
	ldr	x8, [x19, #40]
	ldr	x8, [x8]
	ldr	w3, [x8]
	mov	w0, #2
	mov	w2, #16
	bl	_qglTexCoordPointer
	mov	w0, #1
	bl	_GL_SelectTexture
Lloh20:
	adrp	x22, _GL_TEXTURE_2D@GOTPAGE
Lloh21:
	ldr	x22, [x22, _GL_TEXTURE_2D@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_qglEnable
Lloh22:
	adrp	x8, _r_lightmap@GOTPAGE
Lloh23:
	ldr	x8, [x8, _r_lightmap@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
Lloh25:
	adrp	x9, _GL_MODULATE@GOTPAGE
Lloh26:
	ldr	x9, [x9, _GL_MODULATE@GOTPAGEOFF]
	ldr	x8, [x8]
Lloh27:
	adrp	x10, _GL_REPLACE@GOTPAGE
Lloh28:
	ldr	x10, [x10, _GL_REPLACE@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x9, x10, eq
	ldr	w0, [x8]
	bl	_GL_TexEnv
	ldr	x8, [x19, #48]
	ldr	x8, [x8]
	ldr	x8, [x8]
	add	x0, x8, #4
	bl	_R_BindAnimatedImage
	ldr	w0, [x21]
	bl	_qglEnableClientState
	ldr	w1, [x20]
	ldr	x8, [x19, #40]
	ldr	x8, [x8]
	ldr	w3, [x8, #4]
	mov	w0, #2
	mov	w2, #16
	bl	_qglTexCoordPointer
	ldr	w1, [x19, #32]
	mov	w0, #0
	bl	_qglLockArraysEXT
Lloh29:
	adrp	x0, l_.str.1@PAGE
Lloh30:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_GLimp_LogComment
	ldp	w1, w0, [x19, #24]
	bl	_R_DrawElements
	ldr	w0, [x22]
	bl	_qglDisable
	ldr	w0, [x21]
	bl	_qglDisableClientState
	mov	w0, #0
	bl	_GL_SelectTexture
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh31:
	adrp	x9, _SS_OPAQUE@GOTPAGE
Lloh32:
	ldr	x9, [x9, _SS_OPAQUE@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x8, x9
	b.gt	LBB0_5
; %bb.4:
	bl	_ProjectDlightTexture
LBB0_5:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_8
; %bb.6:
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_8
; %bb.7:
	bl	_RB_FogPass
LBB0_8:
	bl	_qglUnlockArraysEXT
Lloh34:
	adrp	x0, l_.str.2@PAGE
Lloh35:
	add	x0, x0, l_.str.2@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_GLimp_LogComment
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_tess,64,3                      ; @tess
	.comm	_r_logFile,8,3                  ; @r_logFile
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"--- RB_StageIteratorLightmappedMultitexture( %s ) ---\n"

	.comm	_GLS_DEFAULT,4,2                ; @GLS_DEFAULT
	.comm	_GL_FLOAT,4,2                   ; @GL_FLOAT
	.comm	_GL_COLOR_ARRAY,4,2             ; @GL_COLOR_ARRAY
	.comm	_GL_UNSIGNED_BYTE,4,2           ; @GL_UNSIGNED_BYTE
	.comm	_GL_TEXTURE_COORD_ARRAY,4,2     ; @GL_TEXTURE_COORD_ARRAY
	.comm	_GL_TEXTURE_2D,4,2              ; @GL_TEXTURE_2D
	.comm	_r_lightmap,8,3                 ; @r_lightmap
	.comm	_GL_REPLACE,4,2                 ; @GL_REPLACE
	.comm	_GL_MODULATE,4,2                ; @GL_MODULATE
l_.str.1:                               ; @.str.1
	.asciz	"glLockArraysEXT\n"

	.comm	_SS_OPAQUE,8,3                  ; @SS_OPAQUE
l_.str.2:                               ; @.str.2
	.asciz	"glUnlockArraysEXT\n"

	.comm	_GL_FLAT,4,2                    ; @GL_FLAT
	.comm	_GL_SMOOTH,4,2                  ; @GL_SMOOTH
.subsections_via_symbols
