	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movq	%r8, -112(%rbp)                 ## 8-byte Spill
	movl	%ecx, %r8d
	movq	%rdi, %rbx
	movl	$1, %eax
	movq	64(%rbp), %rcx
	movq	%rcx, -136(%rbp)                ## 8-byte Spill
	movq	56(%rbp), %rcx
	movq	48(%rbp), %r9
	movq	40(%rbp), %r10
	movq	32(%rbp), %r15
	movq	24(%rbp), %r11
	movq	16(%rbp), %rdi
	movq	%rdi, -128(%rbp)                ## 8-byte Spill
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %r13d
	leal	(%r13,%r13), %eax
	cmpl	%esi, %r13d
	jl	LBB0_1
## %bb.2:
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	$1, %eax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %r12d
	leal	(%r12,%r12), %eax
	cmpl	%edx, %r12d
	jl	LBB0_3
## %bb.4:
	movq	_r_roundImagesDown@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	setne	%al
	cmpl	%esi, %r13d
	setg	%cl
	andb	%al, %cl
	sarl	%cl, %r13d
	cmpl	%edx, %r12d
	setg	%cl
	andb	%al, %cl
	sarl	%cl, %r12d
	cmpl	%esi, %r13d
	movl	%r8d, -116(%rbp)                ## 4-byte Spill
	movq	%r10, -104(%rbp)                ## 8-byte Spill
	movq	%r9, -152(%rbp)                 ## 8-byte Spill
	movq	%r11, -144(%rbp)                ## 8-byte Spill
	jne	LBB0_7
## %bb.5:
	cmpl	%edx, %r12d
	jne	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_8
LBB0_7:
	movq	_ri@GOTPCREL(%rip), %rax
	movl	%r12d, %edi
	imull	%r13d, %edi
	shll	$2, %edi
	movl	%edx, -76(%rbp)                 ## 4-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movl	%esi, %r14d
	callq	*(%rax)
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, %r15
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movl	-76(%rbp), %edx                 ## 4-byte Reload
	movq	%rax, %rcx
	movl	%r13d, %r8d
	movl	%r12d, %r9d
	callq	_ResampleTexture
	movl	%r12d, %edx
	movl	%r13d, %esi
	movq	%r15, %rax
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movq	%r15, %rbx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_8:
	movl	%esi, %eax
	movl	%edx, %edi
	testq	%r15, %r15
	je	LBB0_10
## %bb.9:
	movq	_textureMaxSize@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_glConfig@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	cmpl	%edi, %ecx
	movl	%ecx, %eax
	cmovgl	%edi, %eax
	testl	%ecx, %ecx
	cmovlel	%edi, %eax
	movl	%eax, %edi
LBB0_10:
	testq	%r14, %r14
	je	LBB0_12
## %bb.11:
	movq	_r_picmip@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %r13d
	sarl	%cl, %r12d
LBB0_12:
	cmpl	$2, %r13d
	movl	$1, %r14d
	cmovll	%r14d, %r13d
	cmpl	$2, %r12d
	cmovgel	%r12d, %r14d
	cmpl	%eax, %r13d
	movl	%edx, -76(%rbp)                 ## 4-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	jg	LBB0_14
LBB0_13:
	cmpl	%edi, %r14d
	jle	LBB0_15
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	shrl	%r13d
	shrl	%r14d
	cmpl	%eax, %r13d
	jle	LBB0_13
	jmp	LBB0_14
LBB0_15:
	movq	_ri@GOTPCREL(%rip), %rax
	movl	%r13d, %edi
	imull	%r14d, %edi
	shll	$2, %edi
	callq	*(%rax)
	movq	%rax, %r15
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	-76(%rbp), %r8d                 ## 4-byte Reload
	imull	%r8d, %edx
	movq	_r_greyscale@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rax
	cmpq	$0, 8(%rax)
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, -80(%rbp)                 ## 4-byte Spill
	je	LBB0_22
LBB0_16:
	testl	%edx, %edx
	jle	LBB0_19
## %bb.17:
	movl	-80(%rbp), %r12d                ## 4-byte Reload
	shlq	$4, %r12
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movss	(%rbx,%r15), %xmm0              ## xmm0 = mem[0],zero,zero,zero
	movss	4(%rbx,%r15), %xmm1             ## xmm1 = mem[0],zero,zero,zero
	movss	8(%rbx,%r15), %xmm2             ## xmm2 = mem[0],zero,zero,zero
	callq	_LUMA
	movss	%xmm0, (%rbx,%r15)
	movss	%xmm0, 4(%rbx,%r15)
	movss	%xmm0, 8(%rbx,%r15)
	addq	$16, %r15
	cmpq	%r15, %r12
	jne	LBB0_18
LBB0_19:
	cmpq	$0, -128(%rbp)                  ## 8-byte Folded Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	-76(%rbp), %r8d                 ## 4-byte Reload
	movl	-80(%rbp), %edx                 ## 4-byte Reload
	movq	_r_greyscale@GOTPCREL(%rip), %rdi
	je	LBB0_32
## %bb.20:
	movq	(%rdi), %rax
	cmpq	$0, 8(%rax)
	jne	LBB0_42
LBB0_26:
	movq	_r_monolightmaps@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, 8(%rax)
	jne	LBB0_42
## %bb.27:
	movq	_GL_RGB@GOTPCREL(%rip), %rax
	jmp	LBB0_43
LBB0_42:
	movq	_GL_LUMINANCE@GOTPCREL(%rip), %rax
LBB0_43:
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-104(%rbp), %r10                ## 8-byte Reload
	jmp	LBB0_62
LBB0_22:
	cmpq	$0, -128(%rbp)                  ## 8-byte Folded Reload
	je	LBB0_28
## %bb.23:
	movq	_r_monolightmaps@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, 8(%rcx)
	jne	LBB0_16
## %bb.24:
	movss	(%rax), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	xorps	%xmm0, %xmm0
	ucomiss	%xmm0, %xmm1
	jne	LBB0_29
	jp	LBB0_29
## %bb.25:
	movss	(%rcx), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jne	LBB0_29
	jp	LBB0_29
	jmp	LBB0_26
LBB0_28:
	movss	(%rax), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	xorps	%xmm0, %xmm0
	ucomiss	%xmm0, %xmm1
	jne	LBB0_29
	jnp	LBB0_32
LBB0_29:
	movss	%xmm1, -72(%rbp)                ## 4-byte Spill
	testl	%edx, %edx
	jle	LBB0_19
## %bb.30:
	movl	-80(%rbp), %r15d                ## 4-byte Reload
	shlq	$4, %r15
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_31:                                ## =>This Inner Loop Header: Depth=1
	movss	(%rbx,%r12), %xmm0              ## xmm0 = mem[0],zero,zero,zero
	movss	4(%rbx,%r12), %xmm1             ## xmm1 = mem[0],zero,zero,zero
	movss	8(%rbx,%r12), %xmm2             ## xmm2 = mem[0],zero,zero,zero
	callq	_LUMA
	movaps	%xmm0, %xmm1
	movss	%xmm0, -96(%rbp)                ## 4-byte Spill
	movss	(%rbx,%r12), %xmm0              ## xmm0 = mem[0],zero,zero,zero
	movss	-72(%rbp), %xmm2                ## 4-byte Reload
                                        ## xmm2 = mem[0],zero,zero,zero
	callq	_LERP
	movss	%xmm0, (%rbx,%r12)
	movss	4(%rbx,%r12), %xmm0             ## xmm0 = mem[0],zero,zero,zero
	movss	-96(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	movss	-72(%rbp), %xmm2                ## 4-byte Reload
                                        ## xmm2 = mem[0],zero,zero,zero
	callq	_LERP
	movss	%xmm0, 4(%rbx,%r12)
	movss	8(%rbx,%r12), %xmm0             ## xmm0 = mem[0],zero,zero,zero
	movss	-96(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	movss	-72(%rbp), %xmm2                ## 4-byte Reload
                                        ## xmm2 = mem[0],zero,zero,zero
	callq	_LERP
	movss	%xmm0, 8(%rbx,%r12)
	addq	$16, %r12
	cmpq	%r12, %r15
	jne	LBB0_31
	jmp	LBB0_19
LBB0_32:
	testl	%edx, %edx
	movq	-104(%rbp), %r10                ## 8-byte Reload
	jle	LBB0_36
## %bb.33:
	movl	%edx, %eax
	shlq	$4, %rax
	xorl	%ecx, %ecx
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	.p2align	4, 0x90
LBB0_34:                                ## =>This Inner Loop Header: Depth=1
	movss	12(%rbx,%rcx), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jne	LBB0_39
	jp	LBB0_39
## %bb.35:                              ##   in Loop: Header=BB0_34 Depth=1
	addq	$16, %rcx
	cmpq	%rcx, %rax
	jne	LBB0_34
LBB0_36:
	movq	(%rdi), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_44
## %bb.37:
	movq	_r_texturebits@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	addl	$-16, %eax
	testl	$-17, %eax
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	jne	LBB0_47
## %bb.38:
	movq	_GL_LUMINANCE8@GOTPCREL(%rip), %rax
	jmp	LBB0_61
LBB0_39:
	movq	(%rdi), %rax
	cmpq	$0, 8(%rax)
	movq	_r_texturebits@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	je	LBB0_48
## %bb.40:
	addl	$-16, %ecx
	testl	$-17, %ecx
	jne	LBB0_50
## %bb.41:
	movq	_GL_LUMINANCE8_ALPHA8@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	jmp	LBB0_61
LBB0_44:
	cmpq	$0, -144(%rbp)                  ## 8-byte Folded Reload
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	je	LBB0_53
## %bb.45:
	movq	_glConfig@GOTPCREL(%rip), %rax
	movq	8(%rax), %rax
	movq	_TC_S3TC_ARB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_51
## %bb.46:
	movq	_GL_COMPRESSED_RGBA_S3TC_DXT1_EXT@GOTPCREL(%rip), %rax
	jmp	LBB0_61
LBB0_47:
	movq	_GL_LUMINANCE@GOTPCREL(%rip), %rax
	jmp	LBB0_61
LBB0_48:
	cmpl	$32, %ecx
	jne	LBB0_58
## %bb.49:
	movq	_GL_RGBA8@GOTPCREL(%rip), %rax
	jmp	LBB0_59
LBB0_50:
	movq	_GL_LUMINANCE_ALPHA@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	jmp	LBB0_61
LBB0_51:
	movq	_TC_S3TC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_53
## %bb.52:
	movq	_GL_RGB4_S3TC@GOTPCREL(%rip), %rax
	jmp	LBB0_61
LBB0_53:
	movq	_r_texturebits@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	cmpl	$32, %ecx
	jne	LBB0_55
## %bb.54:
	movq	_GL_RGB8@GOTPCREL(%rip), %rax
	jmp	LBB0_56
LBB0_55:
	movq	_GL_RGB@GOTPCREL(%rip), %rax
LBB0_56:
	cmpl	$16, %ecx
	jne	LBB0_61
## %bb.57:
	movq	_GL_RGB5@GOTPCREL(%rip), %rax
	jmp	LBB0_61
LBB0_58:
	movq	_GL_RGBA@GOTPCREL(%rip), %rax
LBB0_59:
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	cmpl	$16, %ecx
	jne	LBB0_61
## %bb.60:
	movq	_GL_RGBA4@GOTPCREL(%rip), %rax
LBB0_61:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
LBB0_62:
	movl	(%rax), %edi
	movq	-152(%rbp), %rax                ## 8-byte Reload
	movl	%r13d, (%rax)
	movl	%r14d, (%rcx)
	movl	%edi, -72(%rbp)                 ## 4-byte Spill
	movl	%edi, (%r10)
	movq	-136(%rbp), %rax                ## 8-byte Reload
	movl	$1, (%rax)
	cmpl	%r9d, %r13d
	jne	LBB0_68
## %bb.63:
	cmpl	%r8d, %r14d
	jne	LBB0_68
## %bb.64:
	cmpq	$0, -112(%rbp)                  ## 8-byte Folded Reload
	je	LBB0_73
## %bb.65:
	cmpl	$1, %r9d
	ja	LBB0_74
## %bb.66:
	cmpl	$2, %r8d
	jae	LBB0_74
## %bb.67:
	xorl	%eax, %eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	%r8d, %r14d
	movl	%r9d, %r12d
	jmp	LBB0_80
LBB0_68:
	cmpl	%r13d, %r9d
	jg	LBB0_70
## %bb.69:
	cmpl	%r14d, %r8d
	jle	LBB0_72
	.p2align	4, 0x90
LBB0_70:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	%r9d, %esi
	movl	%r8d, %edx
	movq	%rbx, %r12
	movl	%r8d, %ebx
	movl	%r9d, %r15d
	callq	_R_MipMap
	movl	%r15d, %r9d
	movl	%ebx, %r8d
	movq	%r12, %rbx
	sarl	%r9d
	sarl	%r8d
	cmpl	$2, %r9d
	movl	$1, %eax
	cmovll	%eax, %r9d
	cmpl	$2, %r8d
	cmovll	%eax, %r8d
	cmpl	%r13d, %r9d
	ja	LBB0_70
## %bb.71:                              ##   in Loop: Header=BB0_70 Depth=1
	cmpl	%r14d, %r8d
	ja	LBB0_70
LBB0_72:
	imull	%r9d, %r8d
	shll	$2, %r8d
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r8d, %edx
	callq	_Com_Memcpy
	xorl	%r12d, %r12d
	jmp	LBB0_81
LBB0_73:
	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	-72(%rbp), %edx                 ## 4-byte Reload
	movl	%r9d, %ecx
	xorl	%r9d, %r9d
	pushq	%rbx
	pushq	%rax
	pushq	%r10
	callq	_qglTexImage2D
	addq	$32, %rsp
	jmp	LBB0_91
LBB0_74:
	movl	-116(%rbp), %eax                ## 4-byte Reload
	cmpl	$2, %eax
	movl	$1, %r15d
	cmovgel	%eax, %r15d
	decl	%r15d
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_75:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%esi, %r15d
	je	LBB0_78
## %bb.76:                              ##   in Loop: Header=BB0_75 Depth=1
	leal	1(%rsi), %r14d
	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
                                        ## kill: def $esi killed $esi killed $rsi
	movl	-72(%rbp), %edx                 ## 4-byte Reload
	movl	%r9d, %ecx
	movl	%r8d, %r12d
	movl	%r9d, %r13d
	xorl	%r9d, %r9d
	pushq	%rbx
	pushq	%rax
	pushq	%r10
	callq	_qglTexImage2D
	movl	%r13d, %r9d
	movl	%r12d, %r8d
	addq	$32, %rsp
	movl	%r12d, %eax
	imull	%r13d, %eax
	cltq
	leaq	(%rbx,%rax,4), %rbx
	shrl	%r9d
	shrl	%r8d
	cmpl	$2, %r9d
	movl	$1, %eax
	cmovll	%eax, %r9d
	cmpl	$2, %r8d
	cmovll	%eax, %r8d
	movl	%r14d, %esi
	cmpl	$1, %r9d
	ja	LBB0_75
## %bb.77:                              ##   in Loop: Header=BB0_75 Depth=1
	movl	%r14d, %esi
	movl	$1, %ecx
	cmpl	$1, %r8d
	ja	LBB0_75
	jmp	LBB0_79
LBB0_78:
	movl	%r9d, %eax
	movl	%r8d, %ecx
	movl	%r15d, %r14d
LBB0_79:
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	movl	%ecx, %edx
	imull	%eax, %edx
	movl	%eax, %r12d
	movl	%ecx, %r14d
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_80:
	shll	$2, %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_Com_Memcpy
	movl	%r12d, %r13d
	movq	-96(%rbp), %r12                 ## 8-byte Reload
LBB0_81:
	xorl	%ecx, %ecx
	cmpq	$0, -112(%rbp)                  ## 8-byte Folded Reload
	sete	%cl
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%r14d, %edx
	callq	_R_LightScaleTexture
	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
	movq	%r15, %rbx
	movq	%r12, %r15
	movl	%r12d, %esi
	movl	-72(%rbp), %edx                 ## 4-byte Reload
	movl	%r13d, %ecx
	movl	%r14d, %r8d
	xorl	%r9d, %r9d
	pushq	%rbx
	pushq	%rax
	pushq	%r10
	callq	_qglTexImage2D
	addq	$32, %rsp
	cmpq	$0, -112(%rbp)                  ## 8-byte Folded Reload
	je	LBB0_91
## %bb.82:
	cmpl	$1, %r13d
	jg	LBB0_84
## %bb.83:
	cmpl	$2, %r14d
	jl	LBB0_89
LBB0_84:
	movl	%r15d, %r15d
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_85:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%r14d, %edx
	callq	_R_MipMap
	sarl	%r13d
	sarl	%r14d
	cmpl	$2, %r13d
	movl	$1, %eax
	cmovll	%eax, %r13d
	cmpl	$2, %r14d
	cmovll	%eax, %r14d
	movq	_r_colorMipLevels@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	movq	%r15, %r12
	je	LBB0_87
## %bb.86:                              ##   in Loop: Header=BB0_85 Depth=1
	movl	%r14d, %esi
	imull	%r13d, %esi
	movq	_mipBlendColors@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	4(%rax,%r12,4), %edx
	movq	%rbx, %rdi
	callq	_R_BlendOverTexture
LBB0_87:                                ##   in Loop: Header=BB0_85 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
	incq	%r12
	subq	$8, %rsp
	movq	%r12, %r15
	movl	%r12d, %esi
	movl	-72(%rbp), %edx                 ## 4-byte Reload
	movl	%r13d, %ecx
	movl	%r14d, %r8d
	xorl	%r9d, %r9d
	pushq	%rbx
	pushq	%rax
	pushq	%r10
	callq	_qglTexImage2D
	addq	$32, %rsp
	cmpl	$1, %r13d
	ja	LBB0_85
## %bb.88:                              ##   in Loop: Header=BB0_85 Depth=1
	cmpl	$1, %r14d
	ja	LBB0_85
LBB0_89:
	incl	%r15d
	movq	-136(%rbp), %rax                ## 8-byte Reload
	movl	%r15d, (%rax)
	movq	_textureFilterAnisotropic@GOTPCREL(%rip), %rax
	movq	_gl_filter_max@GOTPCREL(%rip), %r12
	movq	_gl_filter_min@GOTPCREL(%rip), %r13
	cmpq	$0, (%rax)
	je	LBB0_94
## %bb.90:
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_GL_TEXTURE_MAX_ANISOTROPY_EXT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_maxAnisotropy@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_r_ext_max_anisotropy@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	movl	$1, %edi
	callq	_Com_Clamp
	movl	%r14d, %edi
	movl	%r15d, %esi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_qglTexParameteri
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_95
LBB0_91:
	movq	_textureFilterAnisotropic@GOTPCREL(%rip), %rax
	movq	_GL_LINEAR@GOTPCREL(%rip), %r13
	cmpq	$0, (%rax)
	je	LBB0_93
## %bb.92:
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GL_TEXTURE_MAX_ANISOTROPY_EXT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_qglTexParameteri
LBB0_93:
	movq	%r13, %r12
LBB0_94:
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_95:
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_GL_TEXTURE_MIN_FILTER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	callq	_qglTexParameterf
	movl	(%rbx), %edi
	movq	_GL_TEXTURE_MAG_FILTER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	callq	_qglTexParameterf
	xorl	%eax, %eax
	callq	_GL_CheckErrors
	testq	%r15, %r15
	je	LBB0_97
## %bb.96:
	movq	%r15, %rdi
	movq	_ri@GOTPCREL(%rip), %rax
	callq	*8(%rax)
LBB0_97:
	testq	%r14, %r14
	je	LBB0_99
## %bb.98:
	movq	%r14, %rdi
	movq	_ri@GOTPCREL(%rip), %rax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*8(%rax)                        ## TAILCALL
LBB0_99:
	addq	$120, %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	_textureMaxSize,4,2             ## @textureMaxSize
	.comm	_glConfig,16,3                  ## @glConfig
	.comm	_r_picmip,8,3                   ## @r_picmip
	.comm	_r_greyscale,8,3                ## @r_greyscale
	.comm	_r_monolightmaps,8,3            ## @r_monolightmaps
	.comm	_GL_LUMINANCE,4,2               ## @GL_LUMINANCE
	.comm	_r_texturebits,8,3              ## @r_texturebits
	.comm	_GL_LUMINANCE8,4,2              ## @GL_LUMINANCE8
	.comm	_TC_S3TC_ARB,8,3                ## @TC_S3TC_ARB
	.comm	_GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,4,2 ## @GL_COMPRESSED_RGBA_S3TC_DXT1_EXT
	.comm	_TC_S3TC,8,3                    ## @TC_S3TC
	.comm	_GL_RGB4_S3TC,4,2               ## @GL_RGB4_S3TC
	.comm	_GL_RGB5,4,2                    ## @GL_RGB5
	.comm	_GL_RGB8,4,2                    ## @GL_RGB8
	.comm	_GL_LUMINANCE8_ALPHA8,4,2       ## @GL_LUMINANCE8_ALPHA8
	.comm	_GL_LUMINANCE_ALPHA,4,2         ## @GL_LUMINANCE_ALPHA
	.comm	_GL_RGBA4,4,2                   ## @GL_RGBA4
	.comm	_GL_RGBA8,4,2                   ## @GL_RGBA8
	.comm	_GL_RGBA,4,2                    ## @GL_RGBA
	.comm	_GL_TEXTURE_2D,4,2              ## @GL_TEXTURE_2D
	.comm	_GL_UNSIGNED_BYTE,4,2           ## @GL_UNSIGNED_BYTE
	.comm	_r_colorMipLevels,8,3           ## @r_colorMipLevels
	.comm	_mipBlendColors,8,3             ## @mipBlendColors
	.comm	_textureFilterAnisotropic,8,3   ## @textureFilterAnisotropic
	.comm	_GL_TEXTURE_MAX_ANISOTROPY_EXT,4,2 ## @GL_TEXTURE_MAX_ANISOTROPY_EXT
	.comm	_maxAnisotropy,4,2              ## @maxAnisotropy
	.comm	_r_ext_max_anisotropy,8,3       ## @r_ext_max_anisotropy
	.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, #192
	.cfi_def_cfa_offset 192
	stp	d9, d8, [sp, #80]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x27, x6
	mov	x20, x5
	str	x4, [sp, #64]                   ; 8-byte Folded Spill
	mov	x24, x2
	mov	x22, x1
	mov	x23, x0
	ldr	x8, [x29, #48]
	str	x8, [sp, #72]                   ; 8-byte Folded Spill
	ldr	x8, [x29, #40]
	str	x8, [sp, #48]                   ; 8-byte Folded Spill
	ldp	x8, x12, [x29, #24]
	mov	w9, #1
	str	x8, [sp, #40]                   ; 8-byte Folded Spill
	ldr	x21, [x29, #16]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x8, x9
	lsl	w9, w9, #1
	cmp	w8, w22
	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, w24
	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, w22
	cset	w11, gt
	and	w11, w10, w11
	asr	w25, w8, w11
	cmp	w9, w24
	cset	w8, gt
	and	w8, w10, w8
	asr	w26, w9, w8
	cmp	w25, w22
	ccmp	w26, w24, #0, eq
Lloh3:
	adrp	x19, _ri@GOTPAGE
Lloh4:
	ldr	x19, [x19, _ri@GOTPAGEOFF]
	str	w3, [sp, #20]                   ; 4-byte Folded Spill
	str	x12, [sp, #56]                  ; 8-byte Folded Spill
	str	x7, [sp, #8]                    ; 8-byte Folded Spill
	b.eq	LBB0_6
; %bb.5:
	ldr	x8, [x19]
	mul	w9, w26, w25
	lsl	w0, w9, #2
	blr	x8
	mov	x28, x0
	mov	x0, x23
	mov	x1, x22
	mov	x2, x24
	mov	x3, x28
	mov	x4, x25
	mov	x5, x26
	bl	_ResampleTexture
	mov	x24, x26
	mov	x22, x25
	str	x28, [sp, #32]                  ; 8-byte Folded Spill
	mov	x23, x28
	b	LBB0_7
LBB0_6:
	str	xzr, [sp, #32]                  ; 8-byte Folded Spill
LBB0_7:
	mov	x8, x22
	mov	x9, x24
	cbz	x21, LBB0_9
; %bb.8:
Lloh5:
	adrp	x8, _textureMaxSize@GOTPAGE
Lloh6:
	ldr	x8, [x8, _textureMaxSize@GOTPAGEOFF]
Lloh7:
	adrp	x9, _glConfig@GOTPAGE
Lloh8:
	ldr	x9, [x9, _glConfig@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9
	ccmp	w8, #1, #8, le
	csel	w8, w9, w8, lt
	mov	x9, x8
LBB0_9:
	cbz	x20, LBB0_11
; %bb.10:
Lloh11:
	adrp	x10, _r_picmip@GOTPAGE
Lloh12:
	ldr	x10, [x10, _r_picmip@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	ldr	w10, [x10]
	asr	w25, w25, w10
	asr	w26, w26, w10
LBB0_11:
	cmp	w25, #1
	csinc	w25, w25, wzr, gt
	cmp	w26, #1
	csinc	w26, w26, wzr, gt
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	cmp	w25, w8
	ccmp	w26, w9, #0, le
	b.le	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	lsr	w25, w25, #1
	lsr	w26, w26, #1
	b	LBB0_12
LBB0_14:
	ldr	x8, [x19]
	mul	w9, w25, w26
	lsl	w0, w9, #2
	blr	x8
	mov	x20, x0
	mul	w14, w22, w24
Lloh14:
	adrp	x28, _r_greyscale@GOTPAGE
Lloh15:
	ldr	x28, [x28, _r_greyscale@GOTPAGEOFF]
	ldr	x8, [x28]
	ldr	x9, [x8, #8]
	str	x27, [sp, #24]                  ; 8-byte Folded Spill
	cbz	x9, LBB0_21
LBB0_15:
	mov	x27, x14
	cmp	w14, #1
	b.lt	LBB0_18
; %bb.16:
	add	x19, x23, #8
	mov	x21, x27
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldp	s0, s1, [x19, #-8]
	ldr	s2, [x19]
	bl	_LUMA
	stp	s0, s0, [x19, #-8]
	str	s0, [x19], #16
	subs	x21, x21, #1
	b.ne	LBB0_17
LBB0_18:
	mov	x14, x27
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	cbz	x8, LBB0_31
; %bb.19:
	ldr	x8, [x28]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_25
; %bb.20:
Lloh16:
	adrp	x8, _GL_LUMINANCE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GL_LUMINANCE@GOTPAGEOFF]
	b	LBB0_26
LBB0_21:
	cbz	x27, LBB0_27
; %bb.22:
Lloh18:
	adrp	x9, _r_monolightmaps@GOTPAGE
Lloh19:
	ldr	x9, [x9, _r_monolightmaps@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	ldr	x10, [x9, #8]
	cbnz	x10, LBB0_15
; %bb.23:
	ldr	s8, [x8]
	fcmp	s8, #0.0
	b.ne	LBB0_28
; %bb.24:
	ldr	s8, [x9]
	fcmp	s8, #0.0
	b.ne	LBB0_28
LBB0_25:
Lloh21:
	adrp	x8, _r_monolightmaps@GOTPAGE
Lloh22:
	ldr	x8, [x8, _r_monolightmaps@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
Lloh24:
	adrp	x9, _GL_LUMINANCE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _GL_LUMINANCE@GOTPAGEOFF]
Lloh26:
	adrp	x10, _GL_RGB@GOTPAGE
Lloh27:
	ldr	x10, [x10, _GL_RGB@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
LBB0_26:
	ldp	x10, x9, [sp, #40]              ; 16-byte Folded Reload
	ldr	x13, [sp, #56]                  ; 8-byte Folded Reload
	b	LBB0_46
LBB0_27:
	ldr	s8, [x8]
	fcmp	s8, #0.0
	b.eq	LBB0_31
LBB0_28:
	mov	x27, x14
	cmp	w14, #1
	b.lt	LBB0_18
; %bb.29:
	add	x19, x23, #8
	mov	x21, x27
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	ldp	s0, s1, [x19, #-8]
	ldr	s2, [x19]
	bl	_LUMA
	fmov	s9, s0
	ldur	s0, [x19, #-8]
	fmov	s1, s9
	fmov	s2, s8
	bl	_LERP
	stur	s0, [x19, #-8]
	ldur	s0, [x19, #-4]
	fmov	s1, s9
	fmov	s2, s8
	bl	_LERP
	stur	s0, [x19, #-4]
	ldr	s0, [x19]
	fmov	s1, s9
	fmov	s2, s8
	bl	_LERP
	str	s0, [x19], #16
	subs	x21, x21, #1
	b.ne	LBB0_30
	b	LBB0_18
LBB0_31:
	cmp	w14, #1
	ldr	x13, [sp, #56]                  ; 8-byte Folded Reload
	b.lt	LBB0_35
; %bb.32:
	add	x8, x23, #12
	mov	w9, #1132396544
	mov	x10, x14
LBB0_33:                                ; =>This Inner Loop Header: Depth=1
	ldr	s0, [x8]
	fmov	s1, w9
	fcmp	s0, s1
	b.ne	LBB0_37
; %bb.34:                               ;   in Loop: Header=BB0_33 Depth=1
	add	x8, x8, #16
	subs	x10, x10, #1
	b.ne	LBB0_33
LBB0_35:
	ldr	x8, [x28]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_38
; %bb.36:
Lloh28:
	adrp	x8, _r_texturebits@GOTPAGE
Lloh29:
	ldr	x8, [x8, _r_texturebits@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	ldr	w8, [x8]
	sub	w8, w8, #16
Lloh31:
	adrp	x9, _GL_LUMINANCE@GOTPAGE
Lloh32:
	ldr	x9, [x9, _GL_LUMINANCE@GOTPAGEOFF]
Lloh33:
	adrp	x10, _GL_LUMINANCE8@GOTPAGE
Lloh34:
	ldr	x10, [x10, _GL_LUMINANCE8@GOTPAGEOFF]
	tst	w8, #0xffffffef
	b	LBB0_44
LBB0_37:
	ldr	x8, [x28]
	ldr	x8, [x8, #8]
Lloh35:
	adrp	x9, _r_texturebits@GOTPAGE
Lloh36:
	ldr	x9, [x9, _r_texturebits@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	ldr	w9, [x9]
Lloh38:
	adrp	x10, _GL_RGBA@GOTPAGE
Lloh39:
	ldr	x10, [x10, _GL_RGBA@GOTPAGEOFF]
Lloh40:
	adrp	x11, _GL_RGBA8@GOTPAGE
Lloh41:
	ldr	x11, [x11, _GL_RGBA8@GOTPAGEOFF]
	cmp	w9, #32
	csel	x10, x11, x10, eq
Lloh42:
	adrp	x11, _GL_RGBA4@GOTPAGE
Lloh43:
	ldr	x11, [x11, _GL_RGBA4@GOTPAGEOFF]
	subs	w9, w9, #16
	csel	x10, x11, x10, eq
Lloh44:
	adrp	x11, _GL_LUMINANCE_ALPHA@GOTPAGE
Lloh45:
	ldr	x11, [x11, _GL_LUMINANCE_ALPHA@GOTPAGEOFF]
Lloh46:
	adrp	x12, _GL_LUMINANCE8_ALPHA8@GOTPAGE
Lloh47:
	ldr	x12, [x12, _GL_LUMINANCE8_ALPHA8@GOTPAGEOFF]
	tst	w9, #0xffffffef
	csel	x9, x12, x11, eq
	cmp	x8, #0
	b	LBB0_44
LBB0_38:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	cbz	x8, LBB0_43
; %bb.39:
Lloh48:
	adrp	x8, _glConfig@GOTPAGE
Lloh49:
	ldr	x8, [x8, _glConfig@GOTPAGEOFF]
Lloh50:
	ldr	x8, [x8, #8]
Lloh51:
	adrp	x9, _TC_S3TC_ARB@GOTPAGE
Lloh52:
	ldr	x9, [x9, _TC_S3TC_ARB@GOTPAGEOFF]
Lloh53:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_41
; %bb.40:
Lloh54:
	adrp	x8, _GL_COMPRESSED_RGBA_S3TC_DXT1_EXT@GOTPAGE
Lloh55:
	ldr	x8, [x8, _GL_COMPRESSED_RGBA_S3TC_DXT1_EXT@GOTPAGEOFF]
	b	LBB0_45
LBB0_41:
Lloh56:
	adrp	x9, _TC_S3TC@GOTPAGE
Lloh57:
	ldr	x9, [x9, _TC_S3TC@GOTPAGEOFF]
Lloh58:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_43
; %bb.42:
Lloh59:
	adrp	x8, _GL_RGB4_S3TC@GOTPAGE
Lloh60:
	ldr	x8, [x8, _GL_RGB4_S3TC@GOTPAGEOFF]
	b	LBB0_45
LBB0_43:
Lloh61:
	adrp	x8, _r_texturebits@GOTPAGE
Lloh62:
	ldr	x8, [x8, _r_texturebits@GOTPAGEOFF]
Lloh63:
	ldr	x8, [x8]
	ldr	w8, [x8]
Lloh64:
	adrp	x9, _GL_RGB@GOTPAGE
Lloh65:
	ldr	x9, [x9, _GL_RGB@GOTPAGEOFF]
Lloh66:
	adrp	x10, _GL_RGB8@GOTPAGE
Lloh67:
	ldr	x10, [x10, _GL_RGB8@GOTPAGEOFF]
	cmp	w8, #32
	csel	x9, x10, x9, eq
Lloh68:
	adrp	x10, _GL_RGB5@GOTPAGE
Lloh69:
	ldr	x10, [x10, _GL_RGB5@GOTPAGEOFF]
	cmp	w8, #16
LBB0_44:
	csel	x8, x10, x9, eq
LBB0_45:
	ldp	x10, x9, [sp, #40]              ; 16-byte Folded Reload
LBB0_46:
	ldr	w28, [x8]
	str	w25, [x13]
	str	w26, [x9]
	str	w28, [x10]
	mov	w8, #1
	ldr	x9, [sp, #72]                   ; 8-byte Folded Reload
	str	w8, [x9]
Lloh70:
	adrp	x19, _GL_TEXTURE_2D@GOTPAGE
Lloh71:
	ldr	x19, [x19, _GL_TEXTURE_2D@GOTPAGEOFF]
	cmp	w25, w22
	b.ne	LBB0_52
; %bb.47:
	cmp	w26, w24
	b.ne	LBB0_52
; %bb.48:
	ldr	x8, [sp, #64]                   ; 8-byte Folded Reload
	cbz	x8, LBB0_56
; %bb.49:
	cmp	w22, #1
	b.hi	LBB0_57
; %bb.50:
	cmp	w24, #2
	b.hs	LBB0_57
; %bb.51:
	mov	w27, #0
	b	LBB0_64
LBB0_52:
	cmp	w22, w25
	b.gt	LBB0_54
; %bb.53:
	cmp	w24, w26
	b.le	LBB0_55
LBB0_54:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x22
	mov	x2, x24
	bl	_R_MipMap
	asr	w8, w22, #1
	asr	w9, w24, #1
	cmp	w8, #1
	csinc	w22, w8, wzr, gt
	cmp	w9, #1
	csinc	w24, w9, wzr, gt
	cmp	w22, w25
	ccmp	w24, w26, #2, ls
	b.hi	LBB0_54
LBB0_55:
	mul	w8, w24, w22
	lsl	w2, w8, #2
	mov	x0, x20
	mov	x1, x23
	bl	_Com_Memcpy
	mov	w27, #0
	b	LBB0_65
LBB0_56:
	ldr	w0, [x19]
Lloh72:
	adrp	x8, _GL_RGBA@GOTPAGE
Lloh73:
	ldr	x8, [x8, _GL_RGBA@GOTPAGEOFF]
Lloh74:
	ldr	w6, [x8]
Lloh75:
	adrp	x8, _GL_UNSIGNED_BYTE@GOTPAGE
Lloh76:
	ldr	x8, [x8, _GL_UNSIGNED_BYTE@GOTPAGEOFF]
Lloh77:
	ldr	w7, [x8]
	str	x23, [sp]
	mov	w1, #0
	mov	x2, x28
	mov	x3, x22
	mov	x4, x24
	mov	w5, #0
	bl	_qglTexImage2D
	b	LBB0_76
LBB0_57:
	mov	w1, #0
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	cmp	w8, #1
	csinc	w8, w8, wzr, gt
	sub	w21, w8, #1
Lloh78:
	adrp	x25, _GL_RGBA@GOTPAGE
Lloh79:
	ldr	x25, [x25, _GL_RGBA@GOTPAGEOFF]
Lloh80:
	adrp	x26, _GL_UNSIGNED_BYTE@GOTPAGE
Lloh81:
	ldr	x26, [x26, _GL_UNSIGNED_BYTE@GOTPAGEOFF]
LBB0_58:                                ; =>This Inner Loop Header: Depth=1
	cmp	w21, w1
	b.eq	LBB0_62
; %bb.59:                               ;   in Loop: Header=BB0_58 Depth=1
	add	w27, w1, #1
	ldr	w0, [x19]
	ldr	w6, [x25]
	ldr	w7, [x26]
	str	x23, [sp]
	mov	x2, x28
	mov	x3, x22
	mov	x4, x24
	mov	w5, #0
	bl	_qglTexImage2D
	mul	w8, w24, w22
	add	x23, x23, w8, sxtw #2
	lsr	w8, w22, #1
	lsr	w9, w24, #1
	cmp	w8, #1
	csinc	w22, w8, wzr, gt
	cmp	w9, #1
	csinc	w24, w9, wzr, gt
	mov	x1, x27
	cmp	w22, #1
	b.hi	LBB0_58
; %bb.60:                               ;   in Loop: Header=BB0_58 Depth=1
	mov	x1, x27
	cmp	w24, #1
	b.hi	LBB0_58
; %bb.61:
	mov	w22, #1
	mov	w24, #1
	b	LBB0_63
LBB0_62:
	mov	x27, x21
LBB0_63:
	mul	w14, w24, w22
LBB0_64:
	lsl	w2, w14, #2
	mov	x0, x20
	mov	x1, x23
	bl	_Com_Memcpy
	mov	x25, x22
	mov	x26, x24
LBB0_65:
	ldr	x23, [sp, #64]                  ; 8-byte Folded Reload
	cmp	x23, #0
	cset	w3, eq
	mov	x0, x20
	mov	x1, x25
	mov	x2, x26
	bl	_R_LightScaleTexture
	ldr	w0, [x19]
Lloh82:
	adrp	x21, _GL_RGBA@GOTPAGE
Lloh83:
	ldr	x21, [x21, _GL_RGBA@GOTPAGEOFF]
	ldr	w6, [x21]
Lloh84:
	adrp	x22, _GL_UNSIGNED_BYTE@GOTPAGE
Lloh85:
	ldr	x22, [x22, _GL_UNSIGNED_BYTE@GOTPAGEOFF]
	ldr	w7, [x22]
	str	x20, [sp]
	mov	x1, x27
	mov	x2, x28
	mov	x3, x25
	mov	x4, x26
	mov	w5, #0
	bl	_qglTexImage2D
	cbz	x23, LBB0_76
; %bb.66:
	cmp	w25, #1
	b.gt	LBB0_68
; %bb.67:
	cmp	w26, #2
	b.lt	LBB0_73
LBB0_68:
	mov	w27, w27
Lloh86:
	adrp	x23, _r_colorMipLevels@GOTPAGE
Lloh87:
	ldr	x23, [x23, _r_colorMipLevels@GOTPAGEOFF]
Lloh88:
	adrp	x24, _mipBlendColors@GOTPAGE
Lloh89:
	ldr	x24, [x24, _mipBlendColors@GOTPAGEOFF]
LBB0_69:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x25
	mov	x2, x26
	bl	_R_MipMap
	asr	w8, w25, #1
	asr	w9, w26, #1
	cmp	w8, #1
	csinc	w25, w8, wzr, gt
	cmp	w9, #1
	csinc	w26, w9, wzr, gt
	ldr	x8, [x23]
	ldr	x8, [x8]
	cbz	x8, LBB0_71
; %bb.70:                               ;   in Loop: Header=BB0_69 Depth=1
	mul	w1, w26, w25
	ldr	x8, [x24]
	add	x8, x8, x27, lsl #2
	ldr	w2, [x8, #4]
	mov	x0, x20
	bl	_R_BlendOverTexture
LBB0_71:                                ;   in Loop: Header=BB0_69 Depth=1
	ldr	w0, [x19]
	ldr	w6, [x21]
	add	x27, x27, #1
	ldr	w7, [x22]
	str	x20, [sp]
	mov	x1, x27
	mov	x2, x28
	mov	x3, x25
	mov	x4, x26
	mov	w5, #0
	bl	_qglTexImage2D
	cmp	w25, #1
	b.hi	LBB0_69
; %bb.72:                               ;   in Loop: Header=BB0_69 Depth=1
	cmp	w26, #1
	b.hi	LBB0_69
LBB0_73:
Lloh90:
	adrp	x23, _ri@GOTPAGE
Lloh91:
	ldr	x23, [x23, _ri@GOTPAGEOFF]
	ldr	x24, [sp, #32]                  ; 8-byte Folded Reload
	add	w8, w27, #1
	ldr	x9, [sp, #72]                   ; 8-byte Folded Reload
	str	w8, [x9]
Lloh92:
	adrp	x8, _textureFilterAnisotropic@GOTPAGE
Lloh93:
	ldr	x8, [x8, _textureFilterAnisotropic@GOTPAGEOFF]
Lloh94:
	ldr	x8, [x8]
	cbz	x8, LBB0_75
; %bb.74:
	ldr	w21, [x19]
Lloh95:
	adrp	x8, _GL_TEXTURE_MAX_ANISOTROPY_EXT@GOTPAGE
Lloh96:
	ldr	x8, [x8, _GL_TEXTURE_MAX_ANISOTROPY_EXT@GOTPAGEOFF]
Lloh97:
	adrp	x9, _maxAnisotropy@GOTPAGE
Lloh98:
	ldr	x9, [x9, _maxAnisotropy@GOTPAGEOFF]
Lloh99:
	ldr	w22, [x8]
Lloh100:
	ldr	w1, [x9]
Lloh101:
	adrp	x8, _r_ext_max_anisotropy@GOTPAGE
Lloh102:
	ldr	x8, [x8, _r_ext_max_anisotropy@GOTPAGEOFF]
Lloh103:
	ldr	x8, [x8]
	ldr	w2, [x8]
	mov	w0, #1
	bl	_Com_Clamp
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_qglTexParameteri
LBB0_75:
Lloh104:
	adrp	x21, _gl_filter_max@GOTPAGE
Lloh105:
	ldr	x21, [x21, _gl_filter_max@GOTPAGEOFF]
Lloh106:
	adrp	x8, _gl_filter_min@GOTPAGE
Lloh107:
	ldr	x8, [x8, _gl_filter_min@GOTPAGEOFF]
	b	LBB0_79
LBB0_76:
Lloh108:
	adrp	x8, _textureFilterAnisotropic@GOTPAGE
Lloh109:
	ldr	x8, [x8, _textureFilterAnisotropic@GOTPAGEOFF]
Lloh110:
	ldr	x8, [x8]
	cbz	x8, LBB0_78
; %bb.77:
	ldr	w0, [x19]
Lloh111:
	adrp	x8, _GL_TEXTURE_MAX_ANISOTROPY_EXT@GOTPAGE
Lloh112:
	ldr	x8, [x8, _GL_TEXTURE_MAX_ANISOTROPY_EXT@GOTPAGEOFF]
Lloh113:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_qglTexParameteri
LBB0_78:
Lloh114:
	adrp	x8, _GL_LINEAR@GOTPAGE
Lloh115:
	ldr	x8, [x8, _GL_LINEAR@GOTPAGEOFF]
	mov	x21, x8
Lloh116:
	adrp	x23, _ri@GOTPAGE
Lloh117:
	ldr	x23, [x23, _ri@GOTPAGEOFF]
	ldr	x24, [sp, #32]                  ; 8-byte Folded Reload
LBB0_79:
	ldr	w0, [x19]
Lloh118:
	adrp	x9, _GL_TEXTURE_MIN_FILTER@GOTPAGE
Lloh119:
	ldr	x9, [x9, _GL_TEXTURE_MIN_FILTER@GOTPAGEOFF]
Lloh120:
	ldr	w1, [x9]
	ldr	w2, [x8]
	bl	_qglTexParameterf
	ldr	w0, [x19]
Lloh121:
	adrp	x8, _GL_TEXTURE_MAG_FILTER@GOTPAGE
Lloh122:
	ldr	x8, [x8, _GL_TEXTURE_MAG_FILTER@GOTPAGEOFF]
Lloh123:
	ldr	w1, [x8]
	ldr	w2, [x21]
	bl	_qglTexParameterf
	bl	_GL_CheckErrors
	cbz	x20, LBB0_81
; %bb.80:
	ldr	x8, [x23, #8]
	mov	x0, x20
	blr	x8
LBB0_81:
	cbz	x24, LBB0_83
; %bb.82:
	ldr	x1, [x23, #8]
	mov	x0, x24
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #80]               ; 16-byte Folded Reload
	add	sp, sp, #192
	br	x1
LBB0_83:
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #80]               ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGot	Lloh59, Lloh60
	.loh AdrpLdrGot	Lloh68, Lloh69
	.loh AdrpLdrGot	Lloh66, Lloh67
	.loh AdrpLdrGot	Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGot	Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh75, Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGot	Lloh80, Lloh81
	.loh AdrpLdrGot	Lloh78, Lloh79
	.loh AdrpLdrGot	Lloh84, Lloh85
	.loh AdrpLdrGot	Lloh82, Lloh83
	.loh AdrpLdrGot	Lloh88, Lloh89
	.loh AdrpLdrGot	Lloh86, Lloh87
	.loh AdrpLdrGotLdr	Lloh92, Lloh93, Lloh94
	.loh AdrpLdrGot	Lloh90, Lloh91
	.loh AdrpLdrGotLdr	Lloh101, Lloh102, Lloh103
	.loh AdrpLdrGotLdr	Lloh97, Lloh98, Lloh100
	.loh AdrpLdrGotLdr	Lloh95, Lloh96, Lloh99
	.loh AdrpLdrGot	Lloh106, Lloh107
	.loh AdrpLdrGot	Lloh104, Lloh105
	.loh AdrpLdrGotLdr	Lloh108, Lloh109, Lloh110
	.loh AdrpLdrGotLdr	Lloh111, Lloh112, Lloh113
	.loh AdrpLdrGot	Lloh116, Lloh117
	.loh AdrpLdrGot	Lloh114, Lloh115
	.loh AdrpLdrGotLdr	Lloh121, Lloh122, Lloh123
	.loh AdrpLdrGotLdr	Lloh118, Lloh119, Lloh120
	.cfi_endproc
                                        ; -- End function
	.comm	_GL_RGB,4,2                     ; @GL_RGB
	.comm	_r_roundImagesDown,8,3          ; @r_roundImagesDown
	.comm	_ri,16,3                        ; @ri
	.comm	_textureMaxSize,4,2             ; @textureMaxSize
	.comm	_glConfig,16,3                  ; @glConfig
	.comm	_r_picmip,8,3                   ; @r_picmip
	.comm	_r_greyscale,8,3                ; @r_greyscale
	.comm	_r_monolightmaps,8,3            ; @r_monolightmaps
	.comm	_GL_LUMINANCE,4,2               ; @GL_LUMINANCE
	.comm	_r_texturebits,8,3              ; @r_texturebits
	.comm	_GL_LUMINANCE8,4,2              ; @GL_LUMINANCE8
	.comm	_TC_S3TC_ARB,8,3                ; @TC_S3TC_ARB
	.comm	_GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,4,2 ; @GL_COMPRESSED_RGBA_S3TC_DXT1_EXT
	.comm	_TC_S3TC,8,3                    ; @TC_S3TC
	.comm	_GL_RGB4_S3TC,4,2               ; @GL_RGB4_S3TC
	.comm	_GL_RGB5,4,2                    ; @GL_RGB5
	.comm	_GL_RGB8,4,2                    ; @GL_RGB8
	.comm	_GL_LUMINANCE8_ALPHA8,4,2       ; @GL_LUMINANCE8_ALPHA8
	.comm	_GL_LUMINANCE_ALPHA,4,2         ; @GL_LUMINANCE_ALPHA
	.comm	_GL_RGBA4,4,2                   ; @GL_RGBA4
	.comm	_GL_RGBA8,4,2                   ; @GL_RGBA8
	.comm	_GL_RGBA,4,2                    ; @GL_RGBA
	.comm	_GL_TEXTURE_2D,4,2              ; @GL_TEXTURE_2D
	.comm	_GL_UNSIGNED_BYTE,4,2           ; @GL_UNSIGNED_BYTE
	.comm	_r_colorMipLevels,8,3           ; @r_colorMipLevels
	.comm	_mipBlendColors,8,3             ; @mipBlendColors
	.comm	_textureFilterAnisotropic,8,3   ; @textureFilterAnisotropic
	.comm	_GL_TEXTURE_MAX_ANISOTROPY_EXT,4,2 ; @GL_TEXTURE_MAX_ANISOTROPY_EXT
	.comm	_maxAnisotropy,4,2              ; @maxAnisotropy
	.comm	_r_ext_max_anisotropy,8,3       ; @r_ext_max_anisotropy
	.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
