	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_ev_gpe_detect             ## -- Begin function acpi_ev_gpe_detect
	.p2align	4, 0x90
_acpi_ev_gpe_detect:                    ## @acpi_ev_gpe_detect
	.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	%rdi, %r15
	movq	_ACPI_INTERRUPT_NOT_HANDLED@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_ev_gpe_detect@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ACPI_FUNCTION_NAME
	testq	%r15, %r15
	je	LBB0_19
## %bb.1:
	movq	_acpi_gbl_gpe_lock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_acpi_os_acquire_lock
	movq	(%r15), %rcx
	testq	%rcx, %rcx
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	jne	LBB0_3
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rcx), %rcx
	testq	%rcx, %rcx
	je	LBB0_18
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
                                        ##       Child Loop BB0_13 Depth 3
	cmpq	$0, (%rcx)
	je	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r12d, %r12d
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_7 Depth=2
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=2
	incq	%r12
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	cmpq	(%rcx), %r12
	jae	LBB0_2
LBB0_7:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_13 Depth 3
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	24(%rcx), %r15
	movq	%r12, %rbx
	shlq	$4, %rbx
	leaq	(%r15,%rbx), %rsi
	addq	$12, %rsi
	leaq	-80(%rbp), %rdi
	callq	_acpi_hw_read
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	jne	LBB0_17
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	leaq	(%r15,%rbx), %rsi
	addq	$8, %rsi
	leaq	-72(%rbp), %rdi
	callq	_acpi_hw_read
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	jne	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	movl	-72(%rbp), %edi
	callq	_ACPI_DEBUG_PRINT
	movl	-72(%rbp), %r14d
	andl	-80(%rbp), %r14d
	je	LBB0_5
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=2
	movq	_ACPI_GPE_REGISTER_WIDTH@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=2
	addq	%rbx, %r15
	xorl	%r13d, %r13d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_13 Depth=3
	incq	%r13
	cmpq	%rdi, %r13
	jae	LBB0_6
LBB0_13:                                ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	btl	%r13d, %r14d
	jae	LBB0_12
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=3
	imulq	%r12, %rdi
	addq	%r13, %rdi
	shlq	$2, %rdi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addq	16(%rax), %rdi
	movq	(%r15), %rsi
	addq	%r13, %rsi
	callq	_acpi_ev_gpe_dispatch
	orq	%rax, %rbx
	movq	_ACPI_GPE_REGISTER_WIDTH@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	jmp	LBB0_12
LBB0_17:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_18:
	movq	_acpi_gbl_gpe_lock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_acpi_os_release_lock
LBB0_19:
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_INTERRUPT_NOT_HANDLED,8,3 ## @ACPI_INTERRUPT_NOT_HANDLED
	.comm	_ev_gpe_detect,4,2              ## @ev_gpe_detect
	.comm	_acpi_gbl_gpe_lock,4,2          ## @acpi_gbl_gpe_lock
	.comm	_ACPI_DB_INTERRUPTS,4,2         ## @ACPI_DB_INTERRUPTS
	.comm	_ACPI_GPE_REGISTER_WIDTH,8,3    ## @ACPI_GPE_REGISTER_WIDTH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_ev_gpe_detect             ; -- Begin function acpi_ev_gpe_detect
	.p2align	2
_acpi_ev_gpe_detect:                    ; @acpi_ev_gpe_detect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x0
Lloh0:
	adrp	x8, _ACPI_INTERRUPT_NOT_HANDLED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ACPI_INTERRUPT_NOT_HANDLED@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
Lloh3:
	adrp	x8, _ev_gpe_detect@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ev_gpe_detect@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_ACPI_FUNCTION_NAME
	cbz	x21, LBB0_16
; %bb.1:
Lloh6:
	adrp	x22, _acpi_gbl_gpe_lock@GOTPAGE
Lloh7:
	ldr	x22, [x22, _acpi_gbl_gpe_lock@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_acpi_os_acquire_lock
	mov	x20, x0
	ldr	x21, [x21]
	cbz	x21, LBB0_15
; %bb.2:
Lloh8:
	adrp	x23, _ACPI_GPE_REGISTER_WIDTH@GOTPAGE
Lloh9:
	ldr	x23, [x23, _ACPI_GPE_REGISTER_WIDTH@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x21, [x21, #8]
	cbz	x21, LBB0_15
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;       Child Loop BB0_13 Depth 3
	ldr	x8, [x21]
	cbz	x8, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x24, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	x24, x24, #1
	ldr	x8, [x21]
	cmp	x24, x8
	b.hs	LBB0_3
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_13 Depth 3
	ldr	x27, [x21, #24]
	add	x25, x27, x24, lsl #4
	add	x1, x25, #12
	add	x0, sp, #8
	bl	_acpi_hw_read
	bl	_ACPI_FAILURE
	cbnz	x0, LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	add	x1, x25, #8
	mov	x0, sp
	bl	_acpi_hw_read
	bl	_ACPI_FAILURE
	cbnz	x0, LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	w0, [sp]
	bl	_ACPI_DEBUG_PRINT
	ldr	w8, [sp, #8]
	ldr	w9, [sp]
	ands	w25, w9, w8
	b.eq	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=2
	ldr	x8, [x23]
	cbz	x8, LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=2
	mov	x26, #0
	add	x27, x27, x24, lsl #4
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=3
	add	x26, x26, #1
	cmp	x26, x8
	b.hs	LBB0_6
LBB0_13:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_7 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	lsr	w9, w25, w26
	tbz	w9, #0, LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=3
	ldr	x9, [x21, #16]
	madd	x8, x24, x8, x26
	add	x0, x9, x8, lsl #2
	ldr	x8, [x27]
	add	x1, x26, x8
	bl	_acpi_ev_gpe_dispatch
	orr	x19, x0, x19
	ldr	x8, [x23]
	b	LBB0_12
LBB0_15:
	ldr	w0, [x22]
	mov	x1, x20
	bl	_acpi_os_release_lock
LBB0_16:
	mov	x0, x19
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_INTERRUPT_NOT_HANDLED,8,3 ; @ACPI_INTERRUPT_NOT_HANDLED
	.comm	_ev_gpe_detect,4,2              ; @ev_gpe_detect
	.comm	_acpi_gbl_gpe_lock,4,2          ; @acpi_gbl_gpe_lock
	.comm	_ACPI_DB_INTERRUPTS,4,2         ; @ACPI_DB_INTERRUPTS
	.comm	_ACPI_GPE_REGISTER_WIDTH,8,3    ; @ACPI_GPE_REGISTER_WIDTH
.subsections_via_symbols
