	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_via82xx_interrupt
_snd_via82xx_interrupt:                 ## @snd_via82xx_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	_SGD_SHADOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_VIAREG
	movl	%eax, %edi
	callq	_inl
	testl	%eax, (%rbx)
	je	LBB0_1
## %bb.2:
	leaq	8(%rbx), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock
	cmpl	$0, 4(%rbx)
	je	LBB0_10
## %bb.3:
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_OFFSET_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_VIADEV_REG
	movzbl	%r13b, %edi
	movl	%eax, %esi
	callq	_outb
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r14
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	4(%rbx), %eax
	addq	$16, %r12
	cmpq	%rax, %r14
	jae	LBB0_10
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %r15
	leaq	(%r15,%r12), %rbx
	movq	_OFFSET_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_VIADEV_REG
	movl	%eax, %edi
	callq	_inb
	movq	_VIA_REG_STAT_FLAG@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %r13d
	movq	_VIA_REG_STAT_EOL@GOTPCREL(%rip), %rcx
	orb	(%rcx), %r13b
	movq	_VIA_REG_STAT_STOPPED@GOTPCREL(%rip), %rcx
	orb	(%rcx), %r13b
	andb	%al, %r13b
	je	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, (%r15,%r12)
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, 8(%r15,%r12)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock
	movq	(%r15,%r12), %rdi
	callq	_snd_pcm_period_elapsed
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_lock
	jmp	LBB0_8
LBB0_10:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_1:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SGD_SHADOW,4,2                 ## @SGD_SHADOW
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_OFFSET_STATUS,4,2              ## @OFFSET_STATUS
	.comm	_VIA_REG_STAT_EOL,1,0           ## @VIA_REG_STAT_EOL
	.comm	_VIA_REG_STAT_FLAG,1,0          ## @VIA_REG_STAT_FLAG
	.comm	_VIA_REG_STAT_STOPPED,1,0       ## @VIA_REG_STAT_STOPPED
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_snd_via82xx_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_via82xx_interrupt
_snd_via82xx_interrupt:                 ; @snd_via82xx_interrupt
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
Lloh0:
	adrp	x8, _SGD_SHADOW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SGD_SHADOW@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_VIAREG
	bl	_inl
	ldr	w8, [x19]
	tst	w8, w0
	b.eq	LBB0_10
; %bb.1:
	add	x20, x19, #8
	mov	x0, x20
	bl	_spin_lock
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_9
; %bb.2:
	mov	x23, #0
	mov	x24, #0
Lloh3:
	adrp	x25, _OFFSET_STATUS@GOTPAGE
Lloh4:
	ldr	x25, [x25, _OFFSET_STATUS@GOTPAGEOFF]
Lloh5:
	adrp	x27, _VIA_REG_STAT_FLAG@GOTPAGE
Lloh6:
	ldr	x27, [x27, _VIA_REG_STAT_FLAG@GOTPAGEOFF]
Lloh7:
	adrp	x28, _VIA_REG_STAT_STOPPED@GOTPAGE
Lloh8:
	ldr	x28, [x28, _VIA_REG_STAT_STOPPED@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x25]
	mov	x0, x21
	bl	_VIADEV_REG
	mov	x1, x0
	mov	x0, x22
	bl	_outb
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x24, x24, #1
	ldr	w8, [x19, #4]
	add	x23, x23, #16
	cmp	x24, x8
	b.hs	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x26, [x19, #16]
	add	x21, x26, x23
	ldr	w1, [x25]
	mov	x0, x21
	bl	_VIADEV_REG
	bl	_inb
Lloh9:
	adrp	x8, _VIA_REG_STAT_EOL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VIA_REG_STAT_EOL@GOTPAGEOFF]
	ldrb	w8, [x8]
	ldrb	w9, [x27]
	orr	w8, w9, w8
	ldrb	w9, [x28]
	orr	w8, w8, w9
	ands	w22, w8, w0
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x26, x23]
	cbz	x8, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x8, x26, x23
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_spin_unlock
	ldr	x0, [x26, x23]
	bl	_snd_pcm_period_elapsed
	mov	x0, x20
	bl	_spin_lock
	b	LBB0_3
LBB0_9:
	mov	x0, x20
	bl	_spin_unlock
Lloh11:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh13:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_SGD_SHADOW,4,2                 ; @SGD_SHADOW
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_OFFSET_STATUS,4,2              ; @OFFSET_STATUS
	.comm	_VIA_REG_STAT_EOL,1,0           ; @VIA_REG_STAT_EOL
	.comm	_VIA_REG_STAT_FLAG,1,0          ; @VIA_REG_STAT_FLAG
	.comm	_VIA_REG_STAT_STOPPED,1,0       ; @VIA_REG_STAT_STOPPED
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_snd_via82xx_interrupt
.subsections_via_symbols
