	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __mmc_select_powerclass
___mmc_select_powerclass:               ## @__mmc_select_powerclass
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	40(%rdi), %rax
	movb	(%rax), %cl
	movl	$1, %edx
	shll	%cl, %edx
	leal	-128(%rdx), %ecx
	cmpl	$9, %ecx
	jae	LBB0_1
## %bb.8:
	movl	4(%rax), %ecx
	movq	_MMC_HIGH_26_MAX_DTR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jle	LBB0_9
## %bb.10:
	movq	_MMC_HIGH_52_MAX_DTR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jle	LBB0_11
## %bb.12:
	movq	_MMC_HS200_MAX_DTR@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpl	(%rdx), %ecx
	jg	LBB0_15
## %bb.13:
	movq	_EXT_CSD_DDR_BUS_WIDTH_8@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	%esi, (%rax)
	setne	%cl
	leaq	(%rdi,%rcx,4), %rax
	addq	$28, %rax
	jmp	LBB0_14
LBB0_9:
	leaq	16(%rdi), %rax
	jmp	LBB0_14
LBB0_11:
	movq	_EXT_CSD_BUS_WIDTH_8@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	%esi, (%rax)
	setb	%cl
	leaq	(%rdi,%rcx,4), %rax
	addq	$20, %rax
LBB0_14:
	movl	(%rax), %eax
LBB0_15:
	movq	_EXT_CSD_BUS_WIDTH_8@GOTPCREL(%rip), %rcx
	movq	_EXT_CSD_DDR_BUS_WIDTH_8@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%esi, %edx
	movq	_EXT_CSD_PWR_CL_8BIT_MASK@GOTPCREL(%rip), %rcx
	cmoveq	_EXT_CSD_PWR_CL_4BIT_MASK@GOTPCREL(%rip), %rcx
	movq	_EXT_CSD_PWR_CL_8BIT_SHIFT@GOTPCREL(%rip), %rdx
	cmoveq	_EXT_CSD_PWR_CL_4BIT_SHIFT@GOTPCREL(%rip), %rdx
	andl	(%rcx), %eax
	movb	(%rdx), %cl
	shrl	%cl, %eax
	testl	%eax, %eax
	je	LBB0_16
## %bb.17:
	movq	_EXT_CSD_CMD_SET_NORMAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_EXT_CSD_POWER_CLASS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	36(%rdi), %r8d
	movl	%eax, %ecx
	popq	%rbp
	jmp	_mmc_switch                     ## TAILCALL
LBB0_16:
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_1:
	cmpl	$137, %edx
	jne	LBB0_18
## %bb.2:
	movl	4(%rax), %ecx
	movq	_MMC_HIGH_26_MAX_DTR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jle	LBB0_3
## %bb.4:
	movq	_MMC_HIGH_52_MAX_DTR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jle	LBB0_5
## %bb.6:
	movq	_MMC_HS200_MAX_DTR@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpl	(%rdx), %ecx
	jg	LBB0_15
## %bb.7:
	leaq	12(%rdi), %rax
	jmp	LBB0_14
LBB0_18:
	movq	%rax, %rdi
	callq	_mmc_hostname
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_warn
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_3:
	movq	%rdi, %rax
	jmp	LBB0_14
LBB0_5:
	movq	_EXT_CSD_BUS_WIDTH_8@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	%esi, (%rax)
	setb	%cl
	leaq	(%rdi,%rcx,4), %rax
	addq	$4, %rax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_HIGH_26_MAX_DTR,4,2        ## @MMC_HIGH_26_MAX_DTR
	.comm	_MMC_HIGH_52_MAX_DTR,4,2        ## @MMC_HIGH_52_MAX_DTR
	.comm	_EXT_CSD_BUS_WIDTH_8,4,2        ## @EXT_CSD_BUS_WIDTH_8
	.comm	_MMC_HS200_MAX_DTR,4,2          ## @MMC_HS200_MAX_DTR
	.comm	_EXT_CSD_DDR_BUS_WIDTH_8,4,2    ## @EXT_CSD_DDR_BUS_WIDTH_8
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Voltage range not supported for power class\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EXT_CSD_PWR_CL_8BIT_MASK,4,2   ## @EXT_CSD_PWR_CL_8BIT_MASK
	.comm	_EXT_CSD_PWR_CL_8BIT_SHIFT,4,2  ## @EXT_CSD_PWR_CL_8BIT_SHIFT
	.comm	_EXT_CSD_PWR_CL_4BIT_MASK,4,2   ## @EXT_CSD_PWR_CL_4BIT_MASK
	.comm	_EXT_CSD_PWR_CL_4BIT_SHIFT,4,2  ## @EXT_CSD_PWR_CL_4BIT_SHIFT
	.comm	_EXT_CSD_CMD_SET_NORMAL,4,2     ## @EXT_CSD_CMD_SET_NORMAL
	.comm	_EXT_CSD_POWER_CLASS,4,2        ## @EXT_CSD_POWER_CLASS
	.no_dead_strip	___mmc_select_powerclass
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __mmc_select_powerclass
___mmc_select_powerclass:               ; @__mmc_select_powerclass
	.cfi_startproc
; %bb.0:
	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
	ldr	x8, [x0, #40]
	ldr	w9, [x8]
	mov	w10, #1
	lsl	w10, w10, w9
	sub	w11, w10, #128
Lloh0:
	adrp	x9, _EXT_CSD_DDR_BUS_WIDTH_8@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EXT_CSD_DDR_BUS_WIDTH_8@GOTPAGEOFF]
	cmp	w11, #9
	b.hs	LBB0_8
; %bb.1:
	ldr	w8, [x8, #4]
Lloh2:
	adrp	x10, _MMC_HIGH_26_MAX_DTR@GOTPAGE
Lloh3:
	ldr	x10, [x10, _MMC_HIGH_26_MAX_DTR@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	cmp	w8, w10
	b.le	LBB0_5
; %bb.2:
Lloh5:
	adrp	x10, _MMC_HIGH_52_MAX_DTR@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MMC_HIGH_52_MAX_DTR@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	cmp	w8, w10
	b.le	LBB0_6
; %bb.3:
Lloh8:
	adrp	x10, _MMC_HS200_MAX_DTR@GOTPAGE
Lloh9:
	ldr	x10, [x10, _MMC_HS200_MAX_DTR@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	cmp	w8, w10
	b.le	LBB0_13
LBB0_4:
	mov	w8, #0
	b	LBB0_17
LBB0_5:
	add	x8, x0, #16
	b	LBB0_16
LBB0_6:
Lloh11:
	adrp	x8, _EXT_CSD_BUS_WIDTH_8@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EXT_CSD_BUS_WIDTH_8@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	add	x10, x0, #20
	add	x11, x0, #24
LBB0_7:
	cmp	w8, w1
	csel	x8, x11, x10, lo
	b	LBB0_16
LBB0_8:
	cmp	w10, #137
	b.ne	LBB0_14
; %bb.9:
	ldr	w8, [x8, #4]
Lloh14:
	adrp	x10, _MMC_HIGH_26_MAX_DTR@GOTPAGE
Lloh15:
	ldr	x10, [x10, _MMC_HIGH_26_MAX_DTR@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	cmp	w8, w10
	b.le	LBB0_15
; %bb.10:
Lloh17:
	adrp	x10, _MMC_HIGH_52_MAX_DTR@GOTPAGE
Lloh18:
	ldr	x10, [x10, _MMC_HIGH_52_MAX_DTR@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	cmp	w8, w10
	b.le	LBB0_20
; %bb.11:
Lloh20:
	adrp	x10, _MMC_HS200_MAX_DTR@GOTPAGE
Lloh21:
	ldr	x10, [x10, _MMC_HS200_MAX_DTR@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	cmp	w8, w10
	b.gt	LBB0_4
; %bb.12:
	add	x8, x0, #12
	b	LBB0_16
LBB0_13:
	ldr	w8, [x9]
	add	x10, x0, #28
	add	x11, x0, #32
	cmp	w8, w1
	csel	x8, x10, x11, eq
	b	LBB0_16
LBB0_14:
	mov	x0, x8
	bl	_mmc_hostname
	mov	x1, x0
Lloh23:
	adrp	x0, l_.str@PAGE
Lloh24:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_15:
	mov	x8, x0
LBB0_16:
	ldr	w8, [x8]
LBB0_17:
Lloh28:
	adrp	x10, _EXT_CSD_BUS_WIDTH_8@GOTPAGE
Lloh29:
	ldr	x10, [x10, _EXT_CSD_BUS_WIDTH_8@GOTPAGEOFF]
Lloh30:
	ldr	w10, [x10]
	ldr	w9, [x9]
Lloh31:
	adrp	x11, _EXT_CSD_PWR_CL_4BIT_MASK@GOTPAGE
Lloh32:
	ldr	x11, [x11, _EXT_CSD_PWR_CL_4BIT_MASK@GOTPAGEOFF]
Lloh33:
	adrp	x12, _EXT_CSD_PWR_CL_8BIT_MASK@GOTPAGE
Lloh34:
	ldr	x12, [x12, _EXT_CSD_PWR_CL_8BIT_MASK@GOTPAGEOFF]
	orr	w9, w9, w10
	tst	w9, w1
	csel	x9, x11, x12, eq
	ldr	w9, [x9]
Lloh35:
	adrp	x10, _EXT_CSD_PWR_CL_4BIT_SHIFT@GOTPAGE
Lloh36:
	ldr	x10, [x10, _EXT_CSD_PWR_CL_4BIT_SHIFT@GOTPAGEOFF]
	and	w8, w9, w8
Lloh37:
	adrp	x9, _EXT_CSD_PWR_CL_8BIT_SHIFT@GOTPAGE
Lloh38:
	ldr	x9, [x9, _EXT_CSD_PWR_CL_8BIT_SHIFT@GOTPAGEOFF]
	csel	x9, x10, x9, eq
	ldr	w9, [x9]
	lsr	w3, w8, w9
	cbz	w3, LBB0_19
; %bb.18:
Lloh39:
	adrp	x8, _EXT_CSD_CMD_SET_NORMAL@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EXT_CSD_CMD_SET_NORMAL@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
Lloh42:
	adrp	x8, _EXT_CSD_POWER_CLASS@GOTPAGE
Lloh43:
	ldr	x8, [x8, _EXT_CSD_POWER_CLASS@GOTPAGEOFF]
Lloh44:
	ldr	w2, [x8]
	ldr	w4, [x0, #36]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_mmc_switch
LBB0_19:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_20:
Lloh45:
	adrp	x8, _EXT_CSD_BUS_WIDTH_8@GOTPAGE
Lloh46:
	ldr	x8, [x8, _EXT_CSD_BUS_WIDTH_8@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	add	x10, x0, #4
	add	x11, x0, #8
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_HIGH_26_MAX_DTR,4,2        ; @MMC_HIGH_26_MAX_DTR
	.comm	_MMC_HIGH_52_MAX_DTR,4,2        ; @MMC_HIGH_52_MAX_DTR
	.comm	_EXT_CSD_BUS_WIDTH_8,4,2        ; @EXT_CSD_BUS_WIDTH_8
	.comm	_MMC_HS200_MAX_DTR,4,2          ; @MMC_HS200_MAX_DTR
	.comm	_EXT_CSD_DDR_BUS_WIDTH_8,4,2    ; @EXT_CSD_DDR_BUS_WIDTH_8
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Voltage range not supported for power class\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EXT_CSD_PWR_CL_8BIT_MASK,4,2   ; @EXT_CSD_PWR_CL_8BIT_MASK
	.comm	_EXT_CSD_PWR_CL_8BIT_SHIFT,4,2  ; @EXT_CSD_PWR_CL_8BIT_SHIFT
	.comm	_EXT_CSD_PWR_CL_4BIT_MASK,4,2   ; @EXT_CSD_PWR_CL_4BIT_MASK
	.comm	_EXT_CSD_PWR_CL_4BIT_SHIFT,4,2  ; @EXT_CSD_PWR_CL_4BIT_SHIFT
	.comm	_EXT_CSD_CMD_SET_NORMAL,4,2     ; @EXT_CSD_CMD_SET_NORMAL
	.comm	_EXT_CSD_POWER_CLASS,4,2        ; @EXT_CSD_POWER_CLASS
	.no_dead_strip	___mmc_select_powerclass
.subsections_via_symbols
