	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sd_tuning_rx_cmd
_sd_tuning_rx_cmd:                      ## @sd_tuning_rx_cmd
	.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, %r15d
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	movl	%edx, %esi
	movl	$1, %edx
	callq	_sd_change_phase
	movq	_SD_CFG3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SD_RSP_80CLK_TIMEOUT_EN@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	%r14, %rdi
	movl	%ecx, %edx
	callq	_rtsx_pci_write_register
	movl	%r15d, -48(%rbp)
	xorl	%r15d, %r15d
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$64, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movl	$100, %r9d
	callq	_sd_read_data
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_sd_wait_data_idle
	movq	%rbx, %rdi
	callq	_sd_clear_error
	movl	%r12d, %r15d
LBB0_2:
	movq	_SD_CFG3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_rtsx_pci_write_register
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SD_CFG3,4,2                    ## @SD_CFG3
	.comm	_SD_RSP_80CLK_TIMEOUT_EN,4,2    ## @SD_RSP_80CLK_TIMEOUT_EN
	.no_dead_strip	_sd_tuning_rx_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sd_tuning_rx_cmd
_sd_tuning_rx_cmd:                      ; @sd_tuning_rx_cmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x1
	mov	x20, x0
	ldr	x19, [x0]
	mov	x1, x2
	mov	w2, #1
	bl	_sd_change_phase
Lloh0:
	adrp	x23, _SD_CFG3@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SD_CFG3@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh2:
	adrp	x24, _SD_RSP_80CLK_TIMEOUT_EN@GOTPAGE
Lloh3:
	ldr	x24, [x24, _SD_RSP_80CLK_TIMEOUT_EN@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x19
	mov	x3, x2
	bl	_rtsx_pci_write_register
	str	w21, [sp, #8]
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #64
	mov	x3, #0
	mov	w4, #0
	mov	w5, #100
	bl	_sd_read_data
	mov	w21, #0
	tbz	w0, #31, LBB0_2
; %bb.1:
	mov	x22, x0
	mov	x0, x20
	bl	_sd_wait_data_idle
	mov	x0, x20
	bl	_sd_clear_error
	mov	x21, x22
LBB0_2:
	ldr	w1, [x23]
	ldr	w2, [x24]
	mov	x0, x19
	mov	w3, #0
	bl	_rtsx_pci_write_register
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SD_CFG3,4,2                    ; @SD_CFG3
	.comm	_SD_RSP_80CLK_TIMEOUT_EN,4,2    ; @SD_RSP_80CLK_TIMEOUT_EN
	.no_dead_strip	_sd_tuning_rx_cmd
.subsections_via_symbols
