	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ct_atc_destroy
_ct_atc_destroy:                        ## @ct_atc_destroy
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.1:
	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, %r15
	movq	32(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	callq	_ct_timer_free
	movq	$0, 32(%r15)
LBB0_3:
	movq	%r15, %rdi
	callq	_atc_release_resources
	movq	24(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	callq	_ct_mixer_destroy
LBB0_5:
	movq	_NUM_RSCTYP@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.6:
	xorl	%ebx, %ebx
	movq	_rsc_mgr_funcs@GOTPCREL(%rip), %r12
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_11
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rcx
	movq	(%rcx,%rbx,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	16(%r15), %rdx
	movq	(%rdx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	callq	*%rcx
	movl	(%r14), %eax
	jmp	LBB0_10
LBB0_11:
	movq	8(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	callq	_destroy_hw_obj
LBB0_13:
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.14:
	callq	_ct_vm_destroy
	movq	$0, (%r15)
LBB0_15:
	movq	%r15, %rdi
	callq	_kfree
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
LBB0_16:
	xorl	%eax, %eax
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_RSCTYP,4,2                 ## @NUM_RSCTYP
	.comm	_rsc_mgr_funcs,8,3              ## @rsc_mgr_funcs
	.no_dead_strip	_ct_atc_destroy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ct_atc_destroy
_ct_atc_destroy:                        ; @ct_atc_destroy
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_16
; %bb.1:
	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	x19, x0
	ldr	x0, [x0, #32]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_ct_timer_free
	str	xzr, [x19, #32]
LBB0_3:
	mov	x0, x19
	bl	_atc_release_resources
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_5
; %bb.4:
	bl	_ct_mixer_destroy
LBB0_5:
Lloh0:
	adrp	x20, _NUM_RSCTYP@GOTPAGE
Lloh1:
	ldr	x20, [x20, _NUM_RSCTYP@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.6:
	mov	x21, #0
Lloh2:
	adrp	x22, _rsc_mgr_funcs@GOTPAGE
Lloh3:
	ldr	x22, [x22, _rsc_mgr_funcs@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x21, x21, #1
	cmp	x21, w8, sxtw
	b.ge	LBB0_11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x22]
	ldr	x9, [x9, x21, lsl #3]
	cbz	x9, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x10, [x19, #16]
	ldr	x0, [x10, x21, lsl #3]
	cbz	x0, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	blr	x9
	ldr	w8, [x20]
	b	LBB0_7
LBB0_11:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_13
; %bb.12:
	bl	_destroy_hw_obj
LBB0_13:
	ldr	x0, [x19]
	cbz	x0, LBB0_15
; %bb.14:
	bl	_ct_vm_destroy
	str	xzr, [x19]
LBB0_15:
	mov	x0, x19
	bl	_kfree
	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
LBB0_16:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	mov	w0, #0
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_RSCTYP,4,2                 ; @NUM_RSCTYP
	.comm	_rsc_mgr_funcs,8,3              ; @rsc_mgr_funcs
	.no_dead_strip	_ct_atc_destroy
.subsections_via_symbols
