	.file	"117326770.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Usage: %s <GPIO>\nGPIO must be exported to sysfs and have enabled edge detection\n"
.LC1:
	.string	"/sys/class/gpio/gpio%s/value"
.LC2:
	.string	"read()"
.LC3:
	.string	"poll()"
.LC4:
	.string	"timeout"
.LC5:
	.string	"interrupt\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -53[rbp]
	mov	edx, 5
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rax, -48[rbp]
	mov	edx, 32
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	cmp	DWORD PTR -84[rbp], 2
	je	.L2
	mov	rax, QWORD PTR -96[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L10
.L2:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -48[rbp]
	mov	rcx, rdx
	lea	rdx, .LC1[rip]
	mov	esi, 31
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	lea	rax, -48[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -72[rbp], eax
	cmp	DWORD PTR -72[rbp], 0
	jns	.L4
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	eax, 2
	jmp	.L10
.L4:
	mov	eax, DWORD PTR -72[rbp]
	mov	DWORD PTR -64[rbp], eax
	mov	WORD PTR -60[rbp], 2
	lea	rcx, -53[rbp]
	mov	eax, DWORD PTR -72[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	mov	DWORD PTR -68[rbp], eax
	cmp	DWORD PTR -68[rbp], 0
	jns	.L5
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, 4
	jmp	.L10
.L5:
	lea	rax, -53[rbp]
	mov	edx, 5
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR -72[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	mov	eax, 0
	call	lseek@PLT
	lea	rax, -64[rbp]
	mov	edx, 600000
	mov	esi, 1
	mov	rdi, rax
	call	poll@PLT
	mov	DWORD PTR -68[rbp], eax
	cmp	DWORD PTR -68[rbp], 0
	jns	.L6
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -72[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	mov	eax, 3
	jmp	.L10
.L6:
	cmp	DWORD PTR -68[rbp], 0
	jne	.L7
	lea	rdi, .LC4[rip]
	call	puts@PLT
	jmp	.L8
.L7:
	lea	rcx, -53[rbp]
	mov	eax, DWORD PTR -72[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	mov	DWORD PTR -68[rbp], eax
	cmp	DWORD PTR -68[rbp], 0
	jns	.L9
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, 4
	jmp	.L10
.L9:
	lea	rax, -53[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
.L8:
	jmp	.L5
.L10:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"117326770.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s <GPIO>\012GPIO must be exported to sysfs "
	.ascii	"and have enabled edge detection\012\000"
	.align	2
.LC1:
	.ascii	"/sys/class/gpio/gpio%s/value\000"
	.align	2
.LC2:
	.ascii	"read()\000"
	.align	2
.LC3:
	.ascii	"poll()\000"
	.align	2
.LC4:
	.ascii	"timeout\000"
	.align	2
.LC5:
	.ascii	"interrupt\012\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #48
	mov	r2, #5
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #40
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-72]
	cmp	r3, #2
	beq	.L2
	ldr	r3, [fp, #-76]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L12+4
	bl	printf
	mov	r3, #1
	b	.L10
.L2:
	ldr	r3, [fp, #-76]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r0, fp, #40
	ldr	r2, .L12+8
	mov	r1, #31
	bl	snprintf
	sub	r3, fp, #40
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-64]
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bge	.L4
	sub	r3, fp, #40
	mov	r0, r3
	bl	perror
	mov	r3, #2
	b	.L10
.L4:
	ldr	r3, [fp, #-64]
	str	r3, [fp, #-56]
	mov	r3, #2
	strh	r3, [fp, #-52]	@ movhi
	sub	r3, fp, #48
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-64]
	bl	read
	str	r0, [fp, #-60]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L12+12
	bl	perror
	mov	r3, #4
	b	.L10
.L5:
	sub	r3, fp, #48
	mov	r2, #5
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-64]
	bl	lseek
	sub	r3, fp, #56
	ldr	r2, .L12+16
	mov	r1, #1
	mov	r0, r3
	bl	poll
	str	r0, [fp, #-60]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L12+20
	bl	perror
	ldr	r0, [fp, #-64]
	bl	close
	mov	r3, #3
	b	.L10
.L6:
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bne	.L7
	ldr	r0, .L12+24
	bl	puts
	b	.L8
.L7:
	sub	r3, fp, #48
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-64]
	bl	read
	str	r0, [fp, #-60]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bge	.L9
	ldr	r0, .L12+12
	bl	perror
	mov	r3, #4
	b	.L10
.L9:
	sub	r3, fp, #48
	mov	r1, r3
	ldr	r0, .L12+28
	bl	printf
	ldr	r3, .L12+32
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
.L8:
	b	.L5
.L10:
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC6
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	600000
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	stdout
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
