	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sd_select_driver_type
_sd_select_driver_type:                 ## @sd_select_driver_type
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movl	$0, (%rdi)
	movq	_SD_DRIVER_TYPE_B@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	8(%rdi), %edx
	movl	12(%rdi), %esi
	leaq	-36(%rbp), %rcx
	callq	_mmc_select_drive_strength
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movl	%eax, %r15d
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$2, %edx
	movl	%eax, %ecx
	movq	%r14, %r8
	callq	_mmc_sd_switch
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.2:
	movl	60(%r14), %eax
	andl	$15, %eax
	cmpl	%r15d, %eax
	jne	LBB0_3
## %bb.4:
	movl	%r15d, (%rbx)
LBB0_5:
	movl	-36(%rbp), %esi
	xorl	%r12d, %r12d
	testl	%esi, %esi
	je	LBB0_7
## %bb.6:
	movl	4(%rbx), %edi
	callq	_mmc_set_driver_type
	jmp	LBB0_7
LBB0_3:
	movl	4(%rbx), %edi
	callq	_mmc_hostname
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_warn
	xorl	%r12d, %r12d
LBB0_7:
	movl	%r12d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SD_DRIVER_TYPE_B,4,2           ## @SD_DRIVER_TYPE_B
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Problem setting drive strength!\n"

	.no_dead_strip	_sd_select_driver_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sd_select_driver_type
_sd_select_driver_type:                 ; @sd_select_driver_type
	.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, x1
	mov	x19, x0
	str	wzr, [x0]
Lloh0:
	adrp	x8, _SD_DRIVER_TYPE_B@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SD_DRIVER_TYPE_B@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldp	w9, w1, [x0, #8]
	orr	w2, w8, w9
	add	x3, sp, #12
	bl	_mmc_select_drive_strength
	cbz	w0, LBB0_4
; %bb.1:
	mov	x21, x0
	mov	x0, x19
	mov	w1, #1
	mov	w2, #2
	mov	x3, x21
	mov	x4, x20
	bl	_mmc_sd_switch
	cbnz	w0, LBB0_8
; %bb.2:
	ldr	w8, [x20, #60]
	and	w8, w8, #0xf
	cmp	w8, w21
	b.ne	LBB0_6
; %bb.3:
	str	w21, [x19]
LBB0_4:
	ldr	w1, [sp, #12]
	cbz	w1, LBB0_7
; %bb.5:
	ldr	w0, [x19, #4]
	bl	_mmc_set_driver_type
	b	LBB0_7
LBB0_6:
	ldr	w0, [x19, #4]
	bl	_mmc_hostname
	mov	x1, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
LBB0_7:
	mov	w0, #0
LBB0_8:
	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 AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_SD_DRIVER_TYPE_B,4,2           ; @SD_DRIVER_TYPE_B
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Problem setting drive strength!\n"

	.no_dead_strip	_sd_select_driver_type
.subsections_via_symbols
