	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acpi_ev_match_prw_and_gpe
_acpi_ev_match_prw_and_gpe:             ## @acpi_ev_match_prw_and_gpe
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movl	%edi, %ebx
	movq	_ev_match_prw_and_gpe@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ACPI_FUNCTION_TRACE
	movq	_METHOD_NAME__PRW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ACPI_BTYPE_PACKAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-24(%rbp), %rcx
	movl	%ebx, %edi
	callq	_acpi_ut_evaluate_object
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_AE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_return_ACPI_STATUS
LBB0_2:
	movq	-24(%rbp), %rcx
	cmpl	$2, (%rcx)
	jl	LBB0_14
## %bb.3:
	movq	(%r14), %rax
	movq	8(%r14), %rdx
	movq	8(%rcx), %rcx
	movq	(%rcx), %rsi
	movq	(%rsi), %rdi
	movq	_ACPI_TYPE_INTEGER@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rdi
	jne	LBB0_5
## %bb.4:
	movq	_acpi_gbl_fadt_gpe_device@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movq	%rdi, %rcx
LBB0_9:
	cmpq	%rsi, %rdx
	jne	LBB0_14
## %bb.10:
	movq	(%rax), %rsi
	movq	%rcx, %rdx
	subq	%rsi, %rdx
	jl	LBB0_14
## %bb.11:
	movslq	8(%rax), %rdi
	leaq	(%rsi,%rdi,8), %rsi
	cmpq	%rsi, %rcx
	jge	LBB0_14
## %bb.12:
	movq	16(%rax), %rax
	movq	_ACPI_GPE_WAKE_ENABLED@GOTPCREL(%rip), %rcx
	movq	_ACPI_GPE_RUN_ENABLED@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rcx), %esi
	notl	%esi
	andl	%esi, (%rax,%rdx,4)
	leaq	(%rax,%rdx,4), %rbx
	movq	_ACPI_GPE_TYPE_WAKE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_acpi_ev_set_gpe_type
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	jne	LBB0_14
## %bb.13:
	movq	_ACPI_GPE_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_acpi_ev_update_gpe_enable_masks
	jmp	LBB0_14
LBB0_5:
	movq	_ACPI_TYPE_PACKAGE@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rdi
	jne	LBB0_14
## %bb.6:
	cmpl	$2, %edi
	jl	LBB0_14
## %bb.7:
	movq	8(%rsi), %rdi
	movq	(%rdi), %rsi
	movq	(%rsi), %rsi
	movq	_ACPI_TYPE_LOCAL_REFERENCE@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rsi
	jne	LBB0_14
## %bb.8:
	movq	8(%rdi), %rdi
	cmpq	%rcx, (%rdi)
	je	LBB0_9
LBB0_14:
	movq	-24(%rbp), %rdi
	callq	_acpi_ut_remove_reference
	movq	_AE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_return_ACPI_STATUS
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ev_match_prw_and_gpe,4,2       ## @ev_match_prw_and_gpe
	.comm	_METHOD_NAME__PRW,4,2           ## @METHOD_NAME__PRW
	.comm	_ACPI_BTYPE_PACKAGE,4,2         ## @ACPI_BTYPE_PACKAGE
	.comm	_AE_OK,4,2                      ## @AE_OK
	.comm	_ACPI_TYPE_INTEGER,8,3          ## @ACPI_TYPE_INTEGER
	.comm	_acpi_gbl_fadt_gpe_device,8,3   ## @acpi_gbl_fadt_gpe_device
	.comm	_ACPI_TYPE_PACKAGE,8,3          ## @ACPI_TYPE_PACKAGE
	.comm	_ACPI_TYPE_LOCAL_REFERENCE,8,3  ## @ACPI_TYPE_LOCAL_REFERENCE
	.comm	_ACPI_GPE_WAKE_ENABLED,4,2      ## @ACPI_GPE_WAKE_ENABLED
	.comm	_ACPI_GPE_RUN_ENABLED,4,2       ## @ACPI_GPE_RUN_ENABLED
	.comm	_ACPI_GPE_TYPE_WAKE,4,2         ## @ACPI_GPE_TYPE_WAKE
	.comm	_ACPI_GPE_DISABLE,4,2           ## @ACPI_GPE_DISABLE
	.no_dead_strip	_acpi_ev_match_prw_and_gpe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acpi_ev_match_prw_and_gpe
_acpi_ev_match_prw_and_gpe:             ; @acpi_ev_match_prw_and_gpe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	mov	x20, x0
Lloh0:
	adrp	x8, _ev_match_prw_and_gpe@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ev_match_prw_and_gpe@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_ACPI_FUNCTION_TRACE
Lloh3:
	adrp	x8, _METHOD_NAME__PRW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _METHOD_NAME__PRW@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _ACPI_BTYPE_PACKAGE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ACPI_BTYPE_PACKAGE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	add	x3, sp, #8
	mov	x0, x20
	bl	_acpi_ut_evaluate_object
	bl	_ACPI_FAILURE
Lloh9:
	adrp	x20, _AE_OK@GOTPAGE
Lloh10:
	ldr	x20, [x20, _AE_OK@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x20]
	bl	_return_ACPI_STATUS
LBB0_2:
	ldr	x10, [sp, #8]
	ldr	w8, [x10]
	cmp	w8, #2
	b.lt	LBB0_13
; %bb.3:
	ldp	x8, x9, [x19]
	ldr	x10, [x10, #8]
	ldr	x12, [x10]
	ldr	x10, [x12]
Lloh11:
	adrp	x11, _ACPI_TYPE_INTEGER@GOTPAGE
Lloh12:
	ldr	x11, [x11, _ACPI_TYPE_INTEGER@GOTPAGEOFF]
Lloh13:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_9
; %bb.4:
Lloh14:
	adrp	x11, _acpi_gbl_fadt_gpe_device@GOTPAGE
Lloh15:
	ldr	x11, [x11, _acpi_gbl_fadt_gpe_device@GOTPAGEOFF]
Lloh16:
	ldr	x12, [x11]
	cmp	x9, x12
	b.ne	LBB0_13
LBB0_5:
	ldr	x11, [x8]
	subs	x9, x10, x11
	b.lt	LBB0_13
; %bb.6:
	ldrsw	x12, [x8, #8]
	add	x11, x11, x12, lsl #3
	cmp	x10, x11
	b.ge	LBB0_13
; %bb.7:
	ldr	x8, [x8, #16]
Lloh17:
	adrp	x10, _ACPI_GPE_WAKE_ENABLED@GOTPAGE
Lloh18:
	ldr	x10, [x10, _ACPI_GPE_WAKE_ENABLED@GOTPAGEOFF]
	add	x19, x8, x9, lsl #2
Lloh19:
	ldr	w8, [x10]
Lloh20:
	adrp	x9, _ACPI_GPE_RUN_ENABLED@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ACPI_GPE_RUN_ENABLED@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
Lloh23:
	adrp	x8, _ACPI_GPE_TYPE_WAKE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ACPI_GPE_TYPE_WAKE@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_acpi_ev_set_gpe_type
	bl	_ACPI_FAILURE
	cbnz	x0, LBB0_13
; %bb.8:
Lloh26:
	adrp	x8, _ACPI_GPE_DISABLE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ACPI_GPE_DISABLE@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_acpi_ev_update_gpe_enable_masks
	b	LBB0_13
LBB0_9:
Lloh29:
	adrp	x13, _ACPI_TYPE_PACKAGE@GOTPAGE
Lloh30:
	ldr	x13, [x13, _ACPI_TYPE_PACKAGE@GOTPAGEOFF]
Lloh31:
	ldr	x13, [x13]
	cmp	x10, x13
	ccmp	w10, #2, #8, eq
	b.lt	LBB0_13
; %bb.10:
	ldr	x10, [x12, #8]
	ldr	x12, [x10]
	ldr	x12, [x12]
Lloh32:
	adrp	x13, _ACPI_TYPE_LOCAL_REFERENCE@GOTPAGE
Lloh33:
	ldr	x13, [x13, _ACPI_TYPE_LOCAL_REFERENCE@GOTPAGEOFF]
Lloh34:
	ldr	x13, [x13]
	cmp	x12, x13
	b.ne	LBB0_13
; %bb.11:
	ldr	x10, [x10, #8]
	ldr	x10, [x10]
	cmp	x10, x11
	b.ne	LBB0_13
; %bb.12:
	mov	x10, x11
	cmp	x9, x12
	b.eq	LBB0_5
LBB0_13:
	ldr	x0, [sp, #8]
	bl	_acpi_ut_remove_reference
	ldr	w0, [x20]
	bl	_return_ACPI_STATUS
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_ev_match_prw_and_gpe,4,2       ; @ev_match_prw_and_gpe
	.comm	_METHOD_NAME__PRW,4,2           ; @METHOD_NAME__PRW
	.comm	_ACPI_BTYPE_PACKAGE,4,2         ; @ACPI_BTYPE_PACKAGE
	.comm	_AE_OK,4,2                      ; @AE_OK
	.comm	_ACPI_TYPE_INTEGER,8,3          ; @ACPI_TYPE_INTEGER
	.comm	_acpi_gbl_fadt_gpe_device,8,3   ; @acpi_gbl_fadt_gpe_device
	.comm	_ACPI_TYPE_PACKAGE,8,3          ; @ACPI_TYPE_PACKAGE
	.comm	_ACPI_TYPE_LOCAL_REFERENCE,8,3  ; @ACPI_TYPE_LOCAL_REFERENCE
	.comm	_ACPI_GPE_WAKE_ENABLED,4,2      ; @ACPI_GPE_WAKE_ENABLED
	.comm	_ACPI_GPE_RUN_ENABLED,4,2       ; @ACPI_GPE_RUN_ENABLED
	.comm	_ACPI_GPE_TYPE_WAKE,4,2         ; @ACPI_GPE_TYPE_WAKE
	.comm	_ACPI_GPE_DISABLE,4,2           ; @ACPI_GPE_DISABLE
	.no_dead_strip	_acpi_ev_match_prw_and_gpe
.subsections_via_symbols
