	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function onyx_snd_vol_put
_onyx_snd_vol_put:                      ## @onyx_snd_vol_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
	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
	callq	_snd_kcontrol_chip
	movq	%rax, %r14
	movq	(%rbx), %rcx
	movq	(%rcx), %rdx
	movq	_VOLUME_RANGE_SHIFT@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	cmpq	%rax, %rdx
	jge	LBB0_2
## %bb.1:
	leaq	-128(%rax), %rsi
	cmpq	%rsi, %rdx
	jl	LBB0_2
## %bb.3:
	movq	8(%rcx), %rcx
	cmpq	%rsi, %rcx
	jl	LBB0_2
## %bb.4:
	cmpq	%rax, %rcx
	jge	LBB0_2
## %bb.5:
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_ONYX_REG_DAC_ATTEN_LEFT@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-56(%rbp), %rdx
	movq	%r14, %rdi
	callq	_onyx_read_register
	movq	_ONYX_REG_DAC_ATTEN_RIGHT@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	_onyx_read_register
	movq	(%r15), %rax
	movq	-56(%rbp), %rsi
	addq	%rax, %rsi
	movq	(%rbx), %rcx
	movq	(%rcx), %rdx
	cmpq	%rdx, %rsi
	jne	LBB0_8
## %bb.6:
	movq	-48(%rbp), %rsi
	addq	%rax, %rsi
	cmpq	8(%rcx), %rsi
	jne	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	(%r12), %esi
	subq	%rax, %rdx
	movq	%r14, %rdi
	callq	_onyx_write_register
	movl	(%r13), %esi
	movq	(%rbx), %rax
	movq	8(%rax), %rdx
	subq	(%r15), %rdx
	movq	%r14, %rdi
	callq	_onyx_write_register
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	$1, %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_VOLUME_RANGE_SHIFT,8,3         ## @VOLUME_RANGE_SHIFT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ONYX_REG_DAC_ATTEN_LEFT,4,2    ## @ONYX_REG_DAC_ATTEN_LEFT
	.comm	_ONYX_REG_DAC_ATTEN_RIGHT,4,2   ## @ONYX_REG_DAC_ATTEN_RIGHT
	.no_dead_strip	_onyx_snd_vol_put
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function onyx_snd_vol_put
_onyx_snd_vol_put:                      ; @onyx_snd_vol_put
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x1
	bl	_snd_kcontrol_chip
	ldr	x8, [x20]
	ldr	x11, [x8]
Lloh0:
	adrp	x21, _VOLUME_RANGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _VOLUME_RANGE_SHIFT@GOTPAGEOFF]
	ldr	x9, [x21]
	sub	x10, x9, #128
	cmp	x11, x9
	ccmp	x11, x10, #8, lt
	b.lt	LBB0_2
; %bb.1:
	ldr	x8, [x8, #8]
	cmp	x8, x10
	ccmp	x8, x9, #0, ge
	b.lt	LBB0_4
LBB0_2:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_4:
	mov	x19, x0
	bl	_mutex_lock
Lloh5:
	adrp	x22, _ONYX_REG_DAC_ATTEN_LEFT@GOTPAGE
Lloh6:
	ldr	x22, [x22, _ONYX_REG_DAC_ATTEN_LEFT@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #8
	mov	x0, x19
	bl	_onyx_read_register
Lloh7:
	adrp	x23, _ONYX_REG_DAC_ATTEN_RIGHT@GOTPAGE
Lloh8:
	ldr	x23, [x23, _ONYX_REG_DAC_ATTEN_RIGHT@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x2, sp
	mov	x0, x19
	bl	_onyx_read_register
	ldr	x11, [sp, #8]
	ldr	x8, [x21]
	ldr	x10, [x20]
	ldr	x9, [x10]
	add	x11, x8, x11
	cmp	x11, x9
	b.ne	LBB0_7
; %bb.5:
	ldr	x11, [sp]
	ldr	x10, [x10, #8]
	add	x11, x11, x8
	cmp	x11, x10
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_3
LBB0_7:
	ldr	w1, [x22]
	sub	x2, x9, x8
	mov	x0, x19
	bl	_onyx_write_register
	ldr	w1, [x23]
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	ldr	x9, [x21]
	sub	x2, x8, x9
	mov	x0, x19
	bl	_onyx_write_register
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #1
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_VOLUME_RANGE_SHIFT,8,3         ; @VOLUME_RANGE_SHIFT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ONYX_REG_DAC_ATTEN_LEFT,4,2    ; @ONYX_REG_DAC_ATTEN_LEFT
	.comm	_ONYX_REG_DAC_ATTEN_RIGHT,4,2   ; @ONYX_REG_DAC_ATTEN_RIGHT
	.no_dead_strip	_onyx_snd_vol_put
.subsections_via_symbols
