	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function esdhc_executing_tuning
_esdhc_executing_tuning:                ## @esdhc_executing_tuning
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_ESDHC_TUNE_CTRL_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_ESDHC_TUNE_CTRL_MAX@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	cmpl	%eax, %r12d
	jge	LBB0_5
## %bb.1:
	movq	_ESDHC_TUNE_CTRL_STEP@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_esdhc_prepare_tuning
	movl	(%r15), %edi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_mmc_send_tuning
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	addl	(%r13), %r12d
	movl	(%rbx), %eax
	cmpl	%eax, %r12d
	jl	LBB0_2
	jmp	LBB0_5
LBB0_3:
	movl	(%rbx), %eax
LBB0_5:
	movq	_ESDHC_TUNE_CTRL_STEP@GOTPCREL(%rip), %r13
	movl	(%r13), %ebx
	addl	%r12d, %ebx
	cmpl	%eax, %ebx
	jge	LBB0_9
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_esdhc_prepare_tuning
	movl	(%r15), %edi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_mmc_send_tuning
	movl	(%r13), %ecx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	addl	%ecx, %ebx
	movq	_ESDHC_TUNE_CTRL_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jl	LBB0_6
	jmp	LBB0_9
LBB0_7:
	subl	%ecx, %ebx
LBB0_9:
	addl	%r12d, %ebx
	movl	%ebx, %r12d
	shrl	$31, %r12d
	addl	%ebx, %r12d
	sarl	%r12d
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_esdhc_prepare_tuning
	movl	(%r15), %edi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_mmc_send_tuning
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_esdhc_post_tuning
	movl	(%r15), %edi
	callq	_mmc_dev
	testl	%ebx, %ebx
	leaq	L_.str.2(%rip), %rcx
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rcx, %rdx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	%r12d, %ecx
	movl	%ebx, %r8d
	callq	_dev_dbg
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ESDHC_TUNE_CTRL_MIN,4,2        ## @ESDHC_TUNE_CTRL_MIN
	.comm	_ESDHC_TUNE_CTRL_MAX,4,2        ## @ESDHC_TUNE_CTRL_MAX
	.comm	_ESDHC_TUNE_CTRL_STEP,4,2       ## @ESDHC_TUNE_CTRL_STEP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tuning %s at 0x%x ret %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed"

L_.str.2:                               ## @.str.2
	.asciz	"passed"

	.no_dead_strip	_esdhc_executing_tuning
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function esdhc_executing_tuning
_esdhc_executing_tuning:                ; @esdhc_executing_tuning
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _ESDHC_TUNE_CTRL_MIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ESDHC_TUNE_CTRL_MIN@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x23, _ESDHC_TUNE_CTRL_MAX@GOTPAGE
Lloh4:
	ldr	x23, [x23, _ESDHC_TUNE_CTRL_MAX@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh5:
	adrp	x24, _ESDHC_TUNE_CTRL_STEP@GOTPAGE
Lloh6:
	ldr	x24, [x24, _ESDHC_TUNE_CTRL_STEP@GOTPAGEOFF]
	cmp	w21, w8
	b.ge	LBB0_4
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_esdhc_prepare_tuning
	ldr	w0, [x19]
	mov	x1, x20
	mov	x2, #0
	bl	_mmc_send_tuning
	cbz	w0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w9, [x24]
	ldr	w8, [x23]
	add	w21, w9, w21
	cmp	w21, w8
	b.lt	LBB0_1
	b	LBB0_4
LBB0_3:
	ldr	w8, [x23]
LBB0_4:
	ldr	w9, [x24]
	add	w22, w9, w21
	cmp	w22, w8
	b.ge	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_esdhc_prepare_tuning
	ldr	w0, [x19]
	mov	x1, x20
	mov	x2, #0
	bl	_mmc_send_tuning
	ldr	w8, [x24]
	cbnz	w0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x23]
	add	w22, w8, w22
	cmp	w22, w9
	b.lt	LBB0_5
	b	LBB0_8
LBB0_7:
	sub	w22, w22, w8
LBB0_8:
	add	w8, w22, w21
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w21, w8, #1
	mov	x0, x19
	mov	x1, x21
	bl	_esdhc_prepare_tuning
	ldr	w0, [x19]
	mov	x1, x20
	mov	x2, #0
	bl	_mmc_send_tuning
	mov	x20, x0
	mov	x0, x19
	bl	_esdhc_post_tuning
	ldr	w0, [x19]
	bl	_mmc_dev
Lloh7:
	adrp	x8, l_.str.1@PAGE
Lloh8:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh9:
	adrp	x9, l_.str.2@PAGE
Lloh10:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w20, #0
	csel	x2, x9, x8, eq
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x21
	mov	x4, x20
	bl	_dev_dbg
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ESDHC_TUNE_CTRL_MIN,4,2        ; @ESDHC_TUNE_CTRL_MIN
	.comm	_ESDHC_TUNE_CTRL_MAX,4,2        ; @ESDHC_TUNE_CTRL_MAX
	.comm	_ESDHC_TUNE_CTRL_STEP,4,2       ; @ESDHC_TUNE_CTRL_STEP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tuning %s at 0x%x ret %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed"

l_.str.2:                               ; @.str.2
	.asciz	"passed"

	.no_dead_strip	_esdhc_executing_tuning
.subsections_via_symbols
