	.file	"153267350.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Could not allocate memory"
	.text
	.globl	archive
	.type	archive, @function
archive:
.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, 176
	mov	QWORD PTR -152[rbp], rdi
	mov	QWORD PTR -160[rbp], rsi
	mov	DWORD PTR -164[rbp], edx
	mov	QWORD PTR -176[rbp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -160[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -160[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -144[rbp], rax
	mov	rax, QWORD PTR -160[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -176[rbp]
	lea	rax, -128[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -144[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	rdx, QWORD PTR -152[rbp]
	lea	rax, -128[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 112
	mov	rdi, rax
	call	fwrite@PLT
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -136[rbp], rax
	cmp	QWORD PTR -136[rbp], 0
	jne	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 4
	call	exit@PLT
.L2:
	mov	rsi, QWORD PTR -144[rbp]
	mov	rdx, QWORD PTR -160[rbp]
	mov	rax, QWORD PTR -136[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rsi, QWORD PTR -144[rbp]
	mov	rdx, QWORD PTR -152[rbp]
	mov	rax, QWORD PTR -136[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	archive, .-archive
	.section	.rodata
.LC1:
	.string	"What would you like to do?"
.LC2:
	.string	"0. Exit"
	.align 8
.LC3:
	.string	"1. Concatenate the files given as command line arguments"
.LC4:
	.string	"2. List the files"
.LC5:
	.string	"3. Extract a file"
.LC6:
	.string	"%d"
	.text
	.globl	choose_menu
	.type	choose_menu, @function
choose_menu:
.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, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	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
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	choose_menu, .-choose_menu
	.section	.rodata
.LC7:
	.string	"rb"
.LC8:
	.string	"Couldnt open file %s\n"
	.text
	.globl	archiving_files
	.type	archiving_files, @function
archiving_files:
.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, 48
	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	DWORD PTR -4[rbp], 2
	jmp	.L8
.L10:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -48[rbp], rax
	cmp	QWORD PTR -48[rbp], 0
	jne	.L9
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 3
	call	exit@PLT
.L9:
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	lea	edi, -2[rax]
	mov	rsi, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rdx
	mov	edx, edi
	mov	rdi, rax
	call	archive
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	fclose@PLT
	add	DWORD PTR -4[rbp], 1
.L8:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L10
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	archiving_files, .-archiving_files
	.section	.rodata
.LC9:
	.string	"No files here."
	.text
	.globl	list_files
	.type	list_files, @function
list_files:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 160
	mov	QWORD PTR -152[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -140[rbp], 0
	mov	QWORD PTR -136[rbp], 0
	mov	rax, QWORD PTR -152[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	jmp	.L12
.L13:
	mov	DWORD PTR -140[rbp], 1
	mov	rax, QWORD PTR -24[rbp]
	add	QWORD PTR -136[rbp], rax
	mov	rax, QWORD PTR -136[rbp]
	add	rax, 112
	mov	QWORD PTR -136[rbp], rax
	lea	rax, -128[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	rcx, QWORD PTR -136[rbp]
	mov	rax, QWORD PTR -152[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
.L12:
	mov	rdx, QWORD PTR -152[rbp]
	lea	rax, -128[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 112
	mov	rdi, rax
	call	fread@PLT
	test	rax, rax
	jne	.L13
	cmp	DWORD PTR -140[rbp], 0
	je	.L14
	mov	eax, 1
	jmp	.L16
.L14:
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	eax, -1
.L16:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	list_files, .-list_files
	.section	.rodata
	.align 8
.LC10:
	.string	"What file would you like to extract?"
.LC11:
	.string	"%100s"
.LC12:
	.string	"wb"
.LC13:
	.string	"Couldnt create file"
.LC14:
	.string	"tmp.tmp"
.LC15:
	.string	"Couldnt allocate memory"
.LC16:
	.string	"rb+"
	.text
	.globl	extract
	.type	extract, @function
extract:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 272
	mov	QWORD PTR -264[rbp], rdi
	mov	QWORD PTR -272[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -264[rbp]
	mov	rdi, rax
	call	list_files
	cmp	eax, -1
	je	.L30
	lea	rdi, .LC10[rip]
	call	puts@PLT
	lea	rax, -112[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -112[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -240[rbp], rax
	cmp	QWORD PTR -240[rbp], 0
	jne	.L21
	lea	rdi, .LC13[rip]
	call	puts@PLT
	mov	edi, 2
	call	exit@PLT
.L21:
	lea	rsi, .LC12[rip]
	lea	rdi, .LC14[rip]
	call	fopen@PLT
	mov	QWORD PTR -232[rbp], rax
	cmp	QWORD PTR -232[rbp], 0
	jne	.L22
	lea	rdi, .LC13[rip]
	call	puts@PLT
	mov	edi, 3
	call	exit@PLT
.L22:
	mov	edi, 1
	call	malloc@PLT
	mov	QWORD PTR -248[rbp], rax
	cmp	QWORD PTR -248[rbp], 0
	jne	.L23
	lea	rdi, .LC15[rip]
	call	puts@PLT
	mov	edi, 6
	call	exit@PLT
.L23:
	mov	DWORD PTR -252[rbp], 0
	mov	rax, QWORD PTR -264[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	jmp	.L24
.L28:
	mov	rax, QWORD PTR -120[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -252[rbp]
	add	eax, edx
	mov	DWORD PTR -252[rbp], eax
	mov	eax, DWORD PTR -252[rbp]
	add	eax, 112
	mov	DWORD PTR -252[rbp], eax
	mov	rax, QWORD PTR -120[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR -248[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -248[rbp], rax
	cmp	QWORD PTR -248[rbp], 0
	jne	.L25
	lea	rdi, .LC15[rip]
	call	puts@PLT
	mov	edi, 6
	call	exit@PLT
.L25:
	mov	rax, QWORD PTR -120[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR -248[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -120[rbp]
	mov	rsi, rax
	mov	rdx, QWORD PTR -264[rbp]
	mov	rax, QWORD PTR -248[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fread@PLT
	lea	rdx, -112[rbp]
	lea	rax, -224[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L26
	mov	rdx, QWORD PTR -232[rbp]
	lea	rax, -224[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 112
	mov	rdi, rax
	call	fwrite@PLT
	mov	rax, QWORD PTR -120[rbp]
	mov	rsi, rax
	mov	rdx, QWORD PTR -232[rbp]
	mov	rax, QWORD PTR -248[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
	jmp	.L27
.L26:
	mov	rax, QWORD PTR -120[rbp]
	mov	rsi, rax
	mov	rdx, QWORD PTR -240[rbp]
	mov	rax, QWORD PTR -248[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
.L27:
	mov	eax, DWORD PTR -252[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -264[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
.L24:
	mov	rdx, QWORD PTR -264[rbp]
	lea	rax, -224[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 112
	mov	rdi, rax
	call	fread@PLT
	test	rax, rax
	jne	.L28
	mov	rax, QWORD PTR -240[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -264[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -272[rbp]
	mov	rdi, rax
	call	remove@PLT
	mov	rax, QWORD PTR -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC14[rip]
	call	rename@PLT
	mov	rax, QWORD PTR -272[rbp]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -264[rbp], rax
	mov	rax, QWORD PTR -248[rbp]
	mov	rdi, rax
	call	free@PLT
	jmp	.L18
.L30:
	nop
.L18:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	extract, .-extract
	.section	.rodata
	.align 8
.LC17:
	.string	"Please use command line arguments like this:"
	.align 8
.LC18:
	.string	"%s <archive name.arh> <file 1> <file 2> [...]\n"
.LC19:
	.string	"ab+"
.LC20:
	.string	"Couldn't open arh file"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	cmp	DWORD PTR -36[rbp], 1
	jg	.L32
	lea	rdi, .LC17[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L32:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L33
	lea	rdi, .LC20[rip]
	call	puts@PLT
	mov	edi, 2
	call	exit@PLT
.L33:
	mov	QWORD PTR -8[rbp], 0
.L39:
	mov	eax, 0
	call	choose_menu
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 3
	je	.L34
	cmp	DWORD PTR -20[rbp], 3
	jg	.L35
	cmp	DWORD PTR -20[rbp], 2
	je	.L36
	cmp	DWORD PTR -20[rbp], 2
	jg	.L35
	cmp	DWORD PTR -20[rbp], 0
	je	.L41
	cmp	DWORD PTR -20[rbp], 1
	jne	.L35
	mov	rcx, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	rsi, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	archiving_files
	jmp	.L35
.L36:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	list_files
	jmp	.L35
.L34:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	extract
	jmp	.L35
.L41:
	nop
.L35:
	cmp	DWORD PTR -20[rbp], 0
	jne	.L39
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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	"153267350.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Could not allocate memory\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	archive
	.syntax unified
	.arm
	.fpu softvfp
	.type	archive, %function
archive:
	@ args = 0, pretend = 0, frame = 136
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #136
	str	r0, [fp, #-128]
	str	r1, [fp, #-132]
	str	r2, [fp, #-136]
	str	r3, [fp, #-140]
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-132]
	bl	fseek
	ldr	r0, [fp, #-132]
	bl	ftell
	str	r0, [fp, #-120]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-132]
	bl	fseek
	sub	r3, fp, #112
	ldr	r1, [fp, #-140]
	mov	r0, r3
	bl	strcpy
	ldr	r3, [fp, #-120]
	str	r3, [fp, #-12]
	sub	r0, fp, #112
	ldr	r3, [fp, #-128]
	mov	r2, #1
	mov	r1, #104
	bl	fwrite
	ldr	r3, [fp, #-120]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-116]
	ldr	r3, [fp, #-116]
	cmp	r3, #0
	bne	.L2
	ldr	r0, .L4+4
	bl	puts
	mov	r0, #4
	bl	exit
.L2:
	ldr	r1, [fp, #-120]
	ldr	r3, [fp, #-132]
	mov	r2, #1
	ldr	r0, [fp, #-116]
	bl	fread
	ldr	r1, [fp, #-120]
	ldr	r3, [fp, #-128]
	mov	r2, #1
	ldr	r0, [fp, #-116]
	bl	fwrite
	ldr	r0, [fp, #-116]
	bl	free
	nop
	ldr	r3, .L4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC1
	.word	.LC0
	.size	archive, .-archive
	.section	.rodata
	.align	2
.LC2:
	.ascii	"What would you like to do?\000"
	.align	2
.LC3:
	.ascii	"0. Exit\000"
	.align	2
.LC4:
	.ascii	"1. Concatenate the files given as command line argu"
	.ascii	"ments\000"
	.align	2
.LC5:
	.ascii	"2. List the files\000"
	.align	2
.LC6:
	.ascii	"3. Extract a file\000"
	.align	2
.LC7:
	.ascii	"%d\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	choose_menu
	.syntax unified
	.arm
	.fpu softvfp
	.type	choose_menu, %function
choose_menu:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L9+4
	bl	puts
	ldr	r0, .L9+8
	bl	puts
	ldr	r0, .L9+12
	bl	puts
	ldr	r0, .L9+16
	bl	puts
	ldr	r0, .L9+20
	bl	puts
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L9+24
	bl	__isoc99_scanf
	ldr	r3, [fp, #-12]
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC8
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	choose_menu, .-choose_menu
	.section	.rodata
	.align	2
.LC9:
	.ascii	"rb\000"
	.align	2
.LC10:
	.ascii	"Couldnt open file %s\012\000"
	.text
	.align	2
	.global	archiving_files
	.syntax unified
	.arm
	.fpu softvfp
	.type	archiving_files, %function
archiving_files:
	@ args = 0, 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, #2
	str	r3, [fp, #-8]
	b	.L12
.L14:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L15
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L13
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L15+4
	bl	printf
	mov	r0, #3
	bl	exit
.L13:
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-24]
	bl	fseek
	ldr	r3, [fp, #-8]
	sub	r1, r3, #2
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r1
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	archive
	ldr	r0, [fp, #-28]
	bl	fclose
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L12:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L14
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC9
	.word	.LC10
	.size	archiving_files, .-archiving_files
	.section	.rodata
	.align	2
.LC11:
	.ascii	"No files here.\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	list_files
	.syntax unified
	.arm
	.fpu softvfp
	.type	list_files, %function
list_files:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #128
	str	r0, [fp, #-128]
	ldr	r3, .L24
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-120]
	mov	r3, #0
	str	r3, [fp, #-116]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-128]
	bl	fseek
	b	.L18
.L19:
	mov	r3, #1
	str	r3, [fp, #-120]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-116]
	add	r3, r2, r3
	str	r3, [fp, #-116]
	ldr	r3, [fp, #-116]
	add	r3, r3, #104
	str	r3, [fp, #-116]
	sub	r3, fp, #112
	mov	r0, r3
	bl	puts
	mov	r2, #0
	ldr	r1, [fp, #-116]
	ldr	r0, [fp, #-128]
	bl	fseek
.L18:
	sub	r0, fp, #112
	ldr	r3, [fp, #-128]
	mov	r2, #1
	mov	r1, #104
	bl	fread
	mov	r3, r0
	cmp	r3, #0
	bne	.L19
	ldr	r3, [fp, #-120]
	cmp	r3, #0
	beq	.L20
	mov	r3, #1
	b	.L22
.L20:
	ldr	r0, .L24+4
	bl	puts
	mvn	r3, #0
.L22:
	ldr	r2, .L24
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L23
	bl	__stack_chk_fail
.L23:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC12
	.word	.LC11
	.size	list_files, .-list_files
	.section	.rodata
	.align	2
.LC13:
	.ascii	"What file would you like to extract?\000"
	.align	2
.LC14:
	.ascii	"%100s\000"
	.align	2
.LC15:
	.ascii	"wb\000"
	.align	2
.LC16:
	.ascii	"Couldnt create file\000"
	.align	2
.LC17:
	.ascii	"tmp.tmp\000"
	.align	2
.LC18:
	.ascii	"Couldnt allocate memory\000"
	.align	2
.LC19:
	.ascii	"rb+\000"
	.align	2
.LC20:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	extract
	.syntax unified
	.arm
	.fpu softvfp
	.type	extract, %function
extract:
	@ args = 0, pretend = 0, frame = 232
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #232
	str	r0, [fp, #-232]
	str	r1, [fp, #-236]
	ldr	r3, .L39
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, [fp, #-232]
	bl	list_files
	mov	r3, r0
	cmn	r3, #1
	beq	.L38
	ldr	r0, .L39+4
	bl	puts
	sub	r3, fp, #108
	mov	r1, r3
	ldr	r0, .L39+8
	bl	__isoc99_scanf
	sub	r3, fp, #108
	ldr	r1, .L39+12
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-220]
	ldr	r3, [fp, #-220]
	cmp	r3, #0
	bne	.L29
	ldr	r0, .L39+16
	bl	puts
	mov	r0, #2
	bl	exit
.L29:
	ldr	r1, .L39+12
	ldr	r0, .L39+20
	bl	fopen
	str	r0, [fp, #-216]
	ldr	r3, [fp, #-216]
	cmp	r3, #0
	bne	.L30
	ldr	r0, .L39+16
	bl	puts
	mov	r0, #3
	bl	exit
.L30:
	mov	r0, #1
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-228]
	ldr	r3, [fp, #-228]
	cmp	r3, #0
	bne	.L31
	ldr	r0, .L39+24
	bl	puts
	mov	r0, #6
	bl	exit
.L31:
	mov	r3, #0
	str	r3, [fp, #-224]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-232]
	bl	fseek
	b	.L32
.L36:
	ldr	r3, [fp, #-112]
	ldr	r2, [fp, #-224]
	add	r3, r2, r3
	str	r3, [fp, #-224]
	ldr	r3, [fp, #-224]
	add	r3, r3, #104
	str	r3, [fp, #-224]
	ldr	r3, [fp, #-112]
	mov	r1, r3
	ldr	r0, [fp, #-228]
	bl	realloc
	str	r0, [fp, #-228]
	ldr	r3, [fp, #-228]
	cmp	r3, #0
	bne	.L33
	ldr	r0, .L39+24
	bl	puts
	mov	r0, #6
	bl	exit
.L33:
	ldr	r3, [fp, #-112]
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-228]
	bl	memset
	ldr	r3, [fp, #-112]
	mov	r1, r3
	ldr	r3, [fp, #-232]
	mov	r2, #1
	ldr	r0, [fp, #-228]
	bl	fread
	sub	r2, fp, #108
	sub	r3, fp, #212
	mov	r1, r2
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L34
	sub	r0, fp, #212
	ldr	r3, [fp, #-216]
	mov	r2, #1
	mov	r1, #104
	bl	fwrite
	ldr	r3, [fp, #-112]
	mov	r1, r3
	ldr	r3, [fp, #-216]
	mov	r2, #1
	ldr	r0, [fp, #-228]
	bl	fwrite
	b	.L35
.L34:
	ldr	r3, [fp, #-112]
	mov	r1, r3
	ldr	r3, [fp, #-220]
	mov	r2, #1
	ldr	r0, [fp, #-228]
	bl	fwrite
.L35:
	mov	r2, #0
	ldr	r1, [fp, #-224]
	ldr	r0, [fp, #-232]
	bl	fseek
.L32:
	sub	r0, fp, #212
	ldr	r3, [fp, #-232]
	mov	r2, #1
	mov	r1, #104
	bl	fread
	mov	r3, r0
	cmp	r3, #0
	bne	.L36
	ldr	r0, [fp, #-220]
	bl	fclose
	ldr	r0, [fp, #-216]
	bl	fclose
	ldr	r0, [fp, #-232]
	bl	fclose
	ldr	r0, [fp, #-236]
	bl	remove
	ldr	r1, [fp, #-236]
	ldr	r0, .L39+20
	bl	rename
	ldr	r1, .L39+28
	ldr	r0, [fp, #-236]
	bl	fopen
	str	r0, [fp, #-232]
	ldr	r0, [fp, #-228]
	bl	free
	b	.L26
.L38:
	nop
.L26:
	ldr	r3, .L39
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L37
	bl	__stack_chk_fail
.L37:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L40:
	.align	2
.L39:
	.word	.LC20
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.size	extract, .-extract
	.section	.rodata
	.align	2
.LC21:
	.ascii	"Please use command line arguments like this:\000"
	.align	2
.LC22:
	.ascii	"%s <archive name.arh> <file 1> <file 2> [...]\012\000"
	.align	2
.LC23:
	.ascii	"ab+\000"
	.align	2
.LC24:
	.ascii	"Couldn't open arh file\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	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	bgt	.L42
	ldr	r0, .L52
	bl	puts
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L52+4
	bl	printf
	mov	r0, #1
	bl	exit
.L42:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L52+8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L43
	ldr	r0, .L52+12
	bl	puts
	mov	r0, #2
	bl	exit
.L43:
	mov	r3, #0
	str	r3, [fp, #-12]
.L50:
	bl	choose_menu
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ldrls	pc, [pc, r3, asl #2]
	b	.L44
.L46:
	.word	.L44
	.word	.L48
	.word	.L47
	.word	.L45
.L48:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	archiving_files
	b	.L44
.L47:
	ldr	r0, [fp, #-16]
	bl	list_files
	b	.L44
.L45:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	extract
	nop
.L44:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L50
	ldr	r0, [fp, #-16]
	bl	fclose
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L53:
	.align	2
.L52:
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
