	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function RawImage_ScaleToPower2
_RawImage_ScaleToPower2:                ## @RawImage_ScaleToPower2
	.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
	movl	%r8d, %r14d
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_IMGFLAG_PICMIP@GOTPCREL(%rip), %rcx
	movq	_IMGFLAG_MIPMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_IMGFLAG_CLAMPTOEDGE@GOTPCREL(%rip), %rdi
	cmpl	$0, 16(%rbp)
	je	LBB0_1
## %bb.2:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	cmpq	$0, (%rbx)
	setne	%bl
	jmp	LBB0_3
LBB0_1:
	xorl	%ebx, %ebx
LBB0_3:
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %r15d
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movl	(%rdx), %r13d
	movl	(%rcx), %edx
	movl	(%rdi), %ecx
	andl	%r14d, %ecx
	movl	%ecx, -88(%rbp)                 ## 4-byte Spill
	movl	%r13d, %r10d
	movl	%r15d, %r12d
	testl	%r14d, %eax
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	je	LBB0_5
## %bb.4:
	movl	%r15d, %edi
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%edx, %r15d
	callq	_NextPowerOfTwo
	movl	%eax, %r12d
	movl	%r13d, %edi
	callq	_NextPowerOfTwo
	movl	%r15d, %edx
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	movl	%eax, %r10d
LBB0_5:
	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	%r13d, %r10d
	setg	%cl
	andb	%al, %cl
	sarl	%cl, %r10d
	testb	%bl, %bl
	je	LBB0_10
## %bb.6:
	movq	_r_textureMaxSize@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$2, %r12d
	setge	%cl
	sarl	%cl, %r12d
	cmpl	$2, %r10d
	setge	%cl
	sarl	%cl, %r10d
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%eax, %r12d
	jg	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	%eax, %r10d
	jg	LBB0_9
LBB0_10:
	testq	%r9, %r9
	je	LBB0_39
## %bb.11:
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_39
## %bb.12:
	movl	%edx, %eax
	andl	%r14d, %eax
	je	LBB0_39
## %bb.13:
	movq	_r_imageUpsample@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	je	LBB0_39
## %bb.14:
	movq	_r_imageUpsampleMaxSize@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r12d
	jge	LBB0_39
## %bb.15:
	cmpl	%eax, %r10d
	jge	LBB0_39
## %bb.16:
	movl	%r13d, -84(%rbp)                ## 4-byte Spill
	movl	%r14d, -68(%rbp)                ## 4-byte Spill
	movl	%r12d, %ebx
	shll	%cl, %ebx
	movl	%r10d, %r13d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r13d
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_17 Depth=1
	sarl	%ebx
	sarl	%r13d
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%eax, %ebx
	jg	LBB0_22
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	cmpl	%eax, %r13d
	jg	LBB0_22
## %bb.19:
	movq	_glConfig@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	movl	%r10d, -44(%rbp)                ## 4-byte Spill
	movl	%edx, -72(%rbp)                 ## 4-byte Spill
	jle	LBB0_20
	jmp	LBB0_21
LBB0_39:
	movl	%r12d, %eax
	xorl	%r15d, %eax
	movl	%r10d, %ecx
	xorl	%r13d, %ecx
	orl	%eax, %ecx
	setne	%al
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_45
## %bb.40:
	testq	%r9, %r9
	je	LBB0_45
## %bb.41:
	testb	%al, %al
	je	LBB0_45
## %bb.42:
	movl	%edx, -72(%rbp)                 ## 4-byte Spill
	movq	_ri@GOTPCREL(%rip), %rax
	movl	%r10d, %edi
	imull	%r12d, %edi
	shll	$2, %edi
	movl	%r10d, %ebx
	callq	*(%rax)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rdi
	movl	%r15d, %esi
	movl	%r13d, %edx
	movq	%rax, %rcx
	movl	%r12d, %r8d
	movl	%ebx, %r9d
	callq	_ResampleTexture
LBB0_43:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%ebx, %r10d
LBB0_44:
	movq	(%rdx), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movl	-72(%rbp), %edx                 ## 4-byte Reload
LBB0_45:
	movl	%r10d, %ebx
	movl	%r12d, %esi
	testl	%r14d, %edx
	je	LBB0_47
## %bb.46:
	movq	_r_picmip@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movb	(%rax), %cl
	movl	%r12d, %esi
	sarl	%cl, %esi
	movl	%r10d, %ebx
	sarl	%cl, %ebx
LBB0_47:
	movq	_glConfig@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %esi
	movl	%r10d, -44(%rbp)                ## 4-byte Spill
	jle	LBB0_48
	jmp	LBB0_49
LBB0_20:
	cmpl	%eax, %r13d
	jle	LBB0_23
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	sarl	%ebx
	sarl	%r13d
	cmpl	%eax, %ebx
	jle	LBB0_20
	jmp	LBB0_21
LBB0_23:
	movq	_ri@GOTPCREL(%rip), %rax
	movl	%ebx, %edi
	imull	%r13d, %edi
	shll	$2, %edi
	callq	*(%rax)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rsi
	cmpl	%r15d, %r12d
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	movl	-84(%rbp), %edx                 ## 4-byte Reload
	jne	LBB0_25
## %bb.24:
	cmpl	%edx, %r9d
	jne	LBB0_25
## %bb.26:
	movl	%r9d, %r14d
	imull	%edx, %r15d
	shll	$2, %r15d
	movq	%rax, %rdi
	movl	%r15d, %edx
	callq	_Com_Memcpy
	jmp	LBB0_27
LBB0_25:
	movq	%rsi, %rdi
	movl	%r15d, %esi
	movq	%rax, %rcx
	movl	%r12d, %r8d
	movl	%r9d, %r14d
	callq	_ResampleTexture
LBB0_27:
	movq	_IMGTYPE_COLORALPHA@GOTPCREL(%rip), %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, (%rax)
	jne	LBB0_29
## %bb.28:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movq	%rdi, %rsi
	movl	%r12d, %edx
	movl	%r14d, %ecx
	callq	_RGBAtoYCoCgA
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
LBB0_29:
	cmpl	%ebx, %r12d
	movl	%r14d, %r10d
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	jl	LBB0_31
## %bb.30:
	cmpl	%r13d, %r10d
	jge	LBB0_34
LBB0_31:
	movq	_IMGTYPE_NORMALHEIGHT@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_32:                                ## =>This Inner Loop Header: Depth=1
	addl	%r12d, %r12d
	addl	%r10d, %r10d
	movq	_IMGTYPE_NORMAL@GOTPCREL(%rip), %rax
	cmpq	%rcx, (%rax)
	sete	%al
	cmpq	%rcx, (%r14)
	movq	(%rdx), %rdi
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %r8d
	movl	%r12d, %esi
	movl	%r10d, %edx
	movl	-88(%rbp), %ecx                 ## 4-byte Reload
	movl	%r10d, %r15d
	callq	_FCBIByBlock
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%r15d, %r10d
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	cmpl	%ebx, %r12d
	jl	LBB0_32
## %bb.33:                              ##   in Loop: Header=BB0_32 Depth=1
	cmpl	%r13d, %r10d
	jl	LBB0_32
LBB0_34:
	movq	_IMGTYPE_COLORALPHA@GOTPCREL(%rip), %rax
	cmpq	%rcx, (%rax)
	jne	LBB0_36
## %bb.35:
	movq	(%rdx), %rdi
	movq	%rdi, %rsi
	movl	%r12d, %edx
	movl	%r10d, %ecx
	movl	%r10d, %ebx
	callq	_YCoCgAtoRGBA
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%ebx, %r10d
	movl	-68(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_44
LBB0_36:
	movq	_IMGTYPE_NORMAL@GOTPCREL(%rip), %rax
	cmpq	%rcx, (%rax)
	movl	-68(%rbp), %r14d                ## 4-byte Reload
	je	LBB0_38
## %bb.37:
	movq	_IMGTYPE_NORMALHEIGHT@GOTPCREL(%rip), %rax
	cmpq	%rcx, (%rax)
	jne	LBB0_44
LBB0_38:
	movq	(%rdx), %rdi
	movq	%rdi, %rsi
	movl	%r12d, %edx
	movl	%r10d, %ecx
	movl	%r10d, %ebx
	callq	_FillInNormalizedZ
	jmp	LBB0_43
LBB0_48:
	cmpl	%eax, %ebx
	jle	LBB0_50
LBB0_49:                                ## =>This Inner Loop Header: Depth=1
	sarl	%esi
	sarl	%ebx
	cmpl	%eax, %esi
	jle	LBB0_48
	jmp	LBB0_49
LBB0_50:
	movl	$1, %edi
	callq	_MAX
	movl	%eax, %r13d
	movl	$1, %edi
	movl	%ebx, %esi
	callq	_MAX
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movl	%r12d, %r15d
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_60
## %bb.51:
	cmpl	%r13d, %r12d
	jg	LBB0_53
## %bb.52:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %r14d
	movl	%r12d, %r15d
	cmpl	-56(%rbp), %eax                 ## 4-byte Folded Reload
	jle	LBB0_60
LBB0_53:
	movq	_IMGTYPE_NORMAL@GOTPCREL(%rip), %rbx
	movl	%r12d, %r15d
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_54:                                ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, (%rbx)
	je	LBB0_56
## %bb.55:                              ##   in Loop: Header=BB0_54 Depth=1
	movq	_IMGTYPE_NORMALHEIGHT@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	je	LBB0_56
## %bb.57:                              ##   in Loop: Header=BB0_54 Depth=1
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_R_MipMapsRGB
	jmp	LBB0_58
	.p2align	4, 0x90
LBB0_56:                                ##   in Loop: Header=BB0_54 Depth=1
	movq	_qfalse@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%rdi, %rsi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_R_MipMapNormalHeight
LBB0_58:                                ##   in Loop: Header=BB0_54 Depth=1
	sarl	%r15d
	movl	$1, %edi
	movl	%r15d, %esi
	callq	_MAX
	movl	%eax, %r15d
	sarl	%r14d
	movl	$1, %edi
	movl	%r14d, %esi
	callq	_MAX
	movl	%eax, %r14d
	cmpl	%r13d, %r15d
	jg	LBB0_54
## %bb.59:                              ##   in Loop: Header=BB0_54 Depth=1
	cmpl	-56(%rbp), %r14d                ## 4-byte Folded Reload
	jg	LBB0_54
LBB0_60:
	xorl	%r13d, %r12d
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	xorl	-56(%rbp), %ecx                 ## 4-byte Folded Reload
	xorl	%eax, %eax
	orl	%r12d, %ecx
	setne	%al
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movl	%r15d, (%rcx)
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	movl	%r14d, (%rcx)
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IMGFLAG_PICMIP,4,2             ## @IMGFLAG_PICMIP
	.comm	_IMGFLAG_MIPMAP,4,2             ## @IMGFLAG_MIPMAP
	.comm	_IMGFLAG_CLAMPTOEDGE,4,2        ## @IMGFLAG_CLAMPTOEDGE
	.comm	_r_roundImagesDown,8,3          ## @r_roundImagesDown
	.comm	_r_textureMaxSize,8,3           ## @r_textureMaxSize
	.comm	_r_imageUpsample,8,3            ## @r_imageUpsample
	.comm	_r_imageUpsampleMaxSize,8,3     ## @r_imageUpsampleMaxSize
	.comm	_glConfig,4,2                   ## @glConfig
	.comm	_ri,8,3                         ## @ri
	.comm	_IMGTYPE_COLORALPHA,8,3         ## @IMGTYPE_COLORALPHA
	.comm	_IMGTYPE_NORMAL,8,3             ## @IMGTYPE_NORMAL
	.comm	_IMGTYPE_NORMALHEIGHT,8,3       ## @IMGTYPE_NORMALHEIGHT
	.comm	_r_picmip,8,3                   ## @r_picmip
	.comm	_qfalse,4,2                     ## @qfalse
	.no_dead_strip	_RawImage_ScaleToPower2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function RawImage_ScaleToPower2
_RawImage_ScaleToPower2:                ; @RawImage_ScaleToPower2
	.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	x25, x5
	mov	x26, x4
	mov	x21, x3
	mov	x22, x0
	ldr	w28, [x1]
	ldr	w27, [x2]
Lloh0:
	adrp	x9, _IMGFLAG_PICMIP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IMGFLAG_PICMIP@GOTPAGEOFF]
Lloh2:
	adrp	x8, _IMGFLAG_MIPMAP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IMGFLAG_MIPMAP@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	and	w8, w8, w4
Lloh5:
	adrp	x10, _IMGFLAG_CLAMPTOEDGE@GOTPAGE
Lloh6:
	ldr	x10, [x10, _IMGFLAG_CLAMPTOEDGE@GOTPAGEOFF]
	stp	x1, x2, [sp, #16]               ; 16-byte Folded Spill
	cbz	w6, LBB0_2
; %bb.1:
	ldr	x11, [x22]
	cmp	x11, #0
	cset	w20, ne
	b	LBB0_3
LBB0_2:
	mov	w20, #0
LBB0_3:
	ldr	w10, [x10]
	str	w10, [sp, #12]                  ; 4-byte Folded Spill
	ldr	w19, [x9]
	mov	x0, x27
	mov	x23, x28
	cbz	w8, LBB0_5
; %bb.4:
	mov	x0, x28
	bl	_NextPowerOfTwo
	mov	x23, x0
	mov	x0, x27
	bl	_NextPowerOfTwo
LBB0_5:
Lloh7:
	adrp	x8, _r_roundImagesDown@GOTPAGE
Lloh8:
	ldr	x8, [x8, _r_roundImagesDown@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w8, ne
	cmp	w23, w28
	cset	w9, gt
	and	w9, w8, w9
	asr	w23, w23, w9
	cmp	w0, w27
	cset	w9, gt
	and	w8, w8, w9
	asr	w24, w0, w8
	cbz	w20, LBB0_9
; %bb.6:
Lloh10:
	adrp	x8, _r_textureMaxSize@GOTPAGE
Lloh11:
	ldr	x8, [x8, _r_textureMaxSize@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	ldr	w8, [x8]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w23, w8
	ccmp	w24, w8, #0, le
	b.le	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	cmp	w23, #1
	cset	w9, gt
	asr	w23, w23, w9
	cmp	w24, #1
	cset	w9, gt
	asr	w24, w24, w9
	b	LBB0_7
LBB0_9:
	and	w20, w19, w26
Lloh13:
	adrp	x19, _glConfig@GOTPAGE
Lloh14:
	ldr	x19, [x19, _glConfig@GOTPAGEOFF]
	cbz	x25, LBB0_14
; %bb.10:
	cbz	x22, LBB0_14
; %bb.11:
	cbz	w20, LBB0_14
; %bb.12:
Lloh15:
	adrp	x8, _r_imageUpsample@GOTPAGE
Lloh16:
	ldr	x8, [x8, _r_imageUpsample@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	ldr	w9, [x8]
	cbz	w9, LBB0_14
; %bb.13:
Lloh18:
	adrp	x8, _r_imageUpsampleMaxSize@GOTPAGE
Lloh19:
	ldr	x8, [x8, _r_imageUpsampleMaxSize@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	ldr	w8, [x8]
	cmp	w23, w8
	ccmp	w24, w8, #0, lt
	b.lt	LBB0_34
LBB0_14:
	cmp	w23, w28
	ccmp	w24, w27, #0, eq
	cset	w8, ne
	cbz	x22, LBB0_19
; %bb.15:
	cbz	x25, LBB0_19
; %bb.16:
	cbz	w8, LBB0_19
; %bb.17:
Lloh21:
	adrp	x8, _ri@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ri@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	mul	w9, w24, w23
	lsl	w0, w9, #2
	blr	x8
	mov	x3, x0
	str	x0, [x25]
	ldr	x0, [x22]
	mov	x1, x28
	mov	x2, x27
	mov	x4, x23
	mov	x5, x24
	bl	_ResampleTexture
LBB0_18:
	ldr	x8, [x25]
	str	x8, [x22]
LBB0_19:
	mov	x26, x24
	mov	x1, x23
	cbz	w20, LBB0_21
; %bb.20:
Lloh24:
	adrp	x8, _r_picmip@GOTPAGE
Lloh25:
	ldr	x8, [x8, _r_picmip@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	ldr	w8, [x8]
	asr	w1, w23, w8
	asr	w26, w24, w8
LBB0_21:
	ldr	w8, [x19]
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	cmp	w1, w8
	ccmp	w26, w8, #0, le
	b.le	LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	asr	w1, w1, #1
	asr	w26, w26, #1
	b	LBB0_22
LBB0_24:
	mov	w0, #1
	bl	_MAX
	mov	x25, x0
	mov	w0, #1
	mov	x1, x26
	bl	_MAX
	mov	x26, x0
	mov	x27, x24
	mov	x28, x23
	mov	x8, x22
	cbz	x22, LBB0_33
; %bb.25:
	cmp	w23, w25
	b.gt	LBB0_27
; %bb.26:
	mov	x27, x24
	mov	x28, x23
	cmp	w24, w26
	b.le	LBB0_33
LBB0_27:
Lloh27:
	adrp	x19, _IMGTYPE_NORMAL@GOTPAGE
Lloh28:
	ldr	x19, [x19, _IMGTYPE_NORMAL@GOTPAGEOFF]
Lloh29:
	adrp	x20, _IMGTYPE_NORMALHEIGHT@GOTPAGE
Lloh30:
	ldr	x20, [x20, _IMGTYPE_NORMALHEIGHT@GOTPAGEOFF]
	mov	x28, x23
	mov	x27, x24
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x9, [x20]
	ldr	x0, [x22]
	cmp	x8, x21
	ccmp	x9, x21, #4, ne
	b.ne	LBB0_30
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=1
Lloh31:
	adrp	x8, _qfalse@GOTPAGE
Lloh32:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh33:
	ldr	w4, [x8]
	mov	x1, x0
	mov	x2, x28
	mov	x3, x27
	bl	_R_MipMapNormalHeight
	b	LBB0_31
LBB0_30:                                ;   in Loop: Header=BB0_28 Depth=1
	mov	x1, x28
	mov	x2, x27
	bl	_R_MipMapsRGB
LBB0_31:                                ;   in Loop: Header=BB0_28 Depth=1
	asr	w1, w28, #1
	mov	w0, #1
	bl	_MAX
	mov	x28, x0
	asr	w1, w27, #1
	mov	w0, #1
	bl	_MAX
	mov	x27, x0
	cmp	w28, w25
	b.gt	LBB0_28
; %bb.32:                               ;   in Loop: Header=BB0_28 Depth=1
	cmp	w27, w26
	b.gt	LBB0_28
LBB0_33:
	cmp	w23, w25
	ccmp	w24, w26, #0, eq
	cset	w0, ne
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	str	w28, [x8]
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	str	w27, [x8]
	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_34:
	str	w20, [sp, #8]                   ; 4-byte Folded Spill
	lsl	w20, w23, w9
	lsl	w19, w24, w9
LBB0_35:                                ; =>This Inner Loop Header: Depth=1
	cmp	w20, w8
	ccmp	w19, w8, #0, le
	b.le	LBB0_37
; %bb.36:                               ;   in Loop: Header=BB0_35 Depth=1
	asr	w20, w20, #1
	asr	w19, w19, #1
	b	LBB0_35
LBB0_37:
Lloh34:
	adrp	x8, _glConfig@GOTPAGE
Lloh35:
	ldr	x8, [x8, _glConfig@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
LBB0_38:                                ; =>This Inner Loop Header: Depth=1
	cmp	w20, w8
	ccmp	w19, w8, #0, le
	b.le	LBB0_40
; %bb.39:                               ;   in Loop: Header=BB0_38 Depth=1
	asr	w20, w20, #1
	asr	w19, w19, #1
	b	LBB0_38
LBB0_40:
Lloh37:
	adrp	x8, _ri@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ri@GOTPAGEOFF]
Lloh39:
	ldr	x8, [x8]
	mul	w9, w20, w19
	lsl	w0, w9, #2
	blr	x8
	mov	x3, x0
	str	x0, [x25]
	ldr	x1, [x22]
	cmp	w23, w28
	b.ne	LBB0_43
; %bb.41:
	cmp	w24, w27
	b.ne	LBB0_43
; %bb.42:
	mul	w8, w28, w27
	lsl	w2, w8, #2
	mov	x0, x3
	bl	_Com_Memcpy
	b	LBB0_44
LBB0_43:
	mov	x0, x1
	mov	x1, x28
	mov	x2, x27
	mov	x4, x23
	mov	x5, x24
	bl	_ResampleTexture
LBB0_44:
Lloh40:
	adrp	x27, _IMGTYPE_COLORALPHA@GOTPAGE
Lloh41:
	ldr	x27, [x27, _IMGTYPE_COLORALPHA@GOTPAGEOFF]
	ldr	x8, [x27]
	cmp	x8, x21
	b.ne	LBB0_46
; %bb.45:
	ldr	x0, [x25]
	mov	x1, x0
	mov	x2, x23
	mov	x3, x24
	bl	_RGBAtoYCoCgA
LBB0_46:
	cmp	w23, w20
	str	x22, [sp]                       ; 8-byte Folded Spill
	b.lt	LBB0_48
; %bb.47:
	cmp	w24, w19
	b.ge	LBB0_51
LBB0_48:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	and	w26, w8, w26
Lloh42:
	adrp	x22, _IMGTYPE_NORMAL@GOTPAGE
Lloh43:
	ldr	x22, [x22, _IMGTYPE_NORMAL@GOTPAGEOFF]
Lloh44:
	adrp	x28, _IMGTYPE_NORMALHEIGHT@GOTPAGE
Lloh45:
	ldr	x28, [x28, _IMGTYPE_NORMALHEIGHT@GOTPAGEOFF]
LBB0_49:                                ; =>This Inner Loop Header: Depth=1
	lsl	w23, w23, #1
	lsl	w24, w24, #1
	ldr	x0, [x25]
	ldr	x8, [x22]
	cmp	x8, x21
	ldr	x8, [x28]
	ccmp	x8, x21, #4, ne
	cset	w4, eq
	mov	x1, x23
	mov	x2, x24
	mov	x3, x26
	bl	_FCBIByBlock
	cmp	w23, w20
	b.lt	LBB0_49
; %bb.50:                               ;   in Loop: Header=BB0_49 Depth=1
	cmp	w24, w19
	b.lt	LBB0_49
LBB0_51:
	ldr	x8, [x27]
	cmp	x8, x21
	b.ne	LBB0_53
; %bb.52:
	ldr	x0, [x25]
	mov	x1, x0
	mov	x2, x23
	mov	x3, x24
	bl	_YCoCgAtoRGBA
	ldr	x22, [sp]                       ; 8-byte Folded Reload
Lloh46:
	adrp	x19, _glConfig@GOTPAGE
Lloh47:
	ldr	x19, [x19, _glConfig@GOTPAGEOFF]
	ldr	w20, [sp, #8]                   ; 4-byte Folded Reload
	b	LBB0_18
LBB0_53:
Lloh48:
	adrp	x8, _IMGTYPE_NORMAL@GOTPAGE
Lloh49:
	ldr	x8, [x8, _IMGTYPE_NORMAL@GOTPAGEOFF]
Lloh50:
	ldr	x8, [x8]
Lloh51:
	adrp	x9, _IMGTYPE_NORMALHEIGHT@GOTPAGE
Lloh52:
	ldr	x9, [x9, _IMGTYPE_NORMALHEIGHT@GOTPAGEOFF]
Lloh53:
	ldr	x9, [x9]
	cmp	x8, x21
	ccmp	x9, x21, #4, ne
	ldr	x22, [sp]                       ; 8-byte Folded Reload
Lloh54:
	adrp	x19, _glConfig@GOTPAGE
Lloh55:
	ldr	x19, [x19, _glConfig@GOTPAGEOFF]
	ldr	w20, [sp, #8]                   ; 4-byte Folded Reload
	b.ne	LBB0_18
; %bb.54:
	ldr	x0, [x25]
	mov	x1, x0
	mov	x2, x23
	mov	x3, x24
	bl	_FillInNormalizedZ
	b	LBB0_18
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.comm	_IMGFLAG_PICMIP,4,2             ; @IMGFLAG_PICMIP
	.comm	_IMGFLAG_MIPMAP,4,2             ; @IMGFLAG_MIPMAP
	.comm	_IMGFLAG_CLAMPTOEDGE,4,2        ; @IMGFLAG_CLAMPTOEDGE
	.comm	_r_roundImagesDown,8,3          ; @r_roundImagesDown
	.comm	_r_textureMaxSize,8,3           ; @r_textureMaxSize
	.comm	_r_imageUpsample,8,3            ; @r_imageUpsample
	.comm	_r_imageUpsampleMaxSize,8,3     ; @r_imageUpsampleMaxSize
	.comm	_glConfig,4,2                   ; @glConfig
	.comm	_ri,8,3                         ; @ri
	.comm	_IMGTYPE_COLORALPHA,8,3         ; @IMGTYPE_COLORALPHA
	.comm	_IMGTYPE_NORMAL,8,3             ; @IMGTYPE_NORMAL
	.comm	_IMGTYPE_NORMALHEIGHT,8,3       ; @IMGTYPE_NORMALHEIGHT
	.comm	_r_picmip,8,3                   ; @r_picmip
	.comm	_qfalse,4,2                     ; @qfalse
	.no_dead_strip	_RawImage_ScaleToPower2
.subsections_via_symbols
