	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spdif_passthru_playback_get_resources
_spdif_passthru_playback_get_resources: ## @spdif_passthru_playback_get_resources
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	_SRC@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %r13
	movq	_AMIXER@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	$0, -60(%rbp)
	movq	$0, -48(%rbp)
	movq	16(%rsi), %rax
	movq	(%rax), %rax
	movl	(%rax), %r15d
	movl	(%rdi), %ebx
	callq	_atc_pcm_release_resources
	movq	16(%r12), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	movl	%ecx, -72(%rbp)
	movl	4(%rax), %eax
	movl	$1, %edx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%edx, %ecx
	movl	%edx, %esi
	imull	%ebx, %esi
	leal	(%rcx,%rcx), %edx
	cmpl	%esi, %eax
	ja	LBB0_1
## %bb.2:
	movl	%ecx, -68(%rbp)
	movq	_MEMRD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	leaq	24(%r12), %rdx
	leaq	-72(%rbp), %rsi
	movq	%r13, %rdi
	callq	*(%r13)
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_3
LBB0_11:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_atc_pcm_release_resources
LBB0_12:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	16(%r12), %rax
	movq	(%rax), %rax
	movl	4(%rax), %edi
	imull	-68(%rbp), %ebx
	movl	%ebx, %esi
	callq	_atc_get_pitch
	movl	%eax, %r13d
	movq	24(%r12), %rbx
	movq	(%rbx), %rax
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	*40(%rax)
	movq	(%rbx), %rax
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movq	32(%rax), %r15
	movl	%r13d, %edi
	callq	_select_rom
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	*%r15
	movq	(%rbx), %rax
	movq	24(%rax), %r15
	movq	16(%r12), %rax
	movq	(%rax), %rax
	movl	8(%rax), %edi
	callq	_convert_format
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	*%r15
	movq	(%rbx), %rax
	movq	16(%rax), %r15
	movq	%rbx, %rdi
	callq	*8(%rax)
	xorl	%esi, %esi
	testq	%rax, %rax
	setne	%sil
	movq	%rbx, %rdi
	callq	*%r15
	movq	(%rbx), %rax
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	*(%rax)
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	cmpl	$3, %eax
	movl	$2, %ebx
	cmovgel	%eax, %ebx
	leal	(,%rbx,8), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movl	-68(%rbp), %ecx
	movl	%ecx, -48(%rbp)
	movq	$0, (%r12)
	leaq	-48(%rbp), %rsi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rdx
	callq	*8(%rdi)
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:
	movl	%ebx, %ebx
	shlq	$2, %rbx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	incq	(%r12)
	leaq	4(%rax), %r15
	cmpq	%r15, %rbx
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r12), %rcx
	leaq	(%rcx,%rax), %rdx
	addq	$4, %rdx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	leaq	-48(%rbp), %rsi
	callq	*8(%rdi)
	movl	%eax, %r13d
	movq	%r15, %rax
	testl	%r13d, %r13d
	je	LBB0_7
	jmp	LBB0_11
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_11
LBB0_9:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_ct_map_audio_buffer
	xorl	%r13d, %r13d
	testl	%eax, %eax
	jns	LBB0_12
## %bb.10:
	movl	%eax, %r13d
	jmp	LBB0_11
	.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
	.no_dead_strip	_spdif_passthru_playback_get_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spdif_passthru_playback_get_resources
_spdif_passthru_playback_get_resources: ; @spdif_passthru_playback_get_resources
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _SRC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SRC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x22, [x8, x9, lsl #3]
Lloh3:
	adrp	x9, _AMIXER@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AMIXER@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x21, [x8, x9, lsl #3]
	str	wzr, [sp, #28]
	str	xzr, [sp, #8]
	ldr	x8, [x1, #16]
	ldr	x8, [x8]
	ldr	w24, [x8]
	ldr	w23, [x0]
	bl	_atc_pcm_release_resources
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldp	w9, w8, [x8]
	str	w9, [sp, #16]
	mov	w9, #1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x10, x9
	mul	w11, w9, w23
	lsl	w9, w9, #1
	cmp	w8, w11
	b.hi	LBB0_1
; %bb.2:
Lloh6:
	adrp	x8, _MEMRD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MEMRD@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	stp	w10, w8, [sp, #20]
	ldr	x8, [x22]
	add	x2, x19, #24
	add	x1, sp, #16
	mov	x0, x22
	blr	x8
	mov	x22, x0
	cbz	w0, LBB0_5
LBB0_3:
	mov	x0, x20
	mov	x1, x19
	bl	_atc_pcm_release_resources
LBB0_4:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_5:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	w0, [x8, #4]
	ldr	w8, [sp, #20]
	mul	w1, w8, w23
	bl	_atc_get_pitch
	mov	x22, x0
	ldr	x23, [x19, #24]
	ldr	x8, [x23]
	ldr	x8, [x8, #40]
	mov	x0, x23
	mov	x1, x22
	blr	x8
	ldr	x8, [x23]
	ldr	x25, [x8, #32]
	mov	x0, x22
	bl	_select_rom
	mov	x1, x0
	mov	x0, x23
	blr	x25
	ldr	x8, [x23]
	ldr	x22, [x8, #24]
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	w0, [x8, #8]
	bl	_convert_format
	mov	x1, x0
	mov	x0, x23
	blr	x22
	ldr	x8, [x23]
	ldp	x8, x22, [x8, #8]
	mov	x0, x23
	blr	x8
	cmp	x0, #0
	cset	w1, ne
	mov	x0, x23
	blr	x22
	ldr	x8, [x23]
	ldr	x8, [x8]
	mov	x0, x23
	mov	w1, #1
	blr	x8
	mov	w8, #2
	cmp	w24, #2
	csel	w23, w24, w8, gt
	lsl	w0, w23, #3
Lloh9:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_kzalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_10
; %bb.6:
	mov	x2, x0
	ldr	w8, [sp, #20]
	str	w8, [sp, #8]
	str	xzr, [x19]
	ldr	x8, [x21, #8]
	add	x1, sp, #8
	mov	x0, x21
	blr	x8
	mov	x22, x0
	cbnz	w0, LBB0_3
; %bb.7:
	mov	x8, #0
	lsl	x23, x23, #2
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19]
	add	x9, x9, #1
	str	x9, [x19]
	add	x24, x8, #4
	cmp	x23, x24
	b.eq	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x19, #8]
	ldr	x10, [x21, #8]
	add	x8, x9, x8
	add	x2, x8, #4
	add	x1, sp, #8
	mov	x0, x21
	blr	x10
	mov	x8, x24
	cbz	w0, LBB0_8
	b	LBB0_13
LBB0_10:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_3
LBB0_11:
	mov	x0, x20
	mov	x1, x19
	bl	_ct_map_audio_buffer
	tbnz	w0, #31, LBB0_13
; %bb.12:
	mov	w22, #0
	b	LBB0_4
LBB0_13:
	mov	x22, x0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.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
	.no_dead_strip	_spdif_passthru_playback_get_resources
.subsections_via_symbols
