	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __sdhci_execute_tuning_9750
___sdhci_execute_tuning_9750:           ## @__sdhci_execute_tuning_9750
	.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, %r12
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_gli_set_9750_rx_inv
	movq	%r12, %rdi
	callq	_sdhci_start_tuning
	movq	_GLI_MAX_TUNING_LOOP@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_7
## %bb.1:
	movq	_SDHCI_HOST_CONTROL2@GOTPCREL(%rip), %r13
	movq	_SDHCI_CTRL_EXEC_TUNING@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_sdhci_send_tuning
	cmpl	$0, 4(%r12)
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_sdhci_readw
	testl	%eax, (%r15)
	je	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	movq	_GLI_MAX_TUNING_LOOP@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jl	LBB0_3
	jmp	LBB0_7
LBB0_4:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_sdhci_abort_tuning
	jmp	LBB0_7
LBB0_6:
	movl	%eax, %ecx
	movq	_SDHCI_CTRL_TUNED_CLK@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	testl	%ecx, (%rdx)
	jne	LBB0_18
LBB0_7:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_gli_set_9750_rx_inv
	movq	%r12, %rdi
	callq	_sdhci_start_tuning
	movq	_GLI_MAX_TUNING_LOOP@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_14
## %bb.8:
	xorl	%ebx, %ebx
	movq	_SDHCI_HOST_CONTROL2@GOTPCREL(%rip), %r15
	movq	_SDHCI_CTRL_EXEC_TUNING@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_sdhci_send_tuning
	cmpl	$0, 4(%r12)
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_sdhci_readw
	testl	%eax, (%r13)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	incl	%ebx
	movq	_GLI_MAX_TUNING_LOOP@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jl	LBB0_9
	jmp	LBB0_14
LBB0_13:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_sdhci_abort_tuning
	jmp	LBB0_14
LBB0_12:
	movl	%eax, %ecx
	movq	_SDHCI_CTRL_TUNED_CLK@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	testl	%ecx, (%rdx)
	jne	LBB0_18
LBB0_14:
	movl	4(%r12), %ebx
	movl	(%r12), %edi
	callq	_mmc_hostname
	testl	%ebx, %ebx
	je	LBB0_15
## %bb.16:
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_info
	movq	%r12, %rdi
	callq	_sdhci_reset_tuning
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
LBB0_15:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_info
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
LBB0_17:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GLI_MAX_TUNING_LOOP,4,2        ## @GLI_MAX_TUNING_LOOP
	.comm	_SDHCI_HOST_CONTROL2,4,2        ## @SDHCI_HOST_CONTROL2
	.comm	_SDHCI_CTRL_EXEC_TUNING,4,2     ## @SDHCI_CTRL_EXEC_TUNING
	.comm	_SDHCI_CTRL_TUNED_CLK,4,2       ## @SDHCI_CTRL_TUNED_CLK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Tuning timeout, falling back to fixed sampling clock\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.1:                               ## @.str.1
	.asciz	"%s: Tuning failed, falling back to fixed sampling clock\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	___sdhci_execute_tuning_9750
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __sdhci_execute_tuning_9750
___sdhci_execute_tuning_9750:           ; @__sdhci_execute_tuning_9750
	.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
	mov	w1, #0
	bl	_gli_set_9750_rx_inv
	mov	x0, x19
	bl	_sdhci_start_tuning
Lloh0:
	adrp	x21, _GLI_MAX_TUNING_LOOP@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GLI_MAX_TUNING_LOOP@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh2:
	adrp	x22, _SDHCI_HOST_CONTROL2@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SDHCI_HOST_CONTROL2@GOTPAGEOFF]
Lloh4:
	adrp	x23, _SDHCI_CTRL_EXEC_TUNING@GOTPAGE
Lloh5:
	ldr	x23, [x23, _SDHCI_CTRL_EXEC_TUNING@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	w24, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_sdhci_send_tuning
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_sdhci_readw
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w24, w24, #1
	ldr	w8, [x21]
	cmp	w24, w8
	b.lt	LBB0_2
	b	LBB0_7
LBB0_5:
	mov	x0, x19
	mov	x1, x20
	bl	_sdhci_abort_tuning
	b	LBB0_7
LBB0_6:
Lloh6:
	adrp	x8, _SDHCI_CTRL_TUNED_CLK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SDHCI_CTRL_TUNED_CLK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_14
LBB0_7:
	mov	x0, x19
	mov	w1, #1
	bl	_gli_set_9750_rx_inv
	mov	x0, x19
	bl	_sdhci_start_tuning
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.8:
	mov	w24, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_sdhci_send_tuning
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_sdhci_readw
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	add	w24, w24, #1
	ldr	w8, [x21]
	cmp	w24, w8
	b.lt	LBB0_9
	b	LBB0_15
LBB0_12:
	mov	x0, x19
	mov	x1, x20
	bl	_sdhci_abort_tuning
	b	LBB0_15
LBB0_13:
Lloh9:
	adrp	x8, _SDHCI_CTRL_TUNED_CLK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SDHCI_CTRL_TUNED_CLK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_15
LBB0_14:
	mov	w0, #0
	b	LBB0_19
LBB0_15:
	ldp	w0, w20, [x19]
	bl	_mmc_hostname
	mov	x1, x0
	cbz	w20, LBB0_17
; %bb.16:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_info
	mov	x0, x19
	bl	_sdhci_reset_tuning
Lloh14:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
Lloh18:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_19:
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GLI_MAX_TUNING_LOOP,4,2        ; @GLI_MAX_TUNING_LOOP
	.comm	_SDHCI_HOST_CONTROL2,4,2        ; @SDHCI_HOST_CONTROL2
	.comm	_SDHCI_CTRL_EXEC_TUNING,4,2     ; @SDHCI_CTRL_EXEC_TUNING
	.comm	_SDHCI_CTRL_TUNED_CLK,4,2       ; @SDHCI_CTRL_TUNED_CLK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Tuning timeout, falling back to fixed sampling clock\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.1:                               ; @.str.1
	.asciz	"%s: Tuning failed, falling back to fixed sampling clock\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	___sdhci_execute_tuning_9750
.subsections_via_symbols
