	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_via8233_dxs_volume_put
_snd_via8233_dxs_volume_put:            ## @snd_via8233_dxs_volume_put
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_snd_kcontrol_chip
	movq	%rax, %r15
	movl	(%rbx), %r13d
	movl	%r13d, %ebx
	shll	$4, %ebx
	addl	(%rax), %ebx
	movq	(%r14), %rsi
	movq	_VIA_DXS_MAX_VOLUME@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	xorl	%r12d, %r12d
	movl	%ecx, %eax
	subb	(%rsi), %al
	movzbl	%al, %edx
	cmovbl	%r12d, %edx
	movq	8(%r15), %rax
	movq	(%rax,%r13,8), %rax
	cmpb	(%rax), %dl
	jne	LBB0_1
## %bb.2:
	subb	1(%rsi), %cl
	movzbl	%cl, %ecx
	cmovbl	%r12d, %ecx
	cmpb	1(%rax), %cl
	jne	LBB0_3
	jmp	LBB0_4
LBB0_1:
	movb	%dl, (%rax)
	movq	_VIA_REG_OFS_PLAYBACK_VOLUME_L@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%rbx, %rsi
	movzbl	%dl, %edi
	callq	_outb
	movq	(%r14), %rcx
	movq	_VIA_DXS_MAX_VOLUME@GOTPCREL(%rip), %rax
	movb	(%rax), %dl
	movq	8(%r15), %rax
	movq	(%rax,%r13,8), %rax
	subb	1(%rcx), %dl
	movzbl	%dl, %ecx
	cmovbl	%r12d, %ecx
LBB0_3:
	incq	%rax
	movb	%cl, (%rax)
	movq	_VIA_REG_OFS_PLAYBACK_VOLUME_L@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rbx,%rax), %rsi
	incq	%rsi
	movzbl	%cl, %edi
	callq	_outb
	movl	$1, %r12d
LBB0_4:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VIA_DXS_MAX_VOLUME,1,0         ## @VIA_DXS_MAX_VOLUME
	.comm	_VIA_REG_OFS_PLAYBACK_VOLUME_L,8,3 ## @VIA_REG_OFS_PLAYBACK_VOLUME_L
	.no_dead_strip	_snd_via8233_dxs_volume_put
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_via8233_dxs_volume_put
_snd_via8233_dxs_volume_put:            ; @snd_via8233_dxs_volume_put
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x21, x0
	bl	_snd_kcontrol_chip
	ldr	w23, [x21]
	ldr	w8, [x0]
	add	w21, w8, w23, lsl #4
	ldr	x9, [x19]
	ldrb	w8, [x9]
Lloh0:
	adrp	x24, _VIA_DXS_MAX_VOLUME@GOTPAGE
Lloh1:
	ldr	x24, [x24, _VIA_DXS_MAX_VOLUME@GOTPAGEOFF]
	ldrb	w11, [x24]
	subs	w8, w11, w8
	csel	w10, wzr, w8, lo
	ldr	x8, [x0, #8]
	ldr	x8, [x8, x23, lsl #3]
	ldrb	w12, [x8]
Lloh2:
	adrp	x22, _VIA_REG_OFS_PLAYBACK_VOLUME_L@GOTPAGE
Lloh3:
	ldr	x22, [x22, _VIA_REG_OFS_PLAYBACK_VOLUME_L@GOTPAGEOFF]
	cmp	w10, w12
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	ldrb	w9, [x9, #1]
	subs	w9, w11, w9
	csel	w9, wzr, w9, lo
	ldrb	w10, [x8, #1]!
	cmp	w9, w10
	b.ne	LBB0_3
	b	LBB0_4
LBB0_2:
	mov	x20, x0
	strb	w10, [x8]
	ldr	x8, [x22]
	add	x1, x8, x21
	and	w0, w10, #0xff
	bl	_outb
	ldr	x8, [x19]
	ldrb	w9, [x24]
	ldr	x10, [x20, #8]
	ldr	x10, [x10, x23, lsl #3]
	ldrb	w8, [x8, #1]
	subs	w8, w9, w8
	csel	w9, wzr, w8, lo
	add	x8, x10, #1
LBB0_3:
	strb	w9, [x8]
	ldr	x8, [x22]
	add	x8, x21, x8
	add	x1, x8, #1
	and	w0, w9, #0xff
	bl	_outb
	mov	w0, #1
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_VIA_DXS_MAX_VOLUME,1,0         ; @VIA_DXS_MAX_VOLUME
	.comm	_VIA_REG_OFS_PLAYBACK_VOLUME_L,8,3 ; @VIA_REG_OFS_PLAYBACK_VOLUME_L
	.no_dead_strip	_snd_via8233_dxs_volume_put
.subsections_via_symbols
