	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdhci_send_tuning              ## -- Begin function sdhci_send_tuning
	.p2align	4, 0x90
_sdhci_send_tuning:                     ## @sdhci_send_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	32(%rdi), %r13
	movq	$0, -64(%rbp)
	movq	(%rdi), %r15
	leaq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%r12, -72(%rbp)
	movq	_MMC_RSP_R1@GOTPCREL(%rip), %rax
	movq	_MMC_CMD_ADTC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, -64(%rbp)
	leaq	-48(%rbp), %rax
	movq	%rax, -56(%rbp)
	leaq	-72(%rbp), %rax
	movq	%rax, -48(%rbp)
	movq	_MMC_SEND_TUNING_BLOCK_HS200@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	(%r13), %rax
	movq	_MMC_BUS_WIDTH_8@GOTPCREL(%rip), %rcx
	movl	$128, %esi
	cmpq	(%rcx), %rax
	je	LBB0_3
LBB0_2:
	movl	$64, %esi
LBB0_3:
	movq	%r15, %rdi
	callq	_SDHCI_MAKE_BLKSZ
	movq	_SDHCI_BLOCK_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_sdhci_writew
	movq	_SDHCI_TRNS_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SDHCI_TRANSFER_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_sdhci_writew
	leaq	-72(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_sdhci_send_command
	movq	$0, 24(%rbx)
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_sdhci_del_timer
	movl	$0, 8(%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	12(%rbx), %r14d
	xorl	%r15d, %r15d
	cmpl	$1, 8(%rbx)
	sete	%r15b
	movl	$50, %edi
	callq	_msecs_to_jiffies
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_wait_event_timeout
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_RSP_R1,4,2                 ## @MMC_RSP_R1
	.comm	_MMC_CMD_ADTC,4,2               ## @MMC_CMD_ADTC
	.comm	_MMC_SEND_TUNING_BLOCK_HS200,8,3 ## @MMC_SEND_TUNING_BLOCK_HS200
	.comm	_MMC_BUS_WIDTH_8,8,3            ## @MMC_BUS_WIDTH_8
	.comm	_SDHCI_BLOCK_SIZE,4,2           ## @SDHCI_BLOCK_SIZE
	.comm	_SDHCI_TRNS_READ,4,2            ## @SDHCI_TRNS_READ
	.comm	_SDHCI_TRANSFER_MODE,4,2        ## @SDHCI_TRANSFER_MODE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdhci_send_tuning              ; -- Begin function sdhci_send_tuning
	.p2align	2
_sdhci_send_tuning:                     ; @sdhci_send_tuning
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x1
	mov	x19, x0
	ldr	x23, [x0, #32]
	str	xzr, [sp, #16]
	ldr	x21, [x0]
	add	x20, x0, #16
	mov	x0, x20
	bl	_spin_lock_irqsave
	str	x22, [sp, #8]
Lloh0:
	adrp	x8, _MMC_RSP_R1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMC_RSP_R1@GOTPAGEOFF]
Lloh2:
	adrp	x9, _MMC_CMD_ADTC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MMC_CMD_ADTC@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [sp, #16]
	mov	x8, sp
	str	x8, [sp, #24]
	add	x8, sp, #8
	str	x8, [sp]
Lloh6:
	adrp	x8, _MMC_SEND_TUNING_BLOCK_HS200@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MMC_SEND_TUNING_BLOCK_HS200@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x8, x22
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x23]
Lloh9:
	adrp	x9, _MMC_BUS_WIDTH_8@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MMC_BUS_WIDTH_8@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	mov	w1, #128
	b	LBB0_4
LBB0_3:
	mov	w1, #64
LBB0_4:
	mov	x0, x21
	bl	_SDHCI_MAKE_BLKSZ
	mov	x1, x0
Lloh12:
	adrp	x8, _SDHCI_BLOCK_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SDHCI_BLOCK_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_sdhci_writew
Lloh15:
	adrp	x8, _SDHCI_TRNS_READ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SDHCI_TRNS_READ@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _SDHCI_TRANSFER_MODE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SDHCI_TRANSFER_MODE@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_sdhci_writew
	add	x1, sp, #8
	mov	x0, x19
	bl	_sdhci_send_command
	str	xzr, [x19, #24]
	mov	x1, sp
	mov	x0, x19
	bl	_sdhci_del_timer
	str	wzr, [x19, #8]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldp	w8, w20, [x19, #8]
	cmp	w8, #1
	cset	w19, eq
	mov	w0, #50
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	bl	_wait_event_timeout
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_RSP_R1,4,2                 ; @MMC_RSP_R1
	.comm	_MMC_CMD_ADTC,4,2               ; @MMC_CMD_ADTC
	.comm	_MMC_SEND_TUNING_BLOCK_HS200,8,3 ; @MMC_SEND_TUNING_BLOCK_HS200
	.comm	_MMC_BUS_WIDTH_8,8,3            ; @MMC_BUS_WIDTH_8
	.comm	_SDHCI_BLOCK_SIZE,4,2           ; @SDHCI_BLOCK_SIZE
	.comm	_SDHCI_TRNS_READ,4,2            ; @SDHCI_TRNS_READ
	.comm	_SDHCI_TRANSFER_MODE,4,2        ; @SDHCI_TRANSFER_MODE
.subsections_via_symbols
