	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_sb16_playback_prepare
_snd_sb16_playback_prepare:             ## @snd_sb16_playback_prepare
	.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	%rdi, %r15
	callq	_snd_pcm_substream_chip
	movq	%rax, %r13
	movq	(%r15), %r12
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_snd_sb16_csp_playback_prepare
	movl	12(%r12), %edi
	callq	_snd_pcm_format_unsigned
	testq	%rax, %rax
	movq	_SB_DSP4_MODE_SIGN_STEREO@GOTPCREL(%rip), %rax
	cmovgq	_SB_DSP4_MODE_UNS_STEREO@GOTPCREL(%rip), %rax
	movq	_SB_DSP4_MODE_SIGN_MONO@GOTPCREL(%rip), %rcx
	cmovgq	_SB_DSP4_MODE_UNS_MONO@GOTPCREL(%rip), %rcx
	cmpl	$2, (%r12)
	cmovgeq	%rax, %rcx
	movl	8(%r12), %esi
	movzbl	(%rcx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_SNDRV_PCM_STREAM_PLAYBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_snd_sb16_setup_rate
	movq	%r15, %rdi
	callq	_snd_pcm_lib_buffer_bytes
	movl	%eax, (%r13)
	movq	_SB_MODE_PLAYBACK_8@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%edx, %edx
	andl	4(%r13), %ecx
	sete	%dl
	movl	8(%r13,%rdx,4), %edi
	movl	4(%r12), %esi
	movq	_DMA_MODE_WRITE@GOTPCREL(%rip), %rdx
	movq	_DMA_AUTOINIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movl	%eax, %edx
	callq	_snd_dma_program
	movq	%r15, %rdi
	callq	_snd_pcm_lib_period_bytes
	movl	%eax, %ebx
	leaq	16(%r13), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	_SB_MODE_PLAYBACK_16@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	4(%r13), %eax
	movq	_SB_DSP4_OUT16_AI@GOTPCREL(%rip), %rax
	cmoveq	_SB_DSP4_OUT8_AI@GOTPCREL(%rip), %rax
	movq	_SB_DSP_DMA16_OFF@GOTPCREL(%rip), %r14
	cmoveq	_SB_DSP_DMA8_OFF@GOTPCREL(%rip), %r14
	setne	%cl
	shrl	%cl, %ebx
	decl	%ebx
	movl	(%rax), %esi
	movzbl	%bl, %r12d
	movq	%r13, %rdi
	callq	_snd_sbdsp_command
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_snd_sbdsp_command
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_snd_sbdsp_command
	shrl	$8, %ebx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_snd_sbdsp_command
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_snd_sbdsp_command
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SB_DSP4_MODE_UNS_STEREO,1,0    ## @SB_DSP4_MODE_UNS_STEREO
	.comm	_SB_DSP4_MODE_UNS_MONO,1,0      ## @SB_DSP4_MODE_UNS_MONO
	.comm	_SB_DSP4_MODE_SIGN_STEREO,1,0   ## @SB_DSP4_MODE_SIGN_STEREO
	.comm	_SB_DSP4_MODE_SIGN_MONO,1,0     ## @SB_DSP4_MODE_SIGN_MONO
	.comm	_SNDRV_PCM_STREAM_PLAYBACK,4,2  ## @SNDRV_PCM_STREAM_PLAYBACK
	.comm	_SB_MODE_PLAYBACK_8,4,2         ## @SB_MODE_PLAYBACK_8
	.comm	_DMA_MODE_WRITE,4,2             ## @DMA_MODE_WRITE
	.comm	_DMA_AUTOINIT,4,2               ## @DMA_AUTOINIT
	.comm	_SB_MODE_PLAYBACK_16,4,2        ## @SB_MODE_PLAYBACK_16
	.comm	_SB_DSP4_OUT16_AI,4,2           ## @SB_DSP4_OUT16_AI
	.comm	_SB_DSP_DMA16_OFF,4,2           ## @SB_DSP_DMA16_OFF
	.comm	_SB_DSP4_OUT8_AI,4,2            ## @SB_DSP4_OUT8_AI
	.comm	_SB_DSP_DMA8_OFF,4,2            ## @SB_DSP_DMA8_OFF
	.no_dead_strip	_snd_sb16_playback_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_sb16_playback_prepare
_snd_sb16_playback_prepare:             ; @snd_sb16_playback_prepare
	.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	x21, x0
	bl	_snd_pcm_substream_chip
	mov	x19, x0
	ldr	x22, [x21]
	mov	x1, x22
	bl	_snd_sb16_csp_playback_prepare
	ldr	w0, [x22, #12]
	bl	_snd_pcm_format_unsigned
	ldr	w8, [x22]
Lloh0:
	adrp	x9, _SB_DSP4_MODE_UNS_STEREO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SB_DSP4_MODE_UNS_STEREO@GOTPAGEOFF]
Lloh2:
	adrp	x10, _SB_DSP4_MODE_SIGN_STEREO@GOTPAGE
Lloh3:
	ldr	x10, [x10, _SB_DSP4_MODE_SIGN_STEREO@GOTPAGEOFF]
	cmp	x0, #0
	csel	x9, x9, x10, gt
Lloh4:
	adrp	x10, _SB_DSP4_MODE_UNS_MONO@GOTPAGE
Lloh5:
	ldr	x10, [x10, _SB_DSP4_MODE_UNS_MONO@GOTPAGEOFF]
Lloh6:
	adrp	x11, _SB_DSP4_MODE_SIGN_MONO@GOTPAGE
Lloh7:
	ldr	x11, [x11, _SB_DSP4_MODE_SIGN_MONO@GOTPAGEOFF]
	csel	x10, x10, x11, gt
	cmp	w8, #1
	csel	x8, x9, x10, gt
	ldrb	w20, [x8]
	ldr	w1, [x22, #8]
Lloh8:
	adrp	x8, _SNDRV_PCM_STREAM_PLAYBACK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SNDRV_PCM_STREAM_PLAYBACK@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_snd_sb16_setup_rate
	mov	x0, x21
	bl	_snd_pcm_lib_buffer_bytes
	mov	x2, x0
	str	w0, [x19]
	ldr	w8, [x19, #4]
Lloh11:
	adrp	x9, _SB_MODE_PLAYBACK_8@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SB_MODE_PLAYBACK_8@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	mov	w8, #8
	mov	w9, #12
	csel	x8, x9, x8, eq
	ldr	w0, [x19, x8]
Lloh14:
	adrp	x8, _DMA_MODE_WRITE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DMA_MODE_WRITE@GOTPAGEOFF]
	ldr	w1, [x22, #4]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _DMA_AUTOINIT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _DMA_AUTOINIT@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w3, w9, w8
	bl	_snd_dma_program
	mov	x0, x21
	bl	_snd_pcm_lib_period_bytes
	mov	x21, x0
	add	x22, x19, #16
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	w8, [x19, #4]
Lloh20:
	adrp	x9, _SB_MODE_PLAYBACK_16@GOTPAGE
Lloh21:
	ldr	x9, [x9, _SB_MODE_PLAYBACK_16@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
	lsr	w8, w21, w8
Lloh23:
	adrp	x9, _SB_DSP4_OUT8_AI@GOTPAGE
Lloh24:
	ldr	x9, [x9, _SB_DSP4_OUT8_AI@GOTPAGEOFF]
Lloh25:
	adrp	x10, _SB_DSP4_OUT16_AI@GOTPAGE
Lloh26:
	ldr	x10, [x10, _SB_DSP4_OUT16_AI@GOTPAGEOFF]
	csel	x9, x9, x10, eq
	ldr	w1, [x9]
Lloh27:
	adrp	x9, _SB_DSP_DMA8_OFF@GOTPAGE
Lloh28:
	ldr	x9, [x9, _SB_DSP_DMA8_OFF@GOTPAGEOFF]
Lloh29:
	adrp	x10, _SB_DSP_DMA16_OFF@GOTPAGE
Lloh30:
	ldr	x10, [x10, _SB_DSP_DMA16_OFF@GOTPAGEOFF]
	csel	x21, x9, x10, eq
	sub	w23, w8, #1
	mov	x0, x19
	bl	_snd_sbdsp_command
	mov	x0, x19
	mov	x1, x20
	bl	_snd_sbdsp_command
	and	w1, w23, #0xff
	mov	x0, x19
	bl	_snd_sbdsp_command
	lsr	w1, w23, #8
	mov	x0, x19
	bl	_snd_sbdsp_command
	ldr	w1, [x21]
	mov	x0, x19
	bl	_snd_sbdsp_command
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	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	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SB_DSP4_MODE_UNS_STEREO,1,0    ; @SB_DSP4_MODE_UNS_STEREO
	.comm	_SB_DSP4_MODE_UNS_MONO,1,0      ; @SB_DSP4_MODE_UNS_MONO
	.comm	_SB_DSP4_MODE_SIGN_STEREO,1,0   ; @SB_DSP4_MODE_SIGN_STEREO
	.comm	_SB_DSP4_MODE_SIGN_MONO,1,0     ; @SB_DSP4_MODE_SIGN_MONO
	.comm	_SNDRV_PCM_STREAM_PLAYBACK,4,2  ; @SNDRV_PCM_STREAM_PLAYBACK
	.comm	_SB_MODE_PLAYBACK_8,4,2         ; @SB_MODE_PLAYBACK_8
	.comm	_DMA_MODE_WRITE,4,2             ; @DMA_MODE_WRITE
	.comm	_DMA_AUTOINIT,4,2               ; @DMA_AUTOINIT
	.comm	_SB_MODE_PLAYBACK_16,4,2        ; @SB_MODE_PLAYBACK_16
	.comm	_SB_DSP4_OUT16_AI,4,2           ; @SB_DSP4_OUT16_AI
	.comm	_SB_DSP_DMA16_OFF,4,2           ; @SB_DSP_DMA16_OFF
	.comm	_SB_DSP4_OUT8_AI,4,2            ; @SB_DSP4_OUT8_AI
	.comm	_SB_DSP_DMA8_OFF,4,2            ; @SB_DSP_DMA8_OFF
	.no_dead_strip	_snd_sb16_playback_prepare
.subsections_via_symbols
