	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_via8233_interrupt
_snd_via8233_interrupt:                 ## @snd_via8233_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	leaq	4(%rsi), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock
	movq	_SGD_SHADOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_VIAREG
	movl	%eax, %edi
	callq	_inl
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock
	movq	%rbx, %rdi
	callq	_snd_pcm_period_elapsed
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_lock
	movb	$0, 4(%r13,%r14)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_OFFSET_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_VIADEV_REG
	movzbl	%r12b, %edi
	movl	%eax, %esi
	callq	_outb
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %eax
	movl	$1, %ebx
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	movl	%eax, %ecx
	addq	$40, %r14
	cmpq	%rcx, %r15
	jae	LBB0_14
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rdi), %r13
	movzbl	(%r13,%r14), %ecx
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	shrl	%cl, %edx
	movq	_VIA_REG_STAT_EOL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_VIA_REG_STAT_FLAG@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	%ecx, %esi
	movl	%esi, %r12d
	andl	%edx, %r12d
	testb	%r12b, %r12b
	je	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r14,%r13), %rdi
	movq	32(%r13,%r14), %rbx
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, 24(%r13,%r14)
	je	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_VIA8233_SHADOW_STAT_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, %esi
	andl	%edx, %esi
	testb	%sil, %cl
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	$0, 16(%r13,%r14)
	jmp	LBB0_9
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r13,%r14), %rcx
	addq	%rcx, 16(%r13,%r14)
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movb	%r12b, 4(%r13,%r14)
	testb	%dl, %al
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_VIA_REG_STAT_ACTIVE@GOTPCREL(%rip), %rax
	movzbl	(%rax), %eax
	orb	%r12b, %al
	movb	%al, 4(%r13,%r14)
	jmp	LBB0_11
LBB0_1:
	xorl	%ebx, %ebx
LBB0_14:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock
	movl	%ebx, %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_IRQ_RETVAL                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SGD_SHADOW,4,2                 ## @SGD_SHADOW
	.comm	_VIA8233_SHADOW_STAT_ACTIVE,4,2 ## @VIA8233_SHADOW_STAT_ACTIVE
	.comm	_VIA_REG_STAT_EOL,4,2           ## @VIA_REG_STAT_EOL
	.comm	_VIA_REG_STAT_FLAG,4,2          ## @VIA_REG_STAT_FLAG
	.comm	_VIA_REG_STAT_ACTIVE,1,0        ## @VIA_REG_STAT_ACTIVE
	.comm	_OFFSET_STATUS,4,2              ## @OFFSET_STATUS
	.no_dead_strip	_snd_via8233_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_via8233_interrupt
_snd_via8233_interrupt:                 ; @snd_via8233_interrupt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x1
	add	x0, x1, #4
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	bl	_spin_lock
Lloh0:
	adrp	x8, _SGD_SHADOW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SGD_SHADOW@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_VIAREG
	bl	_inl
	ldr	w8, [x20]
	cbz	w8, LBB0_13
; %bb.1:
	mov	x21, x0
	mov	x24, #0
	mov	x25, #0
	mov	w23, #0
Lloh3:
	adrp	x19, _VIA_REG_STAT_EOL@GOTPAGE
Lloh4:
	ldr	x19, [x19, _VIA_REG_STAT_EOL@GOTPAGEOFF]
Lloh5:
	adrp	x28, _VIA_REG_STAT_FLAG@GOTPAGE
Lloh6:
	ldr	x28, [x28, _VIA_REG_STAT_FLAG@GOTPAGEOFF]
Lloh7:
	adrp	x27, _OFFSET_STATUS@GOTPAGE
Lloh8:
	ldr	x27, [x27, _OFFSET_STATUS@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x27, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x27
	bl	_spin_unlock
	mov	x0, x23
	bl	_snd_pcm_period_elapsed
	mov	x0, x27
	bl	_spin_lock
	strb	wzr, [x19, #4]
Lloh9:
	adrp	x19, _VIA_REG_STAT_EOL@GOTPAGE
Lloh10:
	ldr	x19, [x19, _VIA_REG_STAT_EOL@GOTPAGEOFF]
	mov	x27, x28
Lloh11:
	adrp	x28, _VIA_REG_STAT_FLAG@GOTPAGE
Lloh12:
	ldr	x28, [x28, _VIA_REG_STAT_FLAG@GOTPAGEOFF]
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x27]
	mov	x0, x22
	bl	_VIADEV_REG
	mov	x1, x0
	and	w0, w26, #0xff
	bl	_outb
	ldr	w8, [x20]
	mov	w23, #1
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x25, x25, #1
	add	x24, x24, #40
	cmp	x25, w8, uxtw
	b.hs	LBB0_14
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #8]
	add	x22, x9, x24
	ldr	w10, [x22]
	lsr	w10, w21, w10
	ldr	w11, [x19]
	ldr	w12, [x28]
	orr	w12, w12, w11
	and	w26, w12, w10
	tst	w26, #0xff
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x23, [x22, #32]
	cbz	x23, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x8, x9, x24
	ldr	x8, [x8, #24]
	cbz	x8, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh13:
	adrp	x8, _VIA8233_SHADOW_STAT_ACTIVE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VIA8233_SHADOW_STAT_ACTIVE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	orr	w12, w12, w8
	and	w12, w12, w10
	and	w11, w11, w12
	tst	w11, #0xff
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x11, x9, x24
	str	xzr, [x11, #16]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x11, x9, x24
	ldp	x12, x13, [x11, #8]
	add	x12, x13, x12
	str	x12, [x11, #16]
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x28, x27
	add	x19, x9, x24
	strb	w26, [x19, #4]
	and	w8, w8, w10
	tst	w8, #0xff
	b.eq	LBB0_2
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
Lloh16:
	adrp	x8, _VIA_REG_STAT_ACTIVE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _VIA_REG_STAT_ACTIVE@GOTPAGEOFF]
	ldrb	w8, [x8]
	orr	w8, w8, w26
	strb	w8, [x19, #4]
	b	LBB0_2
LBB0_13:
	mov	w23, #0
LBB0_14:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_spin_unlock
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_IRQ_RETVAL
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_SGD_SHADOW,4,2                 ; @SGD_SHADOW
	.comm	_VIA8233_SHADOW_STAT_ACTIVE,4,2 ; @VIA8233_SHADOW_STAT_ACTIVE
	.comm	_VIA_REG_STAT_EOL,4,2           ; @VIA_REG_STAT_EOL
	.comm	_VIA_REG_STAT_FLAG,4,2          ; @VIA_REG_STAT_FLAG
	.comm	_VIA_REG_STAT_ACTIVE,1,0        ; @VIA_REG_STAT_ACTIVE
	.comm	_OFFSET_STATUS,4,2              ; @OFFSET_STATUS
	.no_dead_strip	_snd_via8233_interrupt
.subsections_via_symbols
