	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function via686_setup_format
_via686_setup_format:                   ## @via686_setup_format
	.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	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_snd_via82xx_channel_reset
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_snd_via82xx_set_table_ptr
	movq	_VIA_REG_TYPE_AUTOSTART@GOTPCREL(%rip), %rcx
	movq	(%r15), %rdx
	movq	_SNDRV_PCM_FORMAT_S16_LE@GOTPCREL(%rip), %rsi
	xorl	%eax, %eax
	movl	$0, %ebx
	cmpq	(%rsi), %rdx
	jne	LBB0_2
## %bb.1:
	movq	_VIA_REG_TYPE_16BIT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
LBB0_2:
	orl	(%rcx), %ebx
	cmpl	$2, 8(%r15)
	movl	$0, %ecx
	jl	LBB0_4
## %bb.3:
	movq	_VIA_REG_TYPE_STEREO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_4:
	orl	%ecx, %ebx
	testb	$16, (%r14)
	jne	LBB0_6
## %bb.5:
	movq	_VIA_REG_TYPE_INT_LSAMPLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	movq	_VIA_REG_TYPE_INT_EOL@GOTPCREL(%rip), %rcx
	movq	_VIA_REG_TYPE_INT_FLAG@GOTPCREL(%rip), %rdx
	orl	(%rcx), %ebx
	orl	%eax, %ebx
	orl	(%rdx), %ebx
	movq	_OFFSET_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_VIADEV_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_outb                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VIA_REG_TYPE_AUTOSTART,4,2     ## @VIA_REG_TYPE_AUTOSTART
	.comm	_SNDRV_PCM_FORMAT_S16_LE,8,3    ## @SNDRV_PCM_FORMAT_S16_LE
	.comm	_VIA_REG_TYPE_16BIT,4,2         ## @VIA_REG_TYPE_16BIT
	.comm	_VIA_REG_TYPE_STEREO,4,2        ## @VIA_REG_TYPE_STEREO
	.comm	_VIA_REG_TYPE_INT_LSAMPLE,4,2   ## @VIA_REG_TYPE_INT_LSAMPLE
	.comm	_VIA_REG_TYPE_INT_EOL,4,2       ## @VIA_REG_TYPE_INT_EOL
	.comm	_VIA_REG_TYPE_INT_FLAG,4,2      ## @VIA_REG_TYPE_INT_FLAG
	.comm	_OFFSET_TYPE,4,2                ## @OFFSET_TYPE
	.no_dead_strip	_via686_setup_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function via686_setup_format
_via686_setup_format:                   ; @via686_setup_format
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_snd_via82xx_channel_reset
	mov	x0, x21
	mov	x1, x20
	bl	_snd_via82xx_set_table_ptr
Lloh0:
	adrp	x8, _VIA_REG_TYPE_AUTOSTART@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VIA_REG_TYPE_AUTOSTART@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x19]
Lloh3:
	adrp	x10, _SNDRV_PCM_FORMAT_S16_LE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _SNDRV_PCM_FORMAT_S16_LE@GOTPAGEOFF]
Lloh5:
	adrp	x11, _VIA_REG_TYPE_16BIT@GOTPAGE
Lloh6:
	ldr	x11, [x11, _VIA_REG_TYPE_16BIT@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
Lloh8:
	ldr	w11, [x11]
	cmp	x9, x10
	csel	w9, w11, wzr, eq
	orr	w8, w9, w8
	ldr	w9, [x19, #8]
Lloh9:
	adrp	x10, _VIA_REG_TYPE_STEREO@GOTPAGE
Lloh10:
	ldr	x10, [x10, _VIA_REG_TYPE_STEREO@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	cmp	w9, #1
	csel	w9, w10, wzr, gt
	orr	w8, w8, w9
	ldr	w9, [x20]
Lloh12:
	adrp	x10, _VIA_REG_TYPE_INT_LSAMPLE@GOTPAGE
Lloh13:
	ldr	x10, [x10, _VIA_REG_TYPE_INT_LSAMPLE@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	tst	w9, #0x10
	csel	w9, w10, wzr, eq
Lloh15:
	adrp	x10, _VIA_REG_TYPE_INT_EOL@GOTPAGE
Lloh16:
	ldr	x10, [x10, _VIA_REG_TYPE_INT_EOL@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
Lloh18:
	adrp	x11, _VIA_REG_TYPE_INT_FLAG@GOTPAGE
Lloh19:
	ldr	x11, [x11, _VIA_REG_TYPE_INT_FLAG@GOTPAGEOFF]
Lloh20:
	ldr	w11, [x11]
	orr	w8, w8, w10
	orr	w8, w8, w9
	orr	w19, w8, w11
Lloh21:
	adrp	x8, _OFFSET_TYPE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _OFFSET_TYPE@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_VIADEV_REG
	mov	x1, x0
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_outb
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_VIA_REG_TYPE_AUTOSTART,4,2     ; @VIA_REG_TYPE_AUTOSTART
	.comm	_SNDRV_PCM_FORMAT_S16_LE,8,3    ; @SNDRV_PCM_FORMAT_S16_LE
	.comm	_VIA_REG_TYPE_16BIT,4,2         ; @VIA_REG_TYPE_16BIT
	.comm	_VIA_REG_TYPE_STEREO,4,2        ; @VIA_REG_TYPE_STEREO
	.comm	_VIA_REG_TYPE_INT_LSAMPLE,4,2   ; @VIA_REG_TYPE_INT_LSAMPLE
	.comm	_VIA_REG_TYPE_INT_EOL,4,2       ; @VIA_REG_TYPE_INT_EOL
	.comm	_VIA_REG_TYPE_INT_FLAG,4,2      ; @VIA_REG_TYPE_INT_FLAG
	.comm	_OFFSET_TYPE,4,2                ; @OFFSET_TYPE
	.no_dead_strip	_via686_setup_format
.subsections_via_symbols
