	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxs_dma_alloc_chan_resources
_mxs_dma_alloc_chan_resources:          ## @mxs_dma_alloc_chan_resources
	.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
	callq	_to_mxs_dma_chan
	movq	%rax, %rbx
	movq	16(%rax), %r15
	movl	(%r15), %edi
	movq	_CCW_BLOCK_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdx
	callq	_dma_alloc_coherent
	movl	%eax, 4(%rbx)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	8(%rbx), %edi
	movq	_mxs_dma_int_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	xorl	%edx, %edx
	movq	%r15, %r8
	callq	_request_irq
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movl	4(%r15), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %r12d
	movl	8(%rbx), %edi
	movq	%r15, %rsi
	callq	_free_irq
LBB0_6:
	movl	(%r15), %edi
	movl	(%r13), %esi
	movl	(%rbx), %ecx
	movl	4(%rbx), %edx
	callq	_dma_free_coherent
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_7
LBB0_4:
	movq	%r14, %rdi
	callq	_mxs_dma_reset_chan
	movq	%rbx, %r15
	addq	$12, %r15
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_dma_async_tx_descriptor_init
	movq	_mxs_dma_tx_submit@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	%r15, %rdi
	callq	_async_tx_ack
	xorl	%r12d, %r12d
LBB0_7:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CCW_BLOCK_SIZE,4,2             ## @CCW_BLOCK_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_mxs_dma_int_handler,4,2        ## @mxs_dma_int_handler
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mxs-dma"

	.comm	_mxs_dma_tx_submit,4,2          ## @mxs_dma_tx_submit
	.no_dead_strip	_mxs_dma_alloc_chan_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxs_dma_alloc_chan_resources
_mxs_dma_alloc_chan_resources:          ; @mxs_dma_alloc_chan_resources
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	bl	_to_mxs_dma_chan
	mov	x19, x0
	ldr	x21, [x0, #16]
	ldr	w0, [x21]
Lloh0:
	adrp	x23, _CCW_BLOCK_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _CCW_BLOCK_SIZE@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x2, x19
	bl	_dma_alloc_coherent
	str	w0, [x19, #4]
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w0, [x19, #8]
Lloh5:
	adrp	x8, _mxs_dma_int_handler@GOTPAGE
Lloh6:
	ldr	x8, [x8, _mxs_dma_int_handler@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x3, l_.str@PAGE
Lloh9:
	add	x3, x3, l_.str@PAGEOFF
	mov	w2, #0
	mov	x4, x21
	bl	_request_irq
	mov	x22, x0
	cbnz	w0, LBB0_4
; %bb.2:
	ldr	w0, [x21, #4]
	bl	_clk_prepare_enable
	mov	x22, x0
	cbz	w0, LBB0_6
; %bb.3:
	ldr	w0, [x19, #8]
	mov	x1, x21
	bl	_free_irq
LBB0_4:
	ldr	w0, [x21]
	ldr	w1, [x23]
	ldp	w3, w2, [x19]
	bl	_dma_free_coherent
	b	LBB0_7
LBB0_5:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_7
LBB0_6:
	mov	x0, x20
	bl	_mxs_dma_reset_chan
	add	x21, x19, #12
	mov	x0, x21
	mov	x1, x20
	bl	_dma_async_tx_descriptor_init
Lloh13:
	adrp	x8, _mxs_dma_tx_submit@GOTPAGE
Lloh14:
	ldr	x8, [x8, _mxs_dma_tx_submit@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x19, #12]
	mov	x0, x21
	bl	_async_tx_ack
LBB0_7:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_CCW_BLOCK_SIZE,4,2             ; @CCW_BLOCK_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_mxs_dma_int_handler,4,2        ; @mxs_dma_int_handler
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mxs-dma"

	.comm	_mxs_dma_tx_submit,4,2          ; @mxs_dma_tx_submit
	.no_dead_strip	_mxs_dma_alloc_chan_resources
.subsections_via_symbols
