	.file	"853558.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Usage: %s [-h] <-e|-d> -k <key> -f <file>\n"
.LC1:
	.string	"key"
.LC2:
	.string	"filename"
	.align 8
.LC3:
	.string	"Option -%c requires an argument (%s).\n"
.LC4:
	.string	"Unknown option `-%c'.\n"
	.align 8
.LC5:
	.string	"Unknown option character `\\x%x'.\n"
.LC6:
	.string	"Unknown : abort"
.LC7:
	.string	"hedk:f:"
	.align 8
.LC8:
	.ascii	"       -h : This help text\n   "
	.string	"    -k : Specify a 8 byte key\n       -e : Encode the file contents with key\n       -d : Decode the file contents with key\n       -f : File to encode/decode\n Note: The file is read as ASCII character stream\n       while encode and as hex stream while decode"
	.align 8
.LC9:
	.string	"Use either encode(-e) or decode(-d) \n"
	.align 8
.LC10:
	.string	"       A key(-k), file(-f), and either Encode(-e)\n       or decode (-d) are mandatory arguments\n"
.LC11:
	.string	"Key length has to be 8\n"
	.text
	.globl	handle_args
	.type	handle_args, @function
handle_args:
.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, 64
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	QWORD PTR -48[rbp], rcx
	mov	QWORD PTR -56[rbp], r8
	mov	QWORD PTR -64[rbp], r9
	mov	BYTE PTR -7[rbp], 0
	mov	WORD PTR -6[rbp], 0
	cmp	DWORD PTR -20[rbp], 1
	jg	.L2
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	mov	DWORD PTR opterr[rip], 0
	jmp	.L3
.L18:
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, 63
	cmp	eax, 44
	ja	.L4
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L6[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L6[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L6:
	.long	.L11-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L10-.L6
	.long	.L9-.L6
	.long	.L8-.L6
	.long	.L4-.L6
	.long	.L7-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L5-.L6
	.text
.L9:
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], 1
	movzx	eax, WORD PTR -6[rbp]
	add	eax, 1
	mov	WORD PTR -6[rbp], ax
	jmp	.L3
.L10:
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], 1
	movzx	eax, WORD PTR -6[rbp]
	add	eax, 1
	mov	WORD PTR -6[rbp], ax
	jmp	.L3
.L5:
	mov	rdx, QWORD PTR optarg[rip]
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR [rax], rdx
	movzx	eax, WORD PTR -6[rbp]
	add	eax, 1
	mov	WORD PTR -6[rbp], ax
	jmp	.L3
.L8:
	mov	rdx, QWORD PTR optarg[rip]
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], rdx
	movzx	eax, WORD PTR -6[rbp]
	add	eax, 1
	mov	WORD PTR -6[rbp], ax
	jmp	.L3
.L7:
	mov	BYTE PTR -7[rbp], 1
	jmp	.L3
.L11:
	mov	eax, DWORD PTR optopt[rip]
	cmp	eax, 107
	je	.L12
	mov	eax, DWORD PTR optopt[rip]
	cmp	eax, 102
	jne	.L13
.L12:
	mov	eax, DWORD PTR optopt[rip]
	cmp	eax, 107
	jne	.L14
	lea	rax, .LC1[rip]
	jmp	.L15
.L14:
	lea	rax, .LC2[rip]
.L15:
	mov	edx, DWORD PTR optopt[rip]
	mov	rdi, QWORD PTR stderr[rip]
	mov	rcx, rax
	lea	rsi, .LC3[rip]
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L16
.L13:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR optopt[rip]
	cdqe
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 16384
	test	eax, eax
	je	.L17
	mov	edx, DWORD PTR optopt[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L16
.L17:
	mov	edx, DWORD PTR optopt[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L16:
	mov	edi, 1
	call	exit@PLT
.L4:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	call	abort@PLT
.L3:
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	lea	rdx, .LC7[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L18
	cmp	BYTE PTR -7[rbp], 0
	je	.L19
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L19:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L20
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L20
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 37
	mov	esi, 1
	lea	rdi, .LC9[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L20:
	cmp	WORD PTR -6[rbp], 2
	jg	.L21
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 96
	mov	esi, 1
	lea	rdi, .LC10[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L21:
	mov	rax, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 8
	je	.L23
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 23
	mov	esi, 1
	lea	rdi, .LC11[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L23:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	handle_args, .-handle_args
	.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	"853558.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s [-h] <-e|-d> -k <key> -f <file>\012\000"
	.align	2
.LC1:
	.ascii	"key\000"
	.align	2
.LC2:
	.ascii	"filename\000"
	.align	2
.LC3:
	.ascii	"Option -%c requires an argument (%s).\012\000"
	.align	2
.LC4:
	.ascii	"Unknown option `-%c'.\012\000"
	.align	2
.LC5:
	.ascii	"Unknown option character `\\x%x'.\012\000"
	.align	2
.LC6:
	.ascii	"Unknown : abort\000"
	.align	2
.LC7:
	.ascii	"hedk:f:\000"
	.align	2
.LC8:
	.ascii	"       -h : This help text\012       -k : Specify a"
	.ascii	" 8 byte key\012       -e : Encode the file contents"
	.ascii	" with key\012       -d : Decode the file contents w"
	.ascii	"ith key\012       -f : File to encode/decode\012 No"
	.ascii	"te: The file is read as ASCII character stream\012 "
	.ascii	"      while encode and as hex stream while decode\000"
	.align	2
.LC9:
	.ascii	"Use either encode(-e) or decode(-d) \012\000"
	.align	2
.LC10:
	.ascii	"       A key(-k), file(-f), and either Encode(-e)\012"
	.ascii	"       or decode (-d) are mandatory arguments\012\000"
	.align	2
.LC11:
	.ascii	"Key length has to be 8\012\000"
	.text
	.align	2
	.global	handle_args
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_args, %function
handle_args:
	@ args = 8, 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	mov	r3, #0
	strb	r3, [fp, #-11]
	mov	r3, #0
	strh	r3, [fp, #-10]	@ movhi
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bgt	.L2
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L24
	bl	printf
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #4]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #4]
	ldr	r2, [r3]
	ldr	r3, [fp, #8]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, .L24+4
	mov	r2, #0
	str	r2, [r3]
	b	.L3
.L18:
	ldr	r3, [fp, #-8]
	sub	r3, r3, #63
	cmp	r3, #44
	ldrls	pc, [pc, r3, asl #2]
	b	.L4
.L6:
	.word	.L11
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L4
	.word	.L10
	.word	.L9
	.word	.L8
	.word	.L4
	.word	.L7
	.word	.L4
	.word	.L4
	.word	.L5
.L9:
	ldr	r3, [fp, #-24]
	mov	r2, #1
	str	r2, [r3]
	ldrsh	r3, [fp, #-10]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r3, #1
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strh	r3, [fp, #-10]	@ movhi
	b	.L3
.L10:
	ldr	r3, [fp, #-28]
	mov	r2, #1
	str	r2, [r3]
	ldrsh	r3, [fp, #-10]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r3, #1
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strh	r3, [fp, #-10]	@ movhi
	b	.L3
.L5:
	ldr	r3, .L24+8
	ldr	r2, [r3]
	ldr	r3, [fp, #8]
	str	r2, [r3]
	ldrsh	r3, [fp, #-10]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r3, #1
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strh	r3, [fp, #-10]	@ movhi
	b	.L3
.L8:
	ldr	r3, .L24+8
	ldr	r2, [r3]
	ldr	r3, [fp, #4]
	str	r2, [r3]
	ldrsh	r3, [fp, #-10]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r3, #1
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strh	r3, [fp, #-10]	@ movhi
	b	.L3
.L7:
	mov	r3, #1
	strb	r3, [fp, #-11]
	b	.L3
.L11:
	ldr	r3, .L24+12
	ldr	r3, [r3]
	cmp	r3, #107
	beq	.L12
	ldr	r3, .L24+12
	ldr	r3, [r3]
	cmp	r3, #102
	bne	.L13
.L12:
	ldr	r3, .L24+16
	ldr	r0, [r3]
	ldr	r3, .L24+12
	ldr	r2, [r3]
	ldr	r3, .L24+12
	ldr	r3, [r3]
	cmp	r3, #107
	bne	.L14
	ldr	r3, .L24+20
	b	.L15
.L14:
	ldr	r3, .L24+24
.L15:
	ldr	r1, .L24+28
	bl	fprintf
	b	.L16
.L13:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, .L24+12
	ldr	r3, [r3]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #16384
	cmp	r3, #0
	beq	.L17
	ldr	r3, .L24+16
	ldr	r3, [r3]
	ldr	r2, .L24+12
	ldr	r2, [r2]
	ldr	r1, .L24+32
	mov	r0, r3
	bl	fprintf
	b	.L16
.L17:
	ldr	r3, .L24+16
	ldr	r3, [r3]
	ldr	r2, .L24+12
	ldr	r2, [r2]
	ldr	r1, .L24+36
	mov	r0, r3
	bl	fprintf
.L16:
	mov	r0, #1
	bl	exit
.L4:
	ldr	r0, .L24+40
	bl	puts
	bl	abort
.L3:
	ldr	r2, .L24+44
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	getopt
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L18
	ldrb	r3, [fp, #-11]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L19
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L24
	bl	printf
	ldr	r0, .L24+48
	bl	puts
	mov	r0, #1
	bl	exit
.L19:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L20
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L20
	ldr	r3, .L24+16
	ldr	r3, [r3]
	mov	r2, #37
	mov	r1, #1
	ldr	r0, .L24+52
	bl	fwrite
	mov	r0, #1
	bl	exit
.L20:
	ldrsh	r3, [fp, #-10]
	cmp	r3, #2
	bgt	.L21
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L24
	bl	printf
	ldr	r3, .L24+16
	ldr	r3, [r3]
	mov	r2, #96
	mov	r1, #1
	ldr	r0, .L24+56
	bl	fwrite
	mov	r0, #1
	bl	exit
.L21:
	ldr	r3, [fp, #8]
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	cmp	r3, #8
	beq	.L23
	ldr	r3, .L24+16
	ldr	r3, [r3]
	mov	r2, #23
	mov	r1, #1
	ldr	r0, .L24+60
	bl	fwrite
	mov	r0, #1
	bl	exit
.L23:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC0
	.word	opterr
	.word	optarg
	.word	optopt
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	handle_args, .-handle_args
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
