	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CalculateMipSize
_CalculateMipSize:                      ## @CalculateMipSize
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $edi killed $edi def $rdi
	leal	3(%rdi), %eax
	leal	6(%rdi), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
                                        ## kill: def $edx killed $edx def $rdx
                                        ## kill: def $esi killed $esi def $rsi
	leal	3(%rsi), %r8d
	leal	6(%rsi), %eax
	testl	%r8d, %r8d
	cmovnsl	%r8d, %eax
	leal	-128(%rdx), %r8d
	cmpl	$18, %r8d
	ja	LBB0_6
## %bb.1:
	sarl	$2, %ecx
	sarl	$2, %eax
	imull	%ecx, %eax
	imull	%edi, %esi
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%r8,4), %rdx
	addq	%rcx, %rdx
	jmpq	*%rdx
LBB0_2:
	shll	$4, %eax
	popq	%rbp
	retq
LBB0_3:
	shll	$3, %eax
	popq	%rbp
	retq
LBB0_4:
	shll	$2, %esi
	jmp	LBB0_5
LBB0_6:
	movq	_ri@GOTPCREL(%rip), %rax
	movq	_PRINT_ALL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	*(%rax)
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_7:
	shll	$3, %esi
LBB0_5:
	movl	%esi, %eax
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_4
	.long	L0_0_set_7
	.long	L0_0_set_3
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_3
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_3
	.long	L0_0_set_2
	.long	L0_0_set_3
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_3
	.long	L0_0_set_2
	.long	L0_0_set_3
	.end_data_region
                                        ## -- End function
	.comm	_ri,8,3                         ## @ri
	.comm	_PRINT_ALL,4,2                  ## @PRINT_ALL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported texture format %08x\n"

	.no_dead_strip	_CalculateMipSize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CalculateMipSize
_CalculateMipSize:                      ; @CalculateMipSize
	.cfi_startproc
; %bb.0:
	add	w8, w0, #3
	add	w9, w0, #6
	cmp	w8, #0
	csel	w9, w9, w8, lt
	add	w8, w1, #3
	add	w10, w1, #6
	cmp	w8, #0
	csel	w10, w10, w8, lt
	sub	w8, w2, #128
	cmp	w8, #18
	b.hi	LBB0_5
; %bb.1:
	asr	w9, w9, #2
	asr	w10, w10, #2
	mul	w9, w10, w9
	mul	w10, w1, w0
Lloh0:
	adrp	x11, lJTI0_0@PAGE
Lloh1:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x12, LBB0_2
	ldrb	w13, [x11, x8]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_2:
	lsl	w0, w9, #4
	ret
LBB0_3:
	lsl	w0, w9, #3
	ret
LBB0_4:
	lsl	w0, w10, #2
	ret
LBB0_5:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh2:
	adrp	x8, _ri@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ri@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _PRINT_ALL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PRINT_ALL@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x9]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	blr	x8
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_6:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	lsl	w0, w10, #3
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
                                        ; -- End function
	.comm	_ri,8,3                         ; @ri
	.comm	_PRINT_ALL,4,2                  ; @PRINT_ALL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported texture format %08x\n"

	.no_dead_strip	_CalculateMipSize
.subsections_via_symbols
