	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_cs46xx_playback_prepare
_snd_cs46xx_playback_prepare:           ## @snd_cs46xx_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, %rbx
	callq	_snd_pcm_substream_chip
	movq	%rax, %r15
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %r13
	movq	16(%r13), %r14
	movq	_BA1_PFIE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_snd_cs46xx_peek
	movl	%eax, %ebx
	andl	$-61504, %ebx                   ## imm = 0xFFFF0FC0
	movl	$2, (%r14)
	cmpl	$1, (%r13)
	jne	LBB0_2
## %bb.1:
	movl	$1, (%r14)
	orl	$8192, %ebx                     ## imm = 0x2000
LBB0_2:
	movl	12(%r13), %edi
	callq	_snd_pcm_format_width
	cmpl	$8, %eax
	jne	LBB0_4
## %bb.3:
	decl	(%r14)
	orl	$4096, %ebx                     ## imm = 0x1000
LBB0_4:
	movl	12(%r13), %edi
	callq	_snd_pcm_format_unsigned
	movl	%ebx, %r12d
	orl	$32768, %r12d                   ## imm = 0x8000
	testq	%rax, %rax
	cmovel	%ebx, %r12d
	movl	12(%r13), %edi
	callq	_snd_pcm_format_width
	cmpl	$8, %eax
	je	LBB0_6
## %bb.5:
	movl	12(%r13), %edi
	callq	_snd_pcm_format_big_endian
	movl	%r12d, %ecx
	orl	$16384, %ecx                    ## imm = 0x4000
	testq	%rax, %rax
	cmovnel	%ecx, %r12d
LBB0_6:
	leaq	16(%r14), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_snd_pcm_lib_buffer_bytes
	movl	%eax, 20(%r14)
	movq	_CS46XX_FRAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	4(%r13), %eax
	movb	(%r14), %cl
	shll	%cl, %eax
	movl	%eax, 16(%r14)
	movq	_BA1_PBA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r14), %edx
	movq	%r15, %rdi
	callq	_snd_cs46xx_poke
	movq	_BA1_PDTC@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_snd_cs46xx_peek
	movb	(%r14), %cl
	movl	$4, %edx
	shll	%cl, %edx
	andl	$-1024, %eax                    ## imm = 0xFC00
	decl	%edx
	orl	%eax, %edx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_snd_cs46xx_poke
	movq	_BA1_PFIE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_snd_cs46xx_poke
	movl	8(%r13), %esi
	movq	%r15, %rdi
	callq	_snd_cs46xx_set_play_sample_rate
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BA1_PFIE,4,2                   ## @BA1_PFIE
	.comm	_CS46XX_FRAGS,4,2               ## @CS46XX_FRAGS
	.comm	_BA1_PBA,4,2                    ## @BA1_PBA
	.comm	_BA1_PDTC,4,2                   ## @BA1_PDTC
	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_snd_cs46xx_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_cs46xx_playback_prepare
_snd_cs46xx_playback_prepare:           ; @snd_cs46xx_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	x20, x0
	bl	_snd_pcm_substream_chip
	mov	x19, x0
	ldr	x22, [x20]
	ldr	x24, [x22, #16]
Lloh0:
	adrp	x23, _BA1_PFIE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _BA1_PFIE@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_snd_cs46xx_peek
	mov	w8, #-61504
	and	w21, w0, w8
	mov	w8, #2
	str	w8, [x24]
	ldr	w8, [x22]
	cmp	w8, #1
	b.ne	LBB0_2
; %bb.1:
	str	w8, [x24]
	orr	w21, w21, #0x2000
LBB0_2:
	ldr	w0, [x22, #12]
	bl	_snd_pcm_format_width
	cmp	w0, #8
	b.ne	LBB0_4
; %bb.3:
	ldr	w8, [x24]
	sub	w8, w8, #1
	str	w8, [x24]
	orr	w21, w21, #0x1000
LBB0_4:
	ldr	w0, [x22, #12]
	bl	_snd_pcm_format_unsigned
	orr	w8, w21, #0x8000
	cmp	x0, #0
	csel	w21, w21, w8, eq
	ldr	w0, [x22, #12]
	bl	_snd_pcm_format_width
	cmp	w0, #8
	b.eq	LBB0_6
; %bb.5:
	ldr	w0, [x22, #12]
	bl	_snd_pcm_format_big_endian
	orr	w8, w21, #0x4000
	cmp	x0, #0
	csel	w21, w21, w8, eq
LBB0_6:
	add	x0, x24, #16
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	mov	x0, x20
	bl	_snd_pcm_lib_buffer_bytes
	ldr	w8, [x22, #4]
Lloh2:
	adrp	x9, _CS46XX_FRAGS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CS46XX_FRAGS@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	mul	w8, w9, w8
	ldp	w9, w2, [x24]
	lsl	w8, w8, w9
	stp	w8, w0, [x24, #16]
Lloh5:
	adrp	x8, _BA1_PBA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BA1_PBA@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_snd_cs46xx_poke
Lloh8:
	adrp	x20, _BA1_PDTC@GOTPAGE
Lloh9:
	ldr	x20, [x20, _BA1_PDTC@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_snd_cs46xx_peek
	and	w8, w0, #0xfffffc00
	ldr	w9, [x24]
	mov	w10, #4
	lsl	w9, w10, w9
	sub	w9, w9, #1
	orr	w2, w9, w8
	ldr	w1, [x20]
	mov	x0, x19
	bl	_snd_cs46xx_poke
	ldr	w1, [x23]
	mov	x0, x19
	mov	x2, x21
	bl	_snd_cs46xx_poke
	ldr	w1, [x22, #8]
	mov	x0, x19
	bl	_snd_cs46xx_set_play_sample_rate
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_BA1_PFIE,4,2                   ; @BA1_PFIE
	.comm	_CS46XX_FRAGS,4,2               ; @CS46XX_FRAGS
	.comm	_BA1_PBA,4,2                    ; @BA1_PBA
	.comm	_BA1_PDTC,4,2                   ; @BA1_PDTC
	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_snd_cs46xx_playback_prepare
.subsections_via_symbols
