	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_hsmmc_start_dma_transfer
_omap_hsmmc_start_dma_transfer:         ## @omap_hsmmc_start_dma_transfer
	.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
	movq	%rdi, %r14
	movl	$0, -44(%rbp)
	movq	(%rsi), %r15
	movl	(%r15), %esi
	testl	%esi, %esi
	jle	LBB0_1
## %bb.7:
	movq	8(%r15), %rdi
	movl	4(%r15), %ecx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdi,%rbx,4), %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	cmpq	%rbx, %rsi
	jne	LBB0_8
## %bb.2:
	testb	$3, %cl
	je	LBB0_3
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	4(%r15), %ecx
	testb	$3, %cl
	jne	LBB0_9
LBB0_3:
	cmpl	$-1, (%r14)
	je	LBB0_10
## %bb.4:
	movq	_TASK_UNINTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movl	$100, %edi
	callq	_schedule_timeout
	leaq	24(%r14), %rbx
	movq	%rbx, %rdi
	callq	_down_trylock
	testq	%rax, %rax
	je	LBB0_11
## %bb.5:
	movl	(%r14), %edi
	callq	_omap_free_dma
	movl	$-1, (%r14)
	movq	%rbx, %rdi
	callq	_up
	movl	$1, %ebx
	jmp	LBB0_14
LBB0_10:
	leaq	24(%r14), %rdi
	callq	_down_trylock
	movl	$1, %ebx
	testq	%rax, %rax
	jne	LBB0_14
LBB0_11:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_omap_hsmmc_get_dma_sync_dev
	movq	_omap_hsmmc_dma_cb@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leaq	L_.str(%rip), %rsi
	leaq	-44(%rbp), %r8
	movl	%eax, %edi
	movq	%r14, %rcx
	callq	_omap_request_dma
	movl	%eax, %ebx
	movl	16(%r14), %edi
	callq	_mmc_dev
	movl	%eax, %r12d
	testl	%ebx, %ebx
	je	LBB0_13
## %bb.12:
	movl	16(%r14), %edi
	callq	_mmc_hostname
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edi
	movl	%eax, %edx
	movl	%ebx, %ecx
	callq	_dev_err
	jmp	LBB0_14
LBB0_13:
	movq	8(%r15), %rbx
	movl	(%r15), %r13d
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_omap_hsmmc_get_dma_dir
	movl	%r12d, %edi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	movl	%eax, %ecx
	callq	_dma_map_sg
	movl	%eax, 20(%r14)
	movl	-44(%rbp), %eax
	movl	%eax, (%r14)
	movq	$0, 8(%r14)
	movq	8(%r15), %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_omap_hsmmc_config_dma_params
	xorl	%ebx, %ebx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ## @TASK_UNINTERRUPTIBLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MMC/SD"

	.comm	_omap_hsmmc_dma_cb,4,2          ## @omap_hsmmc_dma_cb
L_.str.1:                               ## @.str.1
	.asciz	"%s: omap_request_dma() failed with %d\n"

	.no_dead_strip	_omap_hsmmc_start_dma_transfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_hsmmc_start_dma_transfer
_omap_hsmmc_start_dma_transfer:         ; @omap_hsmmc_start_dma_transfer
	.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	x19, x0
	str	wzr, [sp, #12]
	ldr	x20, [x1]
	ldr	w8, [x20]
	cmp	w8, #0
	b.le	LBB0_7
; %bb.1:
	ldr	x10, [x20, #8]
	ldr	w9, [x20, #4]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	sdiv	w12, w11, w9
	msub	w11, w12, w9, w11
	cbnz	w11, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x10, x10, #4
	subs	x8, x8, #1
	b.ne	LBB0_2
; %bb.4:
	tst	w9, #0x3
	b.eq	LBB0_8
LBB0_5:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_6:
	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
LBB0_7:
	ldr	w9, [x20, #4]
	tst	w9, #0x3
	b.ne	LBB0_5
LBB0_8:
	ldr	w8, [x19]
	cmn	w8, #1
	b.eq	LBB0_11
; %bb.9:
Lloh3:
	adrp	x8, _TASK_UNINTERRUPTIBLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TASK_UNINTERRUPTIBLE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_set_current_state
	mov	w0, #100
	bl	_schedule_timeout
	add	x21, x19, #24
	mov	x0, x21
	bl	_down_trylock
	cbz	x0, LBB0_13
; %bb.10:
	ldr	w0, [x19]
	bl	_omap_free_dma
	mov	w8, #-1
	str	w8, [x19]
	mov	x0, x21
	bl	_up
	mov	w21, #1
	b	LBB0_6
LBB0_11:
	add	x0, x19, #24
	bl	_down_trylock
	cbz	x0, LBB0_13
; %bb.12:
	mov	w21, #1
	b	LBB0_6
LBB0_13:
	mov	x0, x19
	mov	x1, x20
	bl	_omap_hsmmc_get_dma_sync_dev
Lloh6:
	adrp	x8, _omap_hsmmc_dma_cb@GOTPAGE
Lloh7:
	ldr	x8, [x8, _omap_hsmmc_dma_cb@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	add	x4, sp, #12
	mov	x3, x19
	bl	_omap_request_dma
	mov	x21, x0
	ldr	w0, [x19, #16]
	bl	_mmc_dev
	mov	x22, x0
	cbz	w21, LBB0_15
; %bb.14:
	ldr	w0, [x19, #16]
	bl	_mmc_hostname
	mov	x2, x0
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	x3, x21
	bl	_dev_err
	b	LBB0_6
LBB0_15:
	ldr	x21, [x20, #8]
	ldr	w23, [x20]
	mov	x0, x19
	mov	x1, x20
	bl	_omap_hsmmc_get_dma_dir
	mov	x3, x0
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	bl	_dma_map_sg
	str	w0, [x19, #20]
	ldr	w8, [sp, #12]
	str	w8, [x19]
	str	xzr, [x19, #8]
	ldr	x2, [x20, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_omap_hsmmc_config_dma_params
	mov	w21, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ; @TASK_UNINTERRUPTIBLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MMC/SD"

	.comm	_omap_hsmmc_dma_cb,4,2          ; @omap_hsmmc_dma_cb
l_.str.1:                               ; @.str.1
	.asciz	"%s: omap_request_dma() failed with %d\n"

	.no_dead_strip	_omap_hsmmc_start_dma_transfer
.subsections_via_symbols
