	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_ds_terminate_control_method ## -- Begin function acpi_ds_terminate_control_method
	.p2align	4, 0x90
_acpi_ds_terminate_control_method:      ## @acpi_ds_terminate_control_method
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_ds_terminate_control_method@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ACPI_FUNCTION_TRACE_PTR
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.1:
	movq	%rbx, %rdi
	callq	_acpi_ds_method_data_delete_all
	movq	16(%r14), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	decl	16(%rax)
	movq	16(%r14), %rax
	cmpl	$0, 16(%rax)
	jne	LBB0_4
## %bb.3:
	movl	12(%rax), %eax
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx)
	movq	16(%r14), %rax
	movl	8(%rax), %edi
	callq	_acpi_os_release_mutex
	movq	16(%r14), %rax
	movq	$0, (%rax)
LBB0_4:
	movq	_AOPOBJ_MODULE_LEVEL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	jne	LBB0_7
## %bb.5:
	movl	(%rbx), %edi
	callq	_acpi_ns_delete_namespace_subtree
	movq	_AOPOBJ_MODIFIED_NAMESPACE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_7
## %bb.6:
	movl	8(%r14), %edi
	callq	_acpi_ns_delete_namespace_by_owner
LBB0_7:
	movq	24(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	decq	%rdi
	movq	%rdi, 24(%r14)
	testq	%rdi, %rdi
	je	LBB0_11
LBB0_16:
                                        ## kill: def $edi killed $edi killed $rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ACPI_DEBUG_PRINT               ## TAILCALL
LBB0_9:
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ACPI_ERROR
	movq	24(%r14), %rdi
	testq	%rdi, %rdi
	jne	LBB0_16
LBB0_11:
	movq	_AML_METHOD_SERIALIZED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r14)
	je	LBB0_14
## %bb.12:
	cmpq	$0, 16(%r14)
	jne	LBB0_14
## %bb.13:
	movq	%r14, %rdi
	callq	_acpi_ds_create_method_mutex
LBB0_14:
	movq	_AOPOBJ_MODULE_LEVEL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_17
## %bb.15:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_17:
	addq	$8, %r14
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_acpi_ut_release_owner_id       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ds_terminate_control_method,4,2 ## @ds_terminate_control_method
	.comm	_return_VOID,4,2                ## @return_VOID
	.comm	_AOPOBJ_MODULE_LEVEL,4,2        ## @AOPOBJ_MODULE_LEVEL
	.comm	_AOPOBJ_MODIFIED_NAMESPACE,4,2  ## @AOPOBJ_MODIFIED_NAMESPACE
	.comm	_AE_INFO,4,2                    ## @AE_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid zero thread count in method"

	.comm	_ACPI_DB_DISPATCH,4,2           ## @ACPI_DB_DISPATCH
	.comm	_AML_METHOD_SERIALIZED,4,2      ## @AML_METHOD_SERIALIZED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_ds_terminate_control_method ; -- Begin function acpi_ds_terminate_control_method
	.p2align	2
_acpi_ds_terminate_control_method:      ; @acpi_ds_terminate_control_method
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _ds_terminate_control_method@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ds_terminate_control_method@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_ACPI_FUNCTION_TRACE_PTR
	cbz	x20, LBB0_7
; %bb.1:
	mov	x0, x20
	bl	_acpi_ds_method_data_delete_all
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	w9, [x8, #16]
	sub	w9, w9, #1
	str	w9, [x8, #16]
	ldr	x8, [x19, #16]
	ldr	w9, [x8, #16]
	cbnz	w9, LBB0_4
; %bb.3:
	ldr	w8, [x8, #12]
	ldr	x9, [x20, #8]
	str	w8, [x9]
	ldr	x8, [x19, #16]
	ldr	w0, [x8, #8]
	bl	_acpi_os_release_mutex
	ldr	x8, [x19, #16]
	str	xzr, [x8]
LBB0_4:
	ldr	w8, [x19]
Lloh3:
	adrp	x9, _AOPOBJ_MODULE_LEVEL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AOPOBJ_MODULE_LEVEL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_7
; %bb.5:
	ldr	w0, [x20]
	bl	_acpi_ns_delete_namespace_subtree
	ldr	w8, [x19]
Lloh6:
	adrp	x9, _AOPOBJ_MODIFIED_NAMESPACE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AOPOBJ_MODIFIED_NAMESPACE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
	ldr	w0, [x19, #8]
	bl	_acpi_ns_delete_namespace_by_owner
LBB0_7:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_10
; %bb.8:
	sub	x0, x8, #1
	str	x0, [x19, #24]
	cbz	x0, LBB0_11
LBB0_9:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ACPI_DEBUG_PRINT
LBB0_10:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_ACPI_ERROR
	ldr	x0, [x19, #24]
	cbnz	x0, LBB0_9
LBB0_11:
	ldr	w8, [x19, #4]
Lloh11:
	adrp	x9, _AML_METHOD_SERIALIZED@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AML_METHOD_SERIALIZED@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.12:
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_14
; %bb.13:
	mov	x0, x19
	bl	_acpi_ds_create_method_mutex
LBB0_14:
	ldr	w8, [x19]
Lloh14:
	adrp	x9, _AOPOBJ_MODULE_LEVEL@GOTPAGE
Lloh15:
	ldr	x9, [x9, _AOPOBJ_MODULE_LEVEL@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.15:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_16:
	add	x0, x19, #8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_acpi_ut_release_owner_id
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ds_terminate_control_method,4,2 ; @ds_terminate_control_method
	.comm	_return_VOID,4,2                ; @return_VOID
	.comm	_AOPOBJ_MODULE_LEVEL,4,2        ; @AOPOBJ_MODULE_LEVEL
	.comm	_AOPOBJ_MODIFIED_NAMESPACE,4,2  ; @AOPOBJ_MODIFIED_NAMESPACE
	.comm	_AE_INFO,4,2                    ; @AE_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid zero thread count in method"

	.comm	_ACPI_DB_DISPATCH,4,2           ; @ACPI_DB_DISPATCH
	.comm	_AML_METHOD_SERIALIZED,4,2      ; @AML_METHOD_SERIALIZED
.subsections_via_symbols
