	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_ev_acquire_global_lock    ## -- Begin function acpi_ev_acquire_global_lock
	.p2align	4, 0x90
_acpi_ev_acquire_global_lock:           ## @acpi_ev_acquire_global_lock
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r12d
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_ev_acquire_global_lock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ACPI_FUNCTION_TRACE
	movq	_acpi_gbl_global_lock_mutex@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_acpi_ex_system_wait_mutex
	movq	%rax, %r15
	movq	_AE_TIME@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jne	LBB0_3
## %bb.1:
	movq	_acpi_ev_global_lock_thread_id@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	xorl	%eax, %eax
	callq	_acpi_os_get_thread_id
	cmpq	%rax, %rbx
	jne	LBB0_3
## %bb.2:
	movq	_acpi_ev_global_lock_acquired@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	_AE_OK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_15
LBB0_3:
	movq	%r15, %rdi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	(%r13), %rax
	movl	(%rax), %edi
	movl	%r12d, %esi
	callq	_acpi_ex_system_wait_mutex
	movq	%rax, %r15
LBB0_5:
	movq	%r15, %rdi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_return_ACPI_STATUS
LBB0_7:
	xorl	%eax, %eax
	callq	_acpi_os_get_thread_id
	movq	_acpi_ev_global_lock_acquired@GOTPCREL(%rip), %rcx
	incl	(%rcx)
	movq	_acpi_ev_global_lock_thread_id@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_acpi_gbl_global_lock_handle@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	incl	%ecx
	movl	$1, %edx
	cmovnel	%ecx, %edx
	movl	%edx, (%rax)
	movq	_acpi_gbl_global_lock_present@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_9
## %bb.8:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_acpi_gbl_global_lock_acquired@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_AE_OK@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_return_ACPI_STATUS
LBB0_9:
	movq	_acpi_ev_global_lock_pending_lock@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_acpi_os_acquire_lock
	movl	%eax, %ebx
	movq	_acpi_gbl_FACS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_ACPI_ACQUIRE_GLOBAL_LOCK
	testq	%r14, %r14
	je	LBB0_10
## %bb.11:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_acpi_gbl_global_lock_acquired@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ACPI_DEBUG_PRINT
LBB0_14:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_acpi_ev_global_lock_pending@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	(%r13), %edi
	movl	%ebx, %esi
	callq	_acpi_os_release_lock
	movq	%r15, %rdi
	callq	_return_ACPI_STATUS
                                        ## implicit-def: $rax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_acpi_gbl_global_lock_semaphore@GOTPCREL(%rip), %r12
	movq	_ACPI_WAIT_FOREVER@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_acpi_ev_global_lock_pending@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	(%r13), %edi
	movl	%ebx, %esi
	callq	_acpi_os_release_lock
	leaq	L_.str.1(%rip), %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ACPI_DEBUG_PRINT
	movl	(%r12), %edi
	movl	(%r14), %esi
	callq	_acpi_ex_system_wait_semaphore
	movq	%rax, %r15
	movl	(%r13), %edi
	callq	_acpi_os_acquire_lock
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_ACPI_SUCCESS
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_acpi_gbl_FACS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_ACPI_ACQUIRE_GLOBAL_LOCK
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_AE_OK,8,3                      ## @AE_OK
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_ev_acquire_global_lock,4,2     ## @ev_acquire_global_lock
	.comm	_acpi_gbl_global_lock_mutex,8,3 ## @acpi_gbl_global_lock_mutex
	.comm	_AE_TIME,8,3                    ## @AE_TIME
	.comm	_acpi_ev_global_lock_thread_id,8,3 ## @acpi_ev_global_lock_thread_id
	.comm	_acpi_ev_global_lock_acquired,4,2 ## @acpi_ev_global_lock_acquired
	.comm	_acpi_gbl_global_lock_handle,4,2 ## @acpi_gbl_global_lock_handle
	.comm	_acpi_gbl_global_lock_present,4,2 ## @acpi_gbl_global_lock_present
	.comm	_TRUE,8,3                       ## @TRUE
	.comm	_acpi_gbl_global_lock_acquired,8,3 ## @acpi_gbl_global_lock_acquired
	.comm	_acpi_ev_global_lock_pending_lock,4,2 ## @acpi_ev_global_lock_pending_lock
	.comm	_acpi_gbl_FACS,4,2              ## @acpi_gbl_FACS
	.comm	_ACPI_DB_EXEC,4,2               ## @ACPI_DB_EXEC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Acquired hardware Global Lock\n"

	.comm	_acpi_ev_global_lock_pending,8,3 ## @acpi_ev_global_lock_pending
L_.str.1:                               ## @.str.1
	.asciz	"Waiting for hardware Global Lock\n"

	.comm	_acpi_gbl_global_lock_semaphore,4,2 ## @acpi_gbl_global_lock_semaphore
	.comm	_ACPI_WAIT_FOREVER,4,2          ## @ACPI_WAIT_FOREVER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_ev_acquire_global_lock    ; -- Begin function acpi_ev_acquire_global_lock
	.p2align	2
_acpi_ev_acquire_global_lock:           ; @acpi_ev_acquire_global_lock
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x0
Lloh0:
	adrp	x22, _FALSE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _FALSE@GOTPAGEOFF]
	ldr	x20, [x22]
Lloh2:
	adrp	x8, _ev_acquire_global_lock@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ev_acquire_global_lock@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_ACPI_FUNCTION_TRACE
Lloh5:
	adrp	x24, _acpi_gbl_global_lock_mutex@GOTPAGE
Lloh6:
	ldr	x24, [x24, _acpi_gbl_global_lock_mutex@GOTPAGEOFF]
	ldr	x8, [x24]
	ldr	w0, [x8]
	mov	w1, #0
	bl	_acpi_ex_system_wait_mutex
	mov	x19, x0
Lloh7:
	adrp	x8, _AE_TIME@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AE_TIME@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x23, _acpi_ev_global_lock_thread_id@GOTPAGE
Lloh11:
	ldr	x23, [x23, _acpi_ev_global_lock_thread_id@GOTPAGEOFF]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.1:
	ldr	x25, [x23]
	bl	_acpi_os_get_thread_id
	cmp	x25, x0
	b.ne	LBB0_3
; %bb.2:
Lloh12:
	adrp	x8, _acpi_ev_global_lock_acquired@GOTPAGE
Lloh13:
	ldr	x8, [x8, _acpi_ev_global_lock_acquired@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
Lloh14:
	adrp	x8, _AE_OK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AE_OK@GOTPAGEOFF]
Lloh16:
	ldr	x0, [x8]
	b	LBB0_12
LBB0_3:
	mov	x0, x19
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x8, [x24]
	ldr	w0, [x8]
	mov	x1, x21
	bl	_acpi_ex_system_wait_mutex
	mov	x19, x0
LBB0_5:
	mov	x0, x19
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_return_ACPI_STATUS
LBB0_7:
	bl	_acpi_os_get_thread_id
	str	x0, [x23]
Lloh17:
	adrp	x8, _acpi_ev_global_lock_acquired@GOTPAGE
Lloh18:
	ldr	x8, [x8, _acpi_ev_global_lock_acquired@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
Lloh19:
	adrp	x8, _acpi_gbl_global_lock_handle@GOTPAGE
Lloh20:
	ldr	x8, [x8, _acpi_gbl_global_lock_handle@GOTPAGEOFF]
	ldr	w9, [x8]
	adds	w9, w9, #1
	csinc	w9, w9, wzr, lo
	str	w9, [x8]
Lloh21:
	adrp	x8, _acpi_gbl_global_lock_present@GOTPAGE
Lloh22:
	ldr	x8, [x8, _acpi_gbl_global_lock_present@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	cbnz	w8, LBB0_9
; %bb.8:
Lloh24:
	adrp	x8, _TRUE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
Lloh27:
	adrp	x9, _acpi_gbl_global_lock_acquired@GOTPAGE
Lloh28:
	ldr	x9, [x9, _acpi_gbl_global_lock_acquired@GOTPAGEOFF]
Lloh29:
	str	x8, [x9]
Lloh30:
	adrp	x8, _AE_OK@GOTPAGE
Lloh31:
	ldr	x8, [x8, _AE_OK@GOTPAGEOFF]
Lloh32:
	ldr	x0, [x8]
	bl	_return_ACPI_STATUS
LBB0_9:
Lloh33:
	adrp	x23, _acpi_ev_global_lock_pending_lock@GOTPAGE
Lloh34:
	ldr	x23, [x23, _acpi_ev_global_lock_pending_lock@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_acpi_os_acquire_lock
	mov	x21, x0
Lloh35:
	adrp	x24, _acpi_gbl_FACS@GOTPAGE
Lloh36:
	ldr	x24, [x24, _acpi_gbl_FACS@GOTPAGEOFF]
	ldr	w0, [x24]
	mov	x1, x20
	bl	_ACPI_ACQUIRE_GLOBAL_LOCK
	cbz	x20, LBB0_13
; %bb.10:
Lloh37:
	adrp	x8, _TRUE@GOTPAGE
Lloh38:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh39:
	ldr	x8, [x8]
Lloh40:
	adrp	x9, _acpi_gbl_global_lock_acquired@GOTPAGE
Lloh41:
	ldr	x9, [x9, _acpi_gbl_global_lock_acquired@GOTPAGEOFF]
Lloh42:
	str	x8, [x9]
Lloh43:
	adrp	x0, l_.str@PAGE
Lloh44:
	add	x0, x0, l_.str@PAGEOFF
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_ACPI_DEBUG_PRINT
LBB0_11:
	ldr	x8, [x22]
Lloh45:
	adrp	x9, _acpi_ev_global_lock_pending@GOTPAGE
Lloh46:
	ldr	x9, [x9, _acpi_ev_global_lock_pending@GOTPAGEOFF]
Lloh47:
	str	x8, [x9]
	ldr	w0, [x23]
	mov	x1, x21
	bl	_acpi_os_release_lock
	mov	x0, x19
	bl	_return_ACPI_STATUS
                                        ; implicit-def: $x0
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh48:
	adrp	x25, _TRUE@GOTPAGE
Lloh49:
	ldr	x25, [x25, _TRUE@GOTPAGEOFF]
Lloh50:
	adrp	x26, _acpi_ev_global_lock_pending@GOTPAGE
Lloh51:
	ldr	x26, [x26, _acpi_ev_global_lock_pending@GOTPAGEOFF]
Lloh52:
	adrp	x20, l_.str.1@PAGE
Lloh53:
	add	x20, x20, l_.str.1@PAGEOFF
Lloh54:
	adrp	x27, _acpi_gbl_global_lock_semaphore@GOTPAGE
Lloh55:
	ldr	x27, [x27, _acpi_gbl_global_lock_semaphore@GOTPAGEOFF]
Lloh56:
	adrp	x28, _ACPI_WAIT_FOREVER@GOTPAGE
Lloh57:
	ldr	x28, [x28, _ACPI_WAIT_FOREVER@GOTPAGEOFF]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	str	x8, [x26]
	ldr	w0, [x23]
	mov	x1, x21
	bl	_acpi_os_release_lock
	mov	x0, x20
	bl	_ACPI_DEBUG_PRINT
	ldr	w0, [x27]
	ldr	w1, [x28]
	bl	_acpi_ex_system_wait_semaphore
	mov	x19, x0
	ldr	w0, [x23]
	bl	_acpi_os_acquire_lock
	mov	x21, x0
	mov	x0, x19
	bl	_ACPI_SUCCESS
	cbz	x0, LBB0_11
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w0, [x24]
	mov	x1, #0
	bl	_ACPI_ACQUIRE_GLOBAL_LOCK
	b	LBB0_14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotStr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotStr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotStr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh56, Lloh57
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_AE_OK,8,3                      ; @AE_OK
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_ev_acquire_global_lock,4,2     ; @ev_acquire_global_lock
	.comm	_acpi_gbl_global_lock_mutex,8,3 ; @acpi_gbl_global_lock_mutex
	.comm	_AE_TIME,8,3                    ; @AE_TIME
	.comm	_acpi_ev_global_lock_thread_id,8,3 ; @acpi_ev_global_lock_thread_id
	.comm	_acpi_ev_global_lock_acquired,4,2 ; @acpi_ev_global_lock_acquired
	.comm	_acpi_gbl_global_lock_handle,4,2 ; @acpi_gbl_global_lock_handle
	.comm	_acpi_gbl_global_lock_present,4,2 ; @acpi_gbl_global_lock_present
	.comm	_TRUE,8,3                       ; @TRUE
	.comm	_acpi_gbl_global_lock_acquired,8,3 ; @acpi_gbl_global_lock_acquired
	.comm	_acpi_ev_global_lock_pending_lock,4,2 ; @acpi_ev_global_lock_pending_lock
	.comm	_acpi_gbl_FACS,4,2              ; @acpi_gbl_FACS
	.comm	_ACPI_DB_EXEC,4,2               ; @ACPI_DB_EXEC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Acquired hardware Global Lock\n"

	.comm	_acpi_ev_global_lock_pending,8,3 ; @acpi_ev_global_lock_pending
l_.str.1:                               ; @.str.1
	.asciz	"Waiting for hardware Global Lock\n"

	.comm	_acpi_gbl_global_lock_semaphore,4,2 ; @acpi_gbl_global_lock_semaphore
	.comm	_ACPI_WAIT_FOREVER,4,2          ; @ACPI_WAIT_FOREVER
.subsections_via_symbols
