	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_via82xx_codec_write
_snd_via82xx_codec_write:               ## @snd_via82xx_codec_write
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	cmpl	$0, (%rdi)
	jne	LBB0_1
## %bb.2:
	movq	_VIA_REG_AC97_CODEC_ID_PRIMARY@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_VIA_REG_AC97_CODEC_ID_SECONDARY@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movq	_VIA_REG_AC97_CODEC_ID_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_VIA_REG_AC97_CMD_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	movq	_VIA_REG_AC97_DATA_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	orl	%esi, %edx
	orl	%eax, %edx
	movq	%r14, %rdi
	movl	%edx, %esi
	callq	_snd_via82xx_codec_xwrite
	movl	(%rbx), %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_snd_via82xx_codec_ready        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VIA_REG_AC97_CODEC_ID_PRIMARY,4,2 ## @VIA_REG_AC97_CODEC_ID_PRIMARY
	.comm	_VIA_REG_AC97_CODEC_ID_SECONDARY,4,2 ## @VIA_REG_AC97_CODEC_ID_SECONDARY
	.comm	_VIA_REG_AC97_CODEC_ID_SHIFT,4,2 ## @VIA_REG_AC97_CODEC_ID_SHIFT
	.comm	_VIA_REG_AC97_CMD_SHIFT,2,1     ## @VIA_REG_AC97_CMD_SHIFT
	.comm	_VIA_REG_AC97_DATA_SHIFT,2,1    ## @VIA_REG_AC97_DATA_SHIFT
	.no_dead_strip	_snd_via82xx_codec_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_via82xx_codec_write
_snd_via82xx_codec_write:               ; @snd_via82xx_codec_write
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x0, #8]
Lloh0:
	adrp	x8, _VIA_REG_AC97_CODEC_ID_PRIMARY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VIA_REG_AC97_CODEC_ID_PRIMARY@GOTPAGEOFF]
Lloh2:
	adrp	x9, _VIA_REG_AC97_CODEC_ID_SECONDARY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _VIA_REG_AC97_CODEC_ID_SECONDARY@GOTPAGEOFF]
	ldr	w10, [x0]
	cmp	w10, #0
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
Lloh4:
	adrp	x9, _VIA_REG_AC97_CODEC_ID_SHIFT@GOTPAGE
Lloh5:
	ldr	x9, [x9, _VIA_REG_AC97_CODEC_ID_SHIFT@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	lsl	w8, w8, w9
Lloh7:
	adrp	x9, _VIA_REG_AC97_CMD_SHIFT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _VIA_REG_AC97_CMD_SHIFT@GOTPAGEOFF]
	ldrh	w9, [x9]
	lsl	w9, w1, w9
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _VIA_REG_AC97_DATA_SHIFT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _VIA_REG_AC97_DATA_SHIFT@GOTPAGEOFF]
	ldrh	w9, [x9]
	lsl	w9, w2, w9
	orr	w1, w8, w9
	mov	x0, x20
	bl	_snd_via82xx_codec_xwrite
	ldr	w1, [x19]
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_snd_via82xx_codec_ready
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_VIA_REG_AC97_CODEC_ID_PRIMARY,4,2 ; @VIA_REG_AC97_CODEC_ID_PRIMARY
	.comm	_VIA_REG_AC97_CODEC_ID_SECONDARY,4,2 ; @VIA_REG_AC97_CODEC_ID_SECONDARY
	.comm	_VIA_REG_AC97_CODEC_ID_SHIFT,4,2 ; @VIA_REG_AC97_CODEC_ID_SHIFT
	.comm	_VIA_REG_AC97_CMD_SHIFT,2,1     ; @VIA_REG_AC97_CMD_SHIFT
	.comm	_VIA_REG_AC97_DATA_SHIFT,2,1    ; @VIA_REG_AC97_DATA_SHIFT
	.no_dead_strip	_snd_via82xx_codec_write
.subsections_via_symbols
