	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mixart_analog_vol_put
_mixart_analog_vol_put:                 ## @mixart_analog_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_snd_kcontrol_chip
	movq	%rax, %r14
	movq	16(%rax), %rdi
	callq	_mutex_lock
	movq	(%rbx), %rax
	xorl	%ecx, %ecx
	movq	(%r15), %rsi
	movl	(%rsi), %edi
	testq	%rax, %rax
	sete	%cl
	movq	(%r14,%rcx,8), %rcx
	je	LBB0_6
## %bb.1:
	movq	_MIXART_ANALOG_CAPTURE_LEVEL_MIN@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %edi
	jl	LBB0_3
## %bb.2:
	movq	_MIXART_ANALOG_CAPTURE_LEVEL_MAX@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %edi
	jle	LBB0_9
LBB0_3:
	movl	4(%rsi), %esi
	addq	$4, %rcx
	xorl	%edx, %edx
	jmp	LBB0_4
LBB0_6:
	movq	_MIXART_ANALOG_PLAYBACK_LEVEL_MIN@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %edi
	jl	LBB0_8
## %bb.7:
	movq	_MIXART_ANALOG_PLAYBACK_LEVEL_MAX@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %edi
	jg	LBB0_8
LBB0_9:
	xorl	%edx, %edx
	cmpl	%edi, (%rcx)
	je	LBB0_11
## %bb.10:
	movl	%edi, (%rcx)
	movl	$1, %edx
LBB0_11:
	addq	$4, %rcx
	movl	4(%rsi), %esi
	testq	%rax, %rax
	je	LBB0_12
LBB0_4:
	movq	_MIXART_ANALOG_CAPTURE_LEVEL_MIN@GOTPCREL(%rip), %rdi
	cmpl	(%rdi), %esi
	jl	LBB0_18
## %bb.5:
	movq	_MIXART_ANALOG_CAPTURE_LEVEL_MAX@GOTPCREL(%rip), %rdi
	cmpl	(%rdi), %esi
	jle	LBB0_15
	jmp	LBB0_18
LBB0_8:
	movl	4(%rsi), %esi
	addq	$4, %rcx
	xorl	%edx, %edx
LBB0_12:
	movq	_MIXART_ANALOG_PLAYBACK_LEVEL_MIN@GOTPCREL(%rip), %rdi
	cmpl	(%rdi), %esi
	jl	LBB0_18
## %bb.13:
	movq	_MIXART_ANALOG_PLAYBACK_LEVEL_MAX@GOTPCREL(%rip), %rdi
	cmpl	(%rdi), %esi
	jg	LBB0_18
LBB0_15:
	cmpl	%esi, (%rcx)
	jne	LBB0_16
LBB0_18:
	testl	%edx, %edx
	jne	LBB0_17
## %bb.19:
	xorl	%ebx, %ebx
	jmp	LBB0_20
LBB0_16:
	movl	%esi, (%rcx)
LBB0_17:
	xorl	%esi, %esi
	testq	%rax, %rax
	setne	%sil
	movq	%r14, %rdi
	callq	_mixart_update_analog_audio_level
	movl	$1, %ebx
LBB0_20:
	movq	16(%r14), %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MIXART_ANALOG_CAPTURE_LEVEL_MIN,4,2 ## @MIXART_ANALOG_CAPTURE_LEVEL_MIN
	.comm	_MIXART_ANALOG_CAPTURE_LEVEL_MAX,4,2 ## @MIXART_ANALOG_CAPTURE_LEVEL_MAX
	.comm	_MIXART_ANALOG_PLAYBACK_LEVEL_MIN,4,2 ## @MIXART_ANALOG_PLAYBACK_LEVEL_MIN
	.comm	_MIXART_ANALOG_PLAYBACK_LEVEL_MAX,4,2 ## @MIXART_ANALOG_PLAYBACK_LEVEL_MAX
	.no_dead_strip	_mixart_analog_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_analog_vol_put
_mixart_analog_vol_put:                 ; @mixart_analog_vol_put
	.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	x20, x1
	mov	x21, x0
	bl	_snd_kcontrol_chip
	mov	x19, x0
	ldr	x0, [x0, #16]
	bl	_mutex_lock
	ldr	x8, [x21]
	cmp	x8, #0
	cset	w9, eq
	ldr	x13, [x19, w9, uxtw #3]
	ldr	x10, [x20]
	ldr	w9, [x10]
Lloh0:
	adrp	x11, _MIXART_ANALOG_CAPTURE_LEVEL_MIN@GOTPAGE
Lloh1:
	ldr	x11, [x11, _MIXART_ANALOG_CAPTURE_LEVEL_MIN@GOTPAGEOFF]
Lloh2:
	adrp	x12, _MIXART_ANALOG_CAPTURE_LEVEL_MAX@GOTPAGE
Lloh3:
	ldr	x12, [x12, _MIXART_ANALOG_CAPTURE_LEVEL_MAX@GOTPAGEOFF]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	w14, [x11]
	ldr	w15, [x12]
	cmp	w9, w14
	ccmp	w9, w15, #0, ge
	b.le	LBB0_5
; %bb.2:
	mov	w9, #0
	ldr	w10, [x10, #4]
	add	x13, x13, #4
	b	LBB0_9
LBB0_3:
Lloh4:
	adrp	x14, _MIXART_ANALOG_PLAYBACK_LEVEL_MIN@GOTPAGE
Lloh5:
	ldr	x14, [x14, _MIXART_ANALOG_PLAYBACK_LEVEL_MIN@GOTPAGEOFF]
Lloh6:
	ldr	w14, [x14]
Lloh7:
	adrp	x15, _MIXART_ANALOG_PLAYBACK_LEVEL_MAX@GOTPAGE
Lloh8:
	ldr	x15, [x15, _MIXART_ANALOG_PLAYBACK_LEVEL_MAX@GOTPAGEOFF]
Lloh9:
	ldr	w15, [x15]
	cmp	w9, w14
	ccmp	w9, w15, #0, ge
	b.le	LBB0_5
; %bb.4:
	mov	w9, #0
	ldr	w10, [x10, #4]
	add	x13, x13, #4
	b	LBB0_10
LBB0_5:
	ldr	w14, [x13]
	cmp	w14, w9
	b.ne	LBB0_7
; %bb.6:
	mov	w9, #0
	b	LBB0_8
LBB0_7:
	str	w9, [x13]
	mov	w9, #1
LBB0_8:
	ldr	w10, [x10, #4]
	add	x13, x13, #4
	cbz	x8, LBB0_10
LBB0_9:
	ldr	w11, [x11]
	b	LBB0_11
LBB0_10:
Lloh10:
	adrp	x11, _MIXART_ANALOG_PLAYBACK_LEVEL_MIN@GOTPAGE
Lloh11:
	ldr	x11, [x11, _MIXART_ANALOG_PLAYBACK_LEVEL_MIN@GOTPAGEOFF]
Lloh12:
	ldr	w11, [x11]
Lloh13:
	adrp	x12, _MIXART_ANALOG_PLAYBACK_LEVEL_MAX@GOTPAGE
Lloh14:
	ldr	x12, [x12, _MIXART_ANALOG_PLAYBACK_LEVEL_MAX@GOTPAGEOFF]
LBB0_11:
	ldr	w12, [x12]
	cmp	w10, w11
	ccmp	w10, w12, #0, ge
	b.gt	LBB0_13
; %bb.12:
	ldr	w11, [x13]
	cmp	w11, w10
	b.ne	LBB0_15
LBB0_13:
	cbnz	w9, LBB0_16
; %bb.14:
	mov	w20, #0
	b	LBB0_17
LBB0_15:
	str	w10, [x13]
LBB0_16:
	cmp	x8, #0
	cset	w1, ne
	mov	x0, x19
	bl	_mixart_update_analog_audio_level
	mov	w20, #1
LBB0_17:
	ldr	x0, [x19, #16]
	bl	_mutex_unlock
	mov	x0, x20
	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
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MIXART_ANALOG_CAPTURE_LEVEL_MIN,4,2 ; @MIXART_ANALOG_CAPTURE_LEVEL_MIN
	.comm	_MIXART_ANALOG_CAPTURE_LEVEL_MAX,4,2 ; @MIXART_ANALOG_CAPTURE_LEVEL_MAX
	.comm	_MIXART_ANALOG_PLAYBACK_LEVEL_MIN,4,2 ; @MIXART_ANALOG_PLAYBACK_LEVEL_MIN
	.comm	_MIXART_ANALOG_PLAYBACK_LEVEL_MAX,4,2 ; @MIXART_ANALOG_PLAYBACK_LEVEL_MAX
	.no_dead_strip	_mixart_analog_vol_put
.subsections_via_symbols
