	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_pmac_awacs_put_volume
_snd_pmac_awacs_put_volume:             ## @snd_pmac_awacs_put_volume
	.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, %rbx
	movq	%rdi, %r14
	callq	_snd_kcontrol_chip
	movq	(%rbx), %rcx
	movl	(%rcx), %esi
	cmpl	$15, %esi
	ja	LBB0_2
## %bb.1:
	movl	4(%rcx), %ecx
	cmpl	$16, %ecx
	jae	LBB0_2
## %bb.3:
	movl	(%r14), %edx
	movzbl	%dl, %edi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	%edx, %r13d
	shrl	$8, %r13d
	movl	$15, %ebx
	subl	%esi, %ebx
	movl	$15, %r15d
	subl	%ecx, %r15d
	testl	$65536, %edx                    ## imm = 0x10000
	cmovel	%ecx, %r15d
	movl	$15, %r14d
	cmovel	%esi, %ebx
	movq	%rax, %r12
	addq	$8, %r12
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rax,%rdx,4), %eax
	movl	%r13d, %ecx
	shll	%cl, %r14d
	notl	%r14d
	andl	%eax, %r14d
	shll	%cl, %ebx
	andl	$-16, %r14d
	orl	%r15d, %r14d
	movl	%eax, %r15d
	orl	%r14d, %ebx
	movq	%rdx, %r14
	cmpl	%ebx, %eax
	je	LBB0_5
## %bb.4:
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_snd_pmac_awacs_write_reg
LBB0_5:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	cmpl	%r14d, %r15d
	setne	%al
	jmp	LBB0_6
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_snd_pmac_awacs_put_volume
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_pmac_awacs_put_volume
_snd_pmac_awacs_put_volume:             ; @snd_pmac_awacs_put_volume
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	mov	x20, x0
	bl	_snd_kcontrol_chip
	ldr	x9, [x21]
	ldp	w8, w9, [x9]
	cmp	w8, #15
	ccmp	w9, #16, #2, ls
	b.lo	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_2:
	mov	x19, x0
	ldr	w10, [x20]
	and	x20, x10, #0xff
	lsr	w23, w10, #8
	mov	w24, #15
	sub	w11, w24, w8
	sub	w12, w24, w9
	tst	w10, #0x10000
	csel	w25, w9, w12, eq
	csel	w26, w8, w11, eq
	add	x21, x0, #8
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x8, [x19]
	ldr	w22, [x8, x20, lsl #2]
	lsl	w8, w24, w23
	bic	w8, w22, w8
	and	w8, w8, #0xfffffff0
	lsl	w9, w26, w23
	orr	w9, w25, w9
	orr	w2, w9, w8
	cmp	w22, w2
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	bl	_snd_pmac_awacs_write_reg
LBB0_4:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	cmp	w22, w20
	cset	w0, ne
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_snd_pmac_awacs_put_volume
.subsections_via_symbols
