	.file	"1127350.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage:"
.LC1:
	.string	"key "
	.align 8
.LC2:
	.string	"return   0 ~15 (push button nubmer)"
	.text
	.globl	doHelp
	.type	doHelp, @function
doHelp:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	doHelp, .-doHelp
	.section	.rodata
.LC3:
	.string	" Args number is more than 1\n"
.LC4:
	.string	"/dev/cnkey"
.LC5:
	.string	"driver  open error.\n"
.LC6:
	.string	"button NO:%d\n"
	.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -20[rbp], 1
	jle	.L3
	lea	rdi, .LC3[rip]
	call	perror@PLT
	call	doHelp
	mov	eax, 1
	jmp	.L6
.L3:
	mov	esi, 2
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jns	.L5
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L6
.L5:
	lea	rcx, -16[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -16[rbp]
.L6:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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	"1127350.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage:\000"
	.align	2
.LC1:
	.ascii	"key \000"
	.align	2
.LC2:
	.ascii	"return   0 ~15 (push button nubmer)\000"
	.text
	.align	2
	.global	doHelp
	.syntax unified
	.arm
	.fpu softvfp
	.type	doHelp, %function
doHelp:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L2
	bl	puts
	ldr	r0, .L2+4
	bl	puts
	ldr	r0, .L2+8
	bl	puts
	nop
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	doHelp, .-doHelp
	.section	.rodata
	.align	2
.LC3:
	.ascii	" Args number is more than 1\012\000"
	.align	2
.LC4:
	.ascii	"/dev/cnkey\000"
	.align	2
.LC5:
	.ascii	"driver  open error.\012\000"
	.align	2
.LC6:
	.ascii	"button NO:%d\012\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
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	ble	.L5
	ldr	r0, .L10+4
	bl	perror
	bl	doHelp
	mov	r3, #1
	b	.L8
.L5:
	mov	r1, #2
	ldr	r0, .L10+8
	bl	open
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L10+12
	bl	perror
	mov	r3, #1
	b	.L8
.L7:
	sub	r3, fp, #16
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	read
	ldr	r3, [fp, #-16]
	mov	r1, r3
	ldr	r0, .L10+16
	bl	printf
	ldr	r0, [fp, #-12]
	bl	close
	ldr	r3, [fp, #-16]
.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	.LC7
	.word	.LC3
	.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
