	.file	"extr_evgpe.c_AcpiEvAddGpeReference.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	AcpiEvAddGpeReference
	.type	AcpiEvAddGpeReference, @function
AcpiEvAddGpeReference:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, DWORD PTR AE_OK[rip]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	edi, DWORD PTR EvAddGpeReference[rip]
	call	ACPI_FUNCTION_TRACE@PLT
	mov	edx, DWORD PTR [rbx]
	cmp	edx, DWORD PTR ACPI_UINT8_MAX[rip]
	je	.L17
.L2:
	add	edx, 1
	mov	DWORD PTR [rbx], edx
	cmp	edx, 1
	je	.L18
.L3:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	edi, ebp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	return_ACPI_STATUS@PLT
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	test	r12, r12
	jne	.L19
.L4:
	mov	rdi, rbx
	call	AcpiEvUpdateGpeEnableMask@PLT
	mov	edi, eax
	mov	ebp, eax
	call	ACPI_SUCCESS@PLT
	test	rax, rax
	jne	.L20
.L5:
	mov	edi, ebp
	call	ACPI_FAILURE@PLT
	test	rax, rax
	je	.L3
	sub	DWORD PTR [rbx], 1
	mov	edi, ebp
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	return_ACPI_STATUS@PLT
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	edi, DWORD PTR AE_LIMIT[rip]
	call	return_ACPI_STATUS@PLT
	mov	edx, DWORD PTR [rbx]
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rdi, rbx
	call	AcpiEvEnableGpe@PLT
	mov	ebp, eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, rbx
	call	AcpiHwClearGpe@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	AcpiEvAddGpeReference, .-AcpiEvAddGpeReference
	.comm	EvAddGpeReference,4,4
	.comm	AE_OK,4,4
	.comm	AE_LIMIT,4,4
	.comm	ACPI_UINT8_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_evgpe.c_AcpiEvAddGpeReference.c"
	.text
	.align	2
	.global	AcpiEvAddGpeReference
	.syntax unified
	.arm
	.fpu softvfp
	.type	AcpiEvAddGpeReference, %function
AcpiEvAddGpeReference:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r2, .L21
	ldr	r3, .L21+4
	ldr	r0, [r2]
	ldr	r5, [r3]
	mov	r6, r1
	bl	ACPI_FUNCTION_TRACE
	ldr	r2, .L21+8
	ldr	r3, [r4]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L17
.L2:
	add	r3, r3, #1
	cmp	r3, #1
	str	r3, [r4]
	beq	.L18
	mov	r0, r5
	pop	{r4, r5, r6, lr}
	b	return_ACPI_STATUS
.L18:
	cmp	r6, #0
	bne	.L19
.L4:
	mov	r0, r4
	bl	AcpiEvUpdateGpeEnableMask
	mov	r5, r0
	bl	ACPI_SUCCESS
	cmp	r0, #0
	bne	.L20
.L5:
	mov	r0, r5
	bl	ACPI_FAILURE
	cmp	r0, #0
	ldrne	r3, [r4]
	mov	r0, r5
	subne	r3, r3, #1
	strne	r3, [r4]
	pop	{r4, r5, r6, lr}
	b	return_ACPI_STATUS
.L17:
	ldr	r3, .L21+12
	ldr	r0, [r3]
	bl	return_ACPI_STATUS
	ldr	r3, [r4]
	b	.L2
.L19:
	mov	r0, r4
	bl	AcpiHwClearGpe
	b	.L4
.L20:
	mov	r0, r4
	bl	AcpiEvEnableGpe
	mov	r5, r0
	b	.L5
.L22:
	.align	2
.L21:
	.word	EvAddGpeReference
	.word	AE_OK
	.word	ACPI_UINT8_MAX
	.word	AE_LIMIT
	.size	AcpiEvAddGpeReference, .-AcpiEvAddGpeReference
	.comm	EvAddGpeReference,4,4
	.comm	AE_OK,4,4
	.comm	AE_LIMIT,4,4
	.comm	ACPI_UINT8_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
