	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function meson_mx_mmc_map_dma
_meson_mx_mmc_map_dma:                  ## @meson_mx_mmc_map_dma
	.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	(%rsi), %r12
	xorl	%r15d, %r15d
	testq	%r12, %r12
	je	LBB0_7
## %bb.1:
	movq	%rdi, %r14
	movq	8(%r12), %rbx
	testb	$3, (%rbx)
	jne	LBB0_3
## %bb.2:
	testb	$3, 4(%rbx)
	je	LBB0_4
LBB0_3:
	movq	%r14, %rdi
	callq	_mmc_dev
	movl	(%rbx), %edx
	movl	4(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_6:
	subl	(%rax), %r15d
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r14, %rdi
	callq	_mmc_dev
	movl	%eax, %ebx
	movq	8(%r12), %r13
	movl	(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_mmc_get_dma_dir
	movl	%ebx, %edi
	movq	%r13, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%eax, %ecx
	callq	_dma_map_sg
	testl	%eax, %eax
	jg	LBB0_7
## %bb.5:
	movq	%r14, %rdi
	callq	_mmc_dev
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unaligned scatterlist: offset %x length %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"dma_map_sg failed\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_meson_mx_mmc_map_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function meson_mx_mmc_map_dma
_meson_mx_mmc_map_dma:                  ; @meson_mx_mmc_map_dma
	.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
	ldr	x20, [x1]
	cbz	x20, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	x21, [x20, #8]
	ldrb	w8, [x21]
	tst	w8, #0x3
	b.ne	LBB0_3
; %bb.2:
	ldrb	w8, [x21, #4]
	tst	w8, #0x3
	b.eq	LBB0_5
LBB0_3:
	mov	x0, x19
	bl	_mmc_dev
	ldp	w8, w9, [x21]
	stp	x8, x9, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_mmc_dev
	mov	x21, x0
	ldr	x22, [x20, #8]
	ldr	w23, [x20]
	mov	x0, x20
	bl	_mmc_get_dma_dir
	mov	x3, x0
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	bl	_dma_map_sg
	cmp	w0, #0
	b.le	LBB0_8
LBB0_6:
	mov	w0, #0
LBB0_7:
	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_8:
	mov	x0, x19
	bl	_mmc_dev
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unaligned scatterlist: offset %x length %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"dma_map_sg failed\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_meson_mx_mmc_map_dma
.subsections_via_symbols
