	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdmmc_idma_setup
_sdmmc_idma_setup:                      ## @sdmmc_idma_setup
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rdi
	callq	_mmc_dev
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movl	%eax, %edi
	movl	$8, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, 16(%r14)
	movq	(%r14), %rdi
	movq	8(%r14), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_6
## %bb.3:
	callq	_mmc_dev
	movq	_SDMMC_LLI_BUF_LEN@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdx
	addq	$4, %rdx
	movl	(%r15), %ecx
	movl	%eax, %edi
	callq	_dmam_alloc_coherent
	movl	%eax, (%rbx)
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	(%r12), %eax
	sarl	$2, %eax
	movq	(%r14), %rcx
	movl	%eax, (%rcx)
	movq	8(%r14), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rcx)
	jmp	LBB0_7
LBB0_6:
	movl	$1, (%rdi)
	movl	4(%rdi), %eax
	movl	%eax, 8(%rdi)
LBB0_7:
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_4:
	movq	(%r14), %rdi
	callq	_mmc_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SDMMC_LLI_BUF_LEN,4,2          ## @SDMMC_LLI_BUF_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to alloc IDMA descriptor\n"

	.no_dead_strip	_sdmmc_idma_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdmmc_idma_setup
_sdmmc_idma_setup:                      ; @sdmmc_idma_setup
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x0, [x0]
	bl	_mmc_dev
Lloh0:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	w1, #8
	bl	_devm_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	str	x0, [x19, #16]
	ldp	x8, x9, [x19]
	ldr	x9, [x9, #8]
	cbz	x9, LBB0_4
; %bb.2:
	mov	x0, x8
	bl	_mmc_dev
Lloh2:
	adrp	x22, _SDMMC_LLI_BUF_LEN@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SDMMC_LLI_BUF_LEN@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, x20, #4
	ldr	w3, [x21]
	bl	_dmam_alloc_coherent
	str	w0, [x20]
	cbz	w0, LBB0_5
; %bb.3:
	mov	w0, #0
	ldr	w8, [x22]
	asr	w8, w8, #2
	ldp	x9, x10, [x19]
	str	w8, [x9]
	ldr	w8, [x10]
	str	w8, [x9, #8]
	b	LBB0_7
LBB0_4:
	mov	w0, #0
	mov	w9, #1
	str	w9, [x8]
	ldr	w9, [x8, #4]
	str	w9, [x8, #8]
	b	LBB0_7
LBB0_5:
	ldr	x0, [x19]
	bl	_mmc_dev
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_6:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SDMMC_LLI_BUF_LEN,4,2          ; @SDMMC_LLI_BUF_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to alloc IDMA descriptor\n"

	.no_dead_strip	_sdmmc_idma_setup
.subsections_via_symbols
