// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/lzexe.c
// Function: de_run_lzexe
static void de_run_lzexe(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	const char *s;
	struct fmtutil_specialexe_detection_data edd;

	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, "lzexe:raw", 0xff);

	s = de_get_ext_option(c, "execomp:align");
	if(s) {
		d->final_code_alignment = de_atoi(s);
	}
	if(d->final_code_alignment != 512) {
		d->final_code_alignment = 16;
	}

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

	de_zeromem(&edd, sizeof(struct fmtutil_specialexe_detection_data));
	edd.restrict_to_fmt = DE_SPECIALEXEFMT_LZEXE;
	fmtutil_detect_execomp(c, d->host_ei, &edd);
	if(edd.detected_fmt!=DE_SPECIALEXEFMT_LZEXE) {
		de_err(c, "Not an LZEXE-compressed file");
		goto done;
	}
	de_declare_fmt(c, "LZEXE-compressed EXE");
	d->ver = (int)edd.detected_subfmt;
	de_dbg(c, "LZEXE variant: %s", get_lzexe_subfmt_name(d->ver));
	if(d->ver<=3) {
		d->can_decompress_to_exe = 1;
		d->can_decompress_to_raw = 1;
	}
	else if(d->ver==LZEXE_VER_LHARK_SFX || d->ver==LZEXE_VER_PCX2EXE) {
		d->host_ei->regCS = edd.regCS_2;
		d->host_ei->regIP = edd.regIP_2;
		d->host_ei->entry_point = d->host_ei->start_of_dos_code + d->host_ei->regCS*16 +
			d->host_ei->regIP;
		d->can_decompress_to_exe = 0;
		d->can_decompress_to_raw = 1;
	}

	if(!d->can_decompress_to_raw ||
		(d->raw_mode==0 && !d->can_decompress_to_exe))
	{
		de_err(c, "Unsupported LZEXE variant");
		goto done;
	}

	if(d->raw_mode==0xff && !d->can_decompress_to_exe) {
		de_err(c, "This LZEXE variant is not fully supported");
		de_info(c, "Note: Try \"-opt lzexe:raw\" to decompress the raw data");
		goto done;
	}

	d->guest_reloc_table = dbuf_create_membuf(c, 0, 0);
	d->dcmpr_code = dbuf_create_membuf(c, 0, 0);
	dbuf_enable_wbuffer(d->dcmpr_code);

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

	d->ephdr_pos = d->host_ei->start_of_dos_code + d->host_ei->regCS*16;
	if(d->ephdr_pos > c->infile->len) {
		d->errflag = 1;
		return;
	}
	read_special_hdr(c, d, d->ephdr_pos);
	if(d->errflag) goto done;

	// TODO? Should we do this even if raw_mode==1?
	read_reloc_tbl(c, d);
	if(d->errflag) goto done;

	do_decompress_code(c, d);
	dbuf_flush(d->dcmpr_code);
	if(d->errflag) goto done;

	if(d->raw_mode==1) {
		do_write_data_only(c, d);
	}
	else {
		do_write_dcmpr(c, d);
	}

done:

	if(d) {
		if(d->errflag && !d->errmsg_handled) {
			de_err(c, "LZEXE decompression failed");
		}

		dbuf_close(d->guest_reloc_table);
		dbuf_close(d->dcmpr_code);
		de_free(c, d->host_ei);
		de_free(c, d);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
movl $0xa8, %esi
callq 0xdecaf
movq %rax, %r14
movl $0xf0, %esi
movq %rbx, %rdi
callq 0xdecaf
movq %rax, 0x18(%r14)
leaq 0x96611(%rip), %rsi     # 0x121e9a
movq %rbx, %rdi
movl $0xff, %edx
callq 0xdfae5
movb %al, 0x10(%r14)
leaq 0x85112(%rip), %rsi     # 0x1109b3
movq %rbx, %rdi
callq 0xdfa87
testq %rax, %rax
je 0x8b8bc
movq %rax, %rdi
callq 0xdfb36
movl %eax, 0xc(%r14)
jmp 0x8b8c0
movl 0xc(%r14), %eax
cmpl $0x200, %eax            # imm = 0x200
je 0x8b8cf
movl $0x10, 0xc(%r14)
movq 0x18(%rbx), %rsi
movq 0x18(%r14), %rdx
movq %rbx, %rdi
callq 0xf8849
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
movaps %xmm0, 0x60(%r15)
movaps %xmm0, 0x50(%r15)
movaps %xmm0, 0x40(%r15)
movaps %xmm0, 0x30(%r15)
andq $0x0, 0x70(%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movb $0x1, (%r15)
movq 0x18(%r14), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0xf8a24
cmpb $0x1, 0x1(%r15)
jne 0x8b97a
leaq 0x96556(%rip), %rsi     # 0x121e85
movq %rbx, %rdi
callq 0xe07f7
movzbl 0x12(%rsp), %eax
movl %eax, (%r14)
cmpl $0xca, %eax
je 0x8ba0f
cmpl $0x2, %eax
je 0x8b9eb
cmpl $0x3, %eax
je 0x8b9fd
cmpl $0x66, %eax
je 0x8b9f4
cmpl $0x1, %eax
jne 0x8ba06
leaq 0x965f3(%rip), %rdx     # 0x121f68
jmp 0x8ba16
leaq 0x96523(%rip), %rsi     # 0x121ea4
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
cmpl $0x0, 0x4(%r14)
je 0x8b9aa
cmpl $0x0, 0x8(%r14)
jne 0x8b9aa
leaq 0x965ad(%rip), %rsi     # 0x121f4d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
movq 0x80(%r14), %rdi
callq 0xe5591
movq 0x88(%r14), %rdi
callq 0xe5591
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xded32
movq %rbx, %rdi
movq %r14, %rsi
callq 0xded32
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9657c(%rip), %rdx     # 0x121f6e
jmp 0x8ba16
leaq 0x96580(%rip), %rdx     # 0x121f7b
jmp 0x8ba16
leaq 0x96570(%rip), %rdx     # 0x121f74
jmp 0x8ba16
leaq 0x934d4(%rip), %rdx     # 0x11eee1
jmp 0x8ba16
leaq 0x96575(%rip), %rdx     # 0x121f8b
leaq 0x964a4(%rip), %rsi     # 0x121ec1
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movl (%r14), %eax
movb $0x1, %cl
cmpl $0x4, %eax
jl 0x8ba68
cmpl $0xca, %eax
je 0x8ba41
cmpl $0x66, %eax
jne 0x8bb25
movq 0x40(%rsp), %rax
movq 0x18(%r14), %rcx
movq %rax, 0x20(%rcx)
movq 0x48(%rsp), %rdx
movq %rdx, 0x28(%rcx)
shlq $0x4, %rax
addq %rdx, %rax
addq 0x38(%rcx), %rax
movq %rax, 0x40(%rcx)
xorl %ecx, %ecx
movb %cl, 0x11(%r14)
movb $0x1, 0x12(%r14)
movzbl 0x10(%r14), %eax
cmpl $0xff, %eax
je 0x8ba8d
testl %eax, %eax
jne 0x8ba98
cmpb $0x0, 0x11(%r14)
jne 0x8ba98
jmp 0x8bb30
cmpb $0x0, 0x11(%r14)
je 0x8bb3c
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xe59cd
movq %rax, 0x80(%r14)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xe59cd
movq %rax, 0x88(%r14)
movq %rax, %rdi
callq 0xe589c
movq 0x18(%rbx), %rdi
pushq $0xa
popq %rsi
callq 0xe3fa3
movl %eax, 0x20(%r14)
movq 0x18(%rbx), %rdi
pushq $0xc
popq %rsi
callq 0xe3fa3
movl %eax, 0x24(%r14)
movq 0x18(%r14), %rax
movq 0x20(%rax), %rdx
testq %rdx, %rdx
js 0x8bd03
cmpl $0x0, 0x4(%r14)
jne 0x8b98b
shlq $0x4, %rdx
addq 0x38(%rax), %rdx
movq %rdx, 0x28(%r14)
movq 0x18(%rbx), %rax
cmpq 0x18(%rax), %rdx
jle 0x8bb63
movl $0x1, 0x4(%r14)
jmp 0x8b9d9
cmpb $0x0, 0x12(%r14)
jne 0x8ba71
leaq 0x9639c(%rip), %rsi     # 0x121ed3
jmp 0x8b981
leaq 0x963aa(%rip), %rsi     # 0x121eed
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
leaq 0x963c3(%rip), %rsi     # 0x121f17
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf37f
jmp 0x8b98b
movq %rsp, %r15
movq %rdx, (%r15)
leaq 0x96429(%rip), %rsi     # 0x121f99
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %r12
movq %rbx, %rdi
movl %r12d, %esi
callq 0xdeba7
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3fc4
movq %rax, 0x50(%r14)
leaq 0xb2417(%rip), %rsi     # 0x13dfb7
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe4038
movq %rax, 0x48(%r14)
leaq 0xa0e25(%rip), %rsi     # 0x12c9e8
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3fc4
movq %rax, 0x40(%r14)
leaq 0x84e56(%rip), %rsi     # 0x110a3c
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe4038
movq %rax, 0x38(%r14)
leaq 0x84e3a(%rip), %rsi     # 0x110a43
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3fc4
movq %rax, 0x58(%r14)
movq %rax, %rcx
shlq $0x4, %rcx
leaq 0x96380(%rip), %rsi     # 0x121fb3
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3fc4
movq %rax, 0x60(%r14)
leaq 0x96375(%rip), %rsi     # 0x121fcb
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3fc4
movq %rax, 0x68(%r14)
leaq 0x9635d(%rip), %rsi     # 0x121fd6
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
cmpl $0x1, (%r14)
jne 0x8bcd4
movq 0x18(%rbx), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0xe3fc4
movq %rax, 0x70(%r14)
leaq 0x9633c(%rip), %rsi     # 0x121fe1
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xe3fc4
movq %rax, 0x78(%r14)
leaq 0x96324(%rip), %rsi     # 0x121fec
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde896
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
cmpl $0x0, 0x4(%r14)
jne 0x8b98b
movq 0x28(%r14), %rbp
movq 0x68(%r14), %rdx
addq %rbp, %rdx
movq %rdx, 0x30(%r14)
movq 0x18(%rbx), %rax
cmpq 0x18(%rax), %rdx
jle 0x8bd10
movl $0x1, 0x4(%r14)
jmp 0x8b98b
cmpl $0x1, (%r14)
jne 0x8bd39
addq $0x19d, %rbp            # imm = 0x19D
movq 0x80(%r14), %rcx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xefc86
testl %eax, %eax
jne 0x8be27
jmp 0x8bd03
addq $0x158, %rbp            # imm = 0x158
movq %rsp, %r13
movq %rbp, (%r13)
leaq 0x962a9(%rip), %rsi     # 0x121ff7
movq %rbx, %rdi
movq %rbp, %rdx
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
xorl %r15d, %r15d
xorl %r12d, %r12d
cmpq 0x30(%r14), %rbp
jge 0x8be10
cmpl $0x10000, %r12d         # imm = 0x10000
jge 0x8be10
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xe3f2a
testb %al, %al
je 0x8bd99
movzbl %al, %r13d
jmp 0x8bdb7
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xe3fc4
movq %rax, %r13
testl %r13d, %r13d
je 0x8be04
cmpl $0x1, %r13d
je 0x8bfc2
addl %r15d, %r13d
movq %rbx, %rdi
leaq 0x96253(%rip), %rsi     # 0x122017
movl %r13d, %edx
xorl %eax, %eax
callq 0xde9f1
movq 0x80(%r14), %rdi
movl %r13d, %esi
andl $0xf, %esi
callq 0xe5f08
movq 0x80(%r14), %rdi
movl %r13d, %esi
shrl $0x4, %esi
callq 0xe5f08
incl %r12d
movq (%rsp), %rbp
movl %r13d, %r15d
movq %rsp, %r13
jmp 0x8bd6c
addl $0xfff0, %r15d          # imm = 0xFFF0
movl %r15d, %r13d
jmp 0x8bdf5
movl $0x1, 0x4(%r14)
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
pushq $0x1
popq %r12
cmpl $0x0, 0x4(%r14)
jne 0x8b98b
movq 0x28(%r14), %r15
movq 0x58(%r14), %rax
shlq $0x4, %rax
subq %rax, %r15
leaq 0x8575e(%rip), %rsi     # 0x1115a6
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
movl %r12d, %esi
callq 0xdeba7
movq %rbx, %rdi
movl $0x2000, %esi           # imm = 0x2000
callq 0xef27c
movq %rax, %r12
movq %r14, (%rax)
leaq 0x448(%rip), %rax       # 0x8c2c2
movq %rax, 0x8(%r12)
leaq 0x90(%r14), %r13
movq %r15, 0x8(%rsp)
movq %r15, 0x90(%r14)
movq %r14, %rdi
addq $0x98, %rdi
movb $0x1, 0x98(%r14)
callq 0xe6a40
cmpl $0x0, 0x4(%r14)
jne 0x8c020
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8c2d1
testb %al, %al
je 0x8bedc
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xe3f2a
movzbl %al, %esi
movq %r12, %rdi
callq 0xef336
jmp 0x8bea9
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8c2d1
testb %al, %al
je 0x8bf2e
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xe3f2a
movl %eax, %ebp
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xe3f2a
movzbl %al, %r15d
movl %r15d, %eax
shll $0x5, %eax
andl $0x1f00, %eax           # imm = 0x1F00
movzbl %bpl, %ebp
orl %eax, %ebp
xorl $0x1fff, %ebp           # imm = 0x1FFF
andl $0x7, %r15d
je 0x8bf6a
addl $0x2, %r15d
pushq $0x2
jmp 0x8bf8c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8c2d1
movl %eax, %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8c2d1
movzbl %bpl, %ecx
movzbl %al, %eax
leal (%rax,%rcx,2), %r15d
addl $0x2, %r15d
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xe3f2a
notb %al
movzbl %al, %ebp
pushq $0x1
jmp 0x8bf8c
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xe3f2a
cmpb $0x1, %al
je 0x8bea9
movzbl %al, %r15d
testl %r15d, %r15d
je 0x8bfdb
incl %r15d
pushq $0x3
popq %rdx
cmpl $0x3, (%rbx)
jl 0x8bfa9
leal 0x1(%rbp), %ecx
movq %rbx, %rdi
leaq 0x9609d(%rip), %rsi     # 0x12203c
movl %r15d, %r8d
xorl %eax, %eax
callq 0xdea83
notl %ebp
addl 0x10(%r12), %ebp
movq %r12, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0xef363
jmp 0x8bea9
leaq 0x9605a(%rip), %rsi     # 0x122023
movq %rbx, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0xde896
jmp 0x8be18
leaq 0x96051(%rip), %rsi     # 0x122033
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdea83
movq 0x88(%r14), %rdi
callq 0xe58e8
movq 0x88(%r14), %rax
movq 0x90(%r14), %rdx
subq 0x8(%rsp), %rdx
movq 0x18(%rax), %rcx
leaq 0x79c62(%rip), %rsi     # 0x105c78
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
movq %r12, %rsi
callq 0xef395
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
movq 0x88(%r14), %rdi
callq 0xe58e8
cmpl $0x0, 0x4(%r14)
jne 0x8b98b
cmpb $0x1, 0x10(%r14)
jne 0x8c081
movq 0x88(%r14), %rdi
testq %rdi, %rdi
je 0x8b98b
movq 0x18(%rdi), %rdx
leaq 0x9c46e(%rip), %rcx     # 0x1284dd
xorl %esi, %esi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xe4e0b
jmp 0x8b98b
leaq 0x95fcd(%rip), %rsi     # 0x122055
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
leaq 0x8a6d1(%rip), %rsi     # 0x116775
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xe4e62
movq %rax, %r15
movq 0x80(%r14), %rax
movq 0x18(%rax), %rdi
addq $0x1c, %rdi
movslq 0xc(%r14), %rsi
callq 0xdfbb6
movq %rax, %r12
movl $0x5a4d, %esi           # imm = 0x5A4D
movq %r15, %rdi
callq 0xe5f08
movq 0x88(%r14), %rax
movq 0x18(%rax), %rbp
leaq (%r12,%rbp), %rax
movl $0x200, %r13d           # imm = 0x200
cqto
idivq %r13
movq %r15, %rdi
movq %rdx, %rsi
callq 0xe5f08
leaq (%r12,%rbp), %rax
addq $0x1ff, %rax            # imm = 0x1FF
cqto
idivq %r13
movq %r15, %rdi
movq %rax, %rsi
callq 0xe5f08
movq 0x80(%r14), %rax
movq 0x18(%rax), %rax
pushq $0x4
popq %rcx
cqto
idivq %rcx
movq %r15, %rdi
movq %rax, %rsi
callq 0xe5f08
pushq $0x10
popq %rcx
movq %r12, %rax
cqto
idivq %rcx
movq %r15, %rdi
movq %rax, %rsi
callq 0xe5f08
movl 0x20(%r14), %eax
movl 0x24(%r14), %ecx
testl %ecx, %ecx
je 0x8c18e
movl 0x68(%r14), %edx
addl $0xf, %edx
shrl $0x4, %edx
addl 0x60(%r14), %edx
subl %edx, %eax
addl $0xfff7, %eax           # imm = 0xFFF7
movl $0xffff, %esi           # imm = 0xFFFF
andl %esi, %eax
movl $0xffff, %r13d          # imm = 0xFFFF
cmpl %esi, %ecx
je 0x8c191
subl %edx, %ecx
addl $0xfff7, %ecx           # imm = 0xFFF7
movzwl %cx, %r13d
jmp 0x8c191
xorl %r13d, %r13d
movl %eax, %esi
movq %r15, %rdi
callq 0xe5f08
movq %r15, %rdi
movq %r13, %rsi
callq 0xe5f08
movq 0x38(%r14), %rsi
movq %r15, %rdi
callq 0xe5f38
movq 0x40(%r14), %rsi
movq %r15, %rdi
callq 0xe5f08
movq %r15, %rdi
xorl %esi, %esi
callq 0xe5f08
movq 0x50(%r14), %rsi
movq %r15, %rdi
callq 0xe5f08
movq 0x48(%r14), %rsi
movq %r15, %rdi
callq 0xe5f38
pushq $0x1c
popq %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0xe5f08
movq %r15, %rdi
xorl %esi, %esi
callq 0xe5f08
movq %r15, %rdi
movq %r13, %rsi
callq 0xe5eb2
movq 0x80(%r14), %rdi
movq 0x18(%rdi), %rdx
xorl %esi, %esi
movq %r15, %rcx
callq 0xe45f4
movq %r15, %rdi
movq %r12, %rsi
callq 0xe5eb2
movq 0x88(%r14), %rdi
movq 0x18(%rdi), %rdx
xorl %esi, %esi
movq %r15, %rcx
callq 0xe45f4
movq 0x18(%r14), %rax
movq 0x50(%rax), %rcx
testq %rcx, %rcx
jle 0x8c273
movq 0x48(%rax), %rdx
leaq 0x84946(%rip), %rsi     # 0x110b97
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq 0x18(%r14), %rax
movq 0x48(%rax), %rsi
movq 0x50(%rax), %rdx
movq %r15, %rcx
callq 0xe45f4
movq %r15, %rdi
callq 0xe5591
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xdeba7
cmpl $0x0, 0x4(%r14)
jne 0x8b98b
movq %rbx, %rdi
callq 0xdf04c
jmp 0x8b98b