	.file	"211824.c"
	.intel_syntax noprefix
	.text
	.globl	fp
	.bss
	.align 8
	.type	fp, @object
	.size	fp, 8
fp:
	.zero	8
	.globl	file_name_str
	.align 32
	.type	file_name_str, @object
	.size	file_name_str, 256
file_name_str:
	.zero	256
	.section	.rodata
.LC0:
	.string	"Use below param for beep: "
.LC1:
	.string	"1\t for do1 on"
.LC2:
	.string	"2\t for do1 off"
.LC3:
	.string	"3\t for do2 on"
.LC4:
	.string	"4\t for do2 off"
	.text
	.globl	show_help
	.type	show_help, @function
show_help:
.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
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	show_help, .-show_help
	.section	.rodata
.LC5:
	.string	"ual"
.LC6:
	.string	"do"
.LC7:
	.string	"/%s/%s%d/value"
.LC8:
	.string	"rb+"
.LC9:
	.string	"Cannot open %s.\n"
	.text
	.globl	ctrl_do
	.type	ctrl_do, @function
ctrl_do:
.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	DWORD PTR -24[rbp], esi
	lea	rax, .LC5[rip]
	mov	QWORD PTR -16[rbp], rax
	lea	rax, .LC6[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	edx, 256
	mov	esi, 0
	lea	rdi, file_name_str[rip]
	call	memset@PLT
	mov	ecx, DWORD PTR -20[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	r8d, ecx
	mov	rcx, rdx
	mov	rdx, rax
	lea	rsi, .LC7[rip]
	lea	rdi, file_name_str[rip]
	mov	eax, 0
	call	sprintf@PLT
	lea	rsi, .LC8[rip]
	lea	rdi, file_name_str[rip]
	call	fopen@PLT
	mov	QWORD PTR fp[rip], rax
	mov	rax, QWORD PTR fp[rip]
	test	rax, rax
	jne	.L3
	lea	rsi, file_name_str[rip]
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	cmp	DWORD PTR -24[rbp], 0
	je	.L4
	mov	rax, QWORD PTR fp[rip]
	mov	rsi, rax
	mov	edi, 49
	call	fputc@PLT
	jmp	.L5
.L4:
	mov	rax, QWORD PTR fp[rip]
	mov	rsi, rax
	mov	edi, 48
	call	fputc@PLT
.L5:
	mov	rax, QWORD PTR fp[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	ctrl_do, .-ctrl_do
	.globl	main
	.type	main, @function
main:
.LFB8:
	.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
	cmp	DWORD PTR -4[rbp], 2
	je	.L8
	call	show_help
	mov	eax, -1
	jmp	.L9
.L8:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 49
	jne	.L10
	mov	esi, 1
	mov	edi, 1
	call	ctrl_do
	jmp	.L11
.L10:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 50
	jne	.L12
	mov	esi, 0
	mov	edi, 1
	call	ctrl_do
	jmp	.L11
.L12:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 51
	jne	.L13
	mov	esi, 1
	mov	edi, 2
	call	ctrl_do
	jmp	.L11
.L13:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 52
	jne	.L14
	mov	esi, 0
	mov	edi, 2
	call	ctrl_do
	jmp	.L11
.L14:
	call	show_help
.L11:
	mov	eax, 0
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"211824.c"
	.text
	.comm	fp,4,4
	.comm	file_name_str,256,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Use below param for beep: \000"
	.align	2
.LC1:
	.ascii	"1\011 for do1 on\000"
	.align	2
.LC2:
	.ascii	"2\011 for do1 off\000"
	.align	2
.LC3:
	.ascii	"3\011 for do2 on\000"
	.align	2
.LC4:
	.ascii	"4\011 for do2 off\000"
	.text
	.align	2
	.global	show_help
	.syntax unified
	.arm
	.fpu softvfp
	.type	show_help, %function
show_help:
	@ 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
	ldr	r0, .L2+12
	bl	puts
	ldr	r0, .L2+16
	bl	puts
	nop
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	show_help, .-show_help
	.section	.rodata
	.align	2
.LC5:
	.ascii	"ual\000"
	.align	2
.LC6:
	.ascii	"do\000"
	.align	2
.LC7:
	.ascii	"/%s/%s%d/value\000"
	.align	2
.LC8:
	.ascii	"rb+\000"
	.align	2
.LC9:
	.ascii	"Cannot open %s.\012\000"
	.text
	.align	2
	.global	ctrl_do
	.syntax unified
	.arm
	.fpu softvfp
	.type	ctrl_do, %function
ctrl_do:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, .L9
	str	r3, [fp, #-12]
	ldr	r3, .L9+4
	str	r3, [fp, #-8]
	mov	r2, #256
	mov	r1, #0
	ldr	r0, .L9+8
	bl	memset
	ldr	r3, [fp, #-16]
	str	r3, [sp]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	ldr	r1, .L9+12
	ldr	r0, .L9+8
	bl	sprintf
	ldr	r1, .L9+16
	ldr	r0, .L9+8
	bl	fopen
	mov	r3, r0
	ldr	r2, .L9+20
	str	r3, [r2]
	ldr	r3, .L9+20
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L5
	ldr	r1, .L9+8
	ldr	r0, .L9+24
	bl	printf
	mov	r0, #1
	bl	exit
.L5:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L6
	ldr	r3, .L9+20
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #49
	bl	fputc
	b	.L7
.L6:
	ldr	r3, .L9+20
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #48
	bl	fputc
.L7:
	ldr	r3, .L9+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC5
	.word	.LC6
	.word	file_name_str
	.word	.LC7
	.word	.LC8
	.word	fp
	.word	.LC9
	.size	ctrl_do, .-ctrl_do
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	beq	.L12
	bl	show_help
	mvn	r3, #0
	b	.L13
.L12:
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #49
	bne	.L14
	mov	r1, #1
	mov	r0, #1
	bl	ctrl_do
	b	.L15
.L14:
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #50
	bne	.L16
	mov	r1, #0
	mov	r0, #1
	bl	ctrl_do
	b	.L15
.L16:
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #51
	bne	.L17
	mov	r1, #1
	mov	r0, #2
	bl	ctrl_do
	b	.L15
.L17:
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #52
	bne	.L18
	mov	r1, #0
	mov	r0, #2
	bl	ctrl_do
	b	.L15
.L18:
	bl	show_help
.L15:
	mov	r3, #0
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
