	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_hsmmc_prepare_data
_omap_hsmmc_prepare_data:               ## @omap_hsmmc_prepare_data
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	8(%rsi), %rax
	movq	%rax, 24(%rdi)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	xorl	%r14d, %r14d
	cmpq	$0, 8(%r15)
	je	LBB0_6
## %bb.4:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_omap_hsmmc_setup_dma_transfer
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	movl	(%r15), %edi
	callq	_mmc_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
	movl	%ebx, %r14d
	jmp	LBB0_6
LBB0_1:
	movl	16(%r15), %edi
	movq	_BLK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	callq	_OMAP_HSMMC_WRITE
	movq	(%rbx), %rax
	movq	_MMC_RSP_BUSY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_6
## %bb.2:
	movq	_NSEC_PER_MSEC@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	imulq	8(%rax), %rcx
	testq	%rcx, %rcx
	movl	$100000000, %esi                ## imm = 0x5F5E100
	cmovneq	%rcx, %rsi
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_set_data_timeout
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLK,4,2                        ## @BLK
	.comm	_MMC_RSP_BUSY,4,2               ## @MMC_RSP_BUSY
	.comm	_NSEC_PER_MSEC,8,3              ## @NSEC_PER_MSEC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MMC start dma failure\n"

	.no_dead_strip	_omap_hsmmc_prepare_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_hsmmc_prepare_data
_omap_hsmmc_prepare_data:               ; @omap_hsmmc_prepare_data
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x1, #8]
	str	x8, [x0, #24]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_6
; %bb.2:
	mov	x0, x19
	mov	x1, x20
	bl	_omap_hsmmc_setup_dma_transfer
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.3:
	ldr	w0, [x19]
	bl	_mmc_dev
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_7
LBB0_4:
	ldr	w0, [x19, #16]
Lloh2:
	adrp	x8, _BLK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BLK@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_OMAP_HSMMC_WRITE
	ldr	x8, [x20]
	ldr	w9, [x8]
Lloh5:
	adrp	x10, _MMC_RSP_BUSY@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MMC_RSP_BUSY@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_6
; %bb.5:
Lloh8:
	adrp	x9, _NSEC_PER_MSEC@GOTPAGE
Lloh9:
	ldr	x9, [x9, _NSEC_PER_MSEC@GOTPAGEOFF]
	ldr	x8, [x8, #8]
Lloh10:
	ldr	x9, [x9]
	mul	x8, x9, x8
	mov	w9, #57600
	movk	w9, #1525, lsl #16
	cmp	x8, #0
	csel	x1, x9, x8, eq
	mov	x0, x19
	mov	w2, #0
	bl	_set_data_timeout
LBB0_6:
	mov	w20, #0
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_BLK,4,2                        ; @BLK
	.comm	_MMC_RSP_BUSY,4,2               ; @MMC_RSP_BUSY
	.comm	_NSEC_PER_MSEC,8,3              ; @NSEC_PER_MSEC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MMC start dma failure\n"

	.no_dead_strip	_omap_hsmmc_prepare_data
.subsections_via_symbols
