	.file	"107520.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Usage: addiffl <iffl_filename> <filename>\nAdds file <filename> to the IFFL file. IFFL file can hold max. 127 files and\nthe files must be less than 65536 bytes long."
.LC1:
	.string	"r+b"
.LC2:
	.string	"Couldn't open IFFL-file!"
	.align 8
.LC3:
	.string	"IFFL-directory already full (127 files)!"
.LC4:
	.string	"rb"
.LC5:
	.string	"Couldn't open source-file!"
	.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
	sub	rsp, 320
	mov	DWORD PTR -308[rbp], edi
	mov	QWORD PTR -320[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -300[rbp], 0
	mov	DWORD PTR -296[rbp], 0
	cmp	DWORD PTR -308[rbp], 3
	je	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L14
.L2:
	mov	rax, QWORD PTR -320[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -288[rbp], rax
	cmp	QWORD PTR -288[rbp], 0
	jne	.L4
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L14
.L4:
	mov	rdx, QWORD PTR -288[rbp]
	lea	rax, -272[rbp]
	mov	rcx, rdx
	mov	edx, 254
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -288[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	DWORD PTR -296[rbp], 0
	jmp	.L5
.L8:
	mov	eax, DWORD PTR -296[rbp]
	cdqe
	movzx	eax, BYTE PTR -272[rbp+rax]
	test	al, al
	jne	.L6
	mov	eax, DWORD PTR -296[rbp]
	add	eax, 127
	cdqe
	movzx	eax, BYTE PTR -272[rbp+rax]
	test	al, al
	je	.L16
.L6:
	add	DWORD PTR -296[rbp], 1
.L5:
	cmp	DWORD PTR -296[rbp], 126
	jle	.L8
	jmp	.L7
.L16:
	nop
.L7:
	cmp	DWORD PTR -296[rbp], 126
	jle	.L9
	mov	rax, QWORD PTR -288[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L14
.L9:
	mov	rax, QWORD PTR -320[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -280[rbp], rax
	cmp	QWORD PTR -280[rbp], 0
	jne	.L10
	mov	rax, QWORD PTR -288[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L14
.L10:
	mov	rax, QWORD PTR -280[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	DWORD PTR -292[rbp], eax
	cmp	DWORD PTR -292[rbp], -1
	je	.L17
	add	DWORD PTR -300[rbp], 1
	mov	rdx, QWORD PTR -288[rbp]
	mov	eax, DWORD PTR -292[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	cmp	DWORD PTR -300[rbp], 65535
	je	.L18
	jmp	.L10
.L17:
	nop
	jmp	.L12
.L18:
	nop
.L12:
	mov	rax, QWORD PTR -280[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -300[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -296[rbp]
	cdqe
	mov	BYTE PTR -272[rbp+rax], dl
	mov	eax, DWORD PTR -300[rbp]
	sar	eax, 8
	mov	edx, eax
	mov	eax, DWORD PTR -296[rbp]
	add	eax, 127
	cdqe
	mov	BYTE PTR -272[rbp+rax], dl
	mov	rax, QWORD PTR -288[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -288[rbp]
	lea	rax, -272[rbp]
	mov	rcx, rdx
	mov	edx, 254
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	rax, QWORD PTR -288[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L14:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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	"107520.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: addiffl <iffl_filename> <filename>\012Adds f"
	.ascii	"ile <filename> to the IFFL file. IFFL file can hold"
	.ascii	" max. 127 files and\012the files must be less than "
	.ascii	"65536 bytes long.\000"
	.align	2
.LC1:
	.ascii	"r+b\000"
	.align	2
.LC2:
	.ascii	"Couldn't open IFFL-file!\000"
	.align	2
.LC3:
	.ascii	"IFFL-directory already full (127 files)!\000"
	.align	2
.LC4:
	.ascii	"rb\000"
	.align	2
.LC5:
	.ascii	"Couldn't open source-file!\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 288
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #288
	str	r0, [fp, #-288]
	str	r1, [fp, #-292]
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-284]
	mov	r3, #0
	str	r3, [fp, #-280]
	ldr	r3, [fp, #-288]
	cmp	r3, #3
	beq	.L2
	ldr	r0, .L19+4
	bl	puts
	mov	r3, #1
	b	.L14
.L2:
	ldr	r3, [fp, #-292]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L19+8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-276]
	ldr	r3, [fp, #-276]
	cmp	r3, #0
	bne	.L4
	ldr	r0, .L19+12
	bl	puts
	mov	r3, #1
	b	.L14
.L4:
	sub	r0, fp, #264
	ldr	r3, [fp, #-276]
	mov	r2, #254
	mov	r1, #1
	bl	fread
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-276]
	bl	fseek
	mov	r3, #0
	str	r3, [fp, #-280]
	b	.L5
.L8:
	sub	r2, fp, #264
	ldr	r3, [fp, #-280]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L6
	ldr	r3, [fp, #-280]
	add	r3, r3, #127
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r3, [r3, #-260]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L16
.L6:
	ldr	r3, [fp, #-280]
	add	r3, r3, #1
	str	r3, [fp, #-280]
.L5:
	ldr	r3, [fp, #-280]
	cmp	r3, #126
	ble	.L8
	b	.L7
.L16:
	nop
.L7:
	ldr	r3, [fp, #-280]
	cmp	r3, #126
	ble	.L9
	ldr	r0, [fp, #-276]
	bl	fclose
	ldr	r0, .L19+16
	bl	puts
	mov	r3, #1
	b	.L14
.L9:
	ldr	r3, [fp, #-292]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L19+20
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-272]
	ldr	r3, [fp, #-272]
	cmp	r3, #0
	bne	.L10
	ldr	r0, [fp, #-276]
	bl	fclose
	ldr	r0, .L19+24
	bl	puts
	mov	r3, #1
	b	.L14
.L10:
	ldr	r0, [fp, #-272]
	bl	fgetc
	str	r0, [fp, #-268]
	ldr	r3, [fp, #-268]
	cmn	r3, #1
	beq	.L17
	ldr	r3, [fp, #-284]
	add	r3, r3, #1
	str	r3, [fp, #-284]
	ldr	r1, [fp, #-276]
	ldr	r0, [fp, #-268]
	bl	fputc
	ldr	r3, [fp, #-284]
	ldr	r2, .L19+28
	cmp	r3, r2
	beq	.L18
	b	.L10
.L17:
	nop
	b	.L12
.L18:
	nop
.L12:
	ldr	r0, [fp, #-272]
	bl	fclose
	ldr	r3, [fp, #-284]
	and	r1, r3, #255
	sub	r2, fp, #264
	ldr	r3, [fp, #-280]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-284]
	asr	r2, r3, #8
	ldr	r3, [fp, #-280]
	add	r3, r3, #127
	and	r2, r2, #255
	sub	r1, fp, #4
	add	r3, r1, r3
	strb	r2, [r3, #-260]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-276]
	bl	fseek
	sub	r0, fp, #264
	ldr	r3, [fp, #-276]
	mov	r2, #254
	mov	r1, #1
	bl	fwrite
	ldr	r0, [fp, #-276]
	bl	fclose
	mov	r3, #0
.L14:
	ldr	r2, .L19
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC6
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	65535
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
