	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mixart_pcm_vol_put
_mixart_pcm_vol_put:                    ## @mixart_pcm_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, %r14
	movq	%rdi, %rbx
	callq	_snd_kcontrol_chip
	movq	%rax, %r12
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	leaq	8(%r14), %rsi
	movq	%rbx, %rdi
	callq	_snd_ctl_get_ioffidx
	movl	%eax, %r14d
	movl	(%rbx), %ebx
	movq	_MIXART_VOL_REC_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_MIXART_VOL_AES_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	andl	%ebx, %r13d
	movq	16(%r12), %rdi
	callq	_mutex_lock
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	testl	%ebx, %r15d
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	testl	%r13d, %r13d
	setne	%al
	shlq	$3, %rax
	addq	(%r12), %rax
	jmp	LBB0_5
LBB0_2:
	movq	_MIXART_PLAYBACK_STREAMS@GOTPCREL(%rip), %rbx
	xorl	%edi, %edi
	cmpl	(%rbx), %r14d
	setge	%dil
	callq	_snd_BUG_ON
	movq	8(%r12), %rax
	testl	%r13d, %r13d
	je	LBB0_4
## %bb.3:
	movslq	(%rbx), %rcx
	movslq	%r14d, %rdx
	addq	%rcx, %rdx
	leaq	(%rax,%rdx,8), %rax
	jmp	LBB0_5
LBB0_4:
	movslq	%r14d, %rcx
	leaq	(%rax,%rcx,8), %rax
LBB0_5:
	movq	(%rax), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	(%rcx), %ebx
	movq	_MIXART_DIGITAL_LEVEL_MIN@GOTPCREL(%rip), %r8
	movl	(%r8), %edi
	movq	_MIXART_DIGITAL_LEVEL_MAX@GOTPCREL(%rip), %r9
	movl	(%r9), %esi
	movb	$1, %r10b
	cmpl	%edi, %ebx
	jl	LBB0_9
## %bb.6:
	cmpl	%esi, %ebx
	jg	LBB0_9
## %bb.7:
	cmpl	%ebx, (%rax)
	je	LBB0_9
## %bb.8:
	movl	%ebx, (%rax)
	movl	(%r8), %edi
	movl	(%r9), %esi
	xorl	%r10d, %r10d
LBB0_9:
	movl	4(%rcx), %ecx
	cmpl	%edi, %ecx
	jl	LBB0_13
## %bb.10:
	cmpl	%esi, %ecx
	jg	LBB0_13
## %bb.11:
	cmpl	%ecx, 4(%rax)
	jne	LBB0_12
LBB0_13:
	xorl	%ebx, %ebx
	testb	%r10b, %r10b
	je	LBB0_14
	jmp	LBB0_18
LBB0_12:
	movl	%ecx, 4(%rax)
LBB0_14:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, -48(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_16
## %bb.15:
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_mixart_update_capture_stream_level
	jmp	LBB0_17
LBB0_16:
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%r14d, %edx
	callq	_mixart_update_playback_stream_level
LBB0_17:
	movl	$1, %ebx
LBB0_18:
	movq	16(%r12), %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MIXART_VOL_REC_MASK,4,2        ## @MIXART_VOL_REC_MASK
	.comm	_MIXART_VOL_AES_MASK,4,2        ## @MIXART_VOL_AES_MASK
	.comm	_MIXART_PLAYBACK_STREAMS,4,2    ## @MIXART_PLAYBACK_STREAMS
	.comm	_MIXART_DIGITAL_LEVEL_MIN,4,2   ## @MIXART_DIGITAL_LEVEL_MIN
	.comm	_MIXART_DIGITAL_LEVEL_MAX,4,2   ## @MIXART_DIGITAL_LEVEL_MAX
	.no_dead_strip	_mixart_pcm_vol_put
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mixart_pcm_vol_put
_mixart_pcm_vol_put:                    ; @mixart_pcm_vol_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	x22, x1
	mov	x21, x0
	bl	_snd_kcontrol_chip
	mov	x19, x0
	add	x1, x22, #8
	mov	x0, x21
	bl	_snd_ctl_get_ioffidx
	mov	x20, x0
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _MIXART_VOL_REC_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MIXART_VOL_REC_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w23, w9, w8
Lloh3:
	adrp	x9, _MIXART_VOL_AES_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MIXART_VOL_AES_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w21, w9, w8
	ldr	x0, [x19, #16]
	bl	_mutex_lock
	cbz	w23, LBB0_2
; %bb.1:
	cmp	w21, #0
	cset	w8, ne
	ldr	x9, [x19]
	add	x8, x9, w8, uxtw #3
	b	LBB0_5
LBB0_2:
Lloh6:
	adrp	x24, _MIXART_PLAYBACK_STREAMS@GOTPAGE
Lloh7:
	ldr	x24, [x24, _MIXART_PLAYBACK_STREAMS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w20, w8
	cset	w0, ge
	bl	_snd_BUG_ON
	ldr	x8, [x19, #8]
	cbz	w21, LBB0_4
; %bb.3:
	ldr	w9, [x24]
	add	w9, w9, w20
	add	x8, x8, w9, sxtw #3
	b	LBB0_5
LBB0_4:
	add	x8, x8, w20, sxtw #3
LBB0_5:
	ldr	x8, [x8]
	ldr	x9, [x22]
	ldr	w13, [x9]
Lloh8:
	adrp	x14, _MIXART_DIGITAL_LEVEL_MIN@GOTPAGE
Lloh9:
	ldr	x14, [x14, _MIXART_DIGITAL_LEVEL_MIN@GOTPAGEOFF]
	ldr	w10, [x14]
Lloh10:
	adrp	x15, _MIXART_DIGITAL_LEVEL_MAX@GOTPAGE
Lloh11:
	ldr	x15, [x15, _MIXART_DIGITAL_LEVEL_MAX@GOTPAGEOFF]
	ldr	w12, [x15]
	cmp	w13, w10
	ccmp	w13, w12, #0, ge
	b.gt	LBB0_7
; %bb.6:
	ldr	w11, [x8]
	cmp	w11, w13
	b.ne	LBB0_8
LBB0_7:
	mov	w11, #1
	b	LBB0_9
LBB0_8:
	mov	w11, #0
	str	w13, [x8]
	ldr	w10, [x14]
	ldr	w12, [x15]
LBB0_9:
	ldr	w9, [x9, #4]
	cmp	w9, w10
	ccmp	w9, w12, #0, ge
	b.gt	LBB0_11
; %bb.10:
	ldr	w10, [x8, #4]
	cmp	w10, w9
	b.ne	LBB0_13
LBB0_11:
	tbz	w11, #0, LBB0_14
; %bb.12:
	mov	w20, #0
	b	LBB0_18
LBB0_13:
	str	w9, [x8, #4]
LBB0_14:
	mov	x0, x19
	mov	x1, x21
	cbz	w23, LBB0_16
; %bb.15:
	bl	_mixart_update_capture_stream_level
	b	LBB0_17
LBB0_16:
	mov	x2, x20
	bl	_mixart_update_playback_stream_level
LBB0_17:
	mov	w20, #1
LBB0_18:
	ldr	x0, [x19, #16]
	bl	_mutex_unlock
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MIXART_VOL_REC_MASK,4,2        ; @MIXART_VOL_REC_MASK
	.comm	_MIXART_VOL_AES_MASK,4,2        ; @MIXART_VOL_AES_MASK
	.comm	_MIXART_PLAYBACK_STREAMS,4,2    ; @MIXART_PLAYBACK_STREAMS
	.comm	_MIXART_DIGITAL_LEVEL_MIN,4,2   ; @MIXART_DIGITAL_LEVEL_MIN
	.comm	_MIXART_DIGITAL_LEVEL_MAX,4,2   ; @MIXART_DIGITAL_LEVEL_MAX
	.no_dead_strip	_mixart_pcm_vol_put
.subsections_via_symbols
