	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_es1968_pcm_prepare
_snd_es1968_pcm_prepare:                ## @snd_es1968_pcm_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_snd_pcm_substream_chip
	movq	%rax, %r14
	movq	(%rbx), %r15
	movq	8(%r15), %r12
	movq	%rbx, %rdi
	callq	_snd_pcm_lib_buffer_bytes
	movl	%eax, 20(%r12)
	movq	%rbx, %rdi
	callq	_snd_pcm_lib_period_bytes
	movl	%eax, 16(%r12)
	movq	$1, (%r12)
	movl	4(%r15), %edi
	callq	_snd_pcm_format_width
	cmpl	$16, %eax
	jne	LBB0_2
## %bb.1:
	movq	_ESS_FMT_16BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r12)
LBB0_2:
	cmpl	$2, (%r15)
	jl	LBB0_5
## %bb.3:
	movq	_ESS_FMT_STEREO@GOTPCREL(%rip), %rax
	movl	4(%r12), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 4(%r12)
	movq	_ESS_FMT_16BIT@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_5
## %bb.4:
	incl	(%r12)
LBB0_5:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_snd_es1968_calc_bob_rate
	movl	%eax, 12(%r12)
	movl	8(%r12), %eax
	cmpl	$129, %eax
	je	LBB0_8
## %bb.6:
	cmpl	$128, %eax
	jne	LBB0_9
## %bb.7:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_snd_es1968_playback_setup
	jmp	LBB0_9
LBB0_8:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_snd_es1968_capture_setup
LBB0_9:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ESS_FMT_16BIT,4,2              ## @ESS_FMT_16BIT
	.comm	_ESS_FMT_STEREO,4,2             ## @ESS_FMT_STEREO
	.no_dead_strip	_snd_es1968_pcm_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function snd_es1968_pcm_prepare
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_snd_es1968_pcm_prepare:                ; @snd_es1968_pcm_prepare
	.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, x0
	bl	_snd_pcm_substream_chip
	mov	x20, x0
	ldr	x19, [x22]
	ldr	x21, [x19, #8]
	mov	x0, x22
	bl	_snd_pcm_lib_buffer_bytes
	str	w0, [x21, #20]
	mov	x0, x22
	bl	_snd_pcm_lib_period_bytes
	str	w0, [x21, #16]
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x21]
	ldr	w0, [x19, #4]
	bl	_snd_pcm_format_width
	cmp	w0, #16
	b.ne	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _ESS_FMT_16BIT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ESS_FMT_16BIT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [x21, #4]
	orr	w8, w9, w8
	str	w8, [x21, #4]
LBB0_2:
	ldr	w8, [x19]
	cmp	w8, #2
	b.lt	LBB0_5
; %bb.3:
Lloh5:
	adrp	x8, _ESS_FMT_STEREO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ESS_FMT_STEREO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x21, #4]
	orr	w8, w9, w8
	str	w8, [x21, #4]
Lloh8:
	adrp	x9, _ESS_FMT_16BIT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ESS_FMT_16BIT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
LBB0_5:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_snd_es1968_calc_bob_rate
	str	w0, [x21, #12]
	ldr	w8, [x21, #8]
	cmp	w8, #129
	b.eq	LBB0_8
; %bb.6:
	cmp	w8, #128
	b.ne	LBB0_9
; %bb.7:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_snd_es1968_playback_setup
	b	LBB0_9
LBB0_8:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_snd_es1968_capture_setup
LBB0_9:
	mov	w0, #0
	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
	ret
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ESS_FMT_16BIT,4,2              ; @ESS_FMT_16BIT
	.comm	_ESS_FMT_STEREO,4,2             ; @ESS_FMT_STEREO
	.no_dead_strip	_snd_es1968_pcm_prepare
.subsections_via_symbols
