	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function epu_dma_done_irq
_epu_dma_done_irq:                      ## @epu_dma_done_irq
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rsi), %rax
	movq	(%rax), %rcx
	movq	_CX18_INVALID_TASK_HANDLE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_3
## %bb.1:
	movq	16(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.2:
	movq	_CX18_MAX_MDL_ACKS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jg	LBB0_3
## %bb.4:
	movl	4(%rbx), %esi
	movq	(%r14), %rdx
	addq	8(%rax), %rdx
	shll	$2, %ecx
	movq	%r14, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_cx18_memcpy_fromio
	movq	_CX18_F_EWO_MB_STALE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$1, %r15d
	testl	%eax, (%rbx)
	jne	LBB0_7
	jmp	LBB0_6
LBB0_3:
	movq	_CX18_F_EWO_MB_STALE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$-1, %r15d
	testl	%eax, (%rbx)
	jne	LBB0_7
LBB0_6:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_mb_ack_irq
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CX18_INVALID_TASK_HANDLE,8,3   ## @CX18_INVALID_TASK_HANDLE
	.comm	_CX18_MAX_MDL_ACKS,8,3          ## @CX18_MAX_MDL_ACKS
	.comm	_CX18_F_EWO_MB_STALE,4,2        ## @CX18_F_EWO_MB_STALE
	.no_dead_strip	_epu_dma_done_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function epu_dma_done_irq
_epu_dma_done_irq:                      ; @epu_dma_done_irq
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	ldr	x9, [x1, #8]
	ldr	x10, [x9]
	ldr	x8, [x9, #16]
Lloh0:
	adrp	x11, _CX18_INVALID_TASK_HANDLE@GOTPAGE
Lloh1:
	ldr	x11, [x11, _CX18_INVALID_TASK_HANDLE@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x11]
Lloh3:
	adrp	x12, _CX18_MAX_MDL_ACKS@GOTPAGE
Lloh4:
	ldr	x12, [x12, _CX18_MAX_MDL_ACKS@GOTPAGEOFF]
Lloh5:
	ldr	x12, [x12]
	cmp	x10, x11
	ccmp	x8, #0, #4, ne
	ccmp	x8, x12, #0, ne
	b.le	LBB0_4
; %bb.1:
	ldr	w8, [x19]
Lloh6:
	adrp	x9, _CX18_F_EWO_MB_STALE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CX18_F_EWO_MB_STALE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x20
	mov	x1, x19
	bl	_mb_ack_irq
LBB0_3:
	mov	w0, #-1
	b	LBB0_7
LBB0_4:
	ldr	x9, [x9, #8]
	ldr	w1, [x19, #4]
	ldr	x10, [x20]
	add	x2, x10, x9
	lsl	w3, w8, #2
	mov	x0, x20
	bl	_cx18_memcpy_fromio
	ldr	w8, [x19]
Lloh9:
	adrp	x9, _CX18_F_EWO_MB_STALE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CX18_F_EWO_MB_STALE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x20
	mov	x1, x19
	bl	_mb_ack_irq
LBB0_6:
	mov	w0, #1
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CX18_INVALID_TASK_HANDLE,8,3   ; @CX18_INVALID_TASK_HANDLE
	.comm	_CX18_MAX_MDL_ACKS,8,3          ; @CX18_MAX_MDL_ACKS
	.comm	_CX18_F_EWO_MB_STALE,4,2        ; @CX18_F_EWO_MB_STALE
	.no_dead_strip	_epu_dma_done_irq
.subsections_via_symbols
