	.file	"14153.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"efirestool -- tool to work with APPL efires archives\n\nUsage:\n    %s unpack efires destination [filelist]\n    %s pack efires from [filelist]\n    %s list efires [-f filelist]\n"
	.text
	.globl	print_usage
	.type	print_usage, @function
print_usage:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, QWORD PTR -8[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	r8, rsi
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	print_usage, .-print_usage
	.section	.rodata
.LC1:
	.string	"unpack"
.LC2:
	.string	"list"
.LC3:
	.string	"Failed to build filelist\n"
.LC4:
	.string	"pack"
.LC5:
	.string	"Failed to parse filelist\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 80
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -68[rbp], 2
	jg	.L3
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	print_usage
	mov	eax, 1
	jmp	.L18
.L3:
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	DWORD PTR -56[rbp], 0
	cmp	DWORD PTR -68[rbp], 3
	jle	.L5
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	QWORD PTR -40[rbp], rax
.L5:
	cmp	DWORD PTR -68[rbp], 4
	jle	.L6
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	QWORD PTR -32[rbp], rax
.L6:
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L7
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L8
.L7:
	mov	DWORD PTR -52[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L9
	or	DWORD PTR -52[rbp], 1
.L9:
	cmp	QWORD PTR -32[rbp], 0
	je	.L10
	lea	rax, -48[rbp]
	jmp	.L11
.L10:
	mov	eax, 0
.L11:
	mov	edx, DWORD PTR -52[rbp]
	mov	rsi, QWORD PTR -40[rbp]
	mov	rdi, QWORD PTR -16[rbp]
	mov	rcx, rax
	call	unpack_efires
	mov	DWORD PTR -56[rbp], eax
	cmp	DWORD PTR -56[rbp], 0
	jne	.L20
	cmp	QWORD PTR -32[rbp], 0
	je	.L20
	mov	rax, QWORD PTR -48[rbp]
	test	rax, rax
	jne	.L13
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 25
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	DWORD PTR -56[rbp], 1
	jmp	.L20
.L13:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	write_filelist
	mov	DWORD PTR -56[rbp], eax
	jmp	.L20
.L8:
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L15
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	parse_filelist
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	test	rax, rax
	jne	.L16
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 25
	mov	esi, 1
	lea	rdi, .LC5[rip]
	call	fwrite@PLT
	mov	DWORD PTR -56[rbp], 1
	jmp	.L14
.L16:
	mov	rdx, QWORD PTR -48[rbp]
	mov	rcx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	pack_efires
	mov	DWORD PTR -56[rbp], eax
	jmp	.L14
.L15:
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	print_usage
	mov	DWORD PTR -56[rbp], 1
	jmp	.L14
.L20:
	nop
.L14:
	mov	rax, QWORD PTR -48[rbp]
	test	rax, rax
	je	.L17
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	free_filelist
.L17:
	mov	eax, DWORD PTR -56[rbp]
.L18:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.globl	free_filelist
	.type	free_filelist, @function
free_filelist:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L22
.L23:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	add	QWORD PTR -8[rbp], 8
.L22:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L23
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	free_filelist, .-free_filelist
	.section	.rodata
.LC6:
	.string	"r"
.LC7:
	.string	"Cant open filelist (%s): %s\n"
	.align 8
.LC8:
	.string	"Cant allocate memory for filelist\n"
	.text
	.globl	parse_filelist
	.type	parse_filelist, @function
parse_filelist:
.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, 80
	mov	QWORD PTR -72[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L25
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -72[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 0
	jmp	.L33
.L25:
	mov	QWORD PTR -24[rbp], 477218588
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L27
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 34
	mov	esi, 1
	lea	rdi, .LC8[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	jmp	.L33
.L27:
	mov	QWORD PTR -48[rbp], 0
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -40[rbp], rax
	mov	QWORD PTR -56[rbp], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR -56[rbp], 0
	jmp	.L28
.L30:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	sub	rax, 1
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	add	QWORD PTR -40[rbp], 8
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
.L28:
	mov	rax, QWORD PTR -24[rbp]
	sal	rax, 3
	lea	rdx, -8[rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	cmp	QWORD PTR -40[rbp], rax
	jnb	.L29
	mov	rdx, QWORD PTR -32[rbp]
	lea	rcx, -56[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	getline@PLT
	mov	QWORD PTR -48[rbp], rax
	cmp	QWORD PTR -48[rbp], -1
	jne	.L30
.L29:
	cmp	QWORD PTR -48[rbp], 0
	jne	.L31
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], 0
	jmp	.L32
.L31:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L32
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], 0
.L32:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -16[rbp]
.L33:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	parse_filelist, .-parse_filelist
	.section	.rodata
.LC9:
	.string	"Cant write NULL filelist\n"
.LC10:
	.string	"w"
.LC11:
	.string	"%s\n"
	.text
	.globl	write_filelist
	.type	write_filelist, @function
write_filelist:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	cmp	QWORD PTR -24[rbp], 0
	jne	.L36
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 25
	mov	esi, 1
	lea	rdi, .LC9[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L37
.L36:
	mov	rax, QWORD PTR -32[rbp]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L38
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -32[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L37
.L38:
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L39
.L40:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	QWORD PTR -16[rbp], 8
.L39:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L40
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L37:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	write_filelist, .-write_filelist
	.section	.rodata
.LC12:
	.string	"Cant determine destination\n"
	.align 8
.LC13:
	.string	"Cant open resource file (%s): %s\n"
.LC14:
	.string	"fstat failed for (%s): %s\n"
	.align 8
.LC15:
	.string	"File is too short to be an efires file\n"
.LC16:
	.string	"Cant mmap file (%s): %s\n"
	.align 8
.LC17:
	.string	"Wrong efires revision: 0x%02x (expected 0x%02x)\n"
.LC18:
	.string	"File with 0x%x entries: %s\n"
	.align 8
.LC19:
	.string	"File is too small to have so many entries\n"
	.align 8
.LC20:
	.string	"Cant create destination directory '%s': %s\n"
	.align 8
.LC21:
	.string	"Cant chdir to destination directory '%s': %s\n"
.LC22:
	.string	"0x%04x (0x%08x - 0x%08x): %s\n"
	.align 8
.LC23:
	.string	"File 0x%04x: overflows efires file -- skipping\n"
	.align 8
.LC24:
	.string	"File 0x%04x: Failed to create file: %s\n"
	.align 8
.LC25:
	.string	"File 0x%04x: Expected to write %d bytes, wrote %d: %s\n"
	.text
	.globl	unpack_efires
	.type	unpack_efires, @function
unpack_efires:
.LFB11:
	.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, 280
	.cfi_offset 3, -24
	mov	QWORD PTR -264[rbp], rdi
	mov	QWORD PTR -272[rbp], rsi
	mov	DWORD PTR -276[rbp], edx
	mov	QWORD PTR -288[rbp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -240[rbp], 1
	mov	QWORD PTR -216[rbp], 0
	mov	QWORD PTR -208[rbp], 0
	cmp	QWORD PTR -288[rbp], 0
	je	.L42
	mov	rax, QWORD PTR -288[rbp]
	mov	QWORD PTR [rax], 0
.L42:
	mov	eax, DWORD PTR -276[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L43
	cmp	QWORD PTR -272[rbp], 0
	jne	.L43
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 27
	mov	esi, 1
	lea	rdi, .LC12[rip]
	call	fwrite@PLT
	jmp	.L44
.L43:
	mov	rax, QWORD PTR -264[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -236[rbp], eax
	cmp	DWORD PTR -236[rbp], -1
	jne	.L45
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -264[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L44
.L45:
	lea	rdx, -176[rbp]
	mov	eax, DWORD PTR -236[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fstat@PLT
	test	eax, eax
	je	.L46
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -264[rbp]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L44
.L46:
	mov	rax, QWORD PTR -128[rbp]
	mov	QWORD PTR -216[rbp], rax
	cmp	QWORD PTR -216[rbp], 3
	ja	.L47
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 39
	mov	esi, 1
	lea	rdi, .LC15[rip]
	call	fwrite@PLT
	jmp	.L44
.L47:
	mov	rax, QWORD PTR -128[rbp]
	mov	rsi, rax
	mov	eax, DWORD PTR -236[rbp]
	mov	r9d, 0
	mov	r8d, eax
	mov	ecx, 2
	mov	edx, 1
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -208[rbp], rax
	cmp	QWORD PTR -208[rbp], -1
	jne	.L48
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -264[rbp]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	QWORD PTR -208[rbp], 0
	jmp	.L44
.L48:
	mov	rax, QWORD PTR -208[rbp]
	mov	QWORD PTR -192[rbp], rax
	mov	rax, QWORD PTR -192[rbp]
	movzx	eax, WORD PTR [rax]
	cmp	ax, 2
	je	.L49
	mov	rax, QWORD PTR -192[rbp]
	movzx	eax, WORD PTR [rax]
	movzx	edx, ax
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, 2
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L44
.L49:
	mov	rax, QWORD PTR -192[rbp]
	movzx	eax, WORD PTR 2[rax]
	mov	WORD PTR -242[rbp], ax
	movzx	edx, WORD PTR -242[rbp]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, QWORD PTR -264[rbp]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	movzx	edx, WORD PTR -242[rbp]
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 3
	add	rax, 4
	cmp	QWORD PTR -216[rbp], rax
	jnb	.L50
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 42
	mov	esi, 1
	lea	rdi, .LC19[rip]
	call	fwrite@PLT
	jmp	.L44
.L50:
	mov	QWORD PTR -200[rbp], 0
	cmp	QWORD PTR -288[rbp], 0
	je	.L51
	movzx	eax, WORD PTR -242[rbp]
	add	eax, 1
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -288[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -288[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -200[rbp], rax
	cmp	QWORD PTR -200[rbp], 0
	je	.L52
	mov	rax, QWORD PTR -200[rbp]
	mov	QWORD PTR [rax], 0
	jmp	.L51
.L52:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 34
	mov	esi, 1
	lea	rdi, .LC8[rip]
	call	fwrite@PLT
	jmp	.L44
.L51:
	mov	eax, DWORD PTR -276[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L53
	mov	rax, QWORD PTR -272[rbp]
	mov	esi, 493
	mov	rdi, rax
	call	mkdir@PLT
	test	eax, eax
	je	.L54
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -272[rbp]
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L44
.L54:
	mov	rax, QWORD PTR -272[rbp]
	mov	rdi, rax
	call	chdir@PLT
	test	eax, eax
	je	.L53
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -272[rbp]
	lea	rsi, .LC21[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L44
.L53:
	mov	WORD PTR -244[rbp], 0
	jmp	.L55
.L62:
	movzx	eax, WORD PTR -244[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 3
	mov	rdx, QWORD PTR -192[rbp]
	add	rax, rdx
	add	rax, 4
	mov	QWORD PTR -184[rbp], rax
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 64[rax]
	mov	DWORD PTR -232[rbp], eax
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 68[rax]
	mov	DWORD PTR -228[rbp], eax
	mov	rsi, QWORD PTR -184[rbp]
	mov	edx, DWORD PTR -232[rbp]
	mov	eax, DWORD PTR -228[rbp]
	lea	ecx, [rdx+rax]
	movzx	eax, WORD PTR -244[rbp]
	mov	edx, DWORD PTR -232[rbp]
	mov	r8, rsi
	mov	esi, eax
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	QWORD PTR -200[rbp], 0
	je	.L56
	mov	rax, QWORD PTR -184[rbp]
	mov	rbx, QWORD PTR -200[rbp]
	lea	rdx, 8[rbx]
	mov	QWORD PTR -200[rbp], rdx
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR [rbx], rax
.L56:
	mov	eax, DWORD PTR -276[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L67
	mov	edx, DWORD PTR -232[rbp]
	mov	eax, DWORD PTR -228[rbp]
	add	eax, edx
	mov	eax, eax
	cmp	QWORD PTR -216[rbp], rax
	jnb	.L59
	movzx	edx, WORD PTR -244[rbp]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC23[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L58
.L59:
	mov	rax, QWORD PTR -184[rbp]
	mov	edx, 493
	mov	esi, 193
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -224[rbp], eax
	cmp	DWORD PTR -224[rbp], -1
	jne	.L60
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	movzx	edx, WORD PTR -244[rbp]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC24[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L58
.L60:
	mov	edx, DWORD PTR -228[rbp]
	mov	ecx, DWORD PTR -232[rbp]
	mov	rax, QWORD PTR -208[rbp]
	add	rax, rcx
	mov	rcx, rax
	mov	eax, DWORD PTR -224[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -220[rbp], eax
	mov	eax, DWORD PTR -228[rbp]
	cmp	DWORD PTR -220[rbp], eax
	je	.L61
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	movzx	edx, WORD PTR -244[rbp]
	mov	rax, QWORD PTR stderr[rip]
	mov	edi, DWORD PTR -220[rbp]
	mov	ecx, DWORD PTR -228[rbp]
	mov	r9, rsi
	mov	r8d, edi
	lea	rsi, .LC25[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L61:
	mov	eax, DWORD PTR -224[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L58
.L67:
	nop
.L58:
	add	WORD PTR -244[rbp], 1
.L55:
	movzx	eax, WORD PTR -244[rbp]
	cmp	ax, WORD PTR -242[rbp]
	jne	.L62
	mov	DWORD PTR -240[rbp], 0
.L44:
	cmp	DWORD PTR -240[rbp], 0
	je	.L63
	cmp	QWORD PTR -288[rbp], 0
	je	.L63
	mov	rax, QWORD PTR -288[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L63
	mov	rax, QWORD PTR -288[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free_filelist
	mov	rax, QWORD PTR -288[rbp]
	mov	QWORD PTR [rax], 0
.L63:
	cmp	QWORD PTR -208[rbp], 0
	je	.L64
	mov	rdx, QWORD PTR -216[rbp]
	mov	rax, QWORD PTR -208[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	munmap@PLT
.L64:
	mov	eax, DWORD PTR -240[rbp]
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L66
	call	__stack_chk_fail@PLT
.L66:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	unpack_efires, .-unpack_efires
	.section	.rodata
	.align 8
.LC26:
	.string	"Cant open directory to pack (%s) : %s\n"
	.align 8
.LC27:
	.string	"Cant open output file (%s) : %s\n"
	.align 8
.LC28:
	.string	"Cant stat file, skipping (%s/%s) : %s\n"
	.align 8
.LC29:
	.string	"Entry isn't regular file, skipping (%s/%s)\n"
	.align 8
.LC30:
	.string	"File too big for efires, skipping (%s/%s)\n"
	.align 8
.LC31:
	.string	"Filename too long, skipping (%s/%s)\n"
	.align 8
.LC32:
	.string	"Write to result file failed: %s\n"
	.align 8
.LC33:
	.string	"Too many entries, only packing 0x%08x\n"
	.align 8
.LC34:
	.string	"Failed to expand result file to needed size: %s\n"
.LC35:
	.string	"Cant mmap result file: %s\n"
	.align 8
.LC36:
	.string	"Cant open file, leaving zeroed (%s/%s): %s\n"
	.align 8
.LC37:
	.string	"Cant read %u bytes from file, contents in efires undefined (%s/%s): %s\n"
	.text
	.globl	pack_efires
	.type	pack_efires, @function
pack_efires:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 384
	mov	QWORD PTR -360[rbp], rdi
	mov	QWORD PTR -368[rbp], rsi
	mov	QWORD PTR -376[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -348[rbp], 1
	mov	QWORD PTR -280[rbp], 0
	mov	DWORD PTR -328[rbp], -1
	mov	DWORD PTR -344[rbp], -1
	mov	QWORD PTR -272[rbp], 0
	mov	QWORD PTR -312[rbp], 0
	mov	DWORD PTR -340[rbp], 0
	mov	rax, QWORD PTR -368[rbp]
	mov	rdi, rax
	call	opendir@PLT
	mov	QWORD PTR -280[rbp], rax
	mov	rax, QWORD PTR -280[rbp]
	mov	rdi, rax
	call	dirfd@PLT
	mov	DWORD PTR -328[rbp], eax
	cmp	QWORD PTR -280[rbp], 0
	je	.L69
	cmp	DWORD PTR -328[rbp], -1
	jne	.L70
.L69:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -368[rbp]
	lea	rsi, .LC26[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L71
.L70:
	mov	rax, QWORD PTR -360[rbp]
	mov	edx, 420
	mov	esi, 194
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -344[rbp], eax
	cmp	DWORD PTR -344[rbp], -1
	jne	.L72
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -360[rbp]
	lea	rsi, .LC27[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L71
.L72:
	lea	rcx, -160[rbp]
	mov	eax, DWORD PTR -344[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	cmp	rax, -1
	jne	.L73
	call	abort@PLT
.L73:
	mov	DWORD PTR -336[rbp], 76
	mov	QWORD PTR -304[rbp], 0
	mov	rax, QWORD PTR -376[rbp]
	mov	QWORD PTR -296[rbp], rax
	jmp	.L74
.L87:
	mov	QWORD PTR -288[rbp], 0
	cmp	QWORD PTR -296[rbp], 0
	je	.L75
	mov	rax, QWORD PTR -296[rbp]
	lea	rdx, 8[rax]
	mov	QWORD PTR -296[rbp], rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -288[rbp], rax
	jmp	.L76
.L75:
	mov	rax, QWORD PTR -304[rbp]
	add	rax, 19
	mov	QWORD PTR -288[rbp], rax
.L76:
	lea	rdx, -160[rbp]
	mov	rsi, QWORD PTR -288[rbp]
	mov	eax, DWORD PTR -328[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	fstatat@PLT
	test	eax, eax
	je	.L77
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, QWORD PTR -288[rbp]
	mov	rdx, QWORD PTR -368[rbp]
	mov	r8, rsi
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L74
.L77:
	mov	eax, DWORD PTR -136[rbp]
	and	eax, 61440
	cmp	eax, 32768
	je	.L79
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, QWORD PTR -288[rbp]
	mov	rdx, QWORD PTR -368[rbp]
	lea	rsi, .LC29[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L74
.L79:
	mov	rax, QWORD PTR -112[rbp]
	mov	edx, 4294967295
	cmp	rax, rdx
	jle	.L80
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, QWORD PTR -288[rbp]
	mov	rdx, QWORD PTR -368[rbp]
	lea	rsi, .LC30[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L74
.L80:
	mov	rax, QWORD PTR -112[rbp]
	mov	DWORD PTR -172[rbp], eax
	mov	rax, QWORD PTR -288[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR -264[rbp], rax
	cmp	QWORD PTR -264[rbp], 64
	jbe	.L81
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, QWORD PTR -288[rbp]
	mov	rdx, QWORD PTR -368[rbp]
	lea	rsi, .LC31[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L74
.L81:
	add	DWORD PTR -340[rbp], 1
	mov	rdx, QWORD PTR -264[rbp]
	mov	rcx, QWORD PTR -288[rbp]
	lea	rax, -240[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	cmp	QWORD PTR -264[rbp], 63
	ja	.L82
	mov	eax, 64
	sub	rax, QWORD PTR -264[rbp]
	lea	rcx, -240[rbp]
	mov	rdx, QWORD PTR -264[rbp]
	add	rcx, rdx
	mov	rdx, rax
	mov	esi, 0
	mov	rdi, rcx
	call	memset@PLT
.L82:
	lea	rcx, -240[rbp]
	mov	eax, DWORD PTR -344[rbp]
	mov	edx, 72
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	cmp	rax, 72
	je	.L83
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC32[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L71
.L83:
	mov	edx, DWORD PTR -172[rbp]
	mov	eax, DWORD PTR -336[rbp]
	add	eax, edx
	add	eax, 72
	mov	DWORD PTR -336[rbp], eax
	cmp	DWORD PTR -340[rbp], -2
	jne	.L74
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -340[rbp]
	lea	rsi, .LC33[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L85
.L74:
	cmp	QWORD PTR -296[rbp], 0
	je	.L86
	mov	rax, QWORD PTR -296[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L87
.L86:
	cmp	QWORD PTR -296[rbp], 0
	jne	.L85
	mov	rax, QWORD PTR -280[rbp]
	mov	rdi, rax
	call	readdir@PLT
	mov	QWORD PTR -304[rbp], rax
	cmp	QWORD PTR -304[rbp], 0
	jne	.L87
.L85:
	lea	rax, -240[rbp]
	mov	edx, 72
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rcx, -240[rbp]
	mov	eax, DWORD PTR -344[rbp]
	mov	edx, 72
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	cmp	rax, 72
	je	.L88
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC32[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L71
.L88:
	mov	edx, DWORD PTR -336[rbp]
	mov	eax, DWORD PTR -344[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	ftruncate@PLT
	test	eax, eax
	je	.L89
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC34[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L71
.L89:
	mov	eax, DWORD PTR -336[rbp]
	mov	edx, DWORD PTR -344[rbp]
	mov	r9d, 0
	mov	r8d, edx
	mov	ecx, 1
	mov	edx, 3
	mov	rsi, rax
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -312[rbp], rax
	cmp	QWORD PTR -312[rbp], -1
	jne	.L90
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC35[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	QWORD PTR -312[rbp], 0
	jmp	.L71
.L90:
	mov	rax, QWORD PTR -312[rbp]
	mov	QWORD PTR -256[rbp], rax
	mov	rax, QWORD PTR -256[rbp]
	mov	WORD PTR [rax], 2
	mov	eax, DWORD PTR -340[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -256[rbp]
	mov	WORD PTR 2[rax], dx
	mov	eax, DWORD PTR -340[rbp]
	lea	edx, 1[rax]
	mov	eax, edx
	sal	eax, 3
	add	eax, edx
	sal	eax, 3
	add	eax, 4
	mov	DWORD PTR -332[rbp], eax
	mov	WORD PTR -350[rbp], 0
	jmp	.L91
.L95:
	movzx	eax, WORD PTR -350[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 3
	mov	rdx, QWORD PTR -256[rbp]
	add	rax, rdx
	add	rax, 4
	mov	QWORD PTR -248[rbp], rax
	mov	rax, QWORD PTR -248[rbp]
	mov	eax, DWORD PTR 68[rax]
	mov	DWORD PTR -324[rbp], eax
	mov	eax, DWORD PTR -332[rbp]
	mov	DWORD PTR -320[rbp], eax
	mov	eax, DWORD PTR -324[rbp]
	add	DWORD PTR -332[rbp], eax
	mov	rax, QWORD PTR -248[rbp]
	mov	edx, DWORD PTR -324[rbp]
	mov	DWORD PTR 68[rax], edx
	mov	rax, QWORD PTR -248[rbp]
	mov	edx, DWORD PTR -320[rbp]
	mov	DWORD PTR 64[rax], edx
	mov	rsi, QWORD PTR -248[rbp]
	mov	edx, DWORD PTR -320[rbp]
	mov	eax, DWORD PTR -324[rbp]
	lea	ecx, [rdx+rax]
	movzx	eax, WORD PTR -350[rbp]
	mov	edx, DWORD PTR -320[rbp]
	mov	r8, rsi
	mov	esi, eax
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rcx, QWORD PTR -248[rbp]
	mov	eax, DWORD PTR -328[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	openat@PLT
	mov	DWORD PTR -316[rbp], eax
	cmp	DWORD PTR -316[rbp], -1
	jne	.L92
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	mov	rcx, QWORD PTR -248[rbp]
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -368[rbp]
	mov	r8, rsi
	lea	rsi, .LC36[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L93
.L92:
	mov	edx, DWORD PTR -324[rbp]
	mov	ecx, DWORD PTR -320[rbp]
	mov	rax, QWORD PTR -312[rbp]
	add	rax, rcx
	mov	rcx, rax
	mov	eax, DWORD PTR -316[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	edx, DWORD PTR -324[rbp]
	cmp	rax, rdx
	je	.L94
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	mov	rdi, QWORD PTR -248[rbp]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, QWORD PTR -368[rbp]
	mov	edx, DWORD PTR -324[rbp]
	mov	r9, rsi
	mov	r8, rdi
	lea	rsi, .LC37[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L94:
	mov	eax, DWORD PTR -316[rbp]
	mov	edi, eax
	call	close@PLT
.L93:
	add	WORD PTR -350[rbp], 1
.L91:
	movzx	eax, WORD PTR -350[rbp]
	cmp	DWORD PTR -340[rbp], eax
	jne	.L95
	mov	DWORD PTR -348[rbp], 0
.L71:
	cmp	QWORD PTR -280[rbp], 0
	je	.L96
	mov	rax, QWORD PTR -280[rbp]
	mov	rdi, rax
	call	closedir@PLT
.L96:
	cmp	QWORD PTR -312[rbp], 0
	je	.L97
	mov	rdx, QWORD PTR -272[rbp]
	mov	rax, QWORD PTR -312[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	munmap@PLT
.L97:
	cmp	DWORD PTR -344[rbp], -1
	je	.L98
	mov	eax, DWORD PTR -344[rbp]
	mov	edi, eax
	call	close@PLT
	cmp	DWORD PTR -348[rbp], 0
	je	.L98
	mov	rax, QWORD PTR -360[rbp]
	mov	rdi, rax
	call	unlink@PLT
.L98:
	mov	eax, DWORD PTR -348[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L100
	call	__stack_chk_fail@PLT
.L100:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	pack_efires, .-pack_efires
	.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	"14153.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"efirestool -- tool to work with APPL efires archive"
	.ascii	"s\012\012Usage:\012    %s unpack efires destination"
	.ascii	" [filelist]\012    %s pack efires from [filelist]\012"
	.ascii	"    %s list efires [-f filelist]\012\000"
	.text
	.align	2
	.global	print_usage
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_usage, %function
print_usage:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-8]
	ldr	r3, .L2
	ldr	r0, [r3]
	ldr	r3, [fp, #-8]
	str	r3, [sp]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r1, .L2+4
	bl	fprintf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	stderr
	.word	.LC0
	.size	print_usage, .-print_usage
	.section	.rodata
	.align	2
.LC1:
	.ascii	"unpack\000"
	.align	2
.LC2:
	.ascii	"list\000"
	.align	2
.LC3:
	.ascii	"Failed to build filelist\012\000"
	.align	2
.LC4:
	.ascii	"pack\000"
	.align	2
.LC5:
	.ascii	"Failed to parse filelist\012\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 = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-40]
	cmp	r3, #2
	bgt	.L5
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	mov	r0, r3
	bl	print_usage
	mov	r3, #1
	b	.L20
.L5:
	ldr	r3, [fp, #-44]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-44]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-40]
	cmp	r3, #3
	ble	.L7
	ldr	r3, [fp, #-44]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-32]
.L7:
	ldr	r3, [fp, #-40]
	cmp	r3, #4
	ble	.L8
	ldr	r3, [fp, #-44]
	ldr	r3, [r3, #16]
	str	r3, [fp, #-28]
.L8:
	ldr	r1, .L23+4
	ldr	r0, [fp, #-16]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r1, .L23+8
	ldr	r0, [fp, #-16]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L10
.L9:
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r1, .L23+8
	ldr	r0, [fp, #-16]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L11
	ldr	r3, [fp, #-20]
	orr	r3, r3, #1
	str	r3, [fp, #-20]
.L11:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L12
	sub	r3, fp, #36
	b	.L13
.L12:
	mov	r3, #0
.L13:
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-12]
	bl	unpack_efires
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L22
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L22
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L15
	ldr	r3, .L23+12
	ldr	r3, [r3]
	mov	r2, #25
	mov	r1, #1
	ldr	r0, .L23+16
	bl	fwrite
	mov	r3, #1
	str	r3, [fp, #-24]
	b	.L22
.L15:
	ldr	r3, [fp, #-36]
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	write_filelist
	str	r0, [fp, #-24]
	b	.L22
.L10:
	ldr	r1, .L23+20
	ldr	r0, [fp, #-16]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L17
	ldr	r0, [fp, #-28]
	bl	parse_filelist
	mov	r3, r0
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L18
	ldr	r3, .L23+12
	ldr	r3, [r3]
	mov	r2, #25
	mov	r1, #1
	ldr	r0, .L23+24
	bl	fwrite
	mov	r3, #1
	str	r3, [fp, #-24]
	b	.L16
.L18:
	ldr	r3, [fp, #-36]
	mov	r2, r3
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-12]
	bl	pack_efires
	str	r0, [fp, #-24]
	b	.L16
.L17:
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	mov	r0, r3
	bl	print_usage
	mov	r3, #1
	str	r3, [fp, #-24]
	b	.L16
.L22:
	nop
.L16:
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L19
	ldr	r3, [fp, #-36]
	mov	r0, r3
	bl	free_filelist
.L19:
	ldr	r3, [fp, #-24]
.L20:
	ldr	r2, .L23
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC6
	.word	.LC1
	.word	.LC2
	.word	stderr
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.align	2
	.global	free_filelist
	.syntax unified
	.arm
	.fpu softvfp
	.type	free_filelist, %function
free_filelist:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-8]
	b	.L26
.L27:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	str	r3, [fp, #-8]
.L26:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L27
	ldr	r0, [fp, #-16]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	free_filelist, .-free_filelist
	.section	.rodata
	.align	2
.LC7:
	.ascii	"r\000"
	.align	2
.LC8:
	.ascii	"Cant open filelist (%s): %s\012\000"
	.align	2
.LC9:
	.ascii	"Cant allocate memory for filelist\012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	parse_filelist
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_filelist, %function
parse_filelist:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #44
	str	r0, [fp, #-48]
	ldr	r3, .L39
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r1, .L39+4
	ldr	r0, [fp, #-48]
	bl	fopen
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L29
	ldr	r3, .L39+8
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-48]
	ldr	r1, .L39+12
	mov	r0, r4
	bl	fprintf
	mov	r3, #0
	b	.L37
.L29:
	ldr	r3, .L39+16
	str	r3, [fp, #-24]
	ldr	r0, [fp, #-24]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L31
	ldr	r3, .L39+8
	ldr	r3, [r3]
	mov	r2, #34
	mov	r1, #1
	ldr	r0, .L39+20
	bl	fwrite
	ldr	r0, [fp, #-28]
	bl	fclose
	mov	r3, #0
	b	.L37
.L31:
	mov	r3, #0
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-32]
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L32
.L34:
	ldr	r3, [fp, #-32]
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	sub	r3, r3, #1
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-32]
	add	r3, r3, #4
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-36]
.L32:
	ldr	r3, [fp, #-24]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	bcs	.L33
	sub	r3, fp, #40
	ldr	r2, [fp, #-28]
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	getline
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmn	r3, #1
	bne	.L34
.L33:
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L35
	ldr	r3, [fp, #-32]
	mov	r2, #0
	str	r2, [r3]
	b	.L36
.L35:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L36
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-32]
	mov	r2, #0
	str	r2, [r3]
.L36:
	ldr	r0, [fp, #-28]
	bl	fclose
	ldr	r3, [fp, #-20]
.L37:
	ldr	r2, .L39
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L38
	bl	__stack_chk_fail
.L38:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L40:
	.align	2
.L39:
	.word	.LC10
	.word	.LC7
	.word	stderr
	.word	.LC8
	.word	59652323
	.word	.LC9
	.size	parse_filelist, .-parse_filelist
	.section	.rodata
	.align	2
.LC11:
	.ascii	"Cant write NULL filelist\012\000"
	.align	2
.LC12:
	.ascii	"w\000"
	.align	2
.LC13:
	.ascii	"%s\012\000"
	.text
	.align	2
	.global	write_filelist
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_filelist, %function
write_filelist:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L42
	ldr	r3, .L47
	ldr	r3, [r3]
	mov	r2, #25
	mov	r1, #1
	ldr	r0, .L47+4
	bl	fwrite
	mov	r3, #1
	b	.L43
.L42:
	ldr	r1, .L47+8
	ldr	r0, [fp, #-28]
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L44
	ldr	r3, .L47
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-28]
	ldr	r1, .L47+12
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L43
.L44:
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-20]
	b	.L45
.L46:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L47+16
	ldr	r0, [fp, #-16]
	bl	fprintf
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	str	r3, [fp, #-20]
.L45:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L46
	ldr	r0, [fp, #-16]
	bl	fclose
	mov	r3, #0
.L43:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L48:
	.align	2
.L47:
	.word	stderr
	.word	.LC11
	.word	.LC12
	.word	.LC8
	.word	.LC13
	.size	write_filelist, .-write_filelist
	.section	.rodata
	.align	2
.LC14:
	.ascii	"Cant determine destination\012\000"
	.align	2
.LC15:
	.ascii	"Cant open resource file (%s): %s\012\000"
	.align	2
.LC16:
	.ascii	"fstat failed for (%s): %s\012\000"
	.align	2
.LC17:
	.ascii	"File is too short to be an efires file\012\000"
	.align	2
.LC18:
	.ascii	"Cant mmap file (%s): %s\012\000"
	.align	2
.LC19:
	.ascii	"Wrong efires revision: 0x%02x (expected 0x%02x)\012"
	.ascii	"\000"
	.align	2
.LC20:
	.ascii	"File with 0x%x entries: %s\012\000"
	.align	2
.LC21:
	.ascii	"File is too small to have so many entries\012\000"
	.align	2
.LC22:
	.ascii	"Cant create destination directory '%s': %s\012\000"
	.align	2
.LC23:
	.ascii	"Cant chdir to destination directory '%s': %s\012\000"
	.align	2
.LC24:
	.ascii	"0x%04x (0x%08x - 0x%08x): %s\012\000"
	.align	2
.LC25:
	.ascii	"File 0x%04x: overflows efires file -- skipping\012\000"
	.align	2
.LC26:
	.ascii	"File 0x%04x: Failed to create file: %s\012\000"
	.align	2
.LC27:
	.ascii	"File 0x%04x: Expected to write %d bytes, wrote %d: "
	.ascii	"%s\012\000"
	.align	2
.LC28:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	unpack_efires
	.syntax unified
	.arm
	.fpu softvfp
	.type	unpack_efires, %function
unpack_efires:
	@ args = 0, pretend = 0, frame = 160
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #168
	str	r0, [fp, #-160]
	str	r1, [fp, #-164]
	str	r2, [fp, #-168]
	str	r3, [fp, #-172]
	ldr	r3, .L76
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-152]
	mov	r3, #0
	str	r3, [fp, #-148]
	mov	r3, #0
	str	r3, [fp, #-144]
	ldr	r3, [fp, #-172]
	cmp	r3, #0
	beq	.L50
	ldr	r3, [fp, #-172]
	mov	r2, #0
	str	r2, [r3]
.L50:
	ldr	r3, [fp, #-168]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L51
	ldr	r3, [fp, #-164]
	cmp	r3, #0
	bne	.L51
	ldr	r3, .L76+4
	ldr	r3, [r3]
	mov	r2, #27
	mov	r1, #1
	ldr	r0, .L76+8
	bl	fwrite
	b	.L52
.L51:
	mov	r1, #0
	ldr	r0, [fp, #-160]
	bl	open
	str	r0, [fp, #-136]
	ldr	r3, [fp, #-136]
	cmn	r3, #1
	bne	.L53
	ldr	r3, .L76+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-160]
	ldr	r1, .L76+12
	mov	r0, r4
	bl	fprintf
	b	.L52
.L53:
	sub	r3, fp, #108
	mov	r1, r3
	ldr	r0, [fp, #-136]
	bl	fstat
	mov	r3, r0
	cmp	r3, #0
	beq	.L54
	ldr	r3, .L76+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-160]
	ldr	r1, .L76+16
	mov	r0, r4
	bl	fprintf
	b	.L52
.L54:
	ldr	r3, [fp, #-64]
	str	r3, [fp, #-148]
	ldr	r3, [fp, #-148]
	cmp	r3, #3
	bhi	.L55
	ldr	r3, .L76+4
	ldr	r3, [r3]
	mov	r2, #39
	mov	r1, #1
	ldr	r0, .L76+20
	bl	fwrite
	b	.L52
.L55:
	ldr	r3, [fp, #-64]
	mov	r1, r3
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-136]
	str	r3, [sp]
	mov	r3, #2
	mov	r2, #1
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-144]
	ldr	r3, [fp, #-144]
	cmn	r3, #1
	bne	.L56
	ldr	r3, .L76+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-160]
	ldr	r1, .L76+24
	mov	r0, r4
	bl	fprintf
	mov	r3, #0
	str	r3, [fp, #-144]
	b	.L52
.L56:
	ldr	r3, [fp, #-144]
	str	r3, [fp, #-132]
	ldr	r3, [fp, #-132]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	lsl	r3, r3, #8
	orr	r3, r3, r2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	cmp	r3, #2
	beq	.L57
	ldr	r3, .L76+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-132]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	lsl	r3, r3, #8
	orr	r3, r3, r2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r2, r3
	mov	r3, #2
	ldr	r1, .L76+28
	bl	fprintf
	b	.L52
.L57:
	ldr	r3, [fp, #-132]
	ldrb	r2, [r3, #2]	@ zero_extendqisi2
	ldrb	r3, [r3, #3]	@ zero_extendqisi2
	lsl	r3, r3, #8
	orr	r3, r3, r2
	strh	r3, [fp, #-154]	@ movhi
	ldr	r3, .L76+4
	ldr	r0, [r3]
	ldrh	r2, [fp, #-154]
	ldr	r3, [fp, #-160]
	ldr	r1, .L76+32
	bl	fprintf
	ldrh	r2, [fp, #-154]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, #4
	ldr	r2, [fp, #-148]
	cmp	r2, r3
	bcs	.L58
	ldr	r3, .L76+4
	ldr	r3, [r3]
	mov	r2, #42
	mov	r1, #1
	ldr	r0, .L76+36
	bl	fwrite
	b	.L52
.L58:
	mov	r3, #0
	str	r3, [fp, #-140]
	ldr	r3, [fp, #-172]
	cmp	r3, #0
	beq	.L59
	ldrh	r3, [fp, #-154]
	add	r3, r3, #1
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-172]
	str	r2, [r3]
	ldr	r3, [fp, #-172]
	ldr	r3, [r3]
	str	r3, [fp, #-140]
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	beq	.L60
	ldr	r3, [fp, #-140]
	mov	r2, #0
	str	r2, [r3]
	b	.L59
.L60:
	ldr	r3, .L76+4
	ldr	r3, [r3]
	mov	r2, #34
	mov	r1, #1
	ldr	r0, .L76+40
	bl	fwrite
	b	.L52
.L59:
	ldr	r3, [fp, #-168]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L61
	ldr	r1, .L76+44
	ldr	r0, [fp, #-164]
	bl	mkdir
	mov	r3, r0
	cmp	r3, #0
	beq	.L62
	ldr	r3, .L76+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-164]
	ldr	r1, .L76+48
	mov	r0, r4
	bl	fprintf
	b	.L52
.L62:
	ldr	r0, [fp, #-164]
	bl	chdir
	mov	r3, r0
	cmp	r3, #0
	beq	.L61
	ldr	r3, .L76+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-164]
	ldr	r1, .L76+52
	mov	r0, r4
	bl	fprintf
	b	.L52
.L61:
	mov	r3, #0
	strh	r3, [fp, #-156]	@ movhi
	b	.L63
.L70:
	ldrh	r2, [fp, #-156]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, [fp, #-132]
	add	r3, r2, r3
	add	r3, r3, #4
	str	r3, [fp, #-128]
	ldr	r3, [fp, #-128]
	ldrb	r2, [r3, #64]	@ zero_extendqisi2
	ldrb	r1, [r3, #65]	@ zero_extendqisi2
	lsl	r1, r1, #8
	orr	r2, r1, r2
	ldrb	r1, [r3, #66]	@ zero_extendqisi2
	lsl	r1, r1, #16
	orr	r2, r1, r2
	ldrb	r3, [r3, #67]	@ zero_extendqisi2
	lsl	r3, r3, #24
	orr	r3, r3, r2
	str	r3, [fp, #-124]
	ldr	r3, [fp, #-128]
	ldrb	r2, [r3, #68]	@ zero_extendqisi2
	ldrb	r1, [r3, #69]	@ zero_extendqisi2
	lsl	r1, r1, #8
	orr	r2, r1, r2
	ldrb	r1, [r3, #70]	@ zero_extendqisi2
	lsl	r1, r1, #16
	orr	r2, r1, r2
	ldrb	r3, [r3, #71]	@ zero_extendqisi2
	lsl	r3, r3, #24
	orr	r3, r3, r2
	str	r3, [fp, #-120]
	ldrh	r1, [fp, #-156]
	ldr	r2, [fp, #-124]
	ldr	r3, [fp, #-120]
	add	r2, r2, r3
	ldr	r3, [fp, #-128]
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-124]
	ldr	r0, .L76+56
	bl	printf
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	beq	.L64
	ldr	r2, [fp, #-128]
	ldr	r4, [fp, #-140]
	add	r3, r4, #4
	str	r3, [fp, #-140]
	mov	r0, r2
	bl	strdup
	mov	r3, r0
	str	r3, [r4]
.L64:
	ldr	r3, [fp, #-168]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L75
	ldr	r2, [fp, #-124]
	ldr	r3, [fp, #-120]
	add	r3, r2, r3
	ldr	r2, [fp, #-148]
	cmp	r2, r3
	bcs	.L67
	ldr	r3, .L76+4
	ldr	r3, [r3]
	ldrh	r2, [fp, #-156]
	ldr	r1, .L76+60
	mov	r0, r3
	bl	fprintf
	b	.L66
.L67:
	ldr	r3, [fp, #-128]
	ldr	r2, .L76+44
	mov	r1, #193
	mov	r0, r3
	bl	open
	str	r0, [fp, #-116]
	ldr	r3, [fp, #-116]
	cmn	r3, #1
	bne	.L68
	ldr	r3, .L76+4
	ldr	r4, [r3]
	ldrh	r5, [fp, #-156]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L76+64
	mov	r0, r4
	bl	fprintf
	b	.L66
.L68:
	ldr	r2, [fp, #-144]
	ldr	r3, [fp, #-124]
	add	r3, r2, r3
	ldr	r2, [fp, #-120]
	mov	r1, r3
	ldr	r0, [fp, #-116]
	bl	write
	str	r0, [fp, #-112]
	ldr	r3, [fp, #-120]
	ldr	r2, [fp, #-112]
	cmp	r2, r3
	beq	.L69
	ldr	r3, .L76+4
	ldr	r4, [r3]
	ldrh	r5, [fp, #-156]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-112]
	str	r3, [sp]
	ldr	r3, [fp, #-120]
	mov	r2, r5
	ldr	r1, .L76+68
	mov	r0, r4
	bl	fprintf
.L69:
	ldr	r0, [fp, #-116]
	bl	close
	b	.L66
.L75:
	nop
.L66:
	ldrh	r3, [fp, #-156]	@ movhi
	add	r3, r3, #1
	strh	r3, [fp, #-156]	@ movhi
.L63:
	ldrh	r2, [fp, #-156]
	ldrh	r3, [fp, #-154]
	cmp	r2, r3
	bne	.L70
	mov	r3, #0
	str	r3, [fp, #-152]
.L52:
	ldr	r3, [fp, #-152]
	cmp	r3, #0
	beq	.L71
	ldr	r3, [fp, #-172]
	cmp	r3, #0
	beq	.L71
	ldr	r3, [fp, #-172]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L71
	ldr	r3, [fp, #-172]
	ldr	r3, [r3]
	mov	r0, r3
	bl	free_filelist
	ldr	r3, [fp, #-172]
	mov	r2, #0
	str	r2, [r3]
.L71:
	ldr	r3, [fp, #-144]
	cmp	r3, #0
	beq	.L72
	ldr	r1, [fp, #-148]
	ldr	r0, [fp, #-144]
	bl	munmap
.L72:
	ldr	r3, [fp, #-152]
	ldr	r2, .L76
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L74
	bl	__stack_chk_fail
.L74:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L77:
	.align	2
.L76:
	.word	.LC28
	.word	stderr
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC9
	.word	493
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.size	unpack_efires, .-unpack_efires
	.section	.rodata
	.align	2
.LC29:
	.ascii	"Cant open directory to pack (%s) : %s\012\000"
	.align	2
.LC30:
	.ascii	"Cant open output file (%s) : %s\012\000"
	.align	2
.LC31:
	.ascii	"Cant stat file, skipping (%s/%s) : %s\012\000"
	.align	2
.LC32:
	.ascii	"Entry isn't regular file, skipping (%s/%s)\012\000"
	.align	2
.LC33:
	.ascii	"Filename too long, skipping (%s/%s)\012\000"
	.align	2
.LC34:
	.ascii	"Write to result file failed: %s\012\000"
	.align	2
.LC35:
	.ascii	"Too many entries, only packing 0x%08x\012\000"
	.align	2
.LC36:
	.ascii	"Failed to expand result file to needed size: %s\012"
	.ascii	"\000"
	.align	2
.LC37:
	.ascii	"Cant mmap result file: %s\012\000"
	.align	2
.LC38:
	.ascii	"Cant open file, leaving zeroed (%s/%s): %s\012\000"
	.align	2
.LC39:
	.ascii	"Cant read %u bytes from file, contents in efires un"
	.ascii	"defined (%s/%s): %s\012\000"
	.align	2
.LC40:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	pack_efires
	.syntax unified
	.arm
	.fpu softvfp
	.type	pack_efires, %function
pack_efires:
	@ args = 0, pretend = 0, frame = 264
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #272
	str	r0, [fp, #-264]
	str	r1, [fp, #-268]
	str	r2, [fp, #-272]
	ldr	r3, .L110
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-248]
	mov	r3, #0
	str	r3, [fp, #-216]
	mvn	r3, #0
	str	r3, [fp, #-212]
	mvn	r3, #0
	str	r3, [fp, #-244]
	mov	r3, #0
	str	r3, [fp, #-208]
	mov	r3, #0
	str	r3, [fp, #-240]
	mov	r3, #0
	str	r3, [fp, #-252]
	ldr	r0, [fp, #-268]
	bl	opendir
	str	r0, [fp, #-216]
	ldr	r0, [fp, #-216]
	bl	dirfd
	str	r0, [fp, #-212]
	ldr	r3, [fp, #-216]
	cmp	r3, #0
	beq	.L79
	ldr	r3, [fp, #-212]
	cmn	r3, #1
	bne	.L80
.L79:
	ldr	r3, .L110+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-268]
	ldr	r1, .L110+8
	mov	r0, r4
	bl	fprintf
	b	.L81
.L80:
	mov	r2, #420
	mov	r1, #194
	ldr	r0, [fp, #-264]
	bl	open
	str	r0, [fp, #-244]
	ldr	r3, [fp, #-244]
	cmn	r3, #1
	bne	.L82
	ldr	r3, .L110+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-264]
	ldr	r1, .L110+12
	mov	r0, r4
	bl	fprintf
	b	.L81
.L82:
	sub	r3, fp, #88
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-244]
	bl	write
	mov	r3, r0
	cmn	r3, #1
	bne	.L83
	bl	abort
.L83:
	mov	r3, #76
	str	r3, [fp, #-236]
	mov	r3, #0
	str	r3, [fp, #-232]
	ldr	r3, [fp, #-272]
	str	r3, [fp, #-228]
	b	.L84
.L96:
	mov	r3, #0
	str	r3, [fp, #-224]
	ldr	r3, [fp, #-228]
	cmp	r3, #0
	beq	.L85
	ldr	r3, [fp, #-228]
	add	r2, r3, #4
	str	r2, [fp, #-228]
	ldr	r3, [r3]
	str	r3, [fp, #-224]
	b	.L86
.L85:
	ldr	r3, [fp, #-232]
	add	r3, r3, #11
	str	r3, [fp, #-224]
.L86:
	sub	r2, fp, #180
	mov	r3, #0
	ldr	r1, [fp, #-224]
	ldr	r0, [fp, #-212]
	bl	fstatat
	mov	r3, r0
	cmp	r3, #0
	beq	.L87
	ldr	r3, .L110+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	ldr	r3, [fp, #-224]
	ldr	r2, [fp, #-268]
	ldr	r1, .L110+16
	mov	r0, r4
	bl	fprintf
	b	.L84
.L87:
	ldr	r3, [fp, #-164]
	and	r3, r3, #61440
	cmp	r3, #32768
	beq	.L89
	ldr	r3, .L110+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-224]
	ldr	r2, [fp, #-268]
	ldr	r1, .L110+20
	bl	fprintf
	b	.L84
.L89:
	ldr	r3, [fp, #-136]
	str	r3, [fp, #-20]
	ldr	r0, [fp, #-224]
	bl	strlen
	str	r0, [fp, #-204]
	ldr	r3, [fp, #-204]
	cmp	r3, #64
	bls	.L90
	ldr	r3, .L110+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-224]
	ldr	r2, [fp, #-268]
	ldr	r1, .L110+24
	bl	fprintf
	b	.L84
.L90:
	ldr	r3, [fp, #-252]
	add	r3, r3, #1
	str	r3, [fp, #-252]
	sub	r3, fp, #88
	ldr	r2, [fp, #-204]
	ldr	r1, [fp, #-224]
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-204]
	cmp	r3, #63
	bhi	.L91
	sub	r2, fp, #88
	ldr	r3, [fp, #-204]
	add	r0, r2, r3
	ldr	r3, [fp, #-204]
	rsb	r3, r3, #64
	mov	r2, r3
	mov	r1, #0
	bl	memset
.L91:
	sub	r3, fp, #88
	mov	r2, #72
	mov	r1, r3
	ldr	r0, [fp, #-244]
	bl	write
	mov	r3, r0
	cmp	r3, #72
	beq	.L92
	ldr	r3, .L110+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L110+28
	mov	r0, r4
	bl	fprintf
	b	.L81
.L92:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-236]
	add	r3, r2, r3
	add	r3, r3, #72
	str	r3, [fp, #-236]
	ldr	r3, [fp, #-252]
	cmn	r3, #2
	bne	.L84
	ldr	r3, .L110+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-252]
	ldr	r1, .L110+32
	mov	r0, r3
	bl	fprintf
	b	.L94
.L84:
	ldr	r3, [fp, #-228]
	cmp	r3, #0
	beq	.L95
	ldr	r3, [fp, #-228]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L96
.L95:
	ldr	r3, [fp, #-228]
	cmp	r3, #0
	bne	.L94
	ldr	r0, [fp, #-216]
	bl	readdir
	str	r0, [fp, #-232]
	ldr	r3, [fp, #-232]
	cmp	r3, #0
	bne	.L96
.L94:
	sub	r3, fp, #88
	mov	r2, #72
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #88
	mov	r2, #72
	mov	r1, r3
	ldr	r0, [fp, #-244]
	bl	write
	mov	r3, r0
	cmp	r3, #72
	beq	.L97
	ldr	r3, .L110+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L110+28
	mov	r0, r4
	bl	fprintf
	b	.L81
.L97:
	ldr	r3, [fp, #-236]
	mov	r1, r3
	ldr	r0, [fp, #-244]
	bl	ftruncate
	mov	r3, r0
	cmp	r3, #0
	beq	.L98
	ldr	r3, .L110+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L110+36
	mov	r0, r4
	bl	fprintf
	b	.L81
.L98:
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-244]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	ldr	r1, [fp, #-236]
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-240]
	ldr	r3, [fp, #-240]
	cmn	r3, #1
	bne	.L99
	ldr	r3, .L110+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L110+40
	mov	r0, r4
	bl	fprintf
	mov	r3, #0
	str	r3, [fp, #-240]
	b	.L81
.L99:
	ldr	r3, [fp, #-240]
	str	r3, [fp, #-200]
	ldr	r3, [fp, #-200]
	mov	r2, #0
	orr	r2, r2, #2
	strb	r2, [r3]
	mov	r2, #0
	strb	r2, [r3, #1]
	ldr	r3, [fp, #-252]
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r3, [fp, #-200]
	and	r1, r2, #255
	mov	r0, #0
	orr	r1, r0, r1
	strb	r1, [r3, #2]
	lsr	r2, r2, #8
	lsl	r2, r2, #16
	lsr	r2, r2, #16
	mov	r1, #0
	orr	r2, r1, r2
	strb	r2, [r3, #3]
	ldr	r3, [fp, #-252]
	add	r2, r3, #1
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, #4
	str	r3, [fp, #-220]
	mov	r3, #0
	strh	r3, [fp, #-254]	@ movhi
	b	.L100
.L104:
	ldrh	r2, [fp, #-254]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, [fp, #-200]
	add	r3, r2, r3
	add	r3, r3, #4
	str	r3, [fp, #-196]
	ldr	r3, [fp, #-196]
	ldrb	r2, [r3, #68]	@ zero_extendqisi2
	ldrb	r1, [r3, #69]	@ zero_extendqisi2
	lsl	r1, r1, #8
	orr	r2, r1, r2
	ldrb	r1, [r3, #70]	@ zero_extendqisi2
	lsl	r1, r1, #16
	orr	r2, r1, r2
	ldrb	r3, [r3, #71]	@ zero_extendqisi2
	lsl	r3, r3, #24
	orr	r3, r3, r2
	str	r3, [fp, #-192]
	ldr	r3, [fp, #-220]
	str	r3, [fp, #-188]
	ldr	r2, [fp, #-220]
	ldr	r3, [fp, #-192]
	add	r3, r2, r3
	str	r3, [fp, #-220]
	ldr	r3, [fp, #-196]
	ldrb	r2, [fp, #-192]	@ zero_extendqisi2
	mov	r1, #0
	orr	r2, r1, r2
	strb	r2, [r3, #68]
	ldrb	r2, [fp, #-191]	@ zero_extendqisi2
	mov	r1, #0
	orr	r2, r1, r2
	strb	r2, [r3, #69]
	ldrb	r2, [fp, #-190]	@ zero_extendqisi2
	mov	r1, #0
	orr	r2, r1, r2
	strb	r2, [r3, #70]
	ldrb	r2, [fp, #-189]	@ zero_extendqisi2
	mov	r1, #0
	orr	r2, r1, r2
	strb	r2, [r3, #71]
	ldr	r3, [fp, #-196]
	ldrb	r2, [fp, #-188]	@ zero_extendqisi2
	mov	r1, #0
	orr	r2, r1, r2
	strb	r2, [r3, #64]
	ldrb	r2, [fp, #-187]	@ zero_extendqisi2
	mov	r1, #0
	orr	r2, r1, r2
	strb	r2, [r3, #65]
	ldrb	r2, [fp, #-186]	@ zero_extendqisi2
	mov	r1, #0
	orr	r2, r1, r2
	strb	r2, [r3, #66]
	ldrb	r2, [fp, #-185]	@ zero_extendqisi2
	mov	r1, #0
	orr	r2, r1, r2
	strb	r2, [r3, #67]
	ldrh	r1, [fp, #-254]
	ldr	r2, [fp, #-188]
	ldr	r3, [fp, #-192]
	add	r2, r2, r3
	ldr	r3, [fp, #-196]
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-188]
	ldr	r0, .L110+44
	bl	printf
	ldr	r3, [fp, #-196]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-212]
	bl	openat
	str	r0, [fp, #-184]
	ldr	r3, [fp, #-184]
	cmn	r3, #1
	bne	.L101
	ldr	r3, .L110+4
	ldr	r4, [r3]
	ldr	r5, [fp, #-196]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	mov	r3, r5
	ldr	r2, [fp, #-268]
	ldr	r1, .L110+48
	mov	r0, r4
	bl	fprintf
	b	.L102
.L101:
	ldr	r2, [fp, #-240]
	ldr	r3, [fp, #-188]
	add	r3, r2, r3
	ldr	r2, [fp, #-192]
	mov	r1, r3
	ldr	r0, [fp, #-184]
	bl	read
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-192]
	cmp	r3, r2
	beq	.L103
	ldr	r3, .L110+4
	ldr	r5, [r3]
	ldr	r4, [fp, #-196]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp, #4]
	str	r4, [sp]
	ldr	r3, [fp, #-268]
	ldr	r2, [fp, #-192]
	ldr	r1, .L110+52
	mov	r0, r5
	bl	fprintf
.L103:
	ldr	r0, [fp, #-184]
	bl	close
.L102:
	ldrh	r3, [fp, #-254]	@ movhi
	add	r3, r3, #1
	strh	r3, [fp, #-254]	@ movhi
.L100:
	ldrh	r3, [fp, #-254]
	ldr	r2, [fp, #-252]
	cmp	r2, r3
	bne	.L104
	mov	r3, #0
	str	r3, [fp, #-248]
.L81:
	ldr	r3, [fp, #-216]
	cmp	r3, #0
	beq	.L105
	ldr	r0, [fp, #-216]
	bl	closedir
.L105:
	ldr	r3, [fp, #-240]
	cmp	r3, #0
	beq	.L106
	ldr	r1, [fp, #-208]
	ldr	r0, [fp, #-240]
	bl	munmap
.L106:
	ldr	r3, [fp, #-244]
	cmn	r3, #1
	beq	.L107
	ldr	r0, [fp, #-244]
	bl	close
	ldr	r3, [fp, #-248]
	cmp	r3, #0
	beq	.L107
	ldr	r0, [fp, #-264]
	bl	unlink
.L107:
	ldr	r3, [fp, #-248]
	ldr	r2, .L110
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L109
	bl	__stack_chk_fail
.L109:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L111:
	.align	2
.L110:
	.word	.LC40
	.word	stderr
	.word	.LC29
	.word	.LC30
	.word	.LC31
	.word	.LC32
	.word	.LC33
	.word	.LC34
	.word	.LC35
	.word	.LC36
	.word	.LC37
	.word	.LC24
	.word	.LC38
	.word	.LC39
	.size	pack_efires, .-pack_efires
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
