	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wbsd_send_command
_wbsd_send_command:                     ## @wbsd_send_command
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movl	$0, (%rdi)
	movl	(%rsi), %edi
	movq	_WBSD_CMDR@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	addq	8(%r12), %rsi
	callq	_outb
	movzbl	7(%r14), %edi
	movq	(%r15), %rsi
	addq	8(%r12), %rsi
	callq	_outb
	movzbl	6(%r14), %edi
	movq	(%r15), %rsi
	addq	8(%r12), %rsi
	callq	_outb
	movzbl	5(%r14), %edi
	movq	(%r15), %rsi
	addq	8(%r12), %rsi
	callq	_outb
	movzbl	4(%r14), %edi
	movq	(%r15), %rsi
	addq	8(%r12), %rsi
	callq	_outb
	movl	$0, 12(%r14)
	movq	_WBSD_IDX_STATUS@GOTPCREL(%rip), %r15
	movq	_WBSD_CARDTRAFFIC@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_wbsd_read_index
	testl	%eax, (%rbx)
	jne	LBB0_1
## %bb.2:
	movl	8(%r14), %eax
	movq	_MMC_RSP_PRESENT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.3:
	movl	(%r12), %ecx
	movq	_WBSD_INT_CARD@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_7
## %bb.4:
	movq	_ENOMEDIUM@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_7:
	movq	_WBSD_INT_TIMEOUT@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_9
## %bb.8:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, 12(%r14)
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_MMC_RSP_CRC@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_12
## %bb.10:
	movq	_WBSD_INT_CRC@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_12
## %bb.11:
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_12:
	movq	_MMC_RSP_136@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_13
## %bb.14:
	movq	%r12, %rdi
	movq	%r14, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wbsd_get_long_reply            ## TAILCALL
LBB0_13:
	movq	%r12, %rdi
	movq	%r14, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wbsd_get_short_reply           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WBSD_CMDR,8,3                  ## @WBSD_CMDR
	.comm	_WBSD_IDX_STATUS,4,2            ## @WBSD_IDX_STATUS
	.comm	_WBSD_CARDTRAFFIC,4,2           ## @WBSD_CARDTRAFFIC
	.comm	_MMC_RSP_PRESENT,4,2            ## @MMC_RSP_PRESENT
	.comm	_WBSD_INT_CARD,4,2              ## @WBSD_INT_CARD
	.comm	_ENOMEDIUM,4,2                  ## @ENOMEDIUM
	.comm	_WBSD_INT_TIMEOUT,4,2           ## @WBSD_INT_TIMEOUT
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_MMC_RSP_CRC,4,2                ## @MMC_RSP_CRC
	.comm	_WBSD_INT_CRC,4,2               ## @WBSD_INT_CRC
	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.comm	_MMC_RSP_136,4,2                ## @MMC_RSP_136
	.no_dead_strip	_wbsd_send_command
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wbsd_send_command
_wbsd_send_command:                     ; @wbsd_send_command
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x1
	mov	x20, x0
	str	wzr, [x0]
	ldr	w0, [x1]
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x21, _WBSD_CMDR@GOTPAGE
Lloh1:
	ldr	x21, [x21, _WBSD_CMDR@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_outb
	ldrb	w0, [x19, #7]
	ldr	x8, [x20, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_outb
	ldrb	w0, [x19, #6]
	ldr	x8, [x20, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_outb
	ldrb	w0, [x19, #5]
	ldr	x8, [x20, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_outb
	ldrb	w0, [x19, #4]
	ldr	x8, [x20, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_outb
	str	wzr, [x19, #12]
Lloh2:
	adrp	x21, _WBSD_IDX_STATUS@GOTPAGE
Lloh3:
	ldr	x21, [x21, _WBSD_IDX_STATUS@GOTPAGEOFF]
Lloh4:
	adrp	x22, _WBSD_CARDTRAFFIC@GOTPAGE
Lloh5:
	ldr	x22, [x22, _WBSD_CARDTRAFFIC@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	mov	x0, x20
	bl	_wbsd_read_index
	ldr	w8, [x22]
	tst	w8, w0
	b.ne	LBB0_1
; %bb.2:
	ldr	w8, [x19, #8]
Lloh6:
	adrp	x9, _MMC_RSP_PRESENT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MMC_RSP_PRESENT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.3:
	ldr	w9, [x20]
Lloh9:
	adrp	x10, _WBSD_INT_CARD@GOTPAGE
Lloh10:
	ldr	x10, [x10, _WBSD_INT_CARD@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_5
; %bb.4:
Lloh12:
	adrp	x8, _ENOMEDIUM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEDIUM@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh14:
	adrp	x10, _WBSD_INT_TIMEOUT@GOTPAGE
Lloh15:
	ldr	x10, [x10, _WBSD_INT_TIMEOUT@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_9
; %bb.6:
Lloh17:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [x19, #12]
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh19:
	adrp	x10, _MMC_RSP_CRC@GOTPAGE
Lloh20:
	ldr	x10, [x10, _MMC_RSP_CRC@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	tst	w10, w8
	b.eq	LBB0_12
; %bb.10:
Lloh22:
	adrp	x10, _WBSD_INT_CRC@GOTPAGE
Lloh23:
	ldr	x10, [x10, _WBSD_INT_CRC@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_12
; %bb.11:
Lloh25:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
	b	LBB0_7
LBB0_12:
Lloh27:
	adrp	x9, _MMC_RSP_136@GOTPAGE
Lloh28:
	ldr	x9, [x9, _MMC_RSP_136@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	mov	x0, x20
	mov	x1, x19
	tst	w9, w8
	b.eq	LBB0_14
; %bb.13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_wbsd_get_long_reply
LBB0_14:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_wbsd_get_short_reply
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_WBSD_CMDR,8,3                  ; @WBSD_CMDR
	.comm	_WBSD_IDX_STATUS,4,2            ; @WBSD_IDX_STATUS
	.comm	_WBSD_CARDTRAFFIC,4,2           ; @WBSD_CARDTRAFFIC
	.comm	_MMC_RSP_PRESENT,4,2            ; @MMC_RSP_PRESENT
	.comm	_WBSD_INT_CARD,4,2              ; @WBSD_INT_CARD
	.comm	_ENOMEDIUM,4,2                  ; @ENOMEDIUM
	.comm	_WBSD_INT_TIMEOUT,4,2           ; @WBSD_INT_TIMEOUT
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_MMC_RSP_CRC,4,2                ; @MMC_RSP_CRC
	.comm	_WBSD_INT_CRC,4,2               ; @WBSD_INT_CRC
	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.comm	_MMC_RSP_136,4,2                ; @MMC_RSP_136
	.no_dead_strip	_wbsd_send_command
.subsections_via_symbols
