	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atc_pcm_playback_prepare
_atc_pcm_playback_prepare:              ## @atc_pcm_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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	24(%rdi), %rax
	movq	_SRC@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rbx
	movq	_AMIXER@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %r15
	movl	$0, -84(%rbp)
	movq	$0, -64(%rbp)
	movq	32(%rsi), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movl	(%rcx), %r12d
	movslq	(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	callq	_atc_pcm_release_resources
	movq	32(%r13), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, -96(%rbp)
	movl	(%r14), %eax
	movl	%eax, -92(%rbp)
	movq	_MEMRD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
	leaq	8(%r13), %rdx
	leaq	-96(%rbp), %rsi
	movq	%rbx, %rdi
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	callq	*(%rbx)
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_1
LBB0_3:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_atc_pcm_release_resources
LBB0_15:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	32(%r13), %rax
	movq	(%rax), %rax
	movl	8(%rax), %edi
	movl	(%r14), %esi
	imull	4(%r14), %esi
	callq	_atc_get_pitch
	movl	%eax, %r15d
	movq	8(%r13), %rbx
	movq	(%rbx), %rax
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	*32(%rax)
	movq	(%rbx), %rax
	movl	%r12d, -56(%rbp)                ## 4-byte Spill
	movq	24(%rax), %r12
	movl	%r15d, %edi
	callq	_select_rom
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	*%r12
	movq	(%rbx), %rax
	movq	16(%rax), %r15
	movq	32(%r13), %rax
	movq	(%rax), %rax
	movl	4(%rax), %edi
	callq	_convert_format
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	*%r15
	movq	(%rbx), %rax
	movq	8(%rax), %r15
	movq	%rbx, %rdi
	callq	*(%rax)
	xorl	%esi, %esi
	testq	%rax, %rax
	setne	%sil
	movq	%rbx, %rdi
	callq	*%r15
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	cmpl	$3, %eax
	movl	$2, %r15d
	cmovgel	%eax, %r15d
	leal	(,%r15,8), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	movq	%rax, 16(%r13)
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movl	(%r14), %ecx
	movl	%ecx, -64(%rbp)
	movq	$0, 24(%r13)
	leaq	-64(%rbp), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rdx
	callq	*8(%rdi)
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_3
## %bb.5:
	movl	%r15d, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	(,%rax,8), %r15
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	incq	24(%r13)
	leaq	8(%rax), %r12
	cmpq	%r12, %r15
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	16(%r13), %rcx
	leaq	(%rcx,%rax), %rdx
	addq	$8, %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	-64(%rbp), %rsi
	callq	*8(%rdi)
	movl	%eax, %ebx
	movq	%r12, %rax
	testl	%ebx, %ebx
	je	LBB0_6
	jmp	LBB0_3
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_3
LBB0_8:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_ct_map_audio_buffer
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r15
	movq	%r14, -104(%rbp)                ## 8-byte Spill
	leaq	8(%r14), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	shlq	$3, -80(%rbp)                   ## 8-byte Folded Spill
	xorl	%r12d, %r12d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	incq	%r12
	cmpq	%r12, -56(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_14
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r13), %rax
	movq	(%rax,%r12,8), %rbx
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rax
	leaq	8(%r15), %rsi
	movq	_INIT_VOL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	movq	16(%rcx), %rcx
	addq	-80(%rbp), %rcx                 ## 8-byte Folded Reload
	movl	(%rcx,%r12,4), %ecx
	movq	%rbx, %rdi
	callq	*(%rax)
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	(%r15), %rax
	movq	%r15, %rdi
	callq	*(%rax)
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r15
	jmp	LBB0_13
LBB0_14:
	movl	(%r13), %edi
	callq	_ct_timer_prepare
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_9:
	movl	%eax, %ebx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_SRC,8,3                        ## @SRC
	.comm	_AMIXER,8,3                     ## @AMIXER
	.comm	_MEMRD,4,2                      ## @MEMRD
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_INIT_VOL,4,2                   ## @INIT_VOL
	.no_dead_strip	_atc_pcm_playback_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atc_pcm_playback_prepare
_atc_pcm_playback_prepare:              ; @atc_pcm_playback_prepare
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #24]
Lloh0:
	adrp	x9, _SRC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SRC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x23, [x8, x9, lsl #3]
Lloh3:
	adrp	x9, _AMIXER@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AMIXER@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x22, [x8, x9, lsl #3]
	str	wzr, [sp, #28]
	str	xzr, [sp, #8]
	ldr	x8, [x1, #32]
	ldp	x9, x8, [x8]
	ldr	w26, [x9]
	ldrsw	x25, [x8]
	bl	_atc_pcm_release_resources
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	ldr	w8, [x8]
	ldr	w9, [x20]
	stp	w8, w9, [sp, #16]
Lloh6:
	adrp	x8, _MEMRD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MEMRD@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	ldr	x8, [x23]
	add	x21, x19, #8
	add	x1, sp, #16
	mov	x0, x23
	mov	x2, x21
	blr	x8
	mov	x23, x0
	cbz	w0, LBB0_3
LBB0_1:
	mov	x0, x20
	mov	x1, x19
	bl	_atc_pcm_release_resources
LBB0_2:
	mov	x0, x23
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_3:
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	ldr	w0, [x8, #8]
	ldp	w9, w8, [x20]
	mul	w1, w9, w8
	bl	_atc_get_pitch
	mov	x23, x0
	ldr	x24, [x19, #8]
	ldr	x8, [x24]
	ldr	x8, [x8, #32]
	mov	x0, x24
	mov	x1, x23
	blr	x8
	ldr	x8, [x24]
	ldr	x27, [x8, #24]
	mov	x0, x23
	bl	_select_rom
	mov	x1, x0
	mov	x0, x24
	blr	x27
	ldr	x8, [x24]
	ldr	x23, [x8, #16]
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	ldr	w0, [x8, #4]
	bl	_convert_format
	mov	x1, x0
	mov	x0, x24
	blr	x23
	ldr	x8, [x24]
	ldp	x8, x23, [x8]
	mov	x0, x24
	blr	x8
	cmp	x0, #0
	cset	w1, ne
	mov	x0, x24
	blr	x23
	mov	w8, #2
	cmp	w26, #2
	csel	w26, w26, w8, gt
	lsl	w0, w26, #3
Lloh9:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_kzalloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_8
; %bb.4:
	mov	x2, x0
	ldr	w8, [x20]
	str	w8, [sp, #8]
	str	xzr, [x19, #24]
	ldr	x8, [x22, #8]
	add	x1, sp, #8
	mov	x0, x22
	blr	x8
	mov	x23, x0
	cbnz	w0, LBB0_1
; %bb.5:
	mov	x8, #0
	lsl	x24, x26, #3
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #24]
	add	x9, x9, #1
	str	x9, [x19, #24]
	add	x27, x8, #8
	cmp	x24, x27
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x19, #16]
	ldr	x10, [x22, #8]
	add	x8, x9, x8
	add	x2, x8, #8
	add	x1, sp, #8
	mov	x0, x22
	blr	x10
	mov	x8, x27
	cbz	w0, LBB0_6
	b	LBB0_14
LBB0_8:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_1
LBB0_9:
	mov	x0, x20
	mov	x1, x19
	bl	_ct_map_audio_buffer
	tbnz	w0, #31, LBB0_14
; %bb.10:
	mov	x27, #0
	ldr	x23, [x21]
	add	x22, x20, #8
	lsl	x25, x25, #3
Lloh15:
	adrp	x28, _INIT_VOL@GOTPAGE
Lloh16:
	ldr	x28, [x28, _INIT_VOL@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x27, x27, #1
	cmp	x26, x27
	b.eq	LBB0_15
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x24, [x8, x27, lsl #3]
	mov	x0, x22
	bl	_mutex_lock
	ldr	x8, [x24]
	ldr	x8, [x8]
	add	x1, x23, #8
	ldr	w2, [x28]
	ldr	x9, [x20, #16]
	add	x9, x9, x25
	ldr	w3, [x9, x27, lsl #2]
	mov	x0, x24
	blr	x8
	mov	x0, x22
	bl	_mutex_unlock
	ldr	x8, [x23]
	ldr	x8, [x8]
	mov	x0, x23
	blr	x8
	mov	x23, x0
	cbnz	x0, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x23, [x21]
	b	LBB0_11
LBB0_14:
	mov	x23, x0
	b	LBB0_1
LBB0_15:
	ldr	w0, [x19]
	bl	_ct_timer_prepare
	mov	w23, #0
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SRC,8,3                        ; @SRC
	.comm	_AMIXER,8,3                     ; @AMIXER
	.comm	_MEMRD,4,2                      ; @MEMRD
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_INIT_VOL,4,2                   ; @INIT_VOL
	.no_dead_strip	_atc_pcm_playback_prepare
.subsections_via_symbols
