	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mic_dma_register_dma_device
_mic_dma_register_dma_device:           ## @mic_dma_register_dma_device
	.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
	movl	%esi, %r12d
	movq	%rdi, %r13
	movslq	(%rdi), %r15
	leaq	4(%rdi), %r14
	movl	40(%rdi), %edi
	callq	_dma_cap_zero
	movq	_DMA_MEMCPY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	40(%r13), %esi
	callq	_dma_cap_set
	movq	_MIC_DMA_CHAN_HOST@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_DMA_PRIVATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	40(%r13), %esi
	callq	_dma_cap_set
LBB0_2:
	movq	_mic_dma_alloc_chan_resources@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r13)
	movq	_mic_dma_free_chan_resources@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r13)
	movq	_mic_dma_tx_status@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r13)
	movq	_mic_dma_prep_memcpy_lock@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r13)
	movq	_mic_dma_prep_status_lock@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r13)
	movq	_mic_dma_prep_interrupt_lock@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r13)
	movq	_mic_dma_issue_pending@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r13)
	movq	_MIC_DMA_ALIGN_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r13)
	movq	%r14, %rdi
	callq	_INIT_LIST_HEAD
	movq	_MIC_DMA_NUM_CHAN@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	jle	LBB0_5
## %bb.3:
	movq	%r15, %rbx
	shlq	$4, %rbx
	movq	%r15, %r12
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	48(%r13), %rdi
	movq	%r14, 8(%rdi,%rbx)
	addq	%rbx, %rdi
	movq	%rcx, %r15
	callq	_dma_cookie_init
	movq	48(%r13), %rdi
	addq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_list_add_tail
	movq	%r15, %rcx
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	incq	%r12
	movslq	(%rcx), %rax
	addq	%r15, %rax
	addq	$16, %rbx
	cmpq	%rax, %r12
	jl	LBB0_4
LBB0_5:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dmaenginem_async_device_register ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_MEMCPY,4,2                 ## @DMA_MEMCPY
	.comm	_MIC_DMA_CHAN_HOST,4,2          ## @MIC_DMA_CHAN_HOST
	.comm	_DMA_PRIVATE,4,2                ## @DMA_PRIVATE
	.comm	_mic_dma_alloc_chan_resources,4,2 ## @mic_dma_alloc_chan_resources
	.comm	_mic_dma_free_chan_resources,4,2 ## @mic_dma_free_chan_resources
	.comm	_mic_dma_tx_status,4,2          ## @mic_dma_tx_status
	.comm	_mic_dma_prep_memcpy_lock,4,2   ## @mic_dma_prep_memcpy_lock
	.comm	_mic_dma_prep_status_lock,4,2   ## @mic_dma_prep_status_lock
	.comm	_mic_dma_prep_interrupt_lock,4,2 ## @mic_dma_prep_interrupt_lock
	.comm	_mic_dma_issue_pending,4,2      ## @mic_dma_issue_pending
	.comm	_MIC_DMA_ALIGN_SHIFT,4,2        ## @MIC_DMA_ALIGN_SHIFT
	.comm	_MIC_DMA_NUM_CHAN,4,2           ## @MIC_DMA_NUM_CHAN
	.no_dead_strip	_mic_dma_register_dma_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mic_dma_register_dma_device
_mic_dma_register_dma_device:           ; @mic_dma_register_dma_device
	.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	x21, x1
	mov	x19, x0
	ldrsw	x22, [x0]
	add	x20, x0, #4
	ldr	w0, [x0, #40]
	bl	_dma_cap_zero
Lloh0:
	adrp	x8, _DMA_MEMCPY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_MEMCPY@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x19, #40]
	bl	_dma_cap_set
Lloh3:
	adrp	x8, _MIC_DMA_CHAN_HOST@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MIC_DMA_CHAN_HOST@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _DMA_PRIVATE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMA_PRIVATE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	w1, [x19, #40]
	bl	_dma_cap_set
LBB0_2:
Lloh9:
	adrp	x8, _mic_dma_alloc_chan_resources@GOTPAGE
Lloh10:
	ldr	x8, [x8, _mic_dma_alloc_chan_resources@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _mic_dma_free_chan_resources@GOTPAGE
Lloh13:
	ldr	x9, [x9, _mic_dma_free_chan_resources@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #32]
Lloh15:
	adrp	x8, _mic_dma_tx_status@GOTPAGE
Lloh16:
	ldr	x8, [x8, _mic_dma_tx_status@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _mic_dma_prep_memcpy_lock@GOTPAGE
Lloh19:
	ldr	x9, [x9, _mic_dma_prep_memcpy_lock@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #24]
Lloh21:
	adrp	x8, _mic_dma_prep_status_lock@GOTPAGE
Lloh22:
	ldr	x8, [x8, _mic_dma_prep_status_lock@GOTPAGEOFF]
Lloh23:
	adrp	x9, _mic_dma_prep_interrupt_lock@GOTPAGE
Lloh24:
	ldr	x9, [x9, _mic_dma_prep_interrupt_lock@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #16]
Lloh27:
	adrp	x8, _mic_dma_issue_pending@GOTPAGE
Lloh28:
	ldr	x8, [x8, _mic_dma_issue_pending@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
Lloh30:
	adrp	x9, _MIC_DMA_ALIGN_SHIFT@GOTPAGE
Lloh31:
	ldr	x9, [x9, _MIC_DMA_ALIGN_SHIFT@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #8]
	mov	x0, x20
	bl	_INIT_LIST_HEAD
Lloh33:
	adrp	x21, _MIC_DMA_NUM_CHAN@GOTPAGE
Lloh34:
	ldr	x21, [x21, _MIC_DMA_NUM_CHAN@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	lsl	x23, x22, #4
	mov	x24, x22
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #48]
	add	x0, x8, x23
	str	x20, [x0, #8]
	bl	_dma_cookie_init
	ldr	x8, [x19, #48]
	add	x0, x8, x23
	mov	x1, x20
	bl	_list_add_tail
	add	x24, x24, #1
	ldrsw	x8, [x21]
	add	x23, x23, #16
	add	x8, x8, x22
	cmp	x24, x8
	b.lt	LBB0_4
LBB0_5:
	mov	x0, x20
	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
	b	_dmaenginem_async_device_register
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh25
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_MEMCPY,4,2                 ; @DMA_MEMCPY
	.comm	_MIC_DMA_CHAN_HOST,4,2          ; @MIC_DMA_CHAN_HOST
	.comm	_DMA_PRIVATE,4,2                ; @DMA_PRIVATE
	.comm	_mic_dma_alloc_chan_resources,4,2 ; @mic_dma_alloc_chan_resources
	.comm	_mic_dma_free_chan_resources,4,2 ; @mic_dma_free_chan_resources
	.comm	_mic_dma_tx_status,4,2          ; @mic_dma_tx_status
	.comm	_mic_dma_prep_memcpy_lock,4,2   ; @mic_dma_prep_memcpy_lock
	.comm	_mic_dma_prep_status_lock,4,2   ; @mic_dma_prep_status_lock
	.comm	_mic_dma_prep_interrupt_lock,4,2 ; @mic_dma_prep_interrupt_lock
	.comm	_mic_dma_issue_pending,4,2      ; @mic_dma_issue_pending
	.comm	_MIC_DMA_ALIGN_SHIFT,4,2        ; @MIC_DMA_ALIGN_SHIFT
	.comm	_MIC_DMA_NUM_CHAN,4,2           ; @MIC_DMA_NUM_CHAN
	.no_dead_strip	_mic_dma_register_dma_device
.subsections_via_symbols
