	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdhci_auto_cmd_select
_sdhci_auto_cmd_select:                 ## @sdhci_auto_cmd_select
	.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	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	8(%rsi), %rsi
	callq	_sdhci_auto_cmd12
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	(%rbx), %rax
	movq	_SD_IO_RW_EXTENDED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setne	%al
	jmp	LBB0_3
LBB0_1:
	xorl	%eax, %eax
LBB0_3:
	movq	8(%rbx), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_4
## %bb.5:
	movq	_SDHCI_AUTO_CMD23@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r15)
	setne	%bl
	jmp	LBB0_6
LBB0_4:
	xorl	%ebx, %ebx
LBB0_6:
	movq	8(%r15), %rcx
	movq	_SDHCI_SPEC_410@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jl	LBB0_8
## %bb.7:
	movl	%eax, %ecx
	orb	%bl, %cl
	je	LBB0_8
## %bb.14:
	movq	_SDHCI_TRNS_AUTO_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
	movq	_SDHCI_HOST_CONTROL2@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_sdhci_readw
	movq	_SDHCI_CMD23_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%esi, %ecx
	orl	%eax, %ecx
	notl	%esi
	andl	%eax, %esi
	testb	%bl, %bl
	cmovnel	%ecx, %esi
	movl	(%r14), %edx
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdhci_writew                   ## TAILCALL
LBB0_8:
	testb	%al, %al
	je	LBB0_10
## %bb.9:
	movq	_SDHCI_TRNS_AUTO_CMD12@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	testb	%bl, %bl
	je	LBB0_13
## %bb.11:
	movq	_SDHCI_TRNS_AUTO_CMD23@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	orl	%eax, (%r14)
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SD_IO_RW_EXTENDED,8,3          ## @SD_IO_RW_EXTENDED
	.comm	_SDHCI_AUTO_CMD23,4,2           ## @SDHCI_AUTO_CMD23
	.comm	_SDHCI_SPEC_410,8,3             ## @SDHCI_SPEC_410
	.comm	_SDHCI_TRNS_AUTO_SEL,4,2        ## @SDHCI_TRNS_AUTO_SEL
	.comm	_SDHCI_HOST_CONTROL2,4,2        ## @SDHCI_HOST_CONTROL2
	.comm	_SDHCI_CMD23_ENABLE,4,2         ## @SDHCI_CMD23_ENABLE
	.comm	_SDHCI_TRNS_AUTO_CMD12,4,2      ## @SDHCI_TRNS_AUTO_CMD12
	.comm	_SDHCI_TRNS_AUTO_CMD23,4,2      ## @SDHCI_TRNS_AUTO_CMD23
	.no_dead_strip	_sdhci_auto_cmd_select
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdhci_auto_cmd_select
_sdhci_auto_cmd_select:                 ; @sdhci_auto_cmd_select
	.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, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x1, [x1, #8]
	bl	_sdhci_auto_cmd12
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _SD_IO_RW_EXTENDED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SD_IO_RW_EXTENDED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, ne
	b	LBB0_3
LBB0_2:
	mov	w8, #0
LBB0_3:
	ldr	x9, [x21, #8]
	ldr	x9, [x9]
	cbz	x9, LBB0_5
; %bb.4:
	ldr	w9, [x20]
Lloh3:
	adrp	x10, _SDHCI_AUTO_CMD23@GOTPAGE
Lloh4:
	ldr	x10, [x10, _SDHCI_AUTO_CMD23@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	cset	w21, ne
	b	LBB0_6
LBB0_5:
	mov	w21, #0
LBB0_6:
	ldr	x9, [x20, #8]
Lloh6:
	adrp	x10, _SDHCI_SPEC_410@GOTPAGE
Lloh7:
	ldr	x10, [x10, _SDHCI_SPEC_410@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	orr	w11, w8, w21
	cmp	x9, x10
	ccmp	w11, #0, #4, ge
	b.ne	LBB0_9
; %bb.7:
	cbz	w8, LBB0_10
; %bb.8:
Lloh9:
	adrp	x8, _SDHCI_TRNS_AUTO_CMD12@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SDHCI_TRNS_AUTO_CMD12@GOTPAGEOFF]
	b	LBB0_12
LBB0_9:
Lloh11:
	adrp	x8, _SDHCI_TRNS_AUTO_SEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SDHCI_TRNS_AUTO_SEL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
Lloh14:
	adrp	x19, _SDHCI_HOST_CONTROL2@GOTPAGE
Lloh15:
	ldr	x19, [x19, _SDHCI_HOST_CONTROL2@GOTPAGEOFF]
	ldr	w1, [x19]
	mov	x0, x20
	bl	_sdhci_readw
Lloh16:
	adrp	x8, _SDHCI_CMD23_ENABLE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SDHCI_CMD23_ENABLE@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	orr	w9, w8, w0
	bic	w8, w0, w8
	cmp	w21, #0
	csel	w1, w9, w8, ne
	ldr	w2, [x19]
	mov	x0, x20
	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	_sdhci_writew
LBB0_10:
	cbz	w21, LBB0_13
; %bb.11:
Lloh19:
	adrp	x8, _SDHCI_TRNS_AUTO_CMD23@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SDHCI_TRNS_AUTO_CMD23@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_SD_IO_RW_EXTENDED,8,3          ; @SD_IO_RW_EXTENDED
	.comm	_SDHCI_AUTO_CMD23,4,2           ; @SDHCI_AUTO_CMD23
	.comm	_SDHCI_SPEC_410,8,3             ; @SDHCI_SPEC_410
	.comm	_SDHCI_TRNS_AUTO_SEL,4,2        ; @SDHCI_TRNS_AUTO_SEL
	.comm	_SDHCI_HOST_CONTROL2,4,2        ; @SDHCI_HOST_CONTROL2
	.comm	_SDHCI_CMD23_ENABLE,4,2         ; @SDHCI_CMD23_ENABLE
	.comm	_SDHCI_TRNS_AUTO_CMD12,4,2      ; @SDHCI_TRNS_AUTO_CMD12
	.comm	_SDHCI_TRNS_AUTO_CMD23,4,2      ; @SDHCI_TRNS_AUTO_CMD23
	.no_dead_strip	_sdhci_auto_cmd_select
.subsections_via_symbols
