	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function edma_error_handler
_edma_error_handler:                    ## @edma_error_handler
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, 32(%rdi)
	je	LBB0_6
## %bb.1:
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	40(%rdi), %r12
	movq	(%rax), %r15
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movq	24(%rbx), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	callq	_edma_read_slot
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	-48(%rbp), %rax
	orq	-40(%rbp), %rax
	jne	LBB0_4
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	movl	$1, (%rbx)
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	movq	%rbx, %rdi
	callq	_edma_clean_channel
	movq	%rbx, %rdi
	callq	_edma_stop
	movq	%rbx, %rdi
	callq	_edma_start
	movq	%rbx, %rdi
	callq	_edma_trigger_channel
LBB0_5:
	movq	%r14, %rdi
	callq	_spin_unlock
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error on null slot, setting miss\n"

L_.str.1:                               ## @.str.1
	.asciz	"Missed event, TRIGGERING\n"

	.no_dead_strip	_edma_error_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function edma_error_handler
_edma_error_handler:                    ; @edma_error_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	w8, [x0, #32]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	x22, [x0, #40]
	ldr	x8, [x0, #16]
	ldr	x21, [x8]
	add	x20, x0, #8
	mov	x0, x20
	bl	_spin_lock
	ldr	x8, [x19, #24]
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x22
	bl	_edma_read_slot
	cbnz	w0, LBB0_3
; %bb.2:
	ldp	x8, x9, [sp]
	orr	x8, x8, x9
	cbnz	x8, LBB0_4
LBB0_3:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	mov	x0, x19
	bl	_edma_clean_channel
	mov	x0, x19
	bl	_edma_stop
	mov	x0, x19
	bl	_edma_start
	mov	x0, x19
	bl	_edma_trigger_channel
LBB0_5:
	mov	x0, x20
	bl	_spin_unlock
LBB0_6:
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error on null slot, setting miss\n"

l_.str.1:                               ; @.str.1
	.asciz	"Missed event, TRIGGERING\n"

	.no_dead_strip	_edma_error_handler
.subsections_via_symbols
