	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function onyx_snd_mute_put
_onyx_snd_mute_put:                     ## @onyx_snd_mute_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	callq	_snd_kcontrol_chip
	movq	%rax, %r15
	movl	$0, -36(%rbp)
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_mutex_lock
	cmpq	$0, 8(%r15)
	jne	LBB0_2
## %bb.1:
	movq	_ONYX_REG_DAC_CONTROL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-36(%rbp), %rdx
	movq	%r15, %rdi
	callq	_onyx_read_register
	movq	_ONYX_MUTE_RIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_ONYX_MUTE_LEFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	orl	%eax, %edx
	notl	%edx
	andl	-36(%rbp), %edx
	movq	(%r14), %rsi
	xorl	%r12d, %r12d
	cmpl	$0, (%rsi)
	cmovnel	%r12d, %ecx
	cmpl	$0, 4(%rsi)
	cmovel	%eax, %r12d
	orl	%ecx, %r12d
	orl	%edx, %r12d
	movl	(%rbx), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_onyx_write_register
	movl	%eax, %ebx
LBB0_2:
	movq	%r15, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	cmpl	%r12d, -36(%rbp)
	setne	%al
	testl	%ebx, %ebx
	cmovnel	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ONYX_REG_DAC_CONTROL,4,2       ## @ONYX_REG_DAC_CONTROL
	.comm	_ONYX_MUTE_RIGHT,4,2            ## @ONYX_MUTE_RIGHT
	.comm	_ONYX_MUTE_LEFT,4,2             ## @ONYX_MUTE_LEFT
	.no_dead_strip	_onyx_snd_mute_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_mute_put
_onyx_snd_mute_put:                     ; @onyx_snd_mute_put
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	bl	_snd_kcontrol_chip
	mov	x19, x0
	str	wzr, [sp, #12]
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	bl	_mutex_lock
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w20, #0
	neg	w21, w21
	b	LBB0_3
LBB0_2:
Lloh3:
	adrp	x21, _ONYX_REG_DAC_CONTROL@GOTPAGE
Lloh4:
	ldr	x21, [x21, _ONYX_REG_DAC_CONTROL@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_onyx_read_register
	ldr	w8, [sp, #12]
Lloh5:
	adrp	x9, _ONYX_MUTE_RIGHT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ONYX_MUTE_RIGHT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _ONYX_MUTE_LEFT@GOTPAGE
Lloh9:
	ldr	x10, [x10, _ONYX_MUTE_LEFT@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	orr	w11, w10, w9
	bic	w8, w8, w11
	ldr	x11, [x20]
	ldp	w12, w11, [x11]
	cmp	w12, #0
	csel	w10, w10, wzr, eq
	orr	w8, w10, w8
	cmp	w11, #0
	csel	w9, w9, wzr, eq
	orr	w20, w8, w9
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_onyx_write_register
	mov	x21, x0
LBB0_3:
	mov	x0, x19
	bl	_mutex_unlock
	ldr	w8, [sp, #12]
	cmp	w8, w20
	cset	w8, ne
	cmp	w21, #0
	csel	w0, w8, w21, eq
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ONYX_REG_DAC_CONTROL,4,2       ; @ONYX_REG_DAC_CONTROL
	.comm	_ONYX_MUTE_RIGHT,4,2            ; @ONYX_MUTE_RIGHT
	.comm	_ONYX_MUTE_LEFT,4,2             ; @ONYX_MUTE_LEFT
	.no_dead_strip	_onyx_snd_mute_put
.subsections_via_symbols
