	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function if_sdio_card_to_host
_if_sdio_card_to_host:                  ## @if_sdio_card_to_host
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	-44(%rbp), %rsi
	callq	_if_sdio_read_rx_len
	cmpl	$0, -44(%rbp)
	je	LBB0_1
LBB0_21:
	leaq	L_.str.5(%rip), %rdi
	callq	_pr_err
	movl	-44(%rbp), %eax
LBB0_22:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%eax, %r14d
	cmpl	$3, %eax
	jg	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	xorl	%r12d, %r12d
	movl	%r14d, %esi
LBB0_17:
	xorl	%eax, %eax
	callq	_lbs_deb_sdio
LBB0_18:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	movl	%r12d, -44(%rbp)
	testl	%r12d, %r12d
	jne	LBB0_21
LBB0_20:
	xorl	%eax, %eax
	jmp	LBB0_22
LBB0_3:
	movq	_IF_SDIO_IO_RDY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_if_sdio_wait_status
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	jne	LBB0_21
## %bb.4:
	movl	12(%rbx), %edi
	movl	%r14d, %esi
	callq	_sdio_align_size
	movl	12(%rbx), %edi
	movq	(%rbx), %rsi
	movl	8(%rbx), %edx
	movl	%eax, %ecx
	callq	_sdio_readsb
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	jne	LBB0_21
## %bb.5:
	movq	(%rbx), %rax
	movl	4(%rax), %r15d
	shll	$8, %r15d
	orl	(%rax), %r15d
	movl	12(%rax), %r13d
	shll	$8, %r13d
	orl	8(%rax), %r13d
	leaq	L_.str.1(%rip), %rdi
	xorl	%r12d, %r12d
	movl	%r13d, %esi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_lbs_deb_sdio
	cmpl	%r14d, %r15d
	jle	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_lbs_deb_sdio
	jmp	LBB0_18
LBB0_7:
	jge	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_lbs_deb_sdio
LBB0_9:
	cmpl	$128, %r13d
	je	LBB0_15
## %bb.10:
	cmpl	$129, %r13d
	je	LBB0_14
## %bb.11:
	cmpl	$130, %r13d
	jne	LBB0_16
## %bb.12:
	movq	(%rbx), %rsi
	addq	$16, %rsi
	addl	$-4, %r15d
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_if_sdio_handle_cmd
	jmp	LBB0_13
LBB0_15:
	movq	(%rbx), %rsi
	addq	$16, %rsi
	addl	$-4, %r15d
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_if_sdio_handle_event
	jmp	LBB0_13
LBB0_14:
	movq	(%rbx), %rsi
	addq	$16, %rsi
	addl	$-4, %r15d
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_if_sdio_handle_data
LBB0_13:
	movl	%eax, %r12d
	movl	%eax, -44(%rbp)
	testl	%r12d, %r12d
	jne	LBB0_21
	jmp	LBB0_20
LBB0_16:
	leaq	L_.str.4(%rip), %rdi
	xorl	%r12d, %r12d
	movl	%r13d, %esi
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid packet size (%d bytes) from firmware\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IF_SDIO_IO_RDY,4,2             ## @IF_SDIO_IO_RDY
L_.str.1:                               ## @.str.1
	.asciz	"packet of type %d and size %d bytes\n"

L_.str.2:                               ## @.str.2
	.asciz	"packet fragment (%d > %d)\n"

L_.str.3:                               ## @.str.3
	.asciz	"packet fragment (%d < %d)\n"

L_.str.4:                               ## @.str.4
	.asciz	"invalid type (%d) from firmware\n"

L_.str.5:                               ## @.str.5
	.asciz	"problem fetching packet from firmware\n"

	.no_dead_strip	_if_sdio_card_to_host
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function if_sdio_card_to_host
_if_sdio_card_to_host:                  ; @if_sdio_card_to_host
	.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	x19, x0
	add	x1, sp, #12
	bl	_if_sdio_read_rx_len
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_3
LBB0_1:
Lloh0:
	adrp	x0, l_.str.5@PAGE
Lloh1:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_pr_err
	ldr	w0, [sp, #12]
LBB0_2:
	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_3:
	mov	x20, x0
	cmp	w0, #3
	b.gt	LBB0_7
; %bb.4:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
LBB0_5:
	bl	_lbs_deb_sdio
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	str	w0, [sp, #12]
	cbnz	w0, LBB0_1
	b	LBB0_2
LBB0_7:
Lloh7:
	adrp	x8, _IF_SDIO_IO_RDY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IF_SDIO_IO_RDY@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_if_sdio_wait_status
	str	w0, [sp, #12]
	cbnz	w0, LBB0_1
; %bb.8:
	ldr	w0, [x19, #12]
	mov	x1, x20
	bl	_sdio_align_size
	mov	x3, x0
	ldr	x1, [x19]
	ldp	w2, w0, [x19, #8]
	bl	_sdio_readsb
	str	w0, [sp, #12]
	cbnz	w0, LBB0_1
; %bb.9:
	ldr	x8, [x19]
	ldp	w9, w10, [x8]
	orr	w21, w9, w10, lsl #8
	ldp	w9, w8, [x8, #8]
	orr	w22, w9, w8, lsl #8
	str	x21, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	bl	_lbs_deb_sdio
	cmp	w21, w20
	b.le	LBB0_11
; %bb.10:
	str	x20, [sp]
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	b	LBB0_5
LBB0_11:
	b.ge	LBB0_13
; %bb.12:
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	str	x20, [sp]
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x21
	bl	_lbs_deb_sdio
LBB0_13:
	cmp	w22, #128
	b.eq	LBB0_17
; %bb.14:
	cmp	w22, #129
	b.eq	LBB0_18
; %bb.15:
	cmp	w22, #130
	b.ne	LBB0_19
; %bb.16:
	ldr	x8, [x19]
	add	x1, x8, #16
	sub	w2, w21, #4
	mov	x0, x19
	bl	_if_sdio_handle_cmd
	b	LBB0_6
LBB0_17:
	ldr	x8, [x19]
	add	x1, x8, #16
	sub	w2, w21, #4
	mov	x0, x19
	bl	_if_sdio_handle_event
	b	LBB0_6
LBB0_18:
	ldr	x8, [x19]
	add	x1, x8, #16
	sub	w2, w21, #4
	mov	x0, x19
	bl	_if_sdio_handle_data
	b	LBB0_6
LBB0_19:
Lloh16:
	adrp	x0, l_.str.4@PAGE
Lloh17:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x22
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid packet size (%d bytes) from firmware\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IF_SDIO_IO_RDY,4,2             ; @IF_SDIO_IO_RDY
l_.str.1:                               ; @.str.1
	.asciz	"packet of type %d and size %d bytes\n"

l_.str.2:                               ; @.str.2
	.asciz	"packet fragment (%d > %d)\n"

l_.str.3:                               ; @.str.3
	.asciz	"packet fragment (%d < %d)\n"

l_.str.4:                               ; @.str.4
	.asciz	"invalid type (%d) from firmware\n"

l_.str.5:                               ; @.str.5
	.asciz	"problem fetching packet from firmware\n"

	.no_dead_strip	_if_sdio_card_to_host
.subsections_via_symbols
