	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_ev_gpe_initialize         ## -- Begin function acpi_ev_gpe_initialize
	.p2align	4, 0x90
_acpi_ev_gpe_initialize:                ## @acpi_ev_gpe_initialize
	.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
	movq	_ev_gpe_initialize@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ACPI_FUNCTION_TRACE
	movq	_ACPI_MTX_NAMESPACE@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_acpi_ut_acquire_mutex
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	%ebx, %edi
	callq	_return_ACPI_STATUS
LBB0_2:
	movq	_acpi_gbl_FADT@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	xorl	%r14d, %r14d
	movl	$0, %ebx
	movl	$0, %r15d
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	cmpq	$0, 24(%r13)
	movl	$0, %ebx
	movl	$0, %r15d
	je	LBB0_6
## %bb.4:
	movl	%eax, %ebx
	shrl	$31, %ebx
	addl	%eax, %ebx
	sarl	%ebx
	movq	_ACPI_GPE_REGISTER_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	imull	%ebx, %r15d
	decl	%r15d
	movq	_acpi_gbl_fadt_gpe_device@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%r13), %r8d
	movq	_acpi_gbl_gpe_fadt_blocks@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	leaq	24(%r13), %rsi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_acpi_ev_create_gpe_block
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ACPI_EXCEPTION
LBB0_6:
	movl	4(%r13), %eax
	testl	%eax, %eax
	je	LBB0_14
## %bb.7:
	cmpq	$0, 16(%r13)
	je	LBB0_14
## %bb.8:
	movl	%eax, %r14d
	shrl	$31, %r14d
	addl	%eax, %r14d
	sarl	%r14d
	movl	8(%r13), %ecx
	testl	%ebx, %ebx
	je	LBB0_11
## %bb.9:
	cmpl	%ecx, %r15d
	jl	LBB0_11
## %bb.10:
	movq	_ACPI_GPE_REGISTER_WIDTH@GOTPCREL(%rip), %rax
	imull	(%rax), %r14d
	leal	(%rcx,%r14), %edi
	decl	%edi
	callq	_ACPI_ERROR
	xorl	%r14d, %r14d
LBB0_14:
	addl	%r14d, %ebx
	jne	LBB0_16
LBB0_15:
	leaq	L_.str.3(%rip), %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ACPI_DEBUG_PRINT
	jmp	LBB0_18
LBB0_11:
	movq	_acpi_gbl_fadt_gpe_device@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%r13), %r8d
	movq	_acpi_gbl_gpe_fadt_blocks@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	addq	$4, %r9
	leaq	16(%r13), %rsi
	movl	%r14d, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_acpi_ev_create_gpe_block
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	leaq	L_.str.2(%rip), %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ACPI_EXCEPTION
LBB0_13:
	movl	8(%r13), %eax
	movq	_ACPI_GPE_REGISTER_WIDTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	imull	%r14d, %ecx
	leal	(%rax,%rcx), %r15d
	decl	%r15d
	addl	%r14d, %ebx
	je	LBB0_15
LBB0_16:
	movq	_ACPI_GPE_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jle	LBB0_18
## %bb.17:
	movl	%r15d, %edi
	callq	_ACPI_ERROR
LBB0_18:
	movl	(%r12), %edi
	callq	_acpi_ut_release_mutex
	movq	_AE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_return_ACPI_STATUS             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ev_gpe_initialize,4,2          ## @ev_gpe_initialize
	.comm	_ACPI_MTX_NAMESPACE,4,2         ## @ACPI_MTX_NAMESPACE
	.comm	_acpi_gbl_FADT,32,3             ## @acpi_gbl_FADT
	.comm	_ACPI_GPE_REGISTER_WIDTH,4,2    ## @ACPI_GPE_REGISTER_WIDTH
	.comm	_acpi_gbl_fadt_gpe_device,4,2   ## @acpi_gbl_fadt_gpe_device
	.comm	_acpi_gbl_gpe_fadt_blocks,8,3   ## @acpi_gbl_gpe_fadt_blocks
	.comm	_AE_INFO,4,2                    ## @AE_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not create GPE Block 0"

L_.str.2:                               ## @.str.2
	.asciz	"Could not create GPE Block 1"

	.comm	_ACPI_DB_INIT,4,2               ## @ACPI_DB_INIT
L_.str.3:                               ## @.str.3
	.asciz	"There are no GPE blocks defined in the FADT\n"

	.comm	_AE_OK,4,2                      ## @AE_OK
	.comm	_ACPI_GPE_MAX,4,2               ## @ACPI_GPE_MAX
	.comm	_AE_BAD_VALUE,4,2               ## @AE_BAD_VALUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_ev_gpe_initialize         ; -- Begin function acpi_ev_gpe_initialize
	.p2align	2
_acpi_ev_gpe_initialize:                ; @acpi_ev_gpe_initialize
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x8, _ev_gpe_initialize@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ev_gpe_initialize@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_ACPI_FUNCTION_TRACE
Lloh3:
	adrp	x22, _ACPI_MTX_NAMESPACE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _ACPI_MTX_NAMESPACE@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_acpi_ut_acquire_mutex
	mov	x19, x0
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_return_ACPI_STATUS
LBB0_2:
Lloh5:
	adrp	x23, _acpi_gbl_FADT@GOTPAGE
Lloh6:
	ldr	x23, [x23, _acpi_gbl_FADT@GOTPAGEOFF]
	ldr	w8, [x23]
	ldr	x9, [x23, #24]
	cmp	w8, #0
	ccmp	x9, #0, #4, ne
	b.ne	LBB0_4
; %bb.3:
	mov	w19, #0
	mov	w20, #0
	b	LBB0_6
LBB0_4:
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w19, w8, #1
Lloh7:
	adrp	x8, _ACPI_GPE_REGISTER_WIDTH@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ACPI_GPE_REGISTER_WIDTH@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	mul	w8, w8, w19
Lloh10:
	adrp	x9, _acpi_gbl_fadt_gpe_device@GOTPAGE
Lloh11:
	ldr	x9, [x9, _acpi_gbl_fadt_gpe_device@GOTPAGEOFF]
	sub	w20, w8, #1
Lloh12:
	ldr	w0, [x9]
	ldr	w4, [x23, #12]
Lloh13:
	adrp	x8, _acpi_gbl_gpe_fadt_blocks@GOTPAGE
Lloh14:
	ldr	x8, [x8, _acpi_gbl_gpe_fadt_blocks@GOTPAGEOFF]
Lloh15:
	ldr	x5, [x8]
	add	x1, x23, #24
	mov	x2, x19
	mov	w3, #0
	bl	_acpi_ev_create_gpe_block
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_6
; %bb.5:
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_ACPI_EXCEPTION
LBB0_6:
	ldr	w8, [x23, #4]
	ldr	x9, [x23, #16]
	cmp	w8, #0
	ccmp	x9, #0, #4, ne
	b.eq	LBB0_10
; %bb.7:
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w21, w8, #1
	ldr	w3, [x23, #8]
	cbz	w19, LBB0_12
; %bb.8:
	cmp	w20, w3
	b.lt	LBB0_12
; %bb.9:
Lloh18:
	adrp	x8, _ACPI_GPE_REGISTER_WIDTH@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ACPI_GPE_REGISTER_WIDTH@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	madd	w8, w8, w21, w3
	sub	w0, w8, #1
	bl	_ACPI_ERROR
LBB0_10:
	mov	w21, #0
	cmn	w19, w21
	b.ne	LBB0_15
LBB0_11:
Lloh21:
	adrp	x0, l_.str.3@PAGE
Lloh22:
	add	x0, x0, l_.str.3@PAGEOFF
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_ACPI_DEBUG_PRINT
	b	LBB0_17
LBB0_12:
Lloh23:
	adrp	x8, _acpi_gbl_fadt_gpe_device@GOTPAGE
Lloh24:
	ldr	x8, [x8, _acpi_gbl_fadt_gpe_device@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	ldr	w4, [x23, #12]
Lloh26:
	adrp	x8, _acpi_gbl_gpe_fadt_blocks@GOTPAGE
Lloh27:
	ldr	x8, [x8, _acpi_gbl_gpe_fadt_blocks@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	add	x5, x8, #4
	add	x1, x23, #16
	mov	x2, x21
	bl	_acpi_ev_create_gpe_block
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_14
; %bb.13:
Lloh29:
	adrp	x0, l_.str.2@PAGE
Lloh30:
	add	x0, x0, l_.str.2@PAGEOFF
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_ACPI_EXCEPTION
LBB0_14:
	ldr	w8, [x23, #8]
Lloh31:
	adrp	x9, _ACPI_GPE_REGISTER_WIDTH@GOTPAGE
Lloh32:
	ldr	x9, [x9, _ACPI_GPE_REGISTER_WIDTH@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	madd	w8, w9, w21, w8
	sub	w20, w8, #1
	cmn	w19, w21
	b.eq	LBB0_11
LBB0_15:
Lloh34:
	adrp	x8, _ACPI_GPE_MAX@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ACPI_GPE_MAX@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	cmp	w20, w8
	b.le	LBB0_17
; %bb.16:
	mov	x0, x20
	bl	_ACPI_ERROR
LBB0_17:
	ldr	w0, [x22]
	bl	_acpi_ut_release_mutex
Lloh37:
	adrp	x8, _AE_OK@GOTPAGE
Lloh38:
	ldr	x8, [x8, _AE_OK@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_return_ACPI_STATUS
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_ev_gpe_initialize,4,2          ; @ev_gpe_initialize
	.comm	_ACPI_MTX_NAMESPACE,4,2         ; @ACPI_MTX_NAMESPACE
	.comm	_acpi_gbl_FADT,32,3             ; @acpi_gbl_FADT
	.comm	_ACPI_GPE_REGISTER_WIDTH,4,2    ; @ACPI_GPE_REGISTER_WIDTH
	.comm	_acpi_gbl_fadt_gpe_device,4,2   ; @acpi_gbl_fadt_gpe_device
	.comm	_acpi_gbl_gpe_fadt_blocks,8,3   ; @acpi_gbl_gpe_fadt_blocks
	.comm	_AE_INFO,4,2                    ; @AE_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not create GPE Block 0"

l_.str.2:                               ; @.str.2
	.asciz	"Could not create GPE Block 1"

	.comm	_ACPI_DB_INIT,4,2               ; @ACPI_DB_INIT
l_.str.3:                               ; @.str.3
	.asciz	"There are no GPE blocks defined in the FADT\n"

	.comm	_AE_OK,4,2                      ; @AE_OK
	.comm	_ACPI_GPE_MAX,4,2               ; @ACPI_GPE_MAX
	.comm	_AE_BAD_VALUE,4,2               ; @AE_BAD_VALUE
.subsections_via_symbols
