	.file	"87638139.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"coded.txt"
.LC2:
	.string	"w"
.LC3:
	.string	"decoded.txt"
.LC4:
	.string	"%s"
.LC5:
	.string	"%s "
	.align 8
.LC6:
	.string	"An error occurred while closing files.\n"
	.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	rbx
	sub	rsp, 184
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -176[rbp], rax
	lea	rsi, .LC2[rip]
	lea	rdi, .LC3[rip]
	call	fopen@PLT
	mov	QWORD PTR -168[rbp], rax
	mov	DWORD PTR -188[rbp], 21
	jmp	.L2
.L8:
	mov	rdx, QWORD PTR -176[rbp]
	mov	eax, DWORD PTR -180[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	ungetc@PLT
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -176[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	DWORD PTR -184[rbp], 0
	jmp	.L3
.L7:
	cmp	DWORD PTR -188[rbp], 94
	jle	.L4
	mov	eax, DWORD PTR -188[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, -1370734243
	shr	rdx, 32
	add	edx, eax
	sar	edx, 6
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	edx, edx, 94
	sub	eax, edx
	mov	DWORD PTR -188[rbp], eax
.L4:
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	movzx	eax, BYTE PTR -160[rbp+rax]
	mov	edx, eax
	mov	eax, DWORD PTR -188[rbp]
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	edx, eax
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	mov	BYTE PTR -160[rbp+rax], dl
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	movzx	eax, BYTE PTR -160[rbp+rax]
	cmp	al, 32
	jg	.L5
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	movzx	eax, BYTE PTR -160[rbp+rax]
	add	eax, 94
	mov	edx, eax
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	mov	BYTE PTR -160[rbp+rax], dl
.L5:
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	movzx	eax, BYTE PTR -160[rbp+rax]
	test	al, al
	jns	.L6
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	movzx	eax, BYTE PTR -160[rbp+rax]
	sub	eax, 94
	mov	edx, eax
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	mov	BYTE PTR -160[rbp+rax], dl
.L6:
	add	DWORD PTR -188[rbp], 37
	add	DWORD PTR -184[rbp], 1
.L3:
	mov	eax, DWORD PTR -184[rbp]
	movsx	rbx, eax
	lea	rax, -160[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	jb	.L7
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -168[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rax, -160[rbp]
	mov	edx, 128
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
.L2:
	mov	rax, QWORD PTR -176[rbp]
	mov	rdi, rax
	call	getc@PLT
	mov	DWORD PTR -180[rbp], eax
	cmp	DWORD PTR -180[rbp], -1
	jne	.L8
	mov	rax, QWORD PTR -176[rbp]
	mov	rdi, rax
	call	fclose@PLT
	test	eax, eax
	jne	.L9
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	fclose@PLT
	test	eax, eax
	je	.L10
.L9:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 39
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
.L10:
	mov	eax, 0
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.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	"87638139.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"coded.txt\000"
	.align	2
.LC2:
	.ascii	"w\000"
	.align	2
.LC3:
	.ascii	"decoded.txt\000"
	.align	2
.LC4:
	.ascii	"%s\000"
	.align	2
.LC5:
	.ascii	"%s \000"
	.align	2
.LC6:
	.ascii	"An error occurred while closing files.\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 = 152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #152
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L12+4
	ldr	r0, .L12+8
	bl	fopen
	str	r0, [fp, #-148]
	ldr	r1, .L12+12
	ldr	r0, .L12+16
	bl	fopen
	str	r0, [fp, #-144]
	mov	r3, #21
	str	r3, [fp, #-156]
	b	.L2
.L7:
	ldr	r1, [fp, #-148]
	ldr	r0, [fp, #-140]
	bl	ungetc
	sub	r3, fp, #136
	mov	r2, r3
	ldr	r1, .L12+20
	ldr	r0, [fp, #-148]
	bl	__isoc99_fscanf
	mov	r3, #0
	str	r3, [fp, #-152]
	b	.L3
.L6:
	ldr	r3, [fp, #-156]
	cmp	r3, #94
	ble	.L4
	ldr	r2, [fp, #-156]
	ldr	r3, .L12+24
	smull	r1, r3, r2, r3
	add	r3, r3, r2
	asr	r1, r3, #6
	asr	r3, r2, #31
	sub	r1, r1, r3
	mov	r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r1
	lsl	r3, r3, #4
	sub	r3, r3, r1
	lsl	r3, r3, #1
	sub	r3, r2, r3
	str	r3, [fp, #-156]
.L4:
	sub	r2, fp, #136
	ldr	r3, [fp, #-152]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-156]
	and	r3, r3, #255
	sub	r3, r2, r3
	and	r1, r3, #255
	sub	r2, fp, #136
	ldr	r3, [fp, #-152]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	sub	r2, fp, #136
	ldr	r3, [fp, #-152]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	bhi	.L5
	sub	r2, fp, #136
	ldr	r3, [fp, #-152]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	add	r3, r3, #94
	and	r1, r3, #255
	sub	r2, fp, #136
	ldr	r3, [fp, #-152]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
.L5:
	ldr	r3, [fp, #-156]
	add	r3, r3, #37
	str	r3, [fp, #-156]
	ldr	r3, [fp, #-152]
	add	r3, r3, #1
	str	r3, [fp, #-152]
.L3:
	sub	r3, fp, #136
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-152]
	cmp	r2, r3
	bhi	.L6
	sub	r3, fp, #136
	mov	r2, r3
	ldr	r1, .L12+28
	ldr	r0, [fp, #-144]
	bl	fprintf
	sub	r3, fp, #136
	mov	r2, #128
	mov	r1, #0
	mov	r0, r3
	bl	memset
.L2:
	ldr	r0, [fp, #-148]
	bl	getc
	str	r0, [fp, #-140]
	ldr	r3, [fp, #-140]
	cmn	r3, #1
	bne	.L7
	ldr	r0, [fp, #-148]
	bl	fclose
	mov	r3, r0
	cmp	r3, #0
	bne	.L8
	ldr	r0, [fp, #-144]
	bl	fclose
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
.L8:
	ldr	r3, .L12+32
	ldr	r3, [r3]
	mov	r2, #39
	mov	r1, #1
	ldr	r0, .L12+36
	bl	fwrite
.L9:
	mov	r3, #0
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC7
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	-1370734243
	.word	.LC5
	.word	stderr
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
