	.file	"352595.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"/sys/class/gpio/gpio%d/value"
.LC1:
	.string	"open file: %s \n"
.LC2:
	.string	"error opening gpio file"
	.text
	.globl	gpio_fd_open
	.type	gpio_fd_open, @function
gpio_fd_open:
.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, 80
	mov	DWORD PTR -68[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -48[rbp]
	mov	edx, 30
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	edx, DWORD PTR -68[rbp]
	lea	rax, -48[rbp]
	mov	ecx, edx
	lea	rdx, .LC0[rip]
	mov	esi, 30
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	lea	rax, -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -48[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	js	.L8
	mov	eax, DWORD PTR -52[rbp]
	jmp	.L5
.L8:
	nop
.L3:
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, -1
.L5:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	gpio_fd_open, .-gpio_fd_open
	.section	.rodata
.LC3:
	.string	"error poll"
.LC4:
	.string	"read value -> POLLIN... "
.LC5:
	.string	"other than POLLIN ... "
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 26
	call	gpio_fd_open
	mov	DWORD PTR -24[rbp], eax
	cmp	DWORD PTR -24[rbp], 0
	jns	.L10
	mov	edi, 1
	call	exit@PLT
.L10:
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR -16[rbp], eax
	mov	WORD PTR -12[rbp], 58
.L14:
	lea	rax, -16[rbp]
	mov	edx, -1
	mov	esi, 1
	mov	rdi, rax
	call	poll@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jns	.L11
	lea	rdi, .LC3[rip]
	call	perror@PLT
	jmp	.L12
.L11:
	movzx	eax, WORD PTR -10[rbp]
	cwde
	and	eax, 1
	test	eax, eax
	je	.L13
	lea	rdi, .LC4[rip]
	call	puts@PLT
.L13:
	lea	rdi, .LC5[rip]
	call	puts@PLT
.L12:
	jmp	.L14
	.cfi_endproc
.LFE7:
	.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	"352595.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/sys/class/gpio/gpio%d/value\000"
	.align	2
.LC1:
	.ascii	"open file: %s \012\000"
	.align	2
.LC2:
	.ascii	"error opening gpio file\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	gpio_fd_open
	.syntax unified
	.arm
	.fpu softvfp
	.type	gpio_fd_open, %function
gpio_fd_open:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #40
	mov	r2, #30
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r0, fp, #40
	ldr	r3, [fp, #-48]
	ldr	r2, .L9+4
	mov	r1, #30
	bl	snprintf
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, .L9+8
	bl	printf
	sub	r3, fp, #40
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	blt	.L8
	ldr	r3, [fp, #-44]
	b	.L5
.L8:
	nop
.L3:
	ldr	r0, .L9+12
	bl	perror
	mvn	r3, #0
.L5:
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L6
	bl	__stack_chk_fail
.L6:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	gpio_fd_open, .-gpio_fd_open
	.section	.rodata
	.align	2
.LC4:
	.ascii	"error poll\000"
	.align	2
.LC5:
	.ascii	"read value -> POLLIN... \000"
	.align	2
.LC6:
	.ascii	"other than POLLIN ... \000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #26
	bl	gpio_fd_open
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bge	.L12
	mov	r0, #1
	bl	exit
.L12:
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-16]
	mov	r3, #58
	strh	r3, [fp, #-12]	@ movhi
.L16:
	sub	r3, fp, #16
	mvn	r2, #0
	mov	r1, #1
	mov	r0, r3
	bl	poll
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bge	.L13
	ldr	r0, .L18+4
	bl	perror
	b	.L14
.L13:
	ldrsh	r3, [fp, #-10]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L15
	ldr	r0, .L18+8
	bl	puts
.L15:
	ldr	r0, .L18+12
	bl	puts
.L14:
	b	.L16
.L19:
	.align	2
.L18:
	.word	.LC7
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
