	.file	"420487.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Erro na abertura de %s:\t"
.LC1:
	.string	"open"
	.align 8
.LC2:
	.string	"Vers\303\243o do driver < 1.0, abortando\n"
.LC3:
	.string	"Vers\303\243o 0x%x\n"
.LC4:
	.string	"Falha na leitura do nome\n"
.LC5:
	.string	"Nome: %s\n"
	.align 8
.LC6:
	.string	"Falha na leitura do n\303\272mero de eixos\n"
.LC7:
	.string	"%d eixos\n"
	.align 8
.LC8:
	.string	"Falha na leitura do n\303\272mero de bot\303\265es\n"
.LC9:
	.string	"%d bot\303\265es\n"
	.text
	.globl	joystick_open
	.type	joystick_open, @function
joystick_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, 176
	mov	QWORD PTR -168[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -168[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -148[rbp], eax
	cmp	DWORD PTR -148[rbp], -1
	jne	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -168[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L8
.L2:
	lea	rdx, -152[rbp]
	mov	eax, DWORD PTR -148[rbp]
	mov	esi, 2147772929
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L4
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 35
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L8
.L4:
	mov	edx, DWORD PTR -152[rbp]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdx, -144[rbp]
	mov	eax, DWORD PTR -148[rbp]
	mov	esi, 2155899411
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L5
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 25
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L8
.L5:
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -144[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdx, -154[rbp]
	mov	eax, DWORD PTR -148[rbp]
	mov	esi, 2147576337
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 37
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L8
.L6:
	movzx	eax, BYTE PTR -154[rbp]
	movsx	edx, al
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdx, -153[rbp]
	mov	eax, DWORD PTR -148[rbp]
	mov	esi, 2147576338
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L7
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 39
	mov	esi, 1
	lea	rdi, .LC8[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L8
.L7:
	movzx	eax, BYTE PTR -153[rbp]
	movsx	edx, al
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR -148[rbp]
.L8:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	joystick_open, .-joystick_open
	.section	.rodata
	.align 8
.LC10:
	.string	"the_stack_data/420487.c - read"
	.align 8
.LC11:
	.string	"the_stack_data/420487.c - unexpected EOF at joystick device\n"
	.align 8
.LC12:
	.string	"the_stack_data/420487.c - joystick invalid packet\n"
	.text
	.globl	joystick_read
	.type	joystick_read, @function
joystick_read:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	rcx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	cmp	rax, 8
	je	.L11
	cmp	rax, 8
	jg	.L12
	cmp	rax, -1
	je	.L13
	test	rax, rax
	je	.L14
	jmp	.L12
.L13:
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L15
.L14:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 60
	mov	esi, 1
	lea	rdi, .LC11[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L15
.L11:
	mov	eax, 1
	jmp	.L15
.L12:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 50
	mov	esi, 1
	lea	rdi, .LC12[rip]
	call	fwrite@PLT
	mov	eax, -1
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	joystick_read, .-joystick_read
	.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	"420487.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Erro na abertura de %s:\011\000"
	.align	2
.LC1:
	.ascii	"open\000"
	.align	2
.LC2:
	.ascii	"Vers\303\243o do driver < 1.0, abortando\012\000"
	.align	2
.LC3:
	.ascii	"Vers\303\243o 0x%x\012\000"
	.align	2
.LC4:
	.ascii	"Falha na leitura do nome\012\000"
	.align	2
.LC5:
	.ascii	"Nome: %s\012\000"
	.align	2
.LC6:
	.ascii	"Falha na leitura do n\303\272mero de eixos\012\000"
	.align	2
.LC7:
	.ascii	"%d eixos\012\000"
	.align	2
.LC8:
	.ascii	"Falha na leitura do n\303\272mero de bot\303\265es\012"
	.ascii	"\000"
	.align	2
.LC9:
	.ascii	"%d bot\303\265es\012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	joystick_open
	.syntax unified
	.arm
	.fpu softvfp
	.type	joystick_open, %function
joystick_open:
	@ args = 0, pretend = 0, frame = 152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #152
	str	r0, [fp, #-152]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #0
	ldr	r0, [fp, #-152]
	bl	open
	str	r0, [fp, #-140]
	ldr	r3, [fp, #-140]
	cmn	r3, #1
	bne	.L2
	ldr	r3, .L10+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-152]
	ldr	r1, .L10+8
	mov	r0, r3
	bl	fprintf
	ldr	r0, .L10+12
	bl	perror
	mvn	r3, #0
	b	.L8
.L2:
	sub	r3, fp, #144
	mov	r2, r3
	ldr	r1, .L10+16
	ldr	r0, [fp, #-140]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	ldr	r3, .L10+4
	ldr	r3, [r3]
	mov	r2, #35
	mov	r1, #1
	ldr	r0, .L10+20
	bl	fwrite
	mvn	r3, #0
	b	.L8
.L4:
	ldr	r3, .L10+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-144]
	ldr	r1, .L10+24
	mov	r0, r3
	bl	fprintf
	sub	r3, fp, #136
	mov	r2, r3
	ldr	r1, .L10+28
	ldr	r0, [fp, #-140]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L5
	ldr	r3, .L10+4
	ldr	r3, [r3]
	mov	r2, #25
	mov	r1, #1
	ldr	r0, .L10+32
	bl	fwrite
	mvn	r3, #0
	b	.L8
.L5:
	ldr	r3, .L10+4
	ldr	r3, [r3]
	sub	r2, fp, #136
	ldr	r1, .L10+36
	mov	r0, r3
	bl	fprintf
	sub	r3, fp, #146
	mov	r2, r3
	ldr	r1, .L10+40
	ldr	r0, [fp, #-140]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L6
	ldr	r3, .L10+4
	ldr	r3, [r3]
	mov	r2, #37
	mov	r1, #1
	ldr	r0, .L10+44
	bl	fwrite
	mvn	r3, #0
	b	.L8
.L6:
	ldr	r3, .L10+4
	ldr	r3, [r3]
	ldrb	r2, [fp, #-146]	@ zero_extendqisi2
	ldr	r1, .L10+48
	mov	r0, r3
	bl	fprintf
	sub	r3, fp, #145
	mov	r2, r3
	ldr	r1, .L10+52
	ldr	r0, [fp, #-140]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L7
	ldr	r3, .L10+4
	ldr	r3, [r3]
	mov	r2, #39
	mov	r1, #1
	ldr	r0, .L10+56
	bl	fwrite
	mvn	r3, #0
	b	.L8
.L7:
	ldr	r3, .L10+4
	ldr	r3, [r3]
	ldrb	r2, [fp, #-145]	@ zero_extendqisi2
	ldr	r1, .L10+60
	mov	r0, r3
	bl	fprintf
	ldr	r3, [fp, #-140]
.L8:
	ldr	r2, .L10
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC10
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	-2147194367
	.word	.LC2
	.word	.LC3
	.word	-2139067885
	.word	.LC4
	.word	.LC5
	.word	-2147390959
	.word	.LC6
	.word	.LC7
	.word	-2147390958
	.word	.LC8
	.word	.LC9
	.size	joystick_open, .-joystick_open
	.section	.rodata
	.align	2
.LC11:
	.ascii	"the_stack_data/420487.c - read\000"
	.align	2
.LC12:
	.ascii	"the_stack_data/420487.c - unexpected EOF at joystic"
	.ascii	"k device\012\000"
	.align	2
.LC13:
	.ascii	"the_stack_data/420487.c - joystick invalid packet\012"
	.ascii	"\000"
	.text
	.align	2
	.global	joystick_read
	.syntax unified
	.arm
	.fpu softvfp
	.type	joystick_read, %function
joystick_read:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	mov	r2, #8
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	read
	mov	r3, r0
	cmp	r3, #8
	beq	.L13
	cmp	r3, #8
	bgt	.L14
	cmn	r3, #1
	beq	.L15
	cmp	r3, #0
	beq	.L16
	b	.L14
.L15:
	ldr	r0, .L18
	bl	perror
	mvn	r3, #0
	b	.L17
.L16:
	ldr	r3, .L18+4
	ldr	r3, [r3]
	mov	r2, #60
	mov	r1, #1
	ldr	r0, .L18+8
	bl	fwrite
	mvn	r3, #0
	b	.L17
.L13:
	mov	r3, #1
	b	.L17
.L14:
	ldr	r3, .L18+4
	ldr	r3, [r3]
	mov	r2, #50
	mov	r1, #1
	ldr	r0, .L18+12
	bl	fwrite
	mvn	r3, #0
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC11
	.word	stderr
	.word	.LC12
	.word	.LC13
	.size	joystick_read, .-joystick_read
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
