// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/diet.c
// Function: de_run_diet
static void de_run_diet(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	const char *fmtn = NULL;

	d = de_malloc(c, sizeof(lctx));
	d->host_ei = de_malloc(c, sizeof(struct fmtutil_exe_info));
	d->raw_mode = (u8)de_get_ext_option_bool(c, "diet:raw", 0xff);

	fmtutil_collect_exe_info(c, c->infile, d->host_ei);

	identify_diet_fmt(c, &d->idd, 0, d->host_ei);
	switch(d->idd.fmt) {
	case FMT_DATA_100:
		fmtn = "file (v1.00)";
		break;
	case FMT_DATA_102:
		fmtn = "file (v1.02-1.20)";
		break;
	case FMT_DATA_144:
		fmtn = "file (v1.44-1.45)";
		break;
	case FMT_COM_100:
		fmtn = "COM (v1.00)";
		break;
	case FMT_COM_102:
		fmtn = "COM (v1.02-1.20)";
		break;
	case FMT_COM_144:
		fmtn = "COM (v1.44-1.45)";
		break;
	case FMT_EXE_100:
		fmtn = "EXE (v1.00)";
		break;
	case FMT_EXE_102:
		fmtn = "EXE (v1.02-1.20)";
		break;
	case FMT_EXE_144:
		if(d->idd.com2exe_flag)
			fmtn = "EXE-from-COM (v1.44)";
		else
			fmtn = "EXE (v1.44)";
		break;
	case FMT_EXE_145F:
		if(d->idd.com2exe_flag)
			fmtn = "EXE-from-COM (v1.45)";
		else
			fmtn = "EXE (v1.45)";
		break;
	default:
		break;
	}

	if(fmtn) {
		de_declare_fmtf(c, "DIET-compressed %s", fmtn);
	}

	if(d->idd.maybe_lglz) {
		de_warn(c, "This file might be LGLZ-compressed, not DIET");
	}

	if(!fmtn || !d->idd.cmpr_pos_known) {
		d->errflag = 1;
		d->need_errmsg = 1;
		goto done;
	}
	d->cmpr_pos = d->idd.cmpr_pos;

	read_header(c, d);
	if(d->errflag) goto done;

	check_diet_crc(c, d);

	check_unsupp_features(c, d);
	if(d->errflag) goto done;

	d->dcmpr_code = dbuf_create_membuf(c,
		(d->orig_len_known ? d->orig_len : MAX_DIET_DCMPR_LEN), 0x1);
	dbuf_enable_wbuffer(d->dcmpr_code);

	do_decompress_code(c, d);
	if(d->errflag) goto done;
	if(d->idd.ftype==FTYPE_DATA || d->idd.ftype==FTYPE_COM ||
		d->idd.com2exe_flag ||
		(d->idd.ftype==FTYPE_EXE && d->raw_mode==1))
	{
		write_data_or_com_file(c, d);
	}
	else if(d->idd.ftype==FTYPE_EXE && d->raw_mode!=1) {
		write_exe_file(c, d);
	}

done:
	if(d) {
		de_free(c, d->host_ei);
		if(d->need_errmsg) {
			de_err(c, "Bad or unsupported file");
		}
		dbuf_close(d->dcmpr_code);
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movl $0x80, %esi
callq 0xdecaf
movq %rax, %r14
movl $0xf0, %esi
movq %rbx, %rdi
callq 0xdecaf
movq %rax, 0x50(%r14)
leaq 0xc8411(%rip), %rsi     # 0x111406
movq %rbx, %rdi
movl $0xff, %edx
callq 0xdfae5
movb %al, 0x2c(%r14)
movq 0x18(%rbx), %rsi
movq 0x50(%r14), %rdx
movq %rbx, %rdi
callq 0xf8849
movq 0x50(%r14), %rcx
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x49fce
movl (%r14), %eax
decl %eax
cmpl $0x9, %eax
ja 0x4909e
leaq 0xc8370(%rip), %rcx     # 0x1113a8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xc83c7(%rip), %rdx     # 0x11140f
jmp 0x490ba
leaq 0xc83fb(%rip), %rdx     # 0x11144c
jmp 0x490ba
cmpb $0x0, 0xb(%r14)
leaq 0xc8462(%rip), %rax     # 0x1114c1
leaq 0xc8446(%rip), %rdx     # 0x1114ac
jmp 0x490b6
leaq 0xc83bf(%rip), %rdx     # 0x11142e
jmp 0x490ba
leaq 0xc83c8(%rip), %rdx     # 0x111440
jmp 0x490ba
leaq 0xc83f9(%rip), %rdx     # 0x11147a
jmp 0x490ba
leaq 0xc8392(%rip), %rdx     # 0x11141c
jmp 0x490ba
leaq 0xc83ca(%rip), %rdx     # 0x11145d
jmp 0x490ba
leaq 0xc83d2(%rip), %rdx     # 0x11146e
jmp 0x490ba
movb $0x1, %bpl
jmp 0x490cd
cmpb $0x0, 0xb(%r14)
leaq 0xc83f1(%rip), %rax     # 0x1114a0
leaq 0xc83d5(%rip), %rdx     # 0x11148b
cmoveq %rax, %rdx
leaq 0xc840c(%rip), %rsi     # 0x1114cd
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe0824
cmpb $0x0, 0xc(%r14)
je 0x490e5
leaq 0xc8405(%rip), %rsi     # 0x1114e0
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf05a
testb %bpl, %bpl
jne 0x49342
cmpb $0x0, 0xa(%r14)
je 0x49342
movq 0x20(%r14), %rax
movq %rax, 0x40(%r14)
andq $0x0, 0x30(%rsp)
leaq 0x3c(%rsp), %rsi
movq %rbx, %rdi
callq 0xdebae
movq %rbx, %rdi
callq 0xeac74
movq %rax, %r15
cmpb $0x0, 0x8(%r14)
je 0x491f7
movq 0x10(%r14), %rdx
leaq 0xcd08a(%rip), %rsi     # 0x1161bf
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
movq 0x10(%r14), %rax
addq $0x3, %rax
leaq 0x30(%rsp), %rsi
movq %rax, (%rsi)
movq 0x18(%rbx), %rdi
callq 0xe3f2a
movl %eax, %ebp
andb $-0x10, %al
movb %al, 0x2d(%r14)
testb %bpl, %bpl
jns 0x49183
leaq 0xc83ac(%rip), %rsi     # 0x111523
movq %r15, %rdi
callq 0xeb884
movb 0x2d(%r14), %al
testb $0x20, %al
je 0x4919a
leaq 0xc83a9(%rip), %rsi     # 0x111537
movq %r15, %rdi
callq 0xeb884
movb 0x2d(%r14), %al
testb $0x10, %al
je 0x491b1
leaq 0xc83a1(%rip), %rsi     # 0x111546
movq %r15, %rdi
callq 0xeb884
movb 0x2d(%r14), %al
movzbl %al, %r12d
movq %r15, %rdi
callq 0xeb7e4
leaq 0xd7e94(%rip), %rsi     # 0x121058
movq %rbx, %rdi
movl %r12d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
andb $0xf, %bpl
movzbl %bpl, %eax
shll $0x10, %eax
movq %rax, 0x30(%r14)
movq 0x18(%rbx), %rdi
leaq 0x30(%rsp), %rsi
callq 0xe3fc4
orq 0x30(%r14), %rax
jmp 0x4920e
cmpl $0x7, (%r14)
jne 0x4922b
movq 0x18(%rbx), %rdi
pushq $0x20
popq %rsi
callq 0xe409f
andl $0xfffff, %eax          # imm = 0xFFFFF
movq %rax, 0x30(%r14)
leaq 0xf44fc(%rip), %rsi     # 0x13d715
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movb $0x1, 0x2a(%r14)
cmpb $0x0, 0x9(%r14)
je 0x49256
movq 0x18(%rbx), %rdi
movq 0x18(%r14), %rsi
callq 0xe3fa3
movl %eax, 0x48(%r14)
leaq 0xee792(%rip), %rsi     # 0x1379dc
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
cmpb $0x0, 0x8(%r14)
je 0x492bf
movq 0x10(%r14), %rax
addq $0x8, %rax
leaq 0x30(%rsp), %r12
movq %rax, (%r12)
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xe3f2a
movzbl %al, %eax
movl %eax, %ecx
shll $0xe, %ecx
andl $0x3f0000, %ecx         # imm = 0x3F0000
movq %rcx, 0x38(%r14)
andb $0x3, %al
movb %al, 0x2e(%r14)
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xe3fc4
orq 0x38(%r14), %rax
movq %rax, 0x38(%r14)
leaq 0xbeeba(%rip), %rsi     # 0x108167
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movb $0x1, 0x2b(%r14)
cmpb $0x0, 0x2a(%r14)
jne 0x492e1
cmpl $0x1, (%r14)
jne 0x492e1
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rax
subq 0x40(%r14), %rax
movq %rax, 0x30(%r14)
movb $0x1, 0x2a(%r14)
movq %r15, %rdi
callq 0xeaf3c
movl 0x3c(%rsp), %esi
movq %rbx, %rdi
callq 0xdebb7
cmpb $0x0, 0x28(%r14)
jne 0x49349
cmpb $0x0, 0x2a(%r14)
je 0x49315
movq 0x30(%r14), %rax
addq 0x40(%r14), %rax
movq 0x18(%rbx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x49390
xorl %r15d, %r15d
movq %r15, %rdi
callq 0xe0e8d
cmpb $0x0, 0x2d(%r14)
js 0x49342
cmpb $0x0, 0x28(%r14)
jne 0x49349
cmpb $0x0, 0x2b(%r14)
je 0x493f3
movq 0x38(%r14), %rsi
jmp 0x493f8
movw $0x101, 0x28(%r14)      # imm = 0x101
movq 0x50(%r14), %rsi
movq %rbx, %rdi
callq 0xded32
cmpb $0x0, 0x29(%r14)
je 0x4936d
leaq 0xc2b3c(%rip), %rsi     # 0x10be9f
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
movq 0x58(%r14), %rdi
callq 0xe5591
movq %rbx, %rdi
movq %r14, %rsi
callq 0xded32
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x21
popq %rsi
movq %rbx, %rdi
callq 0xe0ae9
movq %rax, %r15
movq 0x18(%rbx), %rsi
movq 0x30(%r14), %rcx
movq 0x40(%r14), %rdx
movq %rax, %rdi
callq 0xe0f33
movq %r15, %rdi
callq 0xe0e95
movl %eax, %ebp
leaq 0xbee94(%rip), %rsi     # 0x108257
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movl 0x48(%r14), %edx
cmpl %edx, %ebp
je 0x49318
leaq 0xc817d(%rip), %rsi     # 0x11155f
movq %rbx, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0xdf05a
jmp 0x49318
movl $0x400000, %esi         # imm = 0x400000
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0xe59cd
movq %rax, 0x58(%r14)
movq %rax, %rdi
callq 0xe589c
movq 0x40(%r14), %rdx
movq 0x30(%r14), %rax
addq %rdx, %rax
movq 0x18(%rbx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x4942b
movw $0x101, 0x28(%r14)      # imm = 0x101
leaq 0xc8174(%rip), %rsi     # 0x1115a6
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
movq %rbx, %rdi
movl $0x2000, %esi           # imm = 0x2000
callq 0xef27c
movq %rax, %r12
movq %r14, (%rax)
leaq 0xf87(%rip), %rax       # 0x4a3e8
movq %rax, 0x8(%r12)
movq 0x40(%r14), %rax
leaq 0x68(%r14), %rcx
movq %rcx, 0x18(%rsp)
movq %rax, 0x68(%r14)
movq %r14, %rdi
addq $0x70, %rdi
movb $0x1, 0x70(%r14)
callq 0xe6a40
movq %r12, 0x10(%rsp)
cmpb $0x0, 0x28(%r14)
jne 0x497c3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a3fb
testb %al, %al
je 0x494dc
movq 0x18(%rbx), %rdi
movq 0x18(%rsp), %rsi
callq 0xe3f2a
cmpl $0x4, (%rbx)
movzbl %al, %ebp
jl 0x494d0
movq %rbx, %rdi
leaq 0xc80fe(%rip), %rsi     # 0x1115c5
movl %ebp, %edx
xorl %eax, %eax
callq 0xde896
movq %r12, %rdi
movl %ebp, %esi
callq 0xef336
jmp 0x4948d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a3fb
movl %eax, %r15d
movq 0x18(%rbx), %rdi
movq 0x18(%rsp), %rsi
callq 0xe3f2a
movl %eax, %r13d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a3fb
movl %eax, %r12d
movzbl %r13b, %ebp
testb %r15b, %r15b
je 0x4952d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a3fb
movzbl %r12b, %r12d
testb %al, %al
je 0x49583
xorl $0x1ff, %ebp            # imm = 0x1FF
jmp 0x4959c
testb %r12b, %r12b
je 0x49613
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a3fb
movl %eax, %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a3fb
movl %eax, %r12d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a3fb
movzbl %r15b, %ecx
shll $0xa, %ecx
movzbl %r12b, %edx
shll $0x9, %edx
movzbl %al, %eax
shll $0x8, %eax
addl %edx, %eax
orl %ebp, %ecx
addl %eax, %ecx
movl $0x8ff, %ebp            # imm = 0x8FF
subl %ecx, %ebp
jmp 0x49624
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a3fb
testb %al, %al
je 0x49632
xorl $0x3ff, %ebp            # imm = 0x3FF
shll $0x8, %r12d
subl %r12d, %ebp
pushq $0x3
popq %r13
movq 0x10(%rsp), %r12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a3fb
testb %al, %al
jne 0x496b4
incl %r13d
cmpl $0x7, %r13d
jne 0x495ac
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a3fb
movl %eax, %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a3fb
cmpb $0x1, %r15b
jne 0x495f4
movzbl %al, %r13d
addl $0x7, %r13d
jmp 0x496b4
testb %al, %al
je 0x49670
movq 0x18(%rbx), %rdi
movq 0x18(%rsp), %rsi
callq 0xe3f2a
movzbl %al, %r13d
addl $0x11, %r13d
jmp 0x496b4
cmpb $-0x1, %r13b
je 0x4970f
notb %r13b
movzbl %r13b, %ebp
pushq $0x2
popq %r13
movq 0x10(%rsp), %r12
jmp 0x496bf
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a3fb
movl %eax, %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a3fb
movzbl %r15b, %r13d
testb %al, %al
je 0x49748
xorl $0x7ff, %ebp            # imm = 0x7FF
shll $0x9, %r12d
shll $0x8, %r13d
addl %r12d, %r13d
subl %r13d, %ebp
jmp 0x495a3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a3fb
movl %eax, %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a3fb
movl %eax, %r12d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a3fb
movzbl %r15b, %ecx
movzbl %r12b, %edx
movq 0x10(%rsp), %r12
addl %edx, %edx
leal (%rdx,%rcx,4), %ecx
movzbl %al, %eax
leal (%rax,%rcx), %r13d
addl $0x9, %r13d
cmpb $0x0, 0x28(%r14)
jne 0x497c3
cmpl $0x3, (%rbx)
jl 0x496db
leal 0x1(%rbp), %edx
movq %rbx, %rdi
leaq 0xc7f2d(%rip), %rsi     # 0x1115fe
movl %r13d, %ecx
xorl %eax, %eax
callq 0xdea83
movl %ebp, %eax
cmpq %rax, 0x60(%r14)
jle 0x497bc
incq %rax
movl %r13d, %ecx
cmpq %rcx, %rax
jb 0x497bc
notl %ebp
addl 0x10(%r12), %ebp
movq %r12, %rdi
movl %ebp, %esi
movl %r13d, %edx
callq 0xef363
jmp 0x4948d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a3fb
testb %al, %al
movq 0x10(%rsp), %r12
je 0x49a47
cmpl $0x3, 0x4(%r14)
jne 0x49a7a
movq %rbx, %rdi
leaq 0xc7e9e(%rip), %rsi     # 0x1115da
xorl %eax, %eax
callq 0xdea83
jmp 0x4948d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a3fb
movl %eax, %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a3fb
movzbl %r15b, %r15d
testb %al, %al
je 0x49789
xorl $0xfff, %ebp            # imm = 0xFFF
shll $0xa, %r12d
shll $0x9, %r13d
addl %r12d, %r13d
shll $0x8, %r15d
addl %r13d, %r15d
subl %r15d, %ebp
jmp 0x495a3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a3fb
movzbl %al, %eax
xorl $0x1fff, %ebp           # imm = 0x1FFF
shll $0xb, %r12d
shll $0xa, %r13d
addl %r12d, %r13d
shll $0x9, %r15d
shll $0x8, %eax
addl %r15d, %eax
addl %r13d, %eax
subl %eax, %ebp
jmp 0x495a3
movw $0x101, 0x28(%r14)      # imm = 0x101
movq 0x58(%r14), %rdi
callq 0xe58e8
movq %rbx, %rdi
movq %r12, %rsi
callq 0xef395
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
cmpb $0x0, 0x28(%r14)
jne 0x49349
movl 0x4(%r14), %eax
leal -0x1(%rax), %ecx
leaq 0xcceea(%rip), %rsi     # 0x1166e5
cmpl $0x2, %ecx
jae 0x4981e
cmpl $0x2, %eax
je 0x49825
cmpb $0x0, 0xb(%r14)
leaq 0xdeccc(%rip), %rax     # 0x1284dd
leaq 0xccecd(%rip), %rsi     # 0x1166e5
cmoveq %rax, %rsi
jmp 0x49825
cmpb $0x0, 0xb(%r14)
je 0x49862
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xe4e62
movq %rax, %r15
movq 0x58(%r14), %rdi
movq 0x18(%rdi), %rdx
xorl %esi, %esi
movq %rax, %rcx
callq 0xe45f4
cmpl $0x2, 0x4(%r14)
jne 0x49855
movq %rbx, %rdi
callq 0xdf04c
movq %r15, %rdi
callq 0xe5591
jmp 0x49349
cmpl $0x3, %eax
jne 0x49349
cmpb $0x1, 0x2c(%r14)
jne 0x4987b
leaq 0xdec64(%rip), %rsi     # 0x1284dd
jmp 0x49825
leaq 0x4c(%rsp), %rsi
movq %rbx, %rdi
callq 0xdebae
cmpq $0x0, 0x58(%r14)
je 0x49a95
movl $0x118, %esi            # imm = 0x118
movq %rbx, %rdi
callq 0xdecaf
movq %rax, %rbp
leaq 0xc7d68(%rip), %rsi     # 0x111612
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
pushq $0x1c
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xe59cd
movq %rax, %r15
cmpb $0x0, 0x28(%r14)
jne 0x49a9d
movl (%r14), %eax
addl $-0x7, %eax
cmpl $0x3, %eax
ja 0x49d08
movq %r15, 0x20(%rsp)
movq %rbp, 0x8(%rsp)
movl %eax, %eax
leaq 0xc7ec9(%rip), %rcx     # 0x1117c8
movq 0x18(%rbx), %rdi
movq 0x50(%r14), %rdx
movq 0x40(%rdx), %rsi
addq (%rcx,%rax,8), %rsi
callq 0xe3fa3
movq %rax, %r13
shlq $0x4, %r13
leaq 0xc7d35(%rip), %rsi     # 0x111657
movq %rbx, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0xde896
cmpl $0x7, (%r14)
jne 0x49ae2
leaq 0x3c(%rsp), %rsi
movq %rbx, %rdi
callq 0xdebae
leaq 0xc7d7b(%rip), %rsi     # 0x1116c8
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
movq 0x30(%r14), %r15
addq 0x40(%r14), %r15
leaq 0xc7d80(%rip), %rsi     # 0x1116f1
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe404f
movl $0xd1edfeca, %ecx       # imm = 0xD1EDFECA
cmpq %rcx, %rax
jne 0x49c32
movq 0x50(%r14), %rax
movq 0x48(%rax), %rdi
subq %r15, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
callq 0xdfb45
movq %rax, %r12
movq 0x18(%rbx), %rdi
leaq 0xc7d49(%rip), %rsi     # 0x111704
pushq $0x4
popq %rdx
leaq 0x30(%rsp), %r9
movq %r15, %rcx
movq %rax, %r8
callq 0xe62f1
movl %eax, 0x10(%rsp)
testl %eax, %eax
je 0x49b50
movq 0x30(%rsp), %rbp
leaq 0x4(%rbp), %r12
movq %r12, %rcx
subq %r15, %rcx
movq 0x50(%r14), %rax
movq 0x48(%rax), %r8
subq %r12, %r8
leaq 0xc7d13(%rip), %rsi     # 0x11170e
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0xe3fa3
leaq 0xc7d12(%rip), %rsi     # 0x11172d
movq %rbx, %rdi
movq %rax, 0x28(%rsp)
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
addq $0x7, %rbp
movq %rbp, %rsi
callq 0xe3fa3
movq %rax, 0x18(%rsp)
jmp 0x49b88
leaq 0xc7b82(%rip), %rsi     # 0x1115d0
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdea83
movq 0x60(%r14), %rcx
movq 0x68(%r14), %rdx
subq 0x40(%r14), %rdx
leaq 0xbc20d(%rip), %rsi     # 0x105c78
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
jmp 0x497c3
leaq 0xc7b69(%rip), %rsi     # 0x1115ea
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
movb $0x1, 0x28(%r14)
jmp 0x497c3
xorl %ebp, %ebp
xorl %r12d, %r12d
xorl %r15d, %r15d
xorl %edi, %edi
callq 0xe5591
testq %r12, %r12
je 0x49ab9
movq %r12, %rdi
callq 0xe5591
movq %rbx, %rdi
callq 0xdf04c
movq %r15, %rdi
callq 0xe5591
testq %rbp, %rbp
je 0x49ad1
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xded32
movl 0x4c(%rsp), %esi
movq %rbx, %rdi
callq 0xdebb7
jmp 0x49349
cmpb $0x0, 0x2b(%r14)
movq 0x8(%rsp), %rbp
movq 0x20(%rsp), %r15
je 0x49d08
testb $0x20, 0x2d(%r14)
je 0x49d08
movq 0x38(%r14), %rax
pushq $0x10
popq %rcx
cqto
idivq %rcx
addq %r13, %rdx
movq %rdx, (%rbp)
leaq 0xc7b60(%rip), %rsi     # 0x11167c
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x58(%r14), %rdi
movq (%rbp), %rsi
callq 0xe3f46
cmpq $0x5a4d, %rax           # imm = 0x5A4D
je 0x49c5a
cmpq $0x4d5a, %rax           # imm = 0x4D5A
je 0x49c5a
jmp 0x49d08
movq 0x18(%rbx), %rdi
leaq 0xc7bae(%rip), %rsi     # 0x111709
pushq $0x4
popq %rdx
leaq 0x30(%rsp), %r9
movq %r15, %rcx
movq %r12, %r8
callq 0xe62f1
testl %eax, %eax
je 0x49c32
movq $0x0, 0x28(%rsp)
movq $0x0, 0x18(%rsp)
leaq 0xc7bc5(%rip), %rsi     # 0x111754
xorl %r12d, %r12d
movq %rbx, %rdi
movq 0x18(%rsp), %rdx
xorl %eax, %eax
callq 0xde896
cmpq $0x10, %r12
je 0x49c32
movq 0x58(%r14), %rdi
leaq (%r12,%r13), %r15
movq %r15, %rsi
callq 0xe3eb4
movzbl %al, %ebp
cmpb $0x5a, %bpl
je 0x49bc9
cmpl $0x4d, %ebp
jne 0x49c2a
movq 0x58(%r14), %rdi
leaq (%r12,%r13), %rsi
incq %rsi
callq 0xe3eb4
movzbl %al, %eax
addl %ebp, %eax
cmpl $0xa7, %eax
jne 0x49c2a
movq 0x58(%r14), %rdi
leaq (%r12,%r13), %rsi
addq $0x6, %rsi
callq 0xe3fa3
cmpq 0x18(%rsp), %rax
jne 0x49c2a
cmpl $0x0, 0x10(%rsp)
je 0x49f6a
movq 0x58(%r14), %rdi
leaq (%r12,%r13), %rsi
addq $0x18, %rsi
callq 0xe3fa3
movq 0x28(%rsp), %rcx
subq %rax, %rcx
cmpq %r12, %rcx
je 0x49f6a
incq %r12
jmp 0x49ba1
movw $0x101, 0x28(%r14)      # imm = 0x101
movl 0x3c(%rsp), %esi
movq %rbx, %rdi
callq 0xdebb7
cmpb $0x0, 0x28(%r14)
movq 0x8(%rsp), %rbp
movq 0x20(%rsp), %r15
jne 0x49d0f
movq 0x58(%r14), %rdi
movq (%rbp), %rsi
pushq $0x1c
popq %rdx
movq %r15, %rcx
callq 0xe45f4
pushq $0x3
popq %r15
movq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0xe3eb4
andb $0x1, %al
movzbl %al, %edx
movq 0x20(%rsp), %rdi
movq %r15, %rsi
movq 0x20(%rsp), %r15
callq 0xe5e13
movq %rbp, %rdx
addq $0x28, %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xf8849
movq 0x60(%rbp), %rcx
movq (%rbp), %rax
movq 0x30(%rbp), %rdx
leaq (%rax,%rcx), %rsi
subq 0x70(%rbp), %rsi
xorl %edi, %edi
testq %rsi, %rsi
cmovgq %rsi, %rdi
movq %rdi, 0x78(%rbp)
movq 0x58(%rbp), %rsi
addq %rsi, %rax
movq %rax, 0x8(%rbp)
leaq (%rsi,%rdx,4), %rdi
movq %rcx, %rax
subq %rdi, %rax
testq %rdx, %rdx
cmoveq %rcx, %rsi
cmoveq %rdx, %rax
leaq -0x1c(%rsi), %rcx
movq %rcx, 0x18(%rbp)
movq %rax, 0x20(%rbp)
cmpq $0x1c, %rsi
jl 0x49d08
testq %rax, %rax
js 0x49d08
cmpb $0x0, 0x28(%r14)
jne 0x49d0f
jmp 0x49d45
movw $0x101, 0x28(%r14)      # imm = 0x101
cmpb $0x0, 0x29(%r14)
je 0x49d3d
leaq 0xc7986(%rip), %rsi     # 0x1116a3
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
movb $0x0, 0x29(%r14)
cmpb $0x0, 0x28(%r14)
je 0x49d45
xorl %edi, %edi
xorl %r12d, %r12d
jmp 0x49a9f
xorl %r12d, %r12d
jmp 0x49a9d
leaq 0xcca29(%rip), %rsi     # 0x116775
movq $0x0, 0x18(%rsp)
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xe4e62
movq %rax, %r13
pushq $0x1c
popq %rdx
movq %r15, 0x20(%rsp)
movq %r15, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0xe45f4
movq 0x58(%r14), %rdi
movq (%rbp), %rsi
movq 0x18(%rbp), %rdx
addq $0x1c, %rsi
movq %r13, 0x40(%rsp)
movq %r13, %rcx
callq 0xe45f4
movq %rbp, 0x8(%rsp)
movq 0x30(%rbp), %rsi
movl $0x0, %eax
movq %rax, 0x28(%rsp)
testq %rsi, %rsi
je 0x49ed1
shlq $0x2, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xe59cd
movq %rax, 0x28(%rsp)
movq 0x58(%r14), %rax
movq %rax, 0x60(%rsp)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x30(%rax), %rax
leaq 0x30(%rsp), %rdx
movq %rcx, 0x50(%rsp)
movq %rcx, (%rdx)
testq %rax, %rax
movl $0x0, %r15d
movq %rax, 0x58(%rsp)
cmovgq %rax, %r15
movl $0x0, 0x10(%rsp)
movq 0x60(%rsp), %r12
subq $0x1, %r15
leaq 0x30(%rsp), %rbp
jb 0x49e78
movq %r12, %rdi
movq %rbp, %rsi
callq 0xe3fc4
movq %rax, %r13
testw %r13w, %r13w
js 0x49e36
movq %r12, %rdi
movq %rbp, %rsi
callq 0xe3fc4
movl %r13d, %ebp
jmp 0x49e54
movl %r13d, %eax
andl $0x7fff, %eax           # imm = 0x7FFF
cmpl $0xc000, %r13d          # imm = 0xC000
cmovael %r13d, %eax
addl 0x18(%rsp), %eax
movzwl %ax, %eax
movl 0x10(%rsp), %ebp
movq %rax, 0x18(%rsp)
movl %eax, %esi
movq 0x28(%rsp), %r13
movq %r13, %rdi
callq 0xe5f08
movl %ebp, 0x10(%rsp)
movl %ebp, %esi
movq %r13, %rdi
callq 0xe5f08
jmp 0x49e07
movq 0x58(%rsp), %rcx
shlq $0x2, %rcx
movq 0x30(%rsp), %rax
subq 0x50(%rsp), %rax
testb $0x20, 0x2d(%r14)
cmoveq %rcx, %rax
movq 0x8(%rsp), %r15
movq %rax, 0x10(%r15)
movq 0x30(%r15), %rdx
shlq $0x2, %rdx
movq 0x28(%rsp), %rdi
xorl %esi, %esi
movq 0x40(%rsp), %r12
movq %r12, %rcx
callq 0xe45f4
movq 0x58(%r14), %rdi
movq 0x10(%r15), %rsi
movq 0x20(%r15), %rdx
addq 0x8(%r15), %rsi
movq %r12, %rcx
callq 0xe45f4
movq 0x58(%r14), %rdi
movq 0x8(%rsp), %rax
movq (%rax), %rdx
xorl %esi, %esi
movq 0x40(%rsp), %rcx
callq 0xe45f4
movq 0x50(%r14), %rax
movq 0x50(%rax), %rcx
testq %rcx, %rcx
jle 0x49f17
movq 0x8(%rsp), %rdx
cmpq $0x0, 0x78(%rdx)
movq 0x48(%rax), %rdx
jle 0x49f28
leaq 0xc7713(%rip), %rsi     # 0x111620
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf05a
movq 0x8(%rsp), %rbp
movq 0x20(%rsp), %r15
movq 0x40(%rsp), %r12
jmp 0x49f60
leaq 0xc6c68(%rip), %rsi     # 0x110b97
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq 0x50(%r14), %rax
movq 0x48(%rax), %rsi
movq 0x50(%rax), %rdx
movq 0x40(%rsp), %r12
movq %r12, %rcx
callq 0xe45f4
movq 0x8(%rsp), %rbp
movq 0x20(%rsp), %r15
movq 0x28(%rsp), %rdi
jmp 0x49a9f
movq 0x8(%rsp), %rax
movq %r15, (%rax)
leaq 0xc77f3(%rip), %rsi     # 0x11176c
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xde896
jmp 0x49c39