// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/nufx.c
// Function: de_run_nufx
static void de_run_nufx(deark *c, de_module_params *mparams)
{
	struct nufx_ctx *d = NULL;
	struct nufx_record *rec = NULL;
	i64 pos;
	i64 rec_idx = 0;

	d = de_malloc(c, sizeof(struct nufx_ctx));
	// TODO: More work on filename encodings.
	d->input_encoding_req = de_get_input_encoding(c, NULL, DE_ENCODING_UNKNOWN);
	if(d->input_encoding_req==DE_ENCODING_UNKNOWN) {
		d->input_encoding = DE_ENCODING_ASCII;
		d->using_default_encoding = 1;
	}
	else {
		d->input_encoding = d->input_encoding_req;
	}
	d->extract_comments = (c->extract_level>=2);
	d->crco_misc = de_crcobj_create(c, DE_CRCOBJ_CRC16_XMODEM);
	d->crco_for_lzw_codec = de_crcobj_create(c, DE_CRCOBJ_CRC16_XMODEM);
	d->crco_dfork = de_crcobj_create(c, DE_CRCOBJ_CRC16_IBM3740);
	d->crco_rfork = de_crcobj_create(c, DE_CRCOBJ_CRC16_IBM3740);

	do_nufx_master_record(c, d);
	if(d->fatalerrflag) goto done;
	pos = d->next_record_pos;

	for(rec_idx=0; rec_idx<d->total_records; rec_idx++) {
		if(pos >= d->master_eof) goto done;

		if(rec) {
			destroy_record(c, rec);
			rec = NULL;
		}

		rec = de_malloc(c, sizeof(struct nufx_record));
		rec->d = d;
		rec->idx = (UI)rec_idx;
		rec->filename = ucstring_create(c);
		rec->hdr_pos = pos;
		do_nufx_record(c, d, rec);
		if(d->fatalerrflag) goto done;

		pos = d->next_record_pos;
	}

done:
	destroy_record(c, rec);
	if(d) {
		if(d->need_errmsg) {
			de_err(c, "Bad or unsupported NuFX file");
		}
		de_crcobj_destroy(d->crco_misc);
		de_crcobj_destroy(d->crco_for_lzw_codec);
		de_crcobj_destroy(d->crco_dfork);
		de_crcobj_destroy(d->crco_rfork);
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
pushq $0x70
popq %rsi
callq 0xdecaf
movq %rax, %r13
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xe08d2
movl %eax, 0x4(%r13)
testl %eax, %eax
jne 0x8c3f8
pushq $0x1
popq %rax
movb $0x1, 0x3(%r13)
movl %eax, 0x8(%r13)
cmpl $0x2, 0x90(%rbx)
setge 0x2(%r13)
pushq $0x20
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0xe0ae9
movq %rax, 0x50(%r13)
movq %rbx, %rdi
movl %ebp, %esi
callq 0xe0ae9
movq %rax, 0x58(%r13)
pushq $0x23
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0xe0ae9
movq %rax, 0x68(%r13)
movq %rbx, %rdi
movl %ebp, %esi
callq 0xe0ae9
movq %rax, 0x60(%r13)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xdebae
leaq 0x95cd0(%rip), %rsi     # 0x12212a
movq %rbx, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
leaq 0x18(%rsp), %r15
movq $0x6, (%r15)
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3fc4
movl %eax, 0x10(%r13)
leaq 0x95cab(%rip), %rsi     # 0x12213f
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x50(%r13), %rdi
callq 0xe0e44
movq 0x50(%r13), %rdi
movq 0x18(%rbx), %rsi
movq (%r15), %rdx
pushq $0x28
popq %rcx
callq 0xe0f33
movq 0x50(%r13), %rdi
callq 0xe0e95
leaq 0x95c91(%rip), %rsi     # 0x12215d
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe40bf
movq %rax, 0x18(%r13)
leaq 0x95c8e(%rip), %rsi     # 0x12217d
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
leaq 0x30(%r13), %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x8d1f5
leaq 0x95c7a(%rip), %rdx     # 0x122190
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8d2be
movq 0x18(%rbx), %rdi
movq %r13, %r12
addq $0x40, %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x8d1f5
leaq 0x95c66(%rip), %rdx     # 0x1221a4
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8d2be
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3fc4
movl %eax, 0xc(%r13)
leaq 0x95c55(%rip), %rsi     # 0x1221b5
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
addq $0x8, (%r15)
cmpl $0x0, 0xc(%r13)
movq 0x18(%rbx), %rdi
pushq $0x30
popq %r14
je 0x8c5c2
leaq 0x18(%rsp), %r15
movq %r15, %rsi
callq 0xe40bf
movq %rax, 0x20(%r13)
leaq 0x95c2a(%rip), %rsi     # 0x1221c1
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x20(%r13), %rax
movq 0x18(%rbx), %rcx
cmpq 0x18(%rcx), %rax
movq %r14, (%r15)
movq %r14, 0x28(%r13)
jle 0x8c5d3
movw $0x101, (%r13)          # imm = 0x101
jmp 0x8c5d3
movq 0x18(%rdi), %rax
movq %rax, 0x20(%r13)
movq %r14, 0x18(%rsp)
movq %r14, 0x28(%r13)
movl 0x8(%rsp), %esi
movq %rbx, %rdi
callq 0xdebb7
cmpb $0x0, (%r13)
je 0x8c64a
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8d1ac
cmpb $0x0, 0x1(%r13)
je 0x8c60c
leaq 0x95b0b(%rip), %rsi     # 0x12210d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
movq 0x50(%r13), %rdi
callq 0xe0e8d
movq 0x58(%r13), %rdi
callq 0xe0e8d
movq 0x68(%r13), %rdi
callq 0xe0e8d
movq 0x60(%r13), %rdi
callq 0xe0e8d
movq %rbx, %rdi
movq %r13, %rsi
callq 0xded32
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %r12
leaq 0x8(%rsp), %rbp
xorl %r15d, %r15d
xorl %eax, %eax
movq %r13, 0x10(%rsp)
cmpq 0x18(%r13), %rax
jge 0x8c5e9
movq 0x28(%r13), %r14
cmpq 0x20(%r13), %r14
jge 0x8c5e9
movq %rax, 0x30(%rsp)
testq %r15, %r15
je 0x8c686
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8d1ac
movl $0xc8, %esi
movq %rbx, %rdi
callq 0xdecaf
movq %rax, %r15
movq %r13, (%rax)
movq 0x30(%rsp), %rax
movl %eax, 0x8(%r15)
movq %rbx, %rdi
callq 0xeac74
movq %rax, 0x98(%r15)
movq %r14, 0x10(%r15)
movq %rbx, %rdi
leaq 0x24(%rsp), %rsi
callq 0xdebae
movq 0x18(%rbx), %rdi
movq 0x10(%r15), %rsi
callq 0xe404f
cmpl $0x4ef546d8, %eax       # imm = 0x4EF546D8
jne 0x8c7e0
movl 0x8(%r15), %edx
movq 0x10(%r15), %rcx
movq %rbx, %rdi
leaq 0x8d6cf(%rip), %rsi     # 0x119dbb
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
movl %r12d, %esi
callq 0xdeba7
movq %rbx, %rdi
leaq 0x28(%rsp), %rsi
callq 0xdebae
movq 0x10(%r15), %rdx
movq %rbx, %rdi
leaq 0x95ad9(%rip), %rsi     # 0x1221f2
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
movl %r12d, %esi
callq 0xdeba7
movq 0x10(%r15), %rax
addq $0x4, %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xe3fc4
movl %eax, 0x28(%r15)
movq %rbx, %rdi
leaq 0x95ab5(%rip), %rsi     # 0x122207
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xe3fc4
movq %rax, 0x20(%r15)
movq %rbx, %rdi
leaq 0x95ab7(%rip), %rsi     # 0x12222c
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x10(%r15), %r14
movq 0x20(%r15), %r12
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xe3fc4
movl %eax, 0xc(%r15)
movq %rbx, %rdi
leaq 0x7ad68(%rip), %rsi     # 0x107509
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xe40bf
movl %eax, 0x2c(%r15)
movq %rbx, %rdi
leaq 0x95a7a(%rip), %rsi     # 0x12223e
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
cmpl $0x11, 0x2c(%r15)
jb 0x8c7ff
movw $0x101, (%r13)          # imm = 0x101
jmp 0x8ce26
movq 0x10(%r15), %rdx
movq %rbx, %rdi
leaq 0x959e3(%rip), %rsi     # 0x1221d1
xorl %eax, %eax
callq 0xdf2a5
movb $0x1, (%r13)
jmp 0x8d121
addq %r12, %r14
addq $-0x2, %r14
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xe3fc4
movl %eax, 0x30(%r15)
movq %rbx, %rdi
leaq 0x95a30(%rip), %rsi     # 0x122250
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xe3fc4
movl %eax, 0x34(%r15)
movq %rbx, %rdi
leaq 0x95a20(%rip), %rsi     # 0x122263
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xe40bf
movl %eax, 0x38(%r15)
movq %rbx, %rdi
leaq 0x95a12(%rip), %rsi     # 0x122278
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xe40bf
movl %eax, 0x3c(%r15)
movq %rbx, %rdi
leaq 0x959fe(%rip), %rsi     # 0x122287
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xe40bf
movl %eax, 0x40(%r15)
movq %rbx, %rdi
leaq 0x959ed(%rip), %rsi     # 0x122299
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xe3fc4
movl %eax, 0x44(%r15)
movq %rbx, %rdi
leaq 0x8cbb6(%rip), %rsi     # 0x119485
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
leaq 0x60(%r15), %r13
movq %rbp, %rsi
movq %r13, %rdx
callq 0x8d1f5
movq %rbx, %rdi
movq %r13, %rsi
leaq 0x958a0(%rip), %rdx     # 0x122198
callq 0x8d2be
movq 0x18(%rbx), %rdi
leaq 0x70(%r15), %r13
movq %rbp, %rsi
movq %r13, %rdx
callq 0x8d1f5
movq %rbx, %rdi
movq %r13, %rsi
leaq 0x944c7(%rip), %rdx     # 0x120de4
callq 0x8d2be
movq 0x18(%rbx), %rdi
movq %r15, %r13
subq $-0x80, %r13
movq %rbp, %rsi
movq %r13, %rdx
callq 0x8d1f5
movq %rbx, %rdi
movq %r13, %rsi
leaq 0x95967(%rip), %rdx     # 0x1222ac
callq 0x8d2be
cmpl $0x0, 0xc(%r15)
je 0x8c9be
movq 0x8(%rsp), %rax
addq $0x2, %rax
cmpq %r14, %rax
jg 0x8c9be
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xe3fc4
movq 0x8(%rsp), %rcx
addq %rax, %rcx
cmpq %r14, %rcx
movl $0x0, %edx
cmovleq %rax, %rdx
movq %rdx, 0x50(%r15)
movq %rbx, %rdi
leaq 0x9592d(%rip), %rsi     # 0x1222ba
xorl %eax, %eax
callq 0xde896
cmpl $0x2, (%rbx)
jl 0x8c9be
movq 0x18(%rbx), %rsi
movq 0x8(%rsp), %rdx
movq 0x50(%r15), %rcx
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %rbx, %rdi
xorl %r9d, %r9d
callq 0xded3a
movq %r14, 0x8(%rsp)
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0xe3fc4
movq %rax, %r13
testq %rax, %rax
jle 0x8ca30
cmpq $0x0, 0x90(%r15)
jne 0x8ca30
movq %rbx, %rdi
callq 0xeac74
movq %rax, 0x90(%r15)
movq 0x18(%rbx), %rcx
movq 0x8(%rsp), %r8
movq %rax, (%rsp)
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq %r15, %rdx
movq %r13, %r9
callq 0x8d301
movq 0x90(%r15), %rdi
callq 0xeb877
movq %rbx, %rdi
leaq 0x958a5(%rip), %rsi     # 0x1222cb
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x8(%rsp), %rax
addq %r13, %rax
movq %rax, 0x8(%rsp)
movl 0x2c(%r15), %ecx
subq 0x10(%r15), %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x18(%r15)
movq 0x10(%rsp), %r13
movq 0x50(%r13), %rdi
callq 0xe0e44
movq 0x50(%r13), %rdi
movq 0x18(%rbx), %rsi
movq 0x10(%r15), %rdx
movq 0x18(%r15), %rcx
addq $0x6, %rdx
addq $-0x6, %rcx
callq 0xe0f33
movq 0x50(%r13), %rdi
callq 0xe0e95
movq %rbx, %rdi
leaq 0x95858(%rip), %rsi     # 0x1222e6
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movl 0x2c(%r15), %esi
movq %rbx, %rdi
pushq $0x50
popq %rdx
callq 0xdf66f
movq %rax, 0xa0(%r15)
movq 0x18(%r15), %rax
addq 0x10(%r15), %rax
movq %rax, 0x58(%r15)
xorl %r12d, %r12d
xorl %ebp, %ebp
movl 0x2c(%r15), %eax
cmpq %rax, %rbp
jae 0x8ce1e
movq 0xa0(%r15), %r14
movl %ebp, (%r14,%r12)
movq 0x8(%rsp), %r13
movq %r13, 0x18(%rsp)
movq %rbx, %rdi
leaq 0x2c(%rsp), %rsi
callq 0xdebae
movl (%r14,%r12), %edx
movq %rbx, %rdi
leaq 0x95812(%rip), %rsi     # 0x12230d
movq %r13, %rcx
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movq 0x18(%rbx), %rdi
leaq 0x18(%rsp), %r13
movq %r13, %rsi
callq 0xe3fc4
movl %eax, 0x4(%r14,%r12)
movq %rbx, %rdi
leaq 0x957f6(%rip), %rsi     # 0x122326
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xe3fc4
movl %eax, 0x8(%r14,%r12)
leaq 0x92390(%rip), %rcx     # 0x11eee1
cmpl $0x5, %eax
ja 0x8cb69
movl %eax, %ecx
andl $0x7, %ecx
leaq 0x95b9a(%rip), %rdx     # 0x1226fc
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
movq %rbx, %rdi
leaq 0x957c8(%rip), %rsi     # 0x12233b
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
leaq 0x18(%rsp), %rsi
callq 0xe3fc4
movl %eax, 0xc(%r14,%r12)
movq %rbx, %rdi
leaq 0x957b9(%rip), %rsi     # 0x122352
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movl 0x4(%r14,%r12), %ecx
movl 0xc(%r14,%r12), %eax
cmpl $0x2, %ecx
je 0x8cbf9
cmpl $0x1, %ecx
movq 0x10(%rsp), %r13
je 0x8cbe2
testl %ecx, %ecx
jne 0x8cbcd
cmpl $0x3, %eax
jae 0x8cbcd
leaq 0x95b49(%rip), %rcx     # 0x122714
jmp 0x8cc11
xorl $0x3, %ecx
orl %eax, %ecx
leaq 0x92308(%rip), %rdx     # 0x11eee1
leaq 0x9245f(%rip), %rax     # 0x11f03f
jmp 0x8cbf3
testq %rax, %rax
leaq 0x95854(%rip), %rdx     # 0x122440
leaq 0x79fcf(%rip), %rax     # 0x106bc2
cmoveq %rax, %rdx
jmp 0x8cc18
leaq 0x95859(%rip), %rdx     # 0x122459
cmpl $0x3, %eax
movq 0x10(%rsp), %r13
jae 0x8cc18
leaq 0x95b0f(%rip), %rcx     # 0x122720
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
movq %rbx, %rdi
leaq 0x93da8(%rip), %rsi     # 0x1209ca
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
leaq 0x18(%rsp), %rsi
callq 0xe3fc4
movl %eax, 0x10(%r14,%r12)
movl 0xc(%r15), %ecx
cmpl $0x2, %ecx
jb 0x8cc60
cmpl $0x2, 0x4(%r14,%r12)
jne 0x8cc60
cmpl $0x2, %ecx
jne 0x8cc5a
cmpl $0x0, 0x8(%r14,%r12)
je 0x8cc60
movb $0x1, 0x49(%r14,%r12)
cmpb $0x0, 0x49(%r14,%r12)
leaq 0xaaff3(%rip), %rcx     # 0x137c60
leaq 0x95712(%rip), %rdx     # 0x122386
cmoveq %rdx, %rcx
movq %rbx, %rdi
leaq 0x956e4(%rip), %rsi     # 0x122366
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
leaq 0x18(%rsp), %rsi
callq 0xe40bf
movq %rax, 0x18(%r14,%r12)
movq %rbx, %rdi
leaq 0x7b4bf(%rip), %rsi     # 0x108167
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
cmpl $0x2, 0x4(%r14,%r12)
jne 0x8cd42
cmpl $0x1, 0xc(%r14,%r12)
jne 0x8cd42
movl 0x40(%r15), %edx
movq %rdx, 0x40(%r14,%r12)
movq %rbx, %rdi
leaq 0x956b8(%rip), %rsi     # 0x122391
xorl %eax, %eax
callq 0xde896
movl 0x44(%r15), %edx
movq %rdx, 0x38(%r14,%r12)
cmpq $0x7f, %rdx
ja 0x8cd0e
movq %rbx, %rdi
leaq 0x956a8(%rip), %rsi     # 0x1223a1
xorl %eax, %eax
callq 0xde896
movq $0x200, 0x38(%r14,%r12) # imm = 0x200
movl $0x200, %edx            # imm = 0x200
movq %rbx, %rdi
leaq 0x87cbf(%rip), %rsi     # 0x1149d7
xorl %eax, %eax
callq 0xde896
movq 0x38(%r14,%r12), %rdx
imulq 0x40(%r14,%r12), %rdx
movq %rdx, 0x20(%r14,%r12)
movq %rbx, %rdi
leaq 0x9568b(%rip), %rsi     # 0x1223c4
xorl %eax, %eax
callq 0xde896
jmp 0x8cd4c
movq 0x18(%r14,%r12), %rax
movq %rax, 0x20(%r14,%r12)
movq 0x18(%rbx), %rdi
leaq 0x18(%rsp), %rsi
callq 0xe40bf
movq %rax, 0x28(%r14,%r12)
movq %rbx, %rdi
leaq 0xb09ac(%rip), %rsi     # 0x13d715
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x58(%r15), %rdx
movq %rdx, 0x30(%r14,%r12)
movq %rbx, %rdi
leaq 0x8c6a6(%rip), %rsi     # 0x11942c
xorl %eax, %eax
callq 0xde896
movq 0x58(%r15), %rax
addq 0x28(%r14,%r12), %rax
movq %rax, 0x58(%r15)
cmpq 0x20(%r13), %rax
jle 0x8cda9
movw $0x101, (%r13)          # imm = 0x101
jmp 0x8cdf9
leaq (%r14,%r12), %rax
movl 0x4(%r14,%r12), %ecx
cmpl $0x2, %ecx
je 0x8cdcd
cmpl $0x3, %ecx
jne 0x8cdf9
cmpl $0x0, 0xc(%r14,%r12)
jne 0x8cdf9
movq %rax, 0xa8(%r15)
jmp 0x8cdf9
movl 0xc(%r14,%r12), %ecx
cmpl $0x2, %ecx
je 0x8cdf2
cmpl $0x1, %ecx
je 0x8cde9
testl %ecx, %ecx
jne 0x8cdf9
movq %rax, 0xb0(%r15)
jmp 0x8cdf9
movq %rax, 0xc0(%r15)
jmp 0x8cdf9
movq %rax, 0xb8(%r15)
movl 0x2c(%rsp), %esi
movq %rbx, %rdi
callq 0xdebb7
cmpb $0x0, (%r13)
jne 0x8ce26
addq $0x10, 0x8(%rsp)
incq %rbp
addq $0x50, %r12
jmp 0x8cabe
movq 0x58(%r15), %rax
movq %rax, 0x28(%r13)
movl 0x28(%rsp), %esi
movq %rbx, %rdi
callq 0xdebb7
cmpb $0x0, (%r13)
pushq $0x1
popq %r12
leaq 0x8(%rsp), %rbp
jne 0x8d121
cmpq $0x0, 0xa8(%r15)
je 0x8cecd
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xe59cd
movq %rax, %r14
movq 0xa8(%r15), %rcx
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %rax, %r8
callq 0x8d3c2
testl %eax, %eax
je 0x8d119
movq 0x18(%r14), %r9
testq %r9, %r9
jle 0x8d119
movq 0x98(%r15), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x8d301
movq 0x98(%r15), %rdi
callq 0xeb877
movq %rbx, %rdi
leaq 0xa1b9d(%rip), %rsi     # 0x12ea5e
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
jmp 0x8ced0
xorl %r14d, %r14d
movq 0x98(%r15), %rdi
callq 0xeaf76
testl %eax, %eax
pushq $0x2f
popq %rbp
je 0x8cf06
movq 0x90(%r15), %rdi
callq 0xeaf8a
testl %eax, %eax
je 0x8cf06
movq 0x90(%r15), %rsi
movq 0x98(%r15), %rdi
callq 0xead71
movzbl 0x34(%r15), %eax
cmpl $0x2f, %eax
jne 0x8d145
movq %rbx, %rdi
leaq 0x95551(%rip), %rsi     # 0x12246f
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
movl %r12d, %esi
callq 0xdeba7
cmpq $0x0, 0xc0(%r15)
je 0x8cf4b
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
movl %r12d, %ecx
callq 0x8de3d
movq %r14, 0x38(%rsp)
cmpq $0x0, 0xb0(%r15)
jne 0x8cf64
cmpq $0x0, 0xb8(%r15)
je 0x8cf88
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x8de3d
cmpq $0x0, 0xb0(%r15)
jne 0x8cfa7
cmpq $0x0, 0xb8(%r15)
jne 0x8cfa7
cmpq $0x0, 0xc0(%r15)
jne 0x8cfa7
movl 0x8(%r15), %edx
movq %rbx, %rdi
leaq 0x954e2(%rip), %rsi     # 0x122482
xorl %eax, %eax
callq 0xdf05a
xorl %r14d, %r14d
xorl %ebp, %ebp
movl 0x2c(%r15), %eax
cmpq %rax, %rbp
jae 0x8d104
movq 0xa0(%r15), %r13
cmpq $0x0, 0x20(%r13,%r14)
jle 0x8d0f3
cmpl $0x0, 0x4(%r13,%r14)
jne 0x8d0f3
cmpl $0x1, 0xc(%r13,%r14)
jne 0x8d0f3
addq %r14, %r13
movq 0x10(%rsp), %rax
cmpb $0x0, 0x2(%rax)
je 0x8d061
movq %rbx, %rdi
callq 0xdfd1a
movq %rax, %r12
movq %rbx, %rdi
movq %rax, %rsi
movq %rax, 0x40(%rsp)
leaq 0xaa3b3(%rip), %rdx     # 0x1373c2
xorl %ecx, %ecx
pushq $0x2
popq %r8
callq 0xdffbd
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
pushq $0x1
popq %rcx
callq 0xe4e62
movq %rax, %r12
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq %r15, %rdx
movq %r13, %rcx
movq %rax, %r8
callq 0x8d3c2
movq %r12, %rdi
pushq $0x1
popq %r12
callq 0xe5591
movq %rbx, %rdi
movq 0x40(%rsp), %rsi
callq 0xdfd24
jmp 0x8d0f3
movl $0x1f4, %esi            # imm = 0x1F4
movq %rbx, %rdi
movl %r12d, %edx
callq 0xe59cd
movq %rax, %r12
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq %r15, %rdx
movq %r13, %rcx
movq %rax, %r8
callq 0x8d3c2
testl %eax, %eax
je 0x8d0dc
movq %rbx, %rdi
callq 0xeac74
movq %rax, %r13
movq 0x18(%r12), %rdx
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, (%rsp)
movl $0x1f4, %ecx            # imm = 0x1F4
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %r8
xorl %r9d, %r9d
callq 0xe4ced
movq %r13, %rdi
callq 0xeb877
movq %rbx, %rdi
leaq 0x7a725(%rip), %rsi     # 0x1077f5
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
jmp 0x8d0df
xorl %r13d, %r13d
movq %r12, %rdi
callq 0xe5591
movq %r13, %rdi
callq 0xeaf3c
pushq $0x1
popq %r12
incq %rbp
addq $0x50, %r14
movq 0x10(%rsp), %r13
jmp 0x8cfac
movq %rbx, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
leaq 0x8(%rsp), %rbp
movq 0x38(%rsp), %r14
movq %r14, %rdi
callq 0xe5591
movl 0x24(%rsp), %esi
movq %rbx, %rdi
callq 0xdebb7
movq 0x30(%rsp), %rax
incq %rax
cmpb $0x0, (%r13)
je 0x8c65d
jmp 0x8c5e9
movq 0x98(%r15), %rcx
movq 0x10(%rcx), %rdx
testq %rdx, %rdx
movl $0x0, %esi
cmovleq %rsi, %rdx
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x8cf14
movq 0x8(%rcx), %rdi
movl (%rdi,%rsi,4), %r9d
movl %ebp, %r8d
cmpl %eax, %r9d
je 0x8d181
pushq $0x5f
popq %r8
cmpl $0x2f, %r9d
jne 0x8d185
movl %r8d, (%rdi,%rsi,4)
incq %rsi
jmp 0x8d15e