	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_sb16_setup_rate
_snd_sb16_setup_rate:                   ## @snd_sb16_setup_rate
	.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
	movl	%edx, %r12d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_SNDRV_PCM_STREAM_PLAYBACK@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	_SB_MODE_PLAYBACK_16@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_SB_MODE_CAPTURE_16@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_snd_sb_ack_16bit
	jmp	LBB0_6
LBB0_5:
	movq	%rbx, %rdi
	callq	_snd_sb_ack_8bit
LBB0_6:
	movq	_SB_RATE_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	jne	LBB0_8
## %bb.7:
	movw	%r15w, 4(%rbx)
	movzwl	%r15w, %r12d
	movq	_SB_DSP_SAMPLE_RATE_IN@GOTPCREL(%rip), %rax
	movzwl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_snd_sbdsp_command
	shrl	$8, %r12d
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_snd_sbdsp_command
	movzbl	%r15b, %r15d
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_snd_sbdsp_command
	movq	_SB_DSP_SAMPLE_RATE_OUT@GOTPCREL(%rip), %rax
	movzwl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_snd_sbdsp_command
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_snd_sbdsp_command
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_snd_sbdsp_command
LBB0_8:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SNDRV_PCM_STREAM_PLAYBACK,4,2  ## @SNDRV_PCM_STREAM_PLAYBACK
	.comm	_SB_MODE_PLAYBACK_16,4,2        ## @SB_MODE_PLAYBACK_16
	.comm	_SB_MODE_CAPTURE_16,4,2         ## @SB_MODE_CAPTURE_16
	.comm	_SB_RATE_LOCK,4,2               ## @SB_RATE_LOCK
	.comm	_SB_DSP_SAMPLE_RATE_IN,2,1      ## @SB_DSP_SAMPLE_RATE_IN
	.comm	_SB_DSP_SAMPLE_RATE_OUT,2,1     ## @SB_DSP_SAMPLE_RATE_OUT
	.no_dead_strip	_snd_sb16_setup_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_sb16_setup_rate
_snd_sb16_setup_rate:                   ; @snd_sb16_setup_rate
	.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	x22, x2
	mov	x21, x1
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _SNDRV_PCM_STREAM_PLAYBACK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SNDRV_PCM_STREAM_PLAYBACK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _SB_MODE_PLAYBACK_16@GOTPAGE
Lloh4:
	ldr	x10, [x10, _SB_MODE_PLAYBACK_16@GOTPAGEOFF]
Lloh5:
	adrp	x11, _SB_MODE_CAPTURE_16@GOTPAGE
Lloh6:
	ldr	x11, [x11, _SB_MODE_CAPTURE_16@GOTPAGEOFF]
	cmp	w9, w22
	csel	x9, x10, x11, eq
	ldr	w9, [x9]
	mov	x0, x20
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	bl	_snd_sb_ack_16bit
	b	LBB0_3
LBB0_2:
	bl	_snd_sb_ack_8bit
LBB0_3:
	ldr	w8, [x20]
Lloh7:
	adrp	x9, _SB_RATE_LOCK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SB_RATE_LOCK@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.4:
	strh	w21, [x20, #4]
Lloh10:
	adrp	x8, _SB_DSP_SAMPLE_RATE_IN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SB_DSP_SAMPLE_RATE_IN@GOTPAGEOFF]
	ldrh	w1, [x8]
	mov	x0, x20
	bl	_snd_sbdsp_command
	lsr	w22, w21, #8
	mov	x0, x20
	mov	x1, x22
	bl	_snd_sbdsp_command
	and	w21, w21, #0xff
	mov	x0, x20
	mov	x1, x21
	bl	_snd_sbdsp_command
Lloh12:
	adrp	x8, _SB_DSP_SAMPLE_RATE_OUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SB_DSP_SAMPLE_RATE_OUT@GOTPAGEOFF]
	ldrh	w1, [x8]
	mov	x0, x20
	bl	_snd_sbdsp_command
	mov	x0, x20
	mov	x1, x22
	bl	_snd_sbdsp_command
	mov	x0, x20
	mov	x1, x21
	bl	_snd_sbdsp_command
LBB0_5:
	mov	x0, x19
	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
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SNDRV_PCM_STREAM_PLAYBACK,4,2  ; @SNDRV_PCM_STREAM_PLAYBACK
	.comm	_SB_MODE_PLAYBACK_16,4,2        ; @SB_MODE_PLAYBACK_16
	.comm	_SB_MODE_CAPTURE_16,4,2         ; @SB_MODE_CAPTURE_16
	.comm	_SB_RATE_LOCK,4,2               ; @SB_RATE_LOCK
	.comm	_SB_DSP_SAMPLE_RATE_IN,2,1      ; @SB_DSP_SAMPLE_RATE_IN
	.comm	_SB_DSP_SAMPLE_RATE_OUT,2,1     ; @SB_DSP_SAMPLE_RATE_OUT
	.no_dead_strip	_snd_sb16_setup_rate
.subsections_via_symbols
