	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adc_dma_interrupt
_adc_dma_interrupt:                     ## @adc_dma_interrupt
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rsi, %rdi
	callq	_spin_lock
	movl	56(%rbx), %edi
	leaq	-32(%rbp), %rsi
	leaq	-24(%rbp), %rdx
	callq	_au1xxx_dbdma_get_dest
	movq	-24(%rbp), %rax
	addq	8(%rbx), %rax
	cmpq	16(%rbx), %rax
	jle	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	%rbx, %rdi
	callq	_stop_adc
	incl	60(%rbx)
	leaq	L_.str(%rip), %rdi
	callq	_err
	jmp	LBB0_7
LBB0_2:
	movl	56(%rbx), %edi
	movq	24(%rbx), %rsi
	movq	32(%rbx), %rdx
	callq	_au1xxx_dbdma_put_dest
	movq	16(%rbx), %rax
	movq	24(%rbx), %rcx
	addq	32(%rbx), %rcx
	movq	%rcx, 24(%rbx)
	movq	40(%rbx), %rdx
	addq	%rax, %rdx
	cmpq	%rdx, %rcx
	jl	LBB0_4
## %bb.3:
	subq	%rax, %rcx
	movq	%rcx, 24(%rbx)
LBB0_4:
	movq	-24(%rbp), %rax
	addq	%rax, 8(%rbx)
	addl	%eax, 52(%rbx)
	leaq	48(%rbx), %r14
	movq	%r14, %rdi
	callq	_waitqueue_active
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_wake_up
LBB0_6:
	movq	%rbx, %rdi
	callq	_spin_unlock
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"adc overrun"

	.no_dead_strip	_adc_dma_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adc_dma_interrupt
_adc_dma_interrupt:                     ; @adc_dma_interrupt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x0, x1
	bl	_spin_lock
	ldr	w0, [x19, #56]
	mov	x1, sp
	add	x2, sp, #8
	bl	_au1xxx_dbdma_get_dest
	ldr	x8, [sp, #8]
	ldp	x9, x10, [x19, #8]
	add	x8, x8, x9
	cmp	x8, x10
	b.le	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_spin_unlock
	mov	x0, x19
	bl	_stop_adc
	ldr	w8, [x19, #60]
	add	w8, w8, #1
	str	w8, [x19, #60]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_err
	b	LBB0_7
LBB0_2:
	ldr	w0, [x19, #56]
	ldp	x1, x2, [x19, #24]
	bl	_au1xxx_dbdma_put_dest
	ldp	x9, x10, [x19, #32]
	ldp	x8, x11, [x19, #16]
	add	x9, x11, x9
	str	x9, [x19, #24]
	add	x10, x8, x10
	cmp	x9, x10
	b.lt	LBB0_4
; %bb.3:
	sub	x8, x9, x8
	str	x8, [x19, #24]
LBB0_4:
	ldr	x8, [sp, #8]
	ldr	x9, [x19, #8]
	add	x9, x9, x8
	str	x9, [x19, #8]
	ldr	w9, [x19, #52]
	add	w8, w9, w8
	str	w8, [x19, #52]
	add	x20, x19, #48
	mov	x0, x20
	bl	_waitqueue_active
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_wake_up
LBB0_6:
	mov	x0, x19
	bl	_spin_unlock
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"adc overrun"

	.no_dead_strip	_adc_dma_interrupt
.subsections_via_symbols
