	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_cx88_volume_put
_snd_cx88_volume_put:                   ## @snd_cx88_volume_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_snd_kcontrol_chip
	movq	%rax, %r14
	movq	8(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_snd_cx88_wm8775_volume_put
LBB0_2:
	movq	(%r15), %rax
	movl	(%rax), %ecx
	movl	4(%rax), %ebx
	andl	$63, %ecx
	andl	$63, %ebx
	movl	%ebx, %eax
	subl	%ecx, %eax
	movl	%eax, %r15d
	negl	%r15d
	orl	$64, %r15d
	testl	%eax, %eax
	cmovnsl	%eax, %r15d
	cmovsl	%ecx, %ebx
	xorl	$63, %ebx
	movq	%r14, %rdi
	callq	_spin_lock_irq
	movq	_AUD_VOL_CTL@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_cx_read
	movl	%eax, %ecx
	andl	$63, %ecx
	xorl	%r12d, %r12d
	cmpl	%ecx, %ebx
	je	LBB0_4
## %bb.3:
	movq	_SHADOW_AUD_VOL_CTL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	(%r13), %esi
	andl	$-64, %eax
	orl	%eax, %ebx
	movl	%ebx, %edx
	callq	_cx_swrite
	movl	$1, %r12d
LBB0_4:
	movq	_AUD_BAL_CTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_cx_read
	andl	$127, %eax
	cmpl	%r15d, %eax
	je	LBB0_6
## %bb.5:
	movl	(%rbx), %edi
	movl	%r15d, %esi
	callq	_cx_write
	movl	$1, %r12d
LBB0_6:
	movq	%r14, %rdi
	callq	_spin_unlock_irq
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AUD_VOL_CTL,4,2                ## @AUD_VOL_CTL
	.comm	_SHADOW_AUD_VOL_CTL,4,2         ## @SHADOW_AUD_VOL_CTL
	.comm	_AUD_BAL_CTL,4,2                ## @AUD_BAL_CTL
	.no_dead_strip	_snd_cx88_volume_put
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_cx88_volume_put
_snd_cx88_volume_put:                   ; @snd_cx88_volume_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	x20, x1
	mov	x21, x0
	bl	_snd_kcontrol_chip
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x21
	mov	x1, x20
	bl	_snd_cx88_wm8775_volume_put
LBB0_2:
	ldr	x8, [x20]
	ldp	w9, w8, [x8]
	and	w9, w9, #0x3f
	and	w8, w8, #0x3f
	sub	w10, w8, w9
	neg	w11, w10
	orr	w11, w11, #0x40
	cmp	w10, #0
	csel	w20, w11, w10, lt
	csel	w8, w9, w8, lt
	eor	w22, w8, #0x3f
	mov	x0, x19
	bl	_spin_lock_irq
Lloh0:
	adrp	x23, _AUD_VOL_CTL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _AUD_VOL_CTL@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_cx_read
	mov	w21, #0
	and	w8, w0, #0x3f
	cmp	w22, w8
	b.eq	LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _SHADOW_AUD_VOL_CTL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SHADOW_AUD_VOL_CTL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w1, [x23]
	and	w9, w0, #0xffffffc0
	orr	w2, w22, w9
	mov	x0, x8
	bl	_cx_swrite
	mov	w21, #1
LBB0_4:
Lloh5:
	adrp	x22, _AUD_BAL_CTL@GOTPAGE
Lloh6:
	ldr	x22, [x22, _AUD_BAL_CTL@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_cx_read
	and	w8, w0, #0x7f
	cmp	w8, w20
	b.eq	LBB0_6
; %bb.5:
	ldr	w0, [x22]
	mov	x1, x20
	bl	_cx_write
	mov	w21, #1
LBB0_6:
	mov	x0, x19
	bl	_spin_unlock_irq
	mov	x0, x21
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_AUD_VOL_CTL,4,2                ; @AUD_VOL_CTL
	.comm	_SHADOW_AUD_VOL_CTL,4,2         ; @SHADOW_AUD_VOL_CTL
	.comm	_AUD_BAL_CTL,4,2                ; @AUD_BAL_CTL
	.no_dead_strip	_snd_cx88_volume_put
.subsections_via_symbols
