	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_ac97_put_spsa
_snd_ac97_put_spsa:                     ## @snd_ac97_put_spsa
	.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, %r14
	movq	%rdi, %rbx
	callq	_snd_kcontrol_chip
	movq	%rax, %r15
	movl	(%rbx), %eax
	movzbl	%al, %r12d
	movl	%eax, %ebx
	shrl	$8, %ebx
	shrl	$16, %eax
	movzbl	%al, %r13d
	movq	(%r14), %rax
	movl	(%rax), %r14d
	andl	%r13d, %r14d
	movq	%r15, %rdi
	callq	_mutex_lock
	movl	%ebx, %ecx
	shll	%cl, %r13d
	shll	%cl, %r14d
	movq	%r15, %rdi
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movl	%r12d, %esi
	callq	_snd_ac97_read_cache
	movzwl	%ax, %eax
	movl	%r13d, %ecx
	notl	%ecx
	andl	%eax, %ecx
	movzwl	%r14w, %edx
	orl	%ecx, %edx
	xorl	%r12d, %r12d
	cmpl	%eax, %edx
	je	LBB0_3
## %bb.1:
	movq	_AC97_EXTENDED_STATUS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_snd_ac97_read_cache
	movw	%ax, -42(%rbp)                  ## 2-byte Spill
	movl	(%rbx), %esi
	movq	_AC97_EA_SPDIF@GOTPCREL(%rip), %rbx
	movzwl	(%rbx), %edx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_snd_ac97_update_bits_nolock
	movzwl	%r13w, %edx
	movzwl	%r14w, %ecx
	movq	%r15, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_snd_ac97_update_bits_nolock
	movl	%eax, %r12d
	movzwl	(%rbx), %eax
	testw	%ax, -42(%rbp)                  ## 2-byte Folded Reload
	je	LBB0_3
## %bb.2:
	movq	_AC97_EXTENDED_STATUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movzwl	%ax, %ecx
	movq	%r15, %rdi
	movl	%ecx, %edx
	callq	_snd_ac97_update_bits_nolock
LBB0_3:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AC97_EXTENDED_STATUS,4,2       ## @AC97_EXTENDED_STATUS
	.comm	_AC97_EA_SPDIF,2,1              ## @AC97_EA_SPDIF
	.no_dead_strip	_snd_ac97_put_spsa
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_ac97_put_spsa
_snd_ac97_put_spsa:                     ; @snd_ac97_put_spsa
	.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
	mov	x19, x0
	ldr	w8, [x20]
	and	w20, w8, #0xff
	lsr	w22, w8, #8
	ubfx	w23, w8, #16, #8
	ldr	x8, [x21]
	ldr	w8, [x8]
	and	w21, w8, w23
	bl	_mutex_lock
	lsl	w23, w23, w22
	lsl	w21, w21, w22
	mov	x0, x19
	mov	x1, x20
	bl	_snd_ac97_read_cache
	bic	w8, w0, w23
	and	w21, w21, #0xffff
	orr	w8, w8, w21
	cmp	w8, w0
	b.ne	LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_4
LBB0_2:
Lloh0:
	adrp	x24, _AC97_EXTENDED_STATUS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _AC97_EXTENDED_STATUS@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_snd_ac97_read_cache
	mov	x22, x0
	ldr	w1, [x24]
Lloh2:
	adrp	x25, _AC97_EA_SPDIF@GOTPAGE
Lloh3:
	ldr	x25, [x25, _AC97_EA_SPDIF@GOTPAGEOFF]
	ldrh	w2, [x25]
	mov	x0, x19
	mov	w3, #0
	bl	_snd_ac97_update_bits_nolock
	and	w2, w23, #0xffff
	mov	x0, x19
	mov	x1, x20
	mov	x3, x21
	bl	_snd_ac97_update_bits_nolock
	mov	x20, x0
	ldrh	w2, [x25]
	tst	w2, w22
	b.eq	LBB0_4
; %bb.3:
	ldr	w1, [x24]
	mov	x0, x19
	mov	x3, x2
	bl	_snd_ac97_update_bits_nolock
LBB0_4:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_AC97_EXTENDED_STATUS,4,2       ; @AC97_EXTENDED_STATUS
	.comm	_AC97_EA_SPDIF,2,1              ; @AC97_EA_SPDIF
	.no_dead_strip	_snd_ac97_put_spsa
.subsections_via_symbols
