	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a10dmac_free
_a10dmac_free:                          ## @a10dmac_free
	.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, %rbx
	movq	32(%rsi), %r14
	movq	%r14, %rdi
	callq	_mtx_lock_spin
	movq	_AWIN_DMA_IRQ_EN_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_DMA_READ
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_a10dmac_read_ctl
	movl	%eax, %r12d
	movq	(%rbx), %rax
	movq	_CH_NDMA@GOTPCREL(%rip), %rcx
	movl	24(%rbx), %edi
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	callq	_AWIN_DMA_IRQ_NDMA_END
	movl	%eax, %r13d
	movq	_AWIN_NDMA_CTL_DMA_LOADING@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	callq	_AWIN_DMA_IRQ_DDMA_END
	movl	%eax, %r13d
	movq	_AWIN_DDMA_CTL_DMA_LOADING@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r12d
	movl	%r13d, %eax
	notl	%eax
	andl	%eax, %r15d
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_a10dmac_write_ctl
	movq	_AWIN_DMA_IRQ_EN_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_DMA_WRITE
	movq	_AWIN_DMA_IRQ_PEND_STA_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r13d, %edx
	callq	_DMA_WRITE
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rbx)
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mtx_unlock_spin                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AWIN_DMA_IRQ_EN_REG,4,2        ## @AWIN_DMA_IRQ_EN_REG
	.comm	_CH_NDMA,8,3                    ## @CH_NDMA
	.comm	_AWIN_NDMA_CTL_DMA_LOADING,4,2  ## @AWIN_NDMA_CTL_DMA_LOADING
	.comm	_AWIN_DDMA_CTL_DMA_LOADING,4,2  ## @AWIN_DDMA_CTL_DMA_LOADING
	.comm	_AWIN_DMA_IRQ_PEND_STA_REG,4,2  ## @AWIN_DMA_IRQ_PEND_STA_REG
	.no_dead_strip	_a10dmac_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a10dmac_free
_a10dmac_free:                          ; @a10dmac_free
	.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, x1
	ldr	x19, [x1, #32]
	mov	x0, x19
	bl	_mtx_lock_spin
Lloh0:
	adrp	x24, _AWIN_DMA_IRQ_EN_REG@GOTPAGE
Lloh1:
	ldr	x24, [x24, _AWIN_DMA_IRQ_EN_REG@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_DMA_READ
	mov	x21, x0
	mov	x0, x20
	bl	_a10dmac_read_ctl
	mov	x22, x0
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _CH_NDMA@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CH_NDMA@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	ldr	w0, [x20, #24]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	bl	_AWIN_DMA_IRQ_NDMA_END
	mov	x23, x0
Lloh5:
	adrp	x8, _AWIN_NDMA_CTL_DMA_LOADING@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AWIN_NDMA_CTL_DMA_LOADING@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
	bl	_AWIN_DMA_IRQ_DDMA_END
	mov	x23, x0
Lloh7:
	adrp	x8, _AWIN_DDMA_CTL_DMA_LOADING@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AWIN_DDMA_CTL_DMA_LOADING@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	bic	w1, w22, w8
	bic	w21, w21, w23
	mov	x0, x20
	bl	_a10dmac_write_ctl
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x21
	bl	_DMA_WRITE
Lloh9:
	adrp	x8, _AWIN_DMA_IRQ_PEND_STA_REG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AWIN_DMA_IRQ_PEND_STA_REG@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x23
	bl	_DMA_WRITE
	stp	xzr, xzr, [x20, #8]
	mov	x0, x19
	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	_mtx_unlock_spin
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AWIN_DMA_IRQ_EN_REG,4,2        ; @AWIN_DMA_IRQ_EN_REG
	.comm	_CH_NDMA,8,3                    ; @CH_NDMA
	.comm	_AWIN_NDMA_CTL_DMA_LOADING,4,2  ; @AWIN_NDMA_CTL_DMA_LOADING
	.comm	_AWIN_DDMA_CTL_DMA_LOADING,4,2  ; @AWIN_DDMA_CTL_DMA_LOADING
	.comm	_AWIN_DMA_IRQ_PEND_STA_REG,4,2  ; @AWIN_DMA_IRQ_PEND_STA_REG
	.no_dead_strip	_a10dmac_free
.subsections_via_symbols
