	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function if_sdio_power_on
_if_sdio_power_on:                      ## @if_sdio_power_on
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	16(%rdi), %rbx
	movq	(%rbx), %rax
	movq	8(%rax), %r15
	movq	%rbx, %rdi
	callq	_sdio_claim_host
	movq	%rbx, %rdi
	callq	_sdio_enable_func
	movl	%eax, -28(%rbp)
	testl	%eax, %eax
	jne	LBB0_13
## %bb.1:
	movq	(%r14), %rax
	movq	_MODEL_8686@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.2:
	movq	_MMC_CAP_SDIO_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_6
## %bb.3:
	movq	8(%r15), %rax
	movq	_MMC_BUS_WIDTH_1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.4:
	movq	_MMC_QUIRK_LENIENT_FN0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rbx), %rcx
	orl	%eax, (%rcx)
	movq	_SDIO_CCCR_IF@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_sdio_f0_readb
	cmpl	$0, -28(%rbp)
	jne	LBB0_12
## %bb.5:
	movq	_SDIO_BUS_ECSI@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r15), %edx
	leaq	-28(%rbp), %rcx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_sdio_f0_writeb
	cmpl	$0, -28(%rbp)
	jne	LBB0_12
LBB0_6:
	movq	_IF_SDIO_IOPORT@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_sdio_readb
	movl	%eax, 8(%r14)
	cmpl	$0, -28(%rbp)
	jne	LBB0_12
## %bb.7:
	movq	(%r15), %rsi
	incq	%rsi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_sdio_readb
	shll	$8, %eax
	orl	%eax, 8(%r14)
	cmpl	$0, -28(%rbp)
	jne	LBB0_12
## %bb.8:
	movq	(%r15), %rsi
	addq	$2, %rsi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_sdio_readb
	shll	$16, %eax
	orl	%eax, 8(%r14)
	cmpl	$0, -28(%rbp)
	jne	LBB0_12
## %bb.9:
	movq	%rbx, %rdi
	callq	_sdio_release_host
	movq	%r14, %rdi
	callq	_if_sdio_prog_firmware
	movl	%eax, -28(%rbp)
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movq	%rbx, %rdi
	callq	_sdio_claim_host
LBB0_12:
	movq	%rbx, %rdi
	callq	_sdio_disable_func
LBB0_13:
	movq	%rbx, %rdi
	callq	_sdio_release_host
	movl	-28(%rbp), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_MODEL_8686,8,3                 ## @MODEL_8686
	.comm	_MMC_CAP_SDIO_IRQ,4,2           ## @MMC_CAP_SDIO_IRQ
	.comm	_MMC_BUS_WIDTH_1,8,3            ## @MMC_BUS_WIDTH_1
	.comm	_MMC_QUIRK_LENIENT_FN0,4,2      ## @MMC_QUIRK_LENIENT_FN0
	.comm	_SDIO_CCCR_IF,4,2               ## @SDIO_CCCR_IF
	.comm	_SDIO_BUS_ECSI,4,2              ## @SDIO_BUS_ECSI
	.comm	_IF_SDIO_IOPORT,8,3             ## @IF_SDIO_IOPORT
	.no_dead_strip	_if_sdio_power_on
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function if_sdio_power_on
_if_sdio_power_on:                      ; @if_sdio_power_on
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
	ldr	x19, [x0, #16]
	ldr	x8, [x19]
	ldr	x21, [x8, #8]
	mov	x0, x19
	bl	_sdio_claim_host
	mov	x0, x19
	bl	_sdio_enable_func
	str	w0, [sp, #12]
	cbnz	w0, LBB0_12
; %bb.1:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _MODEL_8686@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MODEL_8686@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.2:
	ldr	w8, [x21]
Lloh3:
	adrp	x9, _MMC_CAP_SDIO_IRQ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MMC_CAP_SDIO_IRQ@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.3:
	ldr	x8, [x21, #8]
Lloh6:
	adrp	x9, _MMC_BUS_WIDTH_1@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MMC_BUS_WIDTH_1@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
Lloh9:
	adrp	x8, _MMC_QUIRK_LENIENT_FN0@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MMC_QUIRK_LENIENT_FN0@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	x9, [x19]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
Lloh12:
	adrp	x21, _SDIO_CCCR_IF@GOTPAGE
Lloh13:
	ldr	x21, [x21, _SDIO_CCCR_IF@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_sdio_f0_readb
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_11
; %bb.5:
Lloh14:
	adrp	x8, _SDIO_BUS_ECSI@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SDIO_BUS_ECSI@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	orr	w1, w8, w0
	ldr	w2, [x21]
	add	x3, sp, #12
	mov	x0, x19
	bl	_sdio_f0_writeb
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_11
LBB0_6:
Lloh17:
	adrp	x21, _IF_SDIO_IOPORT@GOTPAGE
Lloh18:
	ldr	x21, [x21, _IF_SDIO_IOPORT@GOTPAGEOFF]
	ldr	x1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_sdio_readb
	str	w0, [x20, #8]
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_11
; %bb.7:
	ldr	x8, [x21]
	add	x1, x8, #1
	add	x2, sp, #12
	mov	x0, x19
	bl	_sdio_readb
	ldr	w8, [x20, #8]
	orr	w8, w8, w0, lsl #8
	str	w8, [x20, #8]
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_11
; %bb.8:
	ldr	x8, [x21]
	add	x1, x8, #2
	add	x2, sp, #12
	mov	x0, x19
	bl	_sdio_readb
	ldr	w8, [x20, #8]
	orr	w8, w8, w0, lsl #16
	str	w8, [x20, #8]
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_11
; %bb.9:
	mov	x0, x19
	bl	_sdio_release_host
	mov	x0, x20
	bl	_if_sdio_prog_firmware
	str	w0, [sp, #12]
	cbz	w0, LBB0_13
; %bb.10:
	mov	x0, x19
	bl	_sdio_claim_host
LBB0_11:
	mov	x0, x19
	bl	_sdio_disable_func
LBB0_12:
	mov	x0, x19
	bl	_sdio_release_host
	ldr	w0, [sp, #12]
LBB0_13:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MODEL_8686,8,3                 ; @MODEL_8686
	.comm	_MMC_CAP_SDIO_IRQ,4,2           ; @MMC_CAP_SDIO_IRQ
	.comm	_MMC_BUS_WIDTH_1,8,3            ; @MMC_BUS_WIDTH_1
	.comm	_MMC_QUIRK_LENIENT_FN0,4,2      ; @MMC_QUIRK_LENIENT_FN0
	.comm	_SDIO_CCCR_IF,4,2               ; @SDIO_CCCR_IF
	.comm	_SDIO_BUS_ECSI,4,2              ; @SDIO_BUS_ECSI
	.comm	_IF_SDIO_IOPORT,8,3             ; @IF_SDIO_IOPORT
	.no_dead_strip	_if_sdio_power_on
.subsections_via_symbols
