	.file	"279809.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"-h"
	.align 8
.LC1:
	.string	"Usage:\n%s [-h|-e|-d] input-file output-file password\nOptions\n-e\tEncrypt input-file with supplied password and write to output-file\n-d\tDecrypt input-file with supplied password and write to output-file\n-h\tPrint this help menu\n"
.LC2:
	.string	"-e"
.LC3:
	.string	"-d"
.LC4:
	.string	"rb"
.LC5:
	.string	"wb"
.LC6:
	.string	"Invalid option"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	push	rbx
	sub	rsp, 48
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	cmp	DWORD PTR -52[rbp], 4
	jle	.L2
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	edx, 2
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L3
.L2:
	mov	rax, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L4
.L3:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	edx, 2
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	je	.L5
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	edx, 2
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L6
.L5:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L7
	mov	rax, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	mov	eax, 1
	jmp	.L4
.L7:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L8
	mov	rax, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	mov	eax, 1
	jmp	.L4
.L8:
	mov	DWORD PTR -36[rbp], 0
	mov	BYTE PTR -37[rbp], 0
	jmp	.L9
.L10:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 32
	mov	r12, QWORD PTR [rax]
	mov	eax, DWORD PTR -36[rbp]
	movsx	rbx, eax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 32
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	mov	rcx, rax
	mov	rax, rbx
	mov	edx, 0
	div	rcx
	mov	rcx, rdx
	mov	rax, rcx
	add	rax, r12
	movzx	eax, BYTE PTR [rax]
	xor	al, BYTE PTR -37[rbp]
	movsx	eax, al
	mov	rdx, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	add	DWORD PTR -36[rbp], 1
.L9:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	BYTE PTR -37[rbp], al
	cmp	BYTE PTR -37[rbp], -1
	jne	.L10
	jmp	.L11
.L6:
	lea	rdi, .LC6[rip]
	call	puts@PLT
.L11:
	mov	eax, 0
.L4:
	add	rsp, 48
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"279809.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"-h\000"
	.align	2
.LC1:
	.ascii	"Usage:\012%s [-h|-e|-d] input-file output-file pass"
	.ascii	"word\012Options\012-e\011Encrypt input-file with su"
	.ascii	"pplied password and write to output-file\012-d\011D"
	.ascii	"ecrypt input-file with supplied password and write "
	.ascii	"to output-file\012-h\011Print this help menu\012\000"
	.align	2
.LC2:
	.ascii	"-e\000"
	.align	2
.LC3:
	.ascii	"-d\000"
	.align	2
.LC4:
	.ascii	"rb\000"
	.align	2
.LC5:
	.ascii	"wb\000"
	.global	__aeabi_uidivmod
	.align	2
.LC6:
	.ascii	"Invalid option\000"
	.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	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #24
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, [fp, #-32]
	cmp	r3, #4
	ble	.L2
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, #2
	ldr	r1, .L12
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L3
.L2:
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L12+4
	bl	printf
	mov	r3, #1
	b	.L4
.L3:
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, #2
	ldr	r1, .L12+8
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, #2
	ldr	r1, .L12+12
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L6
.L5:
	ldr	r3, [fp, #-36]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L12+16
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L7
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	mov	r3, #1
	b	.L4
.L7:
	ldr	r3, [fp, #-36]
	add	r3, r3, #12
	ldr	r3, [r3]
	ldr	r1, .L12+20
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L8
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	mov	r3, #1
	b	.L4
.L8:
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	strb	r3, [fp, #-25]
	b	.L9
.L11:
	ldr	r3, [fp, #-36]
	add	r3, r3, #16
	ldr	r4, [r3]
	ldr	r5, [fp, #-24]
	ldr	r3, [fp, #-36]
	add	r3, r3, #16
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r1, r3
	mov	r0, r5
	bl	__aeabi_uidivmod
	mov	r3, r1
	add	r3, r4, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldrb	r3, [fp, #-25]
	eor	r3, r3, r2
	and	r3, r3, #255
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	fputc
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L9:
	ldr	r0, [fp, #-20]
	bl	fgetc
	mov	r3, r0
	strb	r3, [fp, #-25]
	b	.L11
.L6:
	ldr	r0, .L12+24
	bl	puts
	mov	r3, #0
.L4:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.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
