	.file	"extr_apmd.c_proc_apmevent.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"apmevent %04x index %d\n"
.LC1:
	.string	"apm event: %s"
	.text
	.p2align 4
	.globl	proc_apmevent
	.type	proc_apmevent, @function
proc_apmevent:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	lea	r12, .LC0[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, edi
	sub	rsp, 32
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rbp, rsp
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	mov	ecx, DWORD PTR 8[rsp]
	mov	rdx, QWORD PTR [rsp]
	mov	rsi, r12
	xor	eax, eax
	mov	edi, DWORD PTR LOG_NOTICE[rip]
	call	syslog@PLT
	mov	rax, QWORD PTR events[rip]
	mov	rdx, QWORD PTR [rsp]
	lea	rsi, .LC1[rip]
	mov	edi, DWORD PTR LOG_INFO[rip]
	movsx	rdx, DWORD PTR [rax+rdx*4]
	xor	eax, eax
	call	syslog@PLT
	xor	eax, eax
	call	fork@PLT
	test	rax, rax
	je	.L9
.L3:
	mov	esi, DWORD PTR APMIO_NEXTEVENT[rip]
	mov	rdx, rbp
	mov	edi, ebx
	call	ioctl@PLT
	test	rax, rax
	je	.L4
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L10
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	rdx, QWORD PTR [rsp]
	mov	rax, QWORD PTR events[rip]
	lea	rdi, [rax+rdx*4]
	call	exec_event_cmd@PLT
	mov	edi, eax
	call	exit@PLT
	jmp	.L3
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	proc_apmevent, .-proc_apmevent
	.comm	events,8,8
	.comm	LOG_NOTICE,4,4
	.comm	LOG_INFO,4,4
	.comm	APMIO_NEXTEVENT,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_apmd.c_proc_apmevent.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"apmevent %04x index %d\012\000"
	.align	2
.LC1:
	.ascii	"apm event: %s\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	proc_apmevent
	.syntax unified
	.arm
	.fpu softvfp
	.type	proc_apmevent, %function
proc_apmevent:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L11
	sub	sp, sp, #16
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r4, r0
	ldr	r5, .L11+4
	ldr	r10, .L11+8
	ldr	r9, .L11+12
	ldr	r6, .L11+16
	ldr	r8, .L11+20
.L2:
	ldr	r7, .L11+24
	b	.L3
.L4:
	ldmib	sp, {r2, r3}
	mov	r1, r9
	ldr	r0, [r10]
	bl	syslog
	ldr	r3, [r6]
	ldr	r2, [sp, #4]
	mov	r1, r7
	ldr	r2, [r3, r2, lsl #2]
	ldr	r0, [r8]
	bl	syslog
	bl	fork
	cmp	r0, #0
	beq	.L9
.L3:
	mov	r0, r4
	ldr	r1, [r5]
	add	r2, sp, #4
	bl	ioctl
	cmp	r0, #0
	beq	.L4
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L9:
	ldr	r3, [r6]
	ldr	r0, [sp, #4]
	add	r0, r3, r0, lsl #2
	bl	exec_event_cmd
	bl	exit
	b	.L2
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	.LC2
	.word	APMIO_NEXTEVENT
	.word	LOG_NOTICE
	.word	.LC0
	.word	events
	.word	LOG_INFO
	.word	.LC1
	.size	proc_apmevent, .-proc_apmevent
	.comm	events,4,4
	.comm	LOG_NOTICE,4,4
	.comm	LOG_INFO,4,4
	.comm	APMIO_NEXTEVENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
