	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function Upload32
LCPI0_0:
	.long	0x437f0000                      ## float 255
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_Upload32:                              ## @Upload32
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	$1, %eax
	movq	32(%rbp), %rsi
	movq	24(%rbp), %rdi
	movq	16(%rbp), %rdx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %r12d
	leal	(%r12,%r12), %eax
	cmpl	%r15d, %r12d
	jl	LBB0_1
## %bb.2:
	movl	$1, %eax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %ebx
	leal	(%rbx,%rbx), %eax
	cmpl	%r14d, %ebx
	jl	LBB0_3
## %bb.4:
	movq	_r_roundImagesDown@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	setne	%al
	cmpl	%r15d, %r12d
	setg	%cl
	andb	%al, %cl
	sarl	%cl, %r12d
	cmpl	%r14d, %ebx
	setg	%cl
	andb	%al, %cl
	sarl	%cl, %ebx
	cmpl	%r15d, %r12d
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	%r9, -112(%rbp)                 ## 8-byte Spill
	jne	LBB0_7
## %bb.5:
	cmpl	%r14d, %ebx
	jne	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	testq	%r8, %r8
	jne	LBB0_8
	jmp	LBB0_9
LBB0_7:
	movq	_ri@GOTPCREL(%rip), %rax
	movl	%ebx, %edi
	imull	%r12d, %edi
	shll	$2, %edi
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	callq	*(%rax)
	movq	%rax, %r13
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	movl	%r14d, %edx
	movq	%rax, %rcx
	movl	%r12d, %r8d
	movl	%ebx, %r9d
	callq	_ResampleTexture
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movl	%ebx, %r14d
	movl	%r12d, %r15d
	movq	%r13, %rax
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	testq	%r8, %r8
	je	LBB0_9
LBB0_8:
	movq	_r_picmip@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movb	(%rax), %cl
	sarl	%cl, %r12d
	sarl	%cl, %ebx
LBB0_9:
	cmpl	$2, %r12d
	movl	$1, %r13d
	cmovll	%r13d, %r12d
	cmpl	$2, %ebx
	cmovgel	%ebx, %r13d
	movq	_glConfig@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	shrl	%r12d
	shrl	%r13d
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%eax, %r12d
	jg	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpl	%eax, %r13d
	jg	LBB0_10
## %bb.13:
	movq	_ri@GOTPCREL(%rip), %rax
	movl	%r12d, %edi
	imull	%r13d, %edi
	shll	$2, %edi
	callq	*(%rax)
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r15d, %eax
	imull	%r14d, %eax
	movl	$3, -44(%rbp)                   ## 4-byte Folded Spill
	cmpq	$0, -112(%rbp)                  ## 8-byte Folded Reload
	jne	LBB0_30
## %bb.14:
	testl	%eax, %eax
	jle	LBB0_18
## %bb.15:
	movl	%eax, %ecx
	shlq	$4, %rcx
	xorl	%edx, %edx
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movss	12(%rsi,%rdx), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jne	LBB0_23
	jp	LBB0_23
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	addq	$16, %rdx
	cmpq	%rdx, %rcx
	jne	LBB0_16
LBB0_18:
	movq	8(%rbx), %rcx
	movq	_TC_S3TC@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_20
## %bb.19:
	movq	_GL_RGB4_S3TC@GOTPCREL(%rip), %rcx
	jmp	LBB0_29
LBB0_20:
	movq	_r_texturebits@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx), %ecx
	cmpl	$32, %ecx
	je	LBB0_27
## %bb.21:
	cmpl	$16, %ecx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_31
## %bb.22:
	movq	_GL_RGB5@GOTPCREL(%rip), %rcx
	jmp	LBB0_26
LBB0_23:
	movq	_r_texturebits@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx), %ecx
	cmpl	$32, %ecx
	je	LBB0_28
## %bb.24:
	movl	$4, -44(%rbp)                   ## 4-byte Folded Spill
	cmpl	$16, %ecx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_31
## %bb.25:
	movq	_GL_RGBA4@GOTPCREL(%rip), %rcx
LBB0_26:
	movl	(%rcx), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_31
LBB0_27:
	movq	_GL_RGB8@GOTPCREL(%rip), %rcx
	jmp	LBB0_29
LBB0_28:
	movq	_GL_RGBA8@GOTPCREL(%rip), %rcx
LBB0_29:
	movl	(%rcx), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
LBB0_30:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_31:
	cmpl	%r15d, %r12d
	jne	LBB0_35
## %bb.32:
	cmpl	%r14d, %r13d
	jne	LBB0_35
## %bb.33:
	cmpq	$0, -104(%rbp)                  ## 8-byte Folded Reload
	je	LBB0_50
## %bb.34:
	shll	$2, %eax
	movl	%eax, %r14d
	jmp	LBB0_40
LBB0_35:
	cmpl	%r12d, %r15d
	jg	LBB0_37
## %bb.36:
	cmpl	%r13d, %r14d
	jle	LBB0_39
	.p2align	4, 0x90
LBB0_37:                                ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_R_MipMap
	sarl	%r15d
	sarl	%r14d
	cmpl	$2, %r15d
	movl	$1, %eax
	cmovll	%eax, %r15d
	cmpl	$2, %r14d
	cmovll	%eax, %r14d
	cmpl	%r12d, %r15d
	ja	LBB0_37
## %bb.38:                              ##   in Loop: Header=BB0_37 Depth=1
	cmpl	%r13d, %r14d
	ja	LBB0_37
LBB0_39:
	imull	%r15d, %r14d
	shll	$2, %r14d
LBB0_40:
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_Com_Memcpy
	xorl	%ecx, %ecx
	movq	-104(%rbp), %r14                ## 8-byte Reload
	testq	%r14, %r14
	sete	%cl
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%r13d, %edx
	callq	_R_LightScaleTexture
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	%r12d, (%rax)
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, (%rax)
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, (%rax)
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GL_RGBA@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_GL_UNSIGNED_BYTE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	xorl	%esi, %esi
	movl	%r12d, %ecx
	movl	%r13d, %r8d
	xorl	%r9d, %r9d
	pushq	%rbx
	pushq	%rax
	pushq	%r10
	callq	_qglTexImage2D
	addq	$32, %rsp
	testq	%r14, %r14
	je	LBB0_51
## %bb.41:
	movq	_gl_filter_max@GOTPCREL(%rip), %rbx
	movq	_gl_filter_min@GOTPCREL(%rip), %rcx
	cmpl	$1, %r12d
	ja	LBB0_44
## %bb.42:
	cmpl	$2, %r13d
	jb	LBB0_52
LBB0_44:
	movl	$1, %r15d
	movl	$1, %r14d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_45:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%r13d, %edx
	callq	_R_MipMap
	sarl	%r12d
	sarl	%r13d
	cmpl	$2, %r12d
	cmovll	%r14d, %r12d
	cmpl	$2, %r13d
	cmovll	%r14d, %r13d
	movq	_r_colorMipLevels@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_47
## %bb.46:                              ##   in Loop: Header=BB0_45 Depth=1
	movl	%r13d, %esi
	imull	%r12d, %esi
	movq	_mipBlendColors@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r15,4), %edx
	movq	%rbx, %rdi
	callq	_R_BlendOverTexture
LBB0_47:                                ##   in Loop: Header=BB0_45 Depth=1
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GL_RGBA@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_GL_UNSIGNED_BYTE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	movl	%r15d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r12d, %ecx
	movl	%r13d, %r8d
	xorl	%r9d, %r9d
	pushq	%rbx
	pushq	%rax
	pushq	%r10
	callq	_qglTexImage2D
	addq	$32, %rsp
	incq	%r15
	cmpl	$1, %r12d
	ja	LBB0_45
## %bb.48:                              ##   in Loop: Header=BB0_45 Depth=1
	cmpl	$1, %r13d
	ja	LBB0_45
## %bb.49:
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	_gl_filter_max@GOTPCREL(%rip), %rbx
	movq	_gl_filter_min@GOTPCREL(%rip), %rcx
	jmp	LBB0_53
LBB0_50:
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GL_RGBA@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_GL_UNSIGNED_BYTE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	subq	$8, %rsp
	xorl	%esi, %esi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	movl	%r15d, %ecx
	movl	%r14d, %r8d
	xorl	%r9d, %r9d
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	pushq	%rax
	pushq	%r10
	callq	_qglTexImage2D
	addq	$32, %rsp
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	%r15d, (%rax)
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	%r14d, (%rax)
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax)
LBB0_51:
	movq	_GL_LINEAR@GOTPCREL(%rip), %rcx
	movq	%rcx, %rbx
LBB0_52:
	movq	-72(%rbp), %r14                 ## 8-byte Reload
LBB0_53:
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_GL_TEXTURE_MIN_FILTER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rcx), %edx
	callq	_qglTexParameterf
	movl	(%r15), %edi
	movq	_GL_TEXTURE_MAG_FILTER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	callq	_qglTexParameterf
	xorl	%eax, %eax
	callq	_GL_CheckErrors
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_55
## %bb.54:
	movq	_ri@GOTPCREL(%rip), %rax
	callq	*8(%rax)
LBB0_55:
	testq	%r14, %r14
	je	LBB0_57
## %bb.56:
	movq	%r14, %rdi
	movq	_ri@GOTPCREL(%rip), %rax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*8(%rax)                        ## TAILCALL
LBB0_57:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GL_RGB,4,2                     ## @GL_RGB
	.comm	_r_roundImagesDown,8,3          ## @r_roundImagesDown
	.comm	_ri,16,3                        ## @ri
	.comm	_r_picmip,8,3                   ## @r_picmip
	.comm	_glConfig,16,3                  ## @glConfig
	.comm	_TC_S3TC,8,3                    ## @TC_S3TC
	.comm	_GL_RGB4_S3TC,4,2               ## @GL_RGB4_S3TC
	.comm	_r_texturebits,8,3              ## @r_texturebits
	.comm	_GL_RGB5,4,2                    ## @GL_RGB5
	.comm	_GL_RGB8,4,2                    ## @GL_RGB8
	.comm	_GL_RGBA4,4,2                   ## @GL_RGBA4
	.comm	_GL_RGBA8,4,2                   ## @GL_RGBA8
	.comm	_GL_TEXTURE_2D,4,2              ## @GL_TEXTURE_2D
	.comm	_GL_RGBA,4,2                    ## @GL_RGBA
	.comm	_GL_UNSIGNED_BYTE,4,2           ## @GL_UNSIGNED_BYTE
	.comm	_r_colorMipLevels,8,3           ## @r_colorMipLevels
	.comm	_mipBlendColors,8,3             ## @mipBlendColors
	.comm	_GL_TEXTURE_MIN_FILTER,4,2      ## @GL_TEXTURE_MIN_FILTER
	.comm	_gl_filter_min,4,2              ## @gl_filter_min
	.comm	_GL_TEXTURE_MAG_FILTER,4,2      ## @GL_TEXTURE_MAG_FILTER
	.comm	_gl_filter_max,4,2              ## @gl_filter_max
	.comm	_GL_LINEAR,4,2                  ## @GL_LINEAR
	.no_dead_strip	_Upload32
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function Upload32
_Upload32:                              ; @Upload32
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x5
	mov	x20, x4
	mov	x23, x3
	mov	x26, x2
	mov	x28, x1
	mov	x27, x0
	ldr	x12, [x29, #16]
	mov	w9, #1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x8, x9
	lsl	w9, w9, #1
	cmp	w8, w28
	b.lt	LBB0_1
; %bb.2:
	mov	w10, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x9, x10
	lsl	w10, w10, #1
	cmp	w9, w26
	b.lt	LBB0_3
; %bb.4:
Lloh0:
	adrp	x10, _r_roundImagesDown@GOTPAGE
Lloh1:
	ldr	x10, [x10, _r_roundImagesDown@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	ldr	x10, [x10]
	cmp	x10, #0
	cset	w10, ne
	cmp	w8, w28
	cset	w11, gt
	and	w11, w10, w11
	asr	w24, w8, w11
	cmp	w9, w26
	cset	w8, gt
	and	w8, w10, w8
	asr	w25, w9, w8
	cmp	w24, w28
	ccmp	w25, w26, #0, eq
Lloh3:
	adrp	x8, _ri@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ri@GOTPAGEOFF]
	stp	x12, x6, [sp, #16]              ; 16-byte Folded Spill
	mov	x22, x7
	b.eq	LBB0_6
; %bb.5:
	ldr	x8, [x8]
	mul	w9, w25, w24
	lsl	w0, w9, #2
	blr	x8
	mov	x19, x0
	mov	x0, x27
	mov	x1, x28
	mov	x2, x26
	mov	x3, x19
	mov	x4, x24
	mov	x5, x25
	bl	_ResampleTexture
	mov	x26, x25
	mov	x28, x24
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	mov	x27, x19
	cbnz	x20, LBB0_7
	b	LBB0_8
LBB0_6:
	str	xzr, [sp, #8]                   ; 8-byte Folded Spill
	cbz	x20, LBB0_8
LBB0_7:
Lloh5:
	adrp	x8, _r_picmip@GOTPAGE
Lloh6:
	ldr	x8, [x8, _r_picmip@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	w8, [x8]
	asr	w24, w24, w8
	asr	w25, w25, w8
LBB0_8:
	cmp	w24, #1
	csinc	w24, w24, wzr, gt
	cmp	w25, #1
	csinc	w25, w25, wzr, gt
Lloh8:
	adrp	x19, _glConfig@GOTPAGE
Lloh9:
	ldr	x19, [x19, _glConfig@GOTPAGEOFF]
	ldr	w8, [x19]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w24, w8
	ccmp	w25, w8, #0, le
	b.le	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	lsr	w24, w24, #1
	lsr	w25, w25, #1
	b	LBB0_9
LBB0_11:
Lloh10:
	adrp	x8, _ri@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ri@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	mul	w9, w24, w25
	lsl	w0, w9, #2
	blr	x8
	mov	x20, x0
	mul	w8, w28, w26
	cbz	x21, LBB0_13
LBB0_12:
	mov	w21, #3
	b	LBB0_28
LBB0_13:
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.14:
	add	x9, x27, #12
	mov	w10, #1132396544
	mov	x11, x8
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	s0, [x9]
	fmov	s1, w10
	fcmp	s0, s1
	b.ne	LBB0_22
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	add	x9, x9, #16
	subs	x11, x11, #1
	b.ne	LBB0_15
LBB0_17:
	ldr	x9, [x19, #8]
Lloh13:
	adrp	x10, _TC_S3TC@GOTPAGE
Lloh14:
	ldr	x10, [x10, _TC_S3TC@GOTPAGEOFF]
Lloh15:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_19
; %bb.18:
Lloh16:
	adrp	x9, _GL_RGB4_S3TC@GOTPAGE
Lloh17:
	ldr	x9, [x9, _GL_RGB4_S3TC@GOTPAGEOFF]
	b	LBB0_27
LBB0_19:
Lloh18:
	adrp	x9, _r_texturebits@GOTPAGE
Lloh19:
	ldr	x9, [x9, _r_texturebits@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	ldr	w9, [x9]
	cmp	w9, #32
	b.eq	LBB0_25
; %bb.20:
	cmp	w9, #16
	b.ne	LBB0_12
; %bb.21:
Lloh21:
	adrp	x9, _GL_RGB5@GOTPAGE
Lloh22:
	ldr	x9, [x9, _GL_RGB5@GOTPAGEOFF]
	b	LBB0_27
LBB0_22:
Lloh23:
	adrp	x9, _r_texturebits@GOTPAGE
Lloh24:
	ldr	x9, [x9, _r_texturebits@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	ldr	w9, [x9]
	cmp	w9, #32
	b.eq	LBB0_26
; %bb.23:
	cmp	w9, #16
	b.ne	LBB0_54
; %bb.24:
Lloh26:
	adrp	x9, _GL_RGBA4@GOTPAGE
Lloh27:
	ldr	x9, [x9, _GL_RGBA4@GOTPAGEOFF]
	b	LBB0_27
LBB0_25:
Lloh28:
	adrp	x9, _GL_RGB8@GOTPAGE
Lloh29:
	ldr	x9, [x9, _GL_RGB8@GOTPAGEOFF]
	b	LBB0_27
LBB0_26:
Lloh30:
	adrp	x9, _GL_RGBA8@GOTPAGE
Lloh31:
	ldr	x9, [x9, _GL_RGBA8@GOTPAGEOFF]
LBB0_27:
	ldr	w21, [x9]
LBB0_28:
Lloh32:
	adrp	x19, _GL_TEXTURE_2D@GOTPAGE
Lloh33:
	ldr	x19, [x19, _GL_TEXTURE_2D@GOTPAGEOFF]
	cmp	w24, w28
	b.ne	LBB0_32
; %bb.29:
	cmp	w25, w26
	b.ne	LBB0_32
; %bb.30:
	cbz	x23, LBB0_46
; %bb.31:
	lsl	w2, w8, #2
	b	LBB0_36
LBB0_32:
	cmp	w28, w24
	b.gt	LBB0_34
; %bb.33:
	cmp	w26, w25
	b.le	LBB0_35
LBB0_34:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x27
	mov	x1, x28
	mov	x2, x26
	bl	_R_MipMap
	asr	w8, w28, #1
	asr	w9, w26, #1
	cmp	w8, #1
	csinc	w28, w8, wzr, gt
	cmp	w9, #1
	csinc	w26, w9, wzr, gt
	cmp	w28, w24
	ccmp	w26, w25, #2, ls
	b.hi	LBB0_34
LBB0_35:
	mul	w8, w26, w28
	lsl	w2, w8, #2
LBB0_36:
	mov	x0, x20
	mov	x1, x27
	bl	_Com_Memcpy
	cmp	x23, #0
	cset	w3, eq
	mov	x0, x20
	mov	x1, x24
	mov	x2, x25
	bl	_R_LightScaleTexture
	str	w24, [x22]
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	str	w25, [x8]
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	str	w21, [x8]
	ldr	w0, [x19]
Lloh34:
	adrp	x26, _GL_RGBA@GOTPAGE
Lloh35:
	ldr	x26, [x26, _GL_RGBA@GOTPAGEOFF]
	ldr	w6, [x26]
Lloh36:
	adrp	x27, _GL_UNSIGNED_BYTE@GOTPAGE
Lloh37:
	ldr	x27, [x27, _GL_UNSIGNED_BYTE@GOTPAGEOFF]
	ldr	w7, [x27]
	str	x20, [sp]
	mov	w1, #0
	mov	x2, x21
	mov	x3, x24
	mov	x4, x25
	mov	w5, #0
	bl	_qglTexImage2D
	cbz	x23, LBB0_47
; %bb.37:
	cmp	w24, #1
	b.hi	LBB0_40
; %bb.38:
	cmp	w25, #2
	b.hs	LBB0_40
; %bb.39:
Lloh38:
	adrp	x22, _gl_filter_max@GOTPAGE
Lloh39:
	ldr	x22, [x22, _gl_filter_max@GOTPAGEOFF]
Lloh40:
	adrp	x9, _gl_filter_min@GOTPAGE
Lloh41:
	ldr	x9, [x9, _gl_filter_min@GOTPAGEOFF]
	b	LBB0_48
LBB0_40:
	mov	w22, #1
Lloh42:
	adrp	x23, _r_colorMipLevels@GOTPAGE
Lloh43:
	ldr	x23, [x23, _r_colorMipLevels@GOTPAGEOFF]
Lloh44:
	adrp	x28, _mipBlendColors@GOTPAGE
Lloh45:
	ldr	x28, [x28, _mipBlendColors@GOTPAGEOFF]
LBB0_41:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x24
	mov	x2, x25
	bl	_R_MipMap
	asr	w8, w24, #1
	asr	w9, w25, #1
	cmp	w8, #1
	csinc	w24, w8, wzr, gt
	cmp	w9, #1
	csinc	w25, w9, wzr, gt
	ldr	x8, [x23]
	ldr	x8, [x8]
	cbz	x8, LBB0_43
; %bb.42:                               ;   in Loop: Header=BB0_41 Depth=1
	mul	w1, w25, w24
	ldr	x8, [x28]
	ldr	w2, [x8, x22, lsl #2]
	mov	x0, x20
	bl	_R_BlendOverTexture
LBB0_43:                                ;   in Loop: Header=BB0_41 Depth=1
	ldr	w0, [x19]
	ldr	w6, [x26]
	ldr	w7, [x27]
	str	x20, [sp]
	mov	x1, x22
	mov	x2, x21
	mov	x3, x24
	mov	x4, x25
	mov	w5, #0
	bl	_qglTexImage2D
	add	x22, x22, #1
	cmp	w24, #1
	b.hi	LBB0_41
; %bb.44:                               ;   in Loop: Header=BB0_41 Depth=1
	cmp	w25, #1
	b.hi	LBB0_41
; %bb.45:
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
Lloh46:
	adrp	x22, _gl_filter_max@GOTPAGE
Lloh47:
	ldr	x22, [x22, _gl_filter_max@GOTPAGEOFF]
Lloh48:
	adrp	x9, _gl_filter_min@GOTPAGE
Lloh49:
	ldr	x9, [x9, _gl_filter_min@GOTPAGEOFF]
	b	LBB0_49
LBB0_46:
	ldr	w0, [x19]
Lloh50:
	adrp	x8, _GL_RGBA@GOTPAGE
Lloh51:
	ldr	x8, [x8, _GL_RGBA@GOTPAGEOFF]
Lloh52:
	ldr	w6, [x8]
Lloh53:
	adrp	x8, _GL_UNSIGNED_BYTE@GOTPAGE
Lloh54:
	ldr	x8, [x8, _GL_UNSIGNED_BYTE@GOTPAGEOFF]
Lloh55:
	ldr	w7, [x8]
	str	x27, [sp]
	mov	w1, #0
	mov	x2, x21
	mov	x3, x28
	mov	x4, x26
	mov	w5, #0
	bl	_qglTexImage2D
	str	w28, [x22]
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	str	w26, [x8]
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	str	w21, [x8]
LBB0_47:
Lloh56:
	adrp	x9, _GL_LINEAR@GOTPAGE
Lloh57:
	ldr	x9, [x9, _GL_LINEAR@GOTPAGEOFF]
	mov	x22, x9
LBB0_48:
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
LBB0_49:
	ldr	w0, [x19]
Lloh58:
	adrp	x8, _GL_TEXTURE_MIN_FILTER@GOTPAGE
Lloh59:
	ldr	x8, [x8, _GL_TEXTURE_MIN_FILTER@GOTPAGEOFF]
Lloh60:
	ldr	w1, [x8]
	ldr	w2, [x9]
	bl	_qglTexParameterf
	ldr	w0, [x19]
Lloh61:
	adrp	x8, _GL_TEXTURE_MAG_FILTER@GOTPAGE
Lloh62:
	ldr	x8, [x8, _GL_TEXTURE_MAG_FILTER@GOTPAGEOFF]
Lloh63:
	ldr	w1, [x8]
	ldr	w2, [x22]
	bl	_qglTexParameterf
	bl	_GL_CheckErrors
Lloh64:
	adrp	x19, _ri@GOTPAGE
Lloh65:
	ldr	x19, [x19, _ri@GOTPAGEOFF]
	cbz	x20, LBB0_51
; %bb.50:
	ldr	x8, [x19, #8]
	mov	x0, x20
	blr	x8
LBB0_51:
	cbz	x21, LBB0_53
; %bb.52:
	ldr	x1, [x19, #8]
	mov	x0, x21
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	br	x1
LBB0_53:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_54:
	mov	w21, #4
	b	LBB0_28
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGot	Lloh56, Lloh57
	.loh AdrpLdrGot	Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.cfi_endproc
                                        ; -- End function
	.comm	_GL_RGB,4,2                     ; @GL_RGB
	.comm	_r_roundImagesDown,8,3          ; @r_roundImagesDown
	.comm	_ri,16,3                        ; @ri
	.comm	_r_picmip,8,3                   ; @r_picmip
	.comm	_glConfig,16,3                  ; @glConfig
	.comm	_TC_S3TC,8,3                    ; @TC_S3TC
	.comm	_GL_RGB4_S3TC,4,2               ; @GL_RGB4_S3TC
	.comm	_r_texturebits,8,3              ; @r_texturebits
	.comm	_GL_RGB5,4,2                    ; @GL_RGB5
	.comm	_GL_RGB8,4,2                    ; @GL_RGB8
	.comm	_GL_RGBA4,4,2                   ; @GL_RGBA4
	.comm	_GL_RGBA8,4,2                   ; @GL_RGBA8
	.comm	_GL_TEXTURE_2D,4,2              ; @GL_TEXTURE_2D
	.comm	_GL_RGBA,4,2                    ; @GL_RGBA
	.comm	_GL_UNSIGNED_BYTE,4,2           ; @GL_UNSIGNED_BYTE
	.comm	_r_colorMipLevels,8,3           ; @r_colorMipLevels
	.comm	_mipBlendColors,8,3             ; @mipBlendColors
	.comm	_GL_TEXTURE_MIN_FILTER,4,2      ; @GL_TEXTURE_MIN_FILTER
	.comm	_gl_filter_min,4,2              ; @gl_filter_min
	.comm	_GL_TEXTURE_MAG_FILTER,4,2      ; @GL_TEXTURE_MAG_FILTER
	.comm	_gl_filter_max,4,2              ; @gl_filter_max
	.comm	_GL_LINEAR,4,2                  ; @GL_LINEAR
	.no_dead_strip	_Upload32
.subsections_via_symbols
