	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_sb8mixer_put_mux
_snd_sb8mixer_put_mux:                  ## @snd_sb8mixer_put_mux
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	callq	_snd_kcontrol_chip
	movq	%rax, %r14
	movq	(%rbx), %rax
	movl	(%rax), %eax
	cmpl	$3, %eax
	jl	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_2:
	cmpl	$2, %eax
	jne	LBB0_3
## %bb.4:
	movq	_SB_DSP_MIXS_LINE@GOTPCREL(%rip), %rcx
	cmpl	$1, %eax
	je	LBB0_6
	jmp	LBB0_7
LBB0_3:
	movq	_SB_DSP_MIXS_MIC@GOTPCREL(%rip), %rcx
	cmpl	$1, %eax
	jne	LBB0_7
LBB0_6:
	movq	_SB_DSP_MIXS_CD@GOTPCREL(%rip), %rcx
LBB0_7:
	movb	(%rcx), %bl
	addb	%bl, %bl
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_SB_DSP_CAPTURE_SOURCE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_snd_sbmixer_read
	movl	%eax, %ecx
	andb	$-7, %cl
	orb	%bl, %cl
	xorl	%ebx, %ebx
	cmpb	%al, %cl
	setne	%r12b
	je	LBB0_9
## %bb.8:
	movl	(%r15), %esi
	movzbl	%cl, %edx
	movq	%r14, %rdi
	callq	_snd_sbmixer_write
LBB0_9:
	movb	%r12b, %bl
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SB_DSP_MIXS_CD,1,0             ## @SB_DSP_MIXS_CD
	.comm	_SB_DSP_MIXS_LINE,1,0           ## @SB_DSP_MIXS_LINE
	.comm	_SB_DSP_MIXS_MIC,1,0            ## @SB_DSP_MIXS_MIC
	.comm	_SB_DSP_CAPTURE_SOURCE,4,2      ## @SB_DSP_CAPTURE_SOURCE
	.no_dead_strip	_snd_sb8mixer_put_mux
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_sb8mixer_put_mux
_snd_sb8mixer_put_mux:                  ; @snd_sb8mixer_put_mux
	.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
	bl	_snd_kcontrol_chip
	ldr	x8, [x20]
	ldr	w8, [x8]
	cmp	w8, #3
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_5
LBB0_2:
	mov	x19, x0
Lloh3:
	adrp	x9, _SB_DSP_MIXS_CD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SB_DSP_MIXS_CD@GOTPAGEOFF]
Lloh5:
	adrp	x10, _SB_DSP_MIXS_LINE@GOTPAGE
Lloh6:
	ldr	x10, [x10, _SB_DSP_MIXS_LINE@GOTPAGEOFF]
Lloh7:
	adrp	x11, _SB_DSP_MIXS_MIC@GOTPAGE
Lloh8:
	ldr	x11, [x11, _SB_DSP_MIXS_MIC@GOTPAGEOFF]
	cmp	w8, #2
	csel	x10, x10, x11, eq
	cmp	w8, #1
	csel	x8, x9, x10, eq
	ldrb	w20, [x8]
	bl	_spin_lock_irqsave
Lloh9:
	adrp	x21, _SB_DSP_CAPTURE_SOURCE@GOTPAGE
Lloh10:
	ldr	x21, [x21, _SB_DSP_CAPTURE_SOURCE@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_snd_sbmixer_read
	and	w8, w0, #0xfffffff9
	orr	w8, w8, w20, lsl #1
	and	w2, w8, #0xff
	cmp	w2, w0
	cset	w20, ne
	b.eq	LBB0_4
; %bb.3:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_snd_sbmixer_write
LBB0_4:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
LBB0_5:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SB_DSP_MIXS_CD,1,0             ; @SB_DSP_MIXS_CD
	.comm	_SB_DSP_MIXS_LINE,1,0           ; @SB_DSP_MIXS_LINE
	.comm	_SB_DSP_MIXS_MIC,1,0            ; @SB_DSP_MIXS_MIC
	.comm	_SB_DSP_CAPTURE_SOURCE,4,2      ; @SB_DSP_CAPTURE_SOURCE
	.no_dead_strip	_snd_sb8mixer_put_mux
.subsections_via_symbols
