	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aml8726_sdxc_start_command
_aml8726_sdxc_start_command:            ## @aml8726_sdxc_start_command
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	callq	_AML_SDXC_LOCK_ASSERT
	movq	_MMC_ERR_INVALID@GOTPCREL(%rip), %r15
	cmpl	$63, (%r14)
	jg	LBB0_21
## %bb.1:
	movq	%r13, %rdi
	callq	_aml8726_sdxc_soft_reset
	movl	(%r14), %eax
	movl	4(%r14), %edx
	movq	_MMC_RSP_136@GOTPCREL(%rip), %rcx
	testl	%edx, (%rcx)
	je	LBB0_3
## %bb.2:
	movq	_AML_SDXC_SEND_CMD_HAS_RESP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%eax, %ecx
	movq	_AML_SDXC_SEND_RESP_136@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ecx
	movq	_AML_SDXC_SEND_RESP_NO_CRC7_CHECK@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ecx
	jmp	LBB0_5
LBB0_3:
	movq	_MMC_RSP_PRESENT@GOTPCREL(%rip), %rsi
	movl	%eax, %ecx
	testl	%edx, (%rsi)
	je	LBB0_5
## %bb.4:
	movq	_AML_SDXC_SEND_CMD_HAS_RESP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%eax, %ecx
LBB0_5:
	movq	_MMC_RSP_CRC@GOTPCREL(%rip), %rdi
	xorl	%esi, %esi
	movl	$0, %ebx
	andl	(%rdi), %edx
	jne	LBB0_7
## %bb.6:
	movq	_AML_SDXC_SEND_RESP_NO_CRC7_CHECK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
LBB0_7:
	movq	_MMC_STOP_TRANSMISSION@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	jne	LBB0_9
## %bb.8:
	movq	_AML_SDXC_SEND_DATA_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_9:
	orl	%esi, %ecx
	orl	%ecx, %ebx
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movq	16(%r14), %rbx
	movq	$0, -96(%rbp)
	movq	_AML_SDXC_CNTRL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_CSR_READ_4
	movl	%eax, %ecx
	movq	_AML_SDXC_IRQ_ENABLE_STANDARD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AML_SDXC_CMD_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_AML_SDXC_CNTRL_PKG_LEN_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r12d
	notl	%r12d
	andl	%ecx, %r12d
	testq	%rbx, %rbx
	je	LBB0_19
## %bb.10:
	movl	(%rbx), %r10d
	testl	%r10d, %r10d
	je	LBB0_19
## %bb.11:
	movl	4(%rbx), %edi
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rdx
	movq	_MMC_DATA_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movl	(%rdx), %ecx
	orl	%r8d, %ecx
	testl	%edi, %ecx
	je	LBB0_19
## %bb.12:
	movq	_MMC_DATA_MULTI@GOTPCREL(%rip), %rax
	movl	%r10d, %ecx
	testl	%edi, (%rax)
	je	LBB0_14
## %bb.13:
	movq	_MMC_SECTOR_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r10d, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	LBB0_21
LBB0_14:
	cmpl	$512, %ecx                      ## imm = 0x200
	jg	LBB0_21
## %bb.15:
	movl	%edi, -80(%rbp)                 ## 4-byte Spill
	movl	%r8d, -84(%rbp)                 ## 4-byte Spill
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	_AML_SDXC_SEND_CMD_HAS_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)                 ## 4-byte Spill
	movq	_AML_SDXC_SEND_DATA_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movq	_AML_SDXC_SEND_REP_PKG_CNT_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movq	_AML_SDXC_CNTRL_PKG_LEN_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movq	_AML_SDXC_IRQ_ENABLE_RESP_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	(%r13), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	32(%r13), %esi
	movq	_AML_SDXC_IRQ_ENABLE_DMA_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	_AML_SDXC_IRQ_ENABLE_TRANSFER_DONE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	36(%r13), %edi
	movl	8(%rbx), %edx
	movq	_aml8726_sdxc_mapmem@GOTPCREL(%rip), %rax
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	movl	(%rax), %r8d
	movq	_BUS_DMA_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	leaq	-96(%rbp), %r9
	movl	%r10d, %ecx
	movl	%r10d, %ebx
	callq	_bus_dmamap_load
	testl	%eax, %eax
	je	LBB0_22
## %bb.16:
	movq	_MMC_ERR_NO_MEMORY@GOTPCREL(%rip), %r15
	jmp	LBB0_21
LBB0_19:
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
LBB0_20:
	movq	%r14, 24(%r13)
	movq	_MMC_ERR_NONE@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	movl	%ecx, 8(%r14)
	movq	$0, 16(%r13)
	movl	%ecx, 8(%r13)
	movq	_AML_SDXC_MAX_TIMEOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	cmpl	%edi, %eax
	cmovll	%eax, %edi
	leaq	4(%r13), %rbx
	callq	_msecs_to_ticks
	movq	_aml8726_sdxc_timeout@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	movq	%r13, %rcx
	callq	_callout_reset
	movq	_AML_SDXC_IRQ_ENABLE_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_CSR_WRITE_4
	movq	_AML_SDXC_CNTRL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_CSR_WRITE_4
	movq	_AML_SDXC_DMA_ADDR_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-96(%rbp), %edx
	movq	%r13, %rdi
	callq	_CSR_WRITE_4
	movq	_AML_SDXC_CMD_ARGUMENT_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%r14), %edx
	movq	%r13, %rdi
	callq	_CSR_WRITE_4
	movq	%r13, %rdi
	callq	_aml8726_sdxc_engage_dma
	movq	_AML_SDXC_SEND_REG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_CSR_WRITE_4
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_CSR_BARRIER
LBB0_21:
	movl	(%r15), %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movl	-84(%rbp), %eax                 ## 4-byte Reload
	andl	-80(%rbp), %eax                 ## 4-byte Folded Reload
	movl	-72(%rbp), %edx                 ## 4-byte Reload
	cmovel	%eax, %edx
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	cmovnel	%eax, %r15d
	cmpl	$1, -56(%rbp)                   ## 4-byte Folded Reload
	cmovel	%eax, %r15d
	movl	-64(%rbp), %ecx                 ## 4-byte Reload
	notl	%ecx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	andl	%ecx, %eax
	orl	%r15d, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	cmpl	$512, %ecx                      ## imm = 0x200
	cmovnel	%ecx, %eax
	movl	%ecx, %edi
	movl	-68(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	orl	%eax, %r12d
	movl	-88(%rbp), %esi                 ## 4-byte Reload
	orl	-48(%rbp), %esi                 ## 4-byte Folded Reload
	orl	%edx, %esi
	movl	%ebx, %eax
	cltd
	idivl	%edi
	decl	%eax
	movl	-76(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	orl	%esi, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	andl	4(%rbx), %eax
	movl	32(%r13), %esi
	movl	36(%r13), %edi
	movq	_BUS_DMASYNC_PREREAD@GOTPCREL(%rip), %rax
	cmoveq	_BUS_DMASYNC_PREWRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_AML_SDXC_READ_TIMEOUT@GOTPCREL(%rip), %r15
	cmoveq	_AML_SDXC_WRITE_TIMEOUT@GOTPCREL(%rip), %r15
	callq	_bus_dmamap_sync
	movl	(%rbx), %eax
	cltd
	idivl	-52(%rbp)                       ## 4-byte Folded Reload
	imull	(%r15), %eax
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_ERR_INVALID,4,2            ## @MMC_ERR_INVALID
	.comm	_MMC_RSP_136,4,2                ## @MMC_RSP_136
	.comm	_AML_SDXC_SEND_CMD_HAS_RESP,4,2 ## @AML_SDXC_SEND_CMD_HAS_RESP
	.comm	_AML_SDXC_SEND_RESP_136,4,2     ## @AML_SDXC_SEND_RESP_136
	.comm	_AML_SDXC_SEND_RESP_NO_CRC7_CHECK,4,2 ## @AML_SDXC_SEND_RESP_NO_CRC7_CHECK
	.comm	_MMC_RSP_PRESENT,4,2            ## @MMC_RSP_PRESENT
	.comm	_MMC_RSP_CRC,4,2                ## @MMC_RSP_CRC
	.comm	_MMC_STOP_TRANSMISSION,4,2      ## @MMC_STOP_TRANSMISSION
	.comm	_AML_SDXC_SEND_DATA_STOP,4,2    ## @AML_SDXC_SEND_DATA_STOP
	.comm	_AML_SDXC_CNTRL_REG,4,2         ## @AML_SDXC_CNTRL_REG
	.comm	_AML_SDXC_IRQ_ENABLE_STANDARD,4,2 ## @AML_SDXC_IRQ_ENABLE_STANDARD
	.comm	_AML_SDXC_CMD_TIMEOUT,4,2       ## @AML_SDXC_CMD_TIMEOUT
	.comm	_AML_SDXC_CNTRL_PKG_LEN_MASK,4,2 ## @AML_SDXC_CNTRL_PKG_LEN_MASK
	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
	.comm	_MMC_DATA_WRITE,4,2             ## @MMC_DATA_WRITE
	.comm	_MMC_DATA_MULTI,4,2             ## @MMC_DATA_MULTI
	.comm	_MMC_SECTOR_SIZE,4,2            ## @MMC_SECTOR_SIZE
	.comm	_AML_SDXC_SEND_CMD_HAS_DATA,4,2 ## @AML_SDXC_SEND_CMD_HAS_DATA
	.comm	_AML_SDXC_SEND_DATA_WRITE,4,2   ## @AML_SDXC_SEND_DATA_WRITE
	.comm	_AML_SDXC_SEND_REP_PKG_CNT_SHIFT,4,2 ## @AML_SDXC_SEND_REP_PKG_CNT_SHIFT
	.comm	_AML_SDXC_CNTRL_PKG_LEN_SHIFT,4,2 ## @AML_SDXC_CNTRL_PKG_LEN_SHIFT
	.comm	_AML_SDXC_IRQ_ENABLE_RESP_OK,4,2 ## @AML_SDXC_IRQ_ENABLE_RESP_OK
	.comm	_AML_SDXC_IRQ_ENABLE_DMA_DONE,4,2 ## @AML_SDXC_IRQ_ENABLE_DMA_DONE
	.comm	_AML_SDXC_IRQ_ENABLE_TRANSFER_DONE_OK,4,2 ## @AML_SDXC_IRQ_ENABLE_TRANSFER_DONE_OK
	.comm	_aml8726_sdxc_mapmem,4,2        ## @aml8726_sdxc_mapmem
	.comm	_BUS_DMA_NOWAIT,4,2             ## @BUS_DMA_NOWAIT
	.comm	_MMC_ERR_NO_MEMORY,4,2          ## @MMC_ERR_NO_MEMORY
	.comm	_BUS_DMASYNC_PREREAD,4,2        ## @BUS_DMASYNC_PREREAD
	.comm	_AML_SDXC_READ_TIMEOUT,4,2      ## @AML_SDXC_READ_TIMEOUT
	.comm	_BUS_DMASYNC_PREWRITE,4,2       ## @BUS_DMASYNC_PREWRITE
	.comm	_AML_SDXC_WRITE_TIMEOUT,4,2     ## @AML_SDXC_WRITE_TIMEOUT
	.comm	_MMC_ERR_NONE,4,2               ## @MMC_ERR_NONE
	.comm	_AML_SDXC_MAX_TIMEOUT,4,2       ## @AML_SDXC_MAX_TIMEOUT
	.comm	_aml8726_sdxc_timeout,4,2       ## @aml8726_sdxc_timeout
	.comm	_AML_SDXC_IRQ_ENABLE_REG,4,2    ## @AML_SDXC_IRQ_ENABLE_REG
	.comm	_AML_SDXC_DMA_ADDR_REG,4,2      ## @AML_SDXC_DMA_ADDR_REG
	.comm	_AML_SDXC_CMD_ARGUMENT_REG,4,2  ## @AML_SDXC_CMD_ARGUMENT_REG
	.comm	_AML_SDXC_SEND_REG,4,2          ## @AML_SDXC_SEND_REG
	.no_dead_strip	_aml8726_sdxc_start_command
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aml8726_sdxc_start_command
_aml8726_sdxc_start_command:            ; @aml8726_sdxc_start_command
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
	bl	_AML_SDXC_LOCK_ASSERT
	ldr	w8, [x20]
	cmp	w8, #63
	b.le	LBB0_2
LBB0_1:
Lloh0:
	adrp	x26, _MMC_ERR_INVALID@GOTPAGE
Lloh1:
	ldr	x26, [x26, _MMC_ERR_INVALID@GOTPAGEOFF]
	b	LBB0_17
LBB0_2:
	mov	x0, x19
	bl	_aml8726_sdxc_soft_reset
	ldp	w8, w9, [x20]
Lloh2:
	adrp	x10, _MMC_RSP_136@GOTPAGE
Lloh3:
	ldr	x10, [x10, _MMC_RSP_136@GOTPAGEOFF]
Lloh4:
	ldr	w11, [x10]
Lloh5:
	adrp	x10, _AML_SDXC_SEND_RESP_NO_CRC7_CHECK@GOTPAGE
Lloh6:
	ldr	x10, [x10, _AML_SDXC_SEND_RESP_NO_CRC7_CHECK@GOTPAGEOFF]
	tst	w11, w9
	b.eq	LBB0_4
; %bb.3:
Lloh7:
	adrp	x11, _AML_SDXC_SEND_CMD_HAS_RESP@GOTPAGE
Lloh8:
	ldr	x11, [x11, _AML_SDXC_SEND_CMD_HAS_RESP@GOTPAGEOFF]
Lloh9:
	ldr	w11, [x11]
	orr	w11, w11, w8
Lloh10:
	adrp	x12, _AML_SDXC_SEND_RESP_136@GOTPAGE
Lloh11:
	ldr	x12, [x12, _AML_SDXC_SEND_RESP_136@GOTPAGEOFF]
Lloh12:
	ldr	w12, [x12]
	orr	w11, w11, w12
	ldr	w12, [x10]
	orr	w11, w11, w12
	b	LBB0_7
LBB0_4:
Lloh13:
	adrp	x11, _MMC_RSP_PRESENT@GOTPAGE
Lloh14:
	ldr	x11, [x11, _MMC_RSP_PRESENT@GOTPAGEOFF]
Lloh15:
	ldr	w11, [x11]
	tst	w11, w9
	b.eq	LBB0_6
; %bb.5:
Lloh16:
	adrp	x11, _AML_SDXC_SEND_CMD_HAS_RESP@GOTPAGE
Lloh17:
	ldr	x11, [x11, _AML_SDXC_SEND_CMD_HAS_RESP@GOTPAGEOFF]
Lloh18:
	ldr	w11, [x11]
	orr	w11, w11, w8
	b	LBB0_7
LBB0_6:
	mov	x11, x8
LBB0_7:
Lloh19:
	adrp	x12, _MMC_RSP_CRC@GOTPAGE
Lloh20:
	ldr	x12, [x12, _MMC_RSP_CRC@GOTPAGEOFF]
Lloh21:
	ldr	w12, [x12]
	ldr	w10, [x10]
	tst	w12, w9
	csel	w9, w10, wzr, eq
	orr	w9, w9, w11
Lloh22:
	adrp	x10, _MMC_STOP_TRANSMISSION@GOTPAGE
Lloh23:
	ldr	x10, [x10, _MMC_STOP_TRANSMISSION@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
Lloh25:
	adrp	x11, _AML_SDXC_SEND_DATA_STOP@GOTPAGE
Lloh26:
	ldr	x11, [x11, _AML_SDXC_SEND_DATA_STOP@GOTPAGEOFF]
Lloh27:
	ldr	w11, [x11]
	cmp	w8, w10
	csel	w8, w11, wzr, eq
	orr	w21, w9, w8
	ldr	x26, [x20, #16]
	str	xzr, [sp, #40]
Lloh28:
	adrp	x28, _AML_SDXC_CNTRL_REG@GOTPAGE
Lloh29:
	ldr	x28, [x28, _AML_SDXC_CNTRL_REG@GOTPAGEOFF]
	ldr	w1, [x28]
	mov	x0, x19
	bl	_CSR_READ_4
Lloh30:
	adrp	x8, _AML_SDXC_IRQ_ENABLE_STANDARD@GOTPAGE
Lloh31:
	ldr	x8, [x8, _AML_SDXC_IRQ_ENABLE_STANDARD@GOTPAGEOFF]
Lloh32:
	adrp	x9, _AML_SDXC_CMD_TIMEOUT@GOTPAGE
Lloh33:
	ldr	x9, [x9, _AML_SDXC_CMD_TIMEOUT@GOTPAGEOFF]
Lloh34:
	ldr	w23, [x8]
Lloh35:
	ldr	w8, [x9]
Lloh36:
	adrp	x9, _AML_SDXC_CNTRL_PKG_LEN_MASK@GOTPAGE
Lloh37:
	ldr	x9, [x9, _AML_SDXC_CNTRL_PKG_LEN_MASK@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	bic	w22, w0, w9
	cbz	x26, LBB0_16
; %bb.8:
	ldr	w24, [x26]
	cbz	w24, LBB0_16
; %bb.9:
	ldr	w27, [x26, #4]
Lloh39:
	adrp	x9, _MMC_DATA_READ@GOTPAGE
Lloh40:
	ldr	x9, [x9, _MMC_DATA_READ@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
Lloh42:
	adrp	x10, _MMC_DATA_WRITE@GOTPAGE
Lloh43:
	ldr	x10, [x10, _MMC_DATA_WRITE@GOTPAGEOFF]
Lloh44:
	ldr	w25, [x10]
	orr	w9, w25, w9
	tst	w9, w27
	b.eq	LBB0_16
; %bb.10:
Lloh45:
	adrp	x8, _MMC_DATA_MULTI@GOTPAGE
Lloh46:
	ldr	x8, [x8, _MMC_DATA_MULTI@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	mov	x28, x24
	tst	w8, w27
	b.eq	LBB0_12
; %bb.11:
Lloh48:
	adrp	x8, _MMC_SECTOR_SIZE@GOTPAGE
Lloh49:
	ldr	x8, [x8, _MMC_SECTOR_SIZE@GOTPAGEOFF]
Lloh50:
	ldr	w28, [x8]
	sdiv	w8, w24, w28
	msub	w8, w8, w28, w24
	cbnz	w8, LBB0_1
LBB0_12:
	cmp	w28, #512
	b.gt	LBB0_1
; %bb.13:
Lloh51:
	adrp	x8, _AML_SDXC_SEND_CMD_HAS_DATA@GOTPAGE
Lloh52:
	ldr	x8, [x8, _AML_SDXC_SEND_CMD_HAS_DATA@GOTPAGEOFF]
Lloh53:
	ldr	w8, [x8]
	str	w8, [sp, #36]                   ; 4-byte Folded Spill
Lloh54:
	adrp	x8, _AML_SDXC_SEND_DATA_WRITE@GOTPAGE
Lloh55:
	ldr	x8, [x8, _AML_SDXC_SEND_DATA_WRITE@GOTPAGEOFF]
Lloh56:
	adrp	x9, _AML_SDXC_SEND_REP_PKG_CNT_SHIFT@GOTPAGE
Lloh57:
	ldr	x9, [x9, _AML_SDXC_SEND_REP_PKG_CNT_SHIFT@GOTPAGEOFF]
Lloh58:
	ldr	w8, [x8]
	str	w8, [sp, #24]                   ; 4-byte Folded Spill
Lloh59:
	ldr	w8, [x9]
	str	w8, [sp, #32]                   ; 4-byte Folded Spill
Lloh60:
	adrp	x8, _AML_SDXC_CNTRL_PKG_LEN_SHIFT@GOTPAGE
Lloh61:
	ldr	x8, [x8, _AML_SDXC_CNTRL_PKG_LEN_SHIFT@GOTPAGEOFF]
Lloh62:
	adrp	x9, _AML_SDXC_IRQ_ENABLE_RESP_OK@GOTPAGE
Lloh63:
	ldr	x9, [x9, _AML_SDXC_IRQ_ENABLE_RESP_OK@GOTPAGEOFF]
Lloh64:
	ldr	w8, [x8]
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
Lloh65:
	ldr	w10, [x9]
	ldr	w8, [x19]
	stp	w8, w10, [sp, #16]              ; 8-byte Folded Spill
Lloh66:
	adrp	x8, _AML_SDXC_IRQ_ENABLE_DMA_DONE@GOTPAGE
Lloh67:
	ldr	x8, [x8, _AML_SDXC_IRQ_ENABLE_DMA_DONE@GOTPAGEOFF]
Lloh68:
	ldr	w8, [x8]
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
Lloh69:
	adrp	x8, _AML_SDXC_IRQ_ENABLE_TRANSFER_DONE_OK@GOTPAGE
Lloh70:
	ldr	x8, [x8, _AML_SDXC_IRQ_ENABLE_TRANSFER_DONE_OK@GOTPAGEOFF]
Lloh71:
	ldr	w8, [x8]
	str	w8, [sp, #8]                    ; 4-byte Folded Spill
	ldp	w1, w0, [x19, #32]
	ldr	w2, [x26, #8]
Lloh72:
	adrp	x8, _aml8726_sdxc_mapmem@GOTPAGE
Lloh73:
	ldr	x8, [x8, _aml8726_sdxc_mapmem@GOTPAGEOFF]
Lloh74:
	ldr	w4, [x8]
Lloh75:
	adrp	x8, _BUS_DMA_NOWAIT@GOTPAGE
Lloh76:
	ldr	x8, [x8, _BUS_DMA_NOWAIT@GOTPAGEOFF]
Lloh77:
	ldr	w6, [x8]
	add	x5, sp, #40
	mov	x3, x24
	bl	_bus_dmamap_load
	cbz	w0, LBB0_15
; %bb.14:
Lloh78:
	adrp	x26, _MMC_ERR_NO_MEMORY@GOTPAGE
Lloh79:
	ldr	x26, [x26, _MMC_ERR_NO_MEMORY@GOTPAGEOFF]
	b	LBB0_17
LBB0_15:
	tst	w25, w27
	ldr	w8, [sp, #24]                   ; 4-byte Folded Reload
	csel	w8, wzr, w8, eq
	ldr	w9, [sp, #16]                   ; 4-byte Folded Reload
	ccmp	w9, #1, #4, eq
	ldp	w10, w9, [sp, #8]               ; 8-byte Folded Reload
	csel	w9, w9, w10, eq
	ldr	w10, [sp, #20]                  ; 4-byte Folded Reload
	bic	w10, w23, w10
	orr	w23, w9, w10
	cmp	w28, #512
	csel	w9, wzr, w28, eq
	ldr	w10, [sp, #28]                  ; 4-byte Folded Reload
	lsl	w9, w9, w10
	orr	w22, w9, w22
	ldp	w10, w9, [sp, #32]              ; 8-byte Folded Reload
	orr	w9, w9, w21
	orr	w8, w9, w8
	sdiv	w9, w24, w28
	sub	w9, w9, #1
	lsl	w9, w9, w10
	orr	w21, w8, w9
	ldr	w8, [x26, #4]
Lloh80:
	adrp	x9, _MMC_DATA_READ@GOTPAGE
Lloh81:
	ldr	x9, [x9, _MMC_DATA_READ@GOTPAGEOFF]
Lloh82:
	ldr	w9, [x9]
Lloh83:
	adrp	x10, _BUS_DMASYNC_PREWRITE@GOTPAGE
Lloh84:
	ldr	x10, [x10, _BUS_DMASYNC_PREWRITE@GOTPAGEOFF]
	ldp	w1, w0, [x19, #32]
Lloh85:
	adrp	x11, _BUS_DMASYNC_PREREAD@GOTPAGE
Lloh86:
	ldr	x11, [x11, _BUS_DMASYNC_PREREAD@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x10, x11, eq
	ldr	w2, [x8]
Lloh87:
	adrp	x8, _AML_SDXC_WRITE_TIMEOUT@GOTPAGE
Lloh88:
	ldr	x8, [x8, _AML_SDXC_WRITE_TIMEOUT@GOTPAGEOFF]
Lloh89:
	adrp	x9, _AML_SDXC_READ_TIMEOUT@GOTPAGE
Lloh90:
	ldr	x9, [x9, _AML_SDXC_READ_TIMEOUT@GOTPAGEOFF]
	csel	x24, x8, x9, eq
	bl	_bus_dmamap_sync
	ldr	w8, [x24]
	ldr	w9, [x26]
	sdiv	w9, w9, w28
	mul	w8, w9, w8
Lloh91:
	adrp	x28, _AML_SDXC_CNTRL_REG@GOTPAGE
Lloh92:
	ldr	x28, [x28, _AML_SDXC_CNTRL_REG@GOTPAGEOFF]
LBB0_16:
Lloh93:
	adrp	x26, _MMC_ERR_NONE@GOTPAGE
Lloh94:
	ldr	x26, [x26, _MMC_ERR_NONE@GOTPAGEOFF]
	ldr	w9, [x26]
	str	w9, [x20, #8]
	stp	xzr, x20, [x19, #16]
	str	w9, [x19, #8]
Lloh95:
	adrp	x9, _AML_SDXC_MAX_TIMEOUT@GOTPAGE
Lloh96:
	ldr	x9, [x9, _AML_SDXC_MAX_TIMEOUT@GOTPAGEOFF]
Lloh97:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w0, w8, w9, lt
	add	x24, x19, #4
	bl	_msecs_to_ticks
	mov	x1, x0
Lloh98:
	adrp	x8, _aml8726_sdxc_timeout@GOTPAGE
Lloh99:
	ldr	x8, [x8, _aml8726_sdxc_timeout@GOTPAGEOFF]
Lloh100:
	ldr	w2, [x8]
	mov	x0, x24
	mov	x3, x19
	bl	_callout_reset
Lloh101:
	adrp	x8, _AML_SDXC_IRQ_ENABLE_REG@GOTPAGE
Lloh102:
	ldr	x8, [x8, _AML_SDXC_IRQ_ENABLE_REG@GOTPAGEOFF]
Lloh103:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x23
	bl	_CSR_WRITE_4
	ldr	w1, [x28]
	mov	x0, x19
	mov	x2, x22
	bl	_CSR_WRITE_4
Lloh104:
	adrp	x8, _AML_SDXC_DMA_ADDR_REG@GOTPAGE
Lloh105:
	ldr	x8, [x8, _AML_SDXC_DMA_ADDR_REG@GOTPAGEOFF]
Lloh106:
	ldr	w1, [x8]
	ldr	w2, [sp, #40]
	mov	x0, x19
	bl	_CSR_WRITE_4
Lloh107:
	adrp	x8, _AML_SDXC_CMD_ARGUMENT_REG@GOTPAGE
Lloh108:
	ldr	x8, [x8, _AML_SDXC_CMD_ARGUMENT_REG@GOTPAGEOFF]
Lloh109:
	ldr	w1, [x8]
	ldr	w2, [x20, #12]
	mov	x0, x19
	bl	_CSR_WRITE_4
	mov	x0, x19
	bl	_aml8726_sdxc_engage_dma
Lloh110:
	adrp	x20, _AML_SDXC_SEND_REG@GOTPAGE
Lloh111:
	ldr	x20, [x20, _AML_SDXC_SEND_REG@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	x2, x21
	bl	_CSR_WRITE_4
	ldr	w1, [x20]
	mov	x0, x19
	bl	_CSR_BARRIER
LBB0_17:
	ldr	w0, [x26]
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh34
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh75, Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh65
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh64
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh59
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh58
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh78, Lloh79
	.loh AdrpLdrGot	Lloh91, Lloh92
	.loh AdrpLdrGot	Lloh89, Lloh90
	.loh AdrpLdrGot	Lloh87, Lloh88
	.loh AdrpLdrGot	Lloh85, Lloh86
	.loh AdrpLdrGot	Lloh83, Lloh84
	.loh AdrpLdrGotLdr	Lloh80, Lloh81, Lloh82
	.loh AdrpLdrGot	Lloh110, Lloh111
	.loh AdrpLdrGotLdr	Lloh107, Lloh108, Lloh109
	.loh AdrpLdrGotLdr	Lloh104, Lloh105, Lloh106
	.loh AdrpLdrGotLdr	Lloh101, Lloh102, Lloh103
	.loh AdrpLdrGotLdr	Lloh98, Lloh99, Lloh100
	.loh AdrpLdrGotLdr	Lloh95, Lloh96, Lloh97
	.loh AdrpLdrGot	Lloh93, Lloh94
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_ERR_INVALID,4,2            ; @MMC_ERR_INVALID
	.comm	_MMC_RSP_136,4,2                ; @MMC_RSP_136
	.comm	_AML_SDXC_SEND_CMD_HAS_RESP,4,2 ; @AML_SDXC_SEND_CMD_HAS_RESP
	.comm	_AML_SDXC_SEND_RESP_136,4,2     ; @AML_SDXC_SEND_RESP_136
	.comm	_AML_SDXC_SEND_RESP_NO_CRC7_CHECK,4,2 ; @AML_SDXC_SEND_RESP_NO_CRC7_CHECK
	.comm	_MMC_RSP_PRESENT,4,2            ; @MMC_RSP_PRESENT
	.comm	_MMC_RSP_CRC,4,2                ; @MMC_RSP_CRC
	.comm	_MMC_STOP_TRANSMISSION,4,2      ; @MMC_STOP_TRANSMISSION
	.comm	_AML_SDXC_SEND_DATA_STOP,4,2    ; @AML_SDXC_SEND_DATA_STOP
	.comm	_AML_SDXC_CNTRL_REG,4,2         ; @AML_SDXC_CNTRL_REG
	.comm	_AML_SDXC_IRQ_ENABLE_STANDARD,4,2 ; @AML_SDXC_IRQ_ENABLE_STANDARD
	.comm	_AML_SDXC_CMD_TIMEOUT,4,2       ; @AML_SDXC_CMD_TIMEOUT
	.comm	_AML_SDXC_CNTRL_PKG_LEN_MASK,4,2 ; @AML_SDXC_CNTRL_PKG_LEN_MASK
	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
	.comm	_MMC_DATA_WRITE,4,2             ; @MMC_DATA_WRITE
	.comm	_MMC_DATA_MULTI,4,2             ; @MMC_DATA_MULTI
	.comm	_MMC_SECTOR_SIZE,4,2            ; @MMC_SECTOR_SIZE
	.comm	_AML_SDXC_SEND_CMD_HAS_DATA,4,2 ; @AML_SDXC_SEND_CMD_HAS_DATA
	.comm	_AML_SDXC_SEND_DATA_WRITE,4,2   ; @AML_SDXC_SEND_DATA_WRITE
	.comm	_AML_SDXC_SEND_REP_PKG_CNT_SHIFT,4,2 ; @AML_SDXC_SEND_REP_PKG_CNT_SHIFT
	.comm	_AML_SDXC_CNTRL_PKG_LEN_SHIFT,4,2 ; @AML_SDXC_CNTRL_PKG_LEN_SHIFT
	.comm	_AML_SDXC_IRQ_ENABLE_RESP_OK,4,2 ; @AML_SDXC_IRQ_ENABLE_RESP_OK
	.comm	_AML_SDXC_IRQ_ENABLE_DMA_DONE,4,2 ; @AML_SDXC_IRQ_ENABLE_DMA_DONE
	.comm	_AML_SDXC_IRQ_ENABLE_TRANSFER_DONE_OK,4,2 ; @AML_SDXC_IRQ_ENABLE_TRANSFER_DONE_OK
	.comm	_aml8726_sdxc_mapmem,4,2        ; @aml8726_sdxc_mapmem
	.comm	_BUS_DMA_NOWAIT,4,2             ; @BUS_DMA_NOWAIT
	.comm	_MMC_ERR_NO_MEMORY,4,2          ; @MMC_ERR_NO_MEMORY
	.comm	_BUS_DMASYNC_PREREAD,4,2        ; @BUS_DMASYNC_PREREAD
	.comm	_AML_SDXC_READ_TIMEOUT,4,2      ; @AML_SDXC_READ_TIMEOUT
	.comm	_BUS_DMASYNC_PREWRITE,4,2       ; @BUS_DMASYNC_PREWRITE
	.comm	_AML_SDXC_WRITE_TIMEOUT,4,2     ; @AML_SDXC_WRITE_TIMEOUT
	.comm	_MMC_ERR_NONE,4,2               ; @MMC_ERR_NONE
	.comm	_AML_SDXC_MAX_TIMEOUT,4,2       ; @AML_SDXC_MAX_TIMEOUT
	.comm	_aml8726_sdxc_timeout,4,2       ; @aml8726_sdxc_timeout
	.comm	_AML_SDXC_IRQ_ENABLE_REG,4,2    ; @AML_SDXC_IRQ_ENABLE_REG
	.comm	_AML_SDXC_DMA_ADDR_REG,4,2      ; @AML_SDXC_DMA_ADDR_REG
	.comm	_AML_SDXC_CMD_ARGUMENT_REG,4,2  ; @AML_SDXC_CMD_ARGUMENT_REG
	.comm	_AML_SDXC_SEND_REG,4,2          ; @AML_SDXC_SEND_REG
	.no_dead_strip	_aml8726_sdxc_start_command
.subsections_via_symbols
