	.file	"154755.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"\nERROR: Function requires 2 inputs."
.LC1:
	.string	"Please try again."
	.align 8
.LC2:
	.string	"Enter the name of 1) the program file and 2) the file to be scrambled."
.LC3:
	.string	"r+"
	.align 8
.LC4:
	.string	"\nERROR: File could not be opened for reading."
.LC5:
	.string	"w"
	.align 8
.LC6:
	.string	"\nERROR: New scrambled file could not be opened for writing."
	.align 8
.LC7:
	.string	"\nThe file has now been scrambled. \nSee file \"%s\" in the directory"
	.align 8
.LC8:
	.string	"\nFiles closed. Program Terminated."
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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, 120
	.cfi_offset 3, -24
	mov	DWORD PTR -116[rbp], edi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -116[rbp], 2
	je	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -128[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -96[rbp], rax
	cmp	QWORD PTR -96[rbp], 0
	jne	.L3
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L3:
	mov	rax, QWORD PTR -128[rbp]
	add	rax, 8
	mov	rbx, QWORD PTR [rax]
	mov	rdi, rbx
	call	strlen@PLT
	add	rax, rbx
	mov	DWORD PTR [rax], 1818391342
	mov	BYTE PTR 4[rax], 0
	lea	rax, -80[rbp]
	mov	rsi, rbx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rax, -80[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -88[rbp], rax
	cmp	QWORD PTR -96[rbp], 0
	jne	.L5
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L7:
	mov	rdx, QWORD PTR -96[rbp]
	lea	rax, -106[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -104[rbp], eax
	mov	rdx, QWORD PTR -96[rbp]
	lea	rax, -105[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -100[rbp], eax
	cmp	DWORD PTR -100[rbp], 1
	jne	.L6
	mov	rdx, QWORD PTR -88[rbp]
	lea	rax, -105[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
.L6:
	cmp	DWORD PTR -104[rbp], 1
	jne	.L5
	mov	rdx, QWORD PTR -88[rbp]
	lea	rax, -106[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
.L5:
	mov	rax, QWORD PTR -96[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L7
	lea	rax, -80[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -96[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -88[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.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	"154755.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012ERROR: Function requires 2 inputs.\000"
	.align	2
.LC1:
	.ascii	"Please try again.\000"
	.align	2
.LC2:
	.ascii	"Enter the name of 1) the program file and 2) the fi"
	.ascii	"le to be scrambled.\000"
	.align	2
.LC3:
	.ascii	"r+\000"
	.align	2
.LC4:
	.ascii	"\012ERROR: File could not be opened for reading.\000"
	.align	2
.LC5:
	.ascii	".sbl\000"
	.align	2
.LC6:
	.ascii	"w\000"
	.align	2
.LC7:
	.ascii	"\012ERROR: New scrambled file could not be opened f"
	.ascii	"or writing.\000"
	.align	2
.LC8:
	.ascii	"\012The file has now been scrambled. \012See file \""
	.ascii	"%s\" in the directory\000"
	.align	2
.LC9:
	.ascii	"\012Files closed. Program Terminated.\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 88
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #92
	str	r0, [fp, #-96]
	str	r1, [fp, #-100]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-96]
	cmp	r3, #2
	beq	.L2
	ldr	r0, .L9+4
	bl	puts
	ldr	r0, .L9+8
	bl	puts
	ldr	r0, .L9+12
	bl	puts
	mov	r0, #0
	bl	exit
.L2:
	ldr	r3, [fp, #-100]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L9+16
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-84]
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	bne	.L3
	ldr	r0, .L9+20
	bl	puts
	mov	r0, #0
	bl	exit
.L3:
	ldr	r3, [fp, #-100]
	add	r3, r3, #4
	ldr	r4, [r3]
	mov	r0, r4
	bl	strlen
	mov	r3, r0
	add	r3, r4, r3
	ldr	r2, .L9+24
	mov	r0, r3
	mov	r1, r2
	mov	r3, #5
	mov	r2, r3
	bl	memcpy
	sub	r3, fp, #68
	mov	r1, r4
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #68
	ldr	r1, .L9+28
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-80]
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	bne	.L5
	ldr	r0, .L9+32
	bl	puts
	mov	r0, #0
	bl	exit
.L7:
	sub	r0, fp, #86
	ldr	r3, [fp, #-84]
	mov	r2, #1
	mov	r1, #1
	bl	fread
	mov	r3, r0
	str	r3, [fp, #-76]
	sub	r0, fp, #85
	ldr	r3, [fp, #-84]
	mov	r2, #1
	mov	r1, #1
	bl	fread
	mov	r3, r0
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-72]
	cmp	r3, #1
	bne	.L6
	sub	r0, fp, #85
	ldr	r3, [fp, #-80]
	mov	r2, #1
	mov	r1, #1
	bl	fwrite
.L6:
	ldr	r3, [fp, #-76]
	cmp	r3, #1
	bne	.L5
	sub	r0, fp, #86
	ldr	r3, [fp, #-80]
	mov	r2, #1
	mov	r1, #1
	bl	fwrite
.L5:
	ldr	r0, [fp, #-84]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L7
	sub	r3, fp, #68
	mov	r1, r3
	ldr	r0, .L9+36
	bl	printf
	ldr	r0, [fp, #-84]
	bl	fclose
	ldr	r0, [fp, #-80]
	bl	fclose
	ldr	r0, .L9+40
	bl	puts
	mov	r0, #0
	bl	exit
.L10:
	.align	2
.L9:
	.word	.LC10
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
