	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_ev_terminate              ## -- Begin function acpi_ev_terminate
	.p2align	4, 0x90
_acpi_ev_terminate:                     ## @acpi_ev_terminate
	.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	_ev_terminate@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ACPI_FUNCTION_TRACE
	movq	_acpi_gbl_events_initialized@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_10
## %bb.1:
	movq	_ACPI_NUM_FIXED_EVENTS@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	jle	LBB0_6
## %bb.2:
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	cmpq	(%r14), %rbx
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_acpi_disable_event
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %edi
	callq	_ACPI_ERROR
	jmp	LBB0_5
LBB0_6:
	movq	_acpi_hw_disable_gpe_block@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_acpi_ev_walk_gpe_list
	xorl	%eax, %eax
	callq	_acpi_ev_remove_sci_handler
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ACPI_ERROR
LBB0_8:
	xorl	%eax, %eax
	callq	_acpi_ev_remove_global_lock_handler
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ACPI_ERROR
LBB0_10:
	movq	_acpi_ev_delete_gpe_handlers@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_acpi_ev_walk_gpe_list
	movq	_acpi_gbl_original_mode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ACPI_SYS_MODE_LEGACY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.11:
	xorl	%eax, %eax
	callq	_acpi_disable
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	leaq	L_.str.3(%rip), %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ACPI_WARNING                   ## TAILCALL
LBB0_12:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ev_terminate,4,2               ## @ev_terminate
	.comm	_acpi_gbl_events_initialized,8,3 ## @acpi_gbl_events_initialized
	.comm	_ACPI_NUM_FIXED_EVENTS,8,3      ## @ACPI_NUM_FIXED_EVENTS
	.comm	_AE_INFO,4,2                    ## @AE_INFO
	.comm	_acpi_hw_disable_gpe_block,4,2  ## @acpi_hw_disable_gpe_block
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"Could not remove SCI handler"

L_.str.2:                               ## @.str.2
	.asciz	"Could not remove Global Lock handler"

	.comm	_acpi_ev_delete_gpe_handlers,4,2 ## @acpi_ev_delete_gpe_handlers
	.comm	_acpi_gbl_original_mode,8,3     ## @acpi_gbl_original_mode
	.comm	_ACPI_SYS_MODE_LEGACY,8,3       ## @ACPI_SYS_MODE_LEGACY
L_.str.3:                               ## @.str.3
	.asciz	"AcpiDisable failed"

	.comm	_return_VOID,4,2                ## @return_VOID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_ev_terminate              ; -- Begin function acpi_ev_terminate
	.p2align	2
_acpi_ev_terminate:                     ; @acpi_ev_terminate
	.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
Lloh0:
	adrp	x8, _ev_terminate@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ev_terminate@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_ACPI_FUNCTION_TRACE
Lloh3:
	adrp	x8, _acpi_gbl_events_initialized@GOTPAGE
Lloh4:
	ldr	x8, [x8, _acpi_gbl_events_initialized@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.1:
Lloh6:
	adrp	x20, _ACPI_NUM_FIXED_EVENTS@GOTPAGE
Lloh7:
	ldr	x20, [x20, _ACPI_NUM_FIXED_EVENTS@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x8, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x19, #0
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x19, x19, #1
	ldr	x8, [x20]
	cmp	x19, x8
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #0
	bl	_acpi_disable_event
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_ACPI_ERROR
	b	LBB0_3
LBB0_6:
Lloh8:
	adrp	x8, _acpi_hw_disable_gpe_block@GOTPAGE
Lloh9:
	ldr	x8, [x8, _acpi_hw_disable_gpe_block@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	x1, #0
	bl	_acpi_ev_walk_gpe_list
	bl	_acpi_ev_remove_sci_handler
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_8
; %bb.7:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_ACPI_ERROR
LBB0_8:
	bl	_acpi_ev_remove_global_lock_handler
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_10
; %bb.9:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_ACPI_ERROR
LBB0_10:
Lloh15:
	adrp	x8, _acpi_ev_delete_gpe_handlers@GOTPAGE
Lloh16:
	ldr	x8, [x8, _acpi_ev_delete_gpe_handlers@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	x1, #0
	bl	_acpi_ev_walk_gpe_list
Lloh18:
	adrp	x8, _acpi_gbl_original_mode@GOTPAGE
Lloh19:
	ldr	x8, [x8, _acpi_gbl_original_mode@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
Lloh21:
	adrp	x9, _ACPI_SYS_MODE_LEGACY@GOTPAGE
Lloh22:
	ldr	x9, [x9, _ACPI_SYS_MODE_LEGACY@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.11:
	bl	_acpi_disable
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_13
; %bb.12:
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
                                        ; 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_WARNING
LBB0_13:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_ev_terminate,4,2               ; @ev_terminate
	.comm	_acpi_gbl_events_initialized,8,3 ; @acpi_gbl_events_initialized
	.comm	_ACPI_NUM_FIXED_EVENTS,8,3      ; @ACPI_NUM_FIXED_EVENTS
	.comm	_AE_INFO,4,2                    ; @AE_INFO
	.comm	_acpi_hw_disable_gpe_block,4,2  ; @acpi_hw_disable_gpe_block
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"Could not remove SCI handler"

l_.str.2:                               ; @.str.2
	.asciz	"Could not remove Global Lock handler"

	.comm	_acpi_ev_delete_gpe_handlers,4,2 ; @acpi_ev_delete_gpe_handlers
	.comm	_acpi_gbl_original_mode,8,3     ; @acpi_gbl_original_mode
	.comm	_ACPI_SYS_MODE_LEGACY,8,3       ; @ACPI_SYS_MODE_LEGACY
l_.str.3:                               ; @.str.3
	.asciz	"AcpiDisable failed"

	.comm	_return_VOID,4,2                ; @return_VOID
.subsections_via_symbols
