	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function if_sdio_finish_power_on
_if_sdio_finish_power_on:               ## @if_sdio_finish_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %r14
	movq	32(%rdi), %r15
	movq	%r14, %rdi
	callq	_sdio_claim_host
	movq	24(%rbx), %rdi
	movq	_IF_SDIO_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_sdio_set_block_size
	movq	(%rbx), %rcx
	movq	_MODEL_8385@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_3
## %bb.1:
	movq	_MODEL_8686@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_if_sdio_read_rx_unit
LBB0_3:
	movq	%rax, 16(%rbx)
	movq	_if_sdio_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_sdio_claim_irq
	movl	%eax, -36(%rbp)
	testl	%eax, %eax
	jne	LBB0_12
## %bb.4:
	movq	_IF_SDIO_H_INT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-36(%rbp), %rcx
	movq	%r14, %rdi
	movl	$15, %esi
	callq	_sdio_writeb
	cmpl	$0, -36(%rbp)
	je	LBB0_5
## %bb.11:
	movq	%r14, %rdi
	callq	_sdio_release_irq
LBB0_12:
	movq	%r14, %rdi
	callq	_sdio_release_host
LBB0_13:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r14, %rdi
	callq	_sdio_release_host
	movl	$1, (%r15)
	movq	(%rbx), %rax
	movq	_MODEL_8688@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.6:
	leaq	-40(%rbp), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	leaq	L_.str(%rip), %rdi
	callq	_lbs_deb_sdio
	movq	_CMD_FUNC_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_lbs_cmd_copyback@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	movq	%r12, %rdx
	movl	$4, %ecx
	movq	%r12, %r9
	callq	___lbs_cmd
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	4(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_netdev_alert
LBB0_8:
	leaq	12(%rbx), %rdi
	callq	_wake_up
	cmpl	$0, 8(%rbx)
	jne	LBB0_13
## %bb.9:
	movq	%r15, %rdi
	callq	_lbs_start_card
	movl	%eax, -36(%rbp)
	movq	%rbx, %rdi
	callq	_if_sdio_power_off
	cmpl	$0, -36(%rbp)
	jne	LBB0_13
## %bb.10:
	movl	$1, 8(%rbx)
	movq	%r14, %rdi
	callq	_pm_runtime_put
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_IF_SDIO_BLOCK_SIZE,4,2         ## @IF_SDIO_BLOCK_SIZE
	.comm	_MODEL_8385,8,3                 ## @MODEL_8385
	.comm	_MODEL_8686,8,3                 ## @MODEL_8686
	.comm	_if_sdio_interrupt,4,2          ## @if_sdio_interrupt
	.comm	_IF_SDIO_H_INT_MASK,4,2         ## @IF_SDIO_H_INT_MASK
	.comm	_MODEL_8688,8,3                 ## @MODEL_8688
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"send function INIT command\n"

	.comm	_CMD_FUNC_INIT,4,2              ## @CMD_FUNC_INIT
	.comm	_lbs_cmd_copyback,4,2           ## @lbs_cmd_copyback
L_.str.1:                               ## @.str.1
	.asciz	"CMD_FUNC_INIT cmd failed\n"

	.no_dead_strip	_if_sdio_finish_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_finish_power_on
_if_sdio_finish_power_on:               ; @if_sdio_finish_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
	ldp	x19, x21, [x0, #24]
	mov	x0, x19
	bl	_sdio_claim_host
	ldr	x0, [x20, #24]
Lloh0:
	adrp	x8, _IF_SDIO_BLOCK_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IF_SDIO_BLOCK_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_sdio_set_block_size
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _MODEL_8385@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MODEL_8385@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _MODEL_8686@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MODEL_8686@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_2
; %bb.1:
	mov	x0, #0
	b	LBB0_3
LBB0_2:
	mov	x0, x20
	bl	_if_sdio_read_rx_unit
LBB0_3:
	str	x0, [x20, #16]
Lloh9:
	adrp	x8, _if_sdio_interrupt@GOTPAGE
Lloh10:
	ldr	x8, [x8, _if_sdio_interrupt@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sdio_claim_irq
	str	w0, [sp, #12]
	cbnz	w0, LBB0_6
; %bb.4:
Lloh12:
	adrp	x8, _IF_SDIO_H_INT_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IF_SDIO_H_INT_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	w1, #15
	bl	_sdio_writeb
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_8
; %bb.5:
	mov	x0, x19
	bl	_sdio_release_irq
LBB0_6:
	mov	x0, x19
	bl	_sdio_release_host
LBB0_7:
	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
LBB0_8:
	mov	x0, x19
	bl	_sdio_release_host
	mov	w8, #1
	str	w8, [x21]
	ldr	x8, [x20]
Lloh15:
	adrp	x9, _MODEL_8688@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MODEL_8688@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.9:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_lbs_deb_sdio
Lloh20:
	adrp	x8, _CMD_FUNC_INIT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CMD_FUNC_INIT@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x8, _lbs_cmd_copyback@GOTPAGE
Lloh24:
	ldr	x8, [x8, _lbs_cmd_copyback@GOTPAGEOFF]
Lloh25:
	ldr	w4, [x8]
	add	x2, sp, #8
	add	x5, sp, #8
	mov	x0, x21
	mov	w3, #4
	bl	___lbs_cmd
	cbz	x0, LBB0_11
; %bb.10:
	ldr	w0, [x21, #4]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_alert
LBB0_11:
	add	x0, x20, #12
	bl	_wake_up
	ldr	w8, [x20, #8]
	cbnz	w8, LBB0_7
; %bb.12:
	mov	x0, x21
	bl	_lbs_start_card
	str	w0, [sp, #12]
	mov	x0, x20
	bl	_if_sdio_power_off
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_7
; %bb.13:
	mov	w8, #1
	str	w8, [x20, #8]
	mov	x0, x19
	bl	_pm_runtime_put
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_IF_SDIO_BLOCK_SIZE,4,2         ; @IF_SDIO_BLOCK_SIZE
	.comm	_MODEL_8385,8,3                 ; @MODEL_8385
	.comm	_MODEL_8686,8,3                 ; @MODEL_8686
	.comm	_if_sdio_interrupt,4,2          ; @if_sdio_interrupt
	.comm	_IF_SDIO_H_INT_MASK,4,2         ; @IF_SDIO_H_INT_MASK
	.comm	_MODEL_8688,8,3                 ; @MODEL_8688
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"send function INIT command\n"

	.comm	_CMD_FUNC_INIT,4,2              ; @CMD_FUNC_INIT
	.comm	_lbs_cmd_copyback,4,2           ; @lbs_cmd_copyback
l_.str.1:                               ; @.str.1
	.asciz	"CMD_FUNC_INIT cmd failed\n"

	.no_dead_strip	_if_sdio_finish_power_on
.subsections_via_symbols
