// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/fmtutil-lzh.c
// Function: fmtutil_deflate_codectype1_native
static void fmtutil_deflate_codectype1_native(deark *c, struct de_dfilter_in_params *dcmpri,
	struct de_dfilter_out_params *dcmpro, struct de_dfilter_results *dres,
	void *codec_private_params)
{
	struct de_deflate_params *deflparams = (struct de_deflate_params*)codec_private_params;
	struct lzh_ctx *cctx = NULL;
	u8 is_zlib = 0;

	cctx = de_malloc(c, sizeof(struct lzh_ctx));
	cctx->modname = "deflate-native";
	cctx->c = c;
	cctx->dcmpri = dcmpri;
	cctx->dcmpro = dcmpro;
	cctx->dres = dres;

	if(deflparams->flags & DE_DEFLATEFLAG_ISZLIB) is_zlib = 1;
	if(deflparams->flags & DE_DEFLATEFLAG_DEFLATE64) cctx->is_deflate64 = 1;

	cctx->bitrd.bbll.is_lsb = 1;
	cctx->bitrd.f = dcmpri->f;
	cctx->bitrd.curpos = dcmpri->pos;
	cctx->bitrd.endpos = dcmpri->pos + dcmpri->len;

	if(is_zlib) {
		if(!lzh_read_zlib_header(c, cctx)) goto done;

		cctx->crco = de_crcobj_create(c, DE_CRCOBJ_ADLER32);
	}

	if(deflparams->ringbuf_to_use) {
		cctx->ringbuf = deflparams->ringbuf_to_use;
		cctx->ringbuf_owned_by_caller = 1;
	}
	else {
		cctx->ringbuf = de_lz77buffer_create(c, (cctx->is_deflate64 ? 65536 : 32768));
	}

	cctx->ringbuf->userdata = (void*)cctx;
	cctx->ringbuf->writebyte_cb = lzh_lz77buf_writebytecb;

	decompress_deflate_internal(cctx);

	cctx->ringbuf->userdata = NULL;
	cctx->ringbuf->writebyte_cb = NULL;

	if(!cctx->err_flag && is_zlib) {
		if(!lzh_read_zlib_trailer(c, cctx)) goto done;
	}

	if(cctx->err_flag) {
		// A default error message
		de_dfilter_set_errorf(c, dres, cctx->modname, "Deflate decoding error");
		goto done;
	}

	de_bitreader_skip_to_byte_boundary(&cctx->bitrd);
	cctx->dres->bytes_consumed = cctx->bitrd.curpos - cctx->dcmpri->pos;
	if(cctx->dres->bytes_consumed<0) {
		cctx->dres->bytes_consumed = 0;
	}
	cctx->dres->bytes_consumed_valid = 1;

done:
	destroy_lzh_ctx(cctx);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r8, %r14
movq %rcx, %rbp
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r13
movl $0xd0, %esi
callq 0xe8b2b
movq %rax, %rbx
leaq 0x4bca6(%rip), %rcx     # 0x14b4de
movq %rcx, 0x20(%rax)
movq %r13, (%rax)
movq %r15, 0x8(%rax)
movq %r12, 0x10(%rax)
movq %rbp, 0x58(%rsp)
movq %rax, 0x30(%rsp)
movq %rbp, 0x18(%rax)
movl (%r14), %ecx
testb $0x4, %cl
je 0xff861
movb $0x1, 0x7c(%rbx)
movq 0x30(%rsp), %rax
leaq 0x38(%rax), %r12
movb $0x1, 0x58(%rbx)
movq (%r15), %rax
movq %rax, 0x38(%rbx)
movq 0x8(%r15), %rdx
movq %rdx, 0x40(%rbx)
movq 0x10(%r15), %rax
addq %rdx, %rax
movq %rax, 0x48(%rbx)
testb $0x1, %cl
movq %rbx, (%rsp)
movq %r12, 0x10(%rsp)
movq %r13, 0x20(%rsp)
movl %ecx, 0x44(%rsp)
je 0xff9fd
leaq 0x4bc5a(%rip), %rsi     # 0x14b504
movq %r13, %rdi
xorl %eax, %eax
callq 0xe8617
movq %r13, %rdi
movl $0x1, %esi
callq 0xe8a15
movq %r12, %rdi
movl $0x8, %esi
callq 0xf1bed
movq %rax, %r15
movq %r12, %rdi
movl $0x8, %esi
callq 0xf1bed
movq %rax, %r12
movl $0xff, %eax
movq %r13, %rbx
movl %r15d, %r13d
andl %eax, %r13d
movl %r15d, %ebp
andl $0xf, %ebp
leaq 0x4bc1b(%rip), %rsi     # 0x14b517
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0xe87e4
movl %r13d, %edx
shrl $0x4, %edx
leaq 0x4bc09(%rip), %rsi     # 0x14b51e
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe87e4
movl %r12d, %edx
andl $0x1f, %edx
leaq 0x4bbfc(%rip), %rsi     # 0x14b528
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe87e4
movl %r12d, %edx
shrl $0x5, %edx
andl $0x1, %edx
leaq 0x4bbed(%rip), %rsi     # 0x14b533
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe87e4
movl %r12d, %edx
shrl $0x6, %edx
andl $0x3, %edx
leaq 0x4bbdd(%rip), %rsi     # 0x14b53d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe87e4
btl $0x5, %r12d
jb 0x100368
cmpl $0x8, %ebp
jne 0x100368
movl $0xff, %eax
andl %eax, %r12d
shll $0x8, %r15d
orl %r12d, %r15d
movl $0xffff, %eax           # imm = 0xFFFF
movl %r15d, %ecx
andl %eax, %ecx
imull $0x843, %ecx, %ecx      # imm = 0x843
shrl $0x10, %ecx
movl %r15d, %edx
subl %ecx, %edx
andl %eax, %edx
shrl %edx
addl %ecx, %edx
shrl $0x4, %edx
movl %edx, %eax
shll $0x5, %eax
subl %eax, %edx
addl %r15d, %edx
testw %dx, %dx
jne 0x100368
cmpl $0x80, %r13d
jae 0x100368
movq 0x20(%rsp), %r13
movq %r13, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq %r13, %rdi
movl $0x15, %esi
callq 0xeb499
movq (%rsp), %rbx
movq %rax, 0xc0(%rbx)
movq 0x10(%rsp), %r12
movq 0x8(%r14), %rax
testq %rax, %rax
je 0xffa0f
movl $0x1, 0x78(%rbx)
jmp 0xffa2a
xorl %esi, %esi
cmpb $0x0, 0x7c(%rbx)
setne %sil
shll $0xf, %esi
addl $0x8000, %esi           # imm = 0x8000
movq %r13, %rdi
callq 0xfad8f
addq $0x40, 0x30(%rsp)
movq %rax, 0x70(%rbx)
movq %rbx, (%rax)
leaq 0x17ef(%rip), %rcx      # 0x10122d
movq %rcx, 0x8(%rax)
movq (%rbx), %rbp
movq %rbp, 0x8(%rsp)
cmpb $0x0, 0x50(%rbx)
jne 0x10042f
cmpl $0x0, 0x30(%rbx)
jne 0x10042f
movq 0x10(%rbx), %rax
cmpb $0x0, 0x8(%rax)
je 0xffa76
movq 0x28(%rbx), %rcx
cmpq 0x10(%rax), %rcx
jge 0x10042f
movq %rbx, %rdi
callq 0x101ec2
movl $0x20, %edx
movq %r12, %rdi
leaq 0xb0(%rsp), %r15
movq %r15, %rsi
callq 0xf1cf3
movq %r12, %rdi
movl $0x1, %esi
callq 0xf1bed
movq %rax, %r13
movq %r12, %rdi
movl $0x2, %esi
callq 0xf1bed
movq %rax, %r14
movq %rbp, %rdi
leaq 0x4baab(%rip), %rsi     # 0x14b56b
movq %r15, %rdx
movl %r14d, %ecx
movq %r13, 0x50(%rsp)
movl %r13d, %r8d
xorl %eax, %eax
callq 0xe8617
movq %rbp, %rdi
movl $0x1, %esi
callq 0xe8a15
cmpl $0x2, %r14d
je 0xffd3a
cmpl $0x1, %r14d
je 0xffbb3
testl %r14d, %r14d
movq 0x20(%rsp), %r13
jne 0x10039b
movq %r12, %rdi
callq 0xf1c84
movq %r12, %rdi
movl $0x10, %esi
callq 0xf1bed
movq %rax, %r14
movq %rbp, %rdi
leaq 0x4ba7e(%rip), %rsi     # 0x14b5a4
movl %r14d, %edx
xorl %eax, %eax
callq 0xe87e4
movq %r12, %rdi
movl $0x10, %esi
callq 0xf1bed
movq %rax, %r15
movq %rbp, %rdi
leaq 0x4ba78(%rip), %rsi     # 0x14b5c2
movl %r15d, %edx
xorl %eax, %eax
callq 0xe87e4
xorl %r14d, %r15d
cmpl $0xffff, %r15d          # imm = 0xFFFF
jne 0x1003c2
movq %r12, %rdi
callq 0xf1c84
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
andq %rax, %r14
je 0x10034b
incq %r14
movq 0x40(%rbx), %rax
cmpq 0x48(%rbx), %rax
jge 0x100392
movq 0x38(%rbx), %rdi
movq 0x30(%rsp), %rsi
callq 0xeeb4b
movq 0x70(%rbx), %rdi
movzbl %al, %esi
callq 0xfae4e
decq %r14
cmpq $0x1, %r14
jg 0xffb7d
jmp 0x10034b
movl $0x120, %esi            # imm = 0x120
movl $0x120, %edx            # imm = 0x120
movq %rbp, %rdi
callq 0x104d0e
movq %rax, %r14
movq %rax, 0x98(%rbx)
xorl %r15d, %r15d
movq 0x20(%rsp), %r13
movq 0x10(%r14), %rsi
movq %rbp, %rdi
movl %r15d, %edx
movl $0x8, %ecx
callq 0x1049cc
testl %eax, %eax
je 0xffbff
leaq 0x1(%r15), %rax
cmpq $0x8f, %r15
movq %rax, %r15
jne 0xffbd7
movq 0x98(%rbx), %r14
movq $-0x6f, %r15
movq 0x10(%r14), %rsi
leal 0xff(%r15), %edx
movq %rbp, %rdi
movl $0x9, %ecx
callq 0x1049cc
testl %eax, %eax
je 0xffc35
leaq 0x1(%r15), %rax
testq %r15, %r15
movq %rax, %r15
jne 0xffc0d
movq 0x98(%rbx), %r14
movq $-0x17, %r15
movq 0x10(%r14), %rsi
leal 0x117(%r15), %edx
movq %rbp, %rdi
movl $0x7, %ecx
callq 0x1049cc
testl %eax, %eax
je 0xffc6b
leaq 0x1(%r15), %rax
testq %r15, %r15
movq %rax, %r15
jne 0xffc43
movq 0x98(%rbx), %r14
movq $-0x7, %r15
movq 0x10(%r14), %rsi
leal 0x11f(%r15), %edx
movq %rbp, %rdi
movl $0x8, %ecx
callq 0x1049cc
testl %eax, %eax
je 0xffca1
leaq 0x1(%r15), %rax
testq %r15, %r15
movq %rax, %r15
jne 0xffc79
movq 0x98(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %rbp, %rdi
xorl %ecx, %ecx
leaq 0x4bab8(%rip), %r8      # 0x14b774
callq 0x104a46
testl %eax, %eax
je 0x100422
movl $0x20, %esi
movl $0x20, %edx
movq %rbp, %rdi
callq 0x104d0e
movq %rax, %r14
movq %rax, 0xa0(%rbx)
xorl %r15d, %r15d
movq 0x10(%r14), %rsi
movq %rbp, %rdi
movl %r15d, %edx
movl $0x5, %ecx
callq 0x1049cc
testl %eax, %eax
je 0xffd0d
leaq 0x1(%r15), %rax
cmpq $0x1f, %r15
movq %rax, %r15
jne 0xffce8
movq 0xa0(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %rbp, %rdi
xorl %ecx, %ecx
leaq 0x4ba65(%rip), %r8      # 0x14b78d
callq 0x104a46
testl %eax, %eax
jne 0x100187
jmp 0x100422
movq %rbp, %rdi
leaq 0x2c(%rsp), %rsi
callq 0xe8a1c
movq %rbx, %rdi
callq 0x101ec2
xorps %xmm0, %xmm0
movups %xmm0, 0x9c(%rsp)
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movq %r12, %rdi
movl $0x5, %esi
callq 0xf1bed
movq %rax, 0x38(%rsp)
leal 0x101(%rax), %edx
movq %rbp, %rdi
leaq 0x4b8aa(%rip), %rsi     # 0x14b640
movl %edx, 0x1c(%rsp)
xorl %eax, %eax
callq 0xe87e4
movq %r12, %rdi
movl $0x5, %esi
callq 0xf1bed
incl %eax
movq %rbp, %rdi
leaq 0x4b89c(%rip), %rsi     # 0x14b656
movq %rax, %r13
movl %eax, %edx
xorl %eax, %eax
callq 0xe87e4
movq %r12, %rdi
movl $0x4, %esi
callq 0xf1bed
movq %rax, %r14
leal 0x4(%rax), %edx
movq %rbp, %rdi
leaq 0x4b886(%rip), %rsi     # 0x14b669
xorl %eax, %eax
callq 0xe87e4
movl $0x13, %esi
movl $0x13, %edx
movq %rbp, %rdi
callq 0x104d0e
movq %rax, 0x90(%rbx)
addl $0x4, %r14d
je 0xffe51
movl %r14d, %r15d
xorl %r14d, %r14d
movq %r12, %rdi
movl $0x3, %esi
callq 0xf1bed
leaq 0x4bbcd(%rip), %rcx     # 0x14b9f0
movzbl (%r14,%rcx), %ecx
movl %eax, 0x60(%rsp,%rcx,4)
cmpl $0x3, (%rbp)
jl 0xffe49
movq %rbp, %rdi
leaq 0x4b846(%rip), %rsi     # 0x14b682
movl %r14d, %edx
movl %eax, %r8d
xorl %eax, %eax
callq 0xe889f
incq %r14
cmpq %r14, %r15
jne 0xffe0f
xorl %r14d, %r14d
movl 0x60(%rsp,%r14,4), %ecx
testl %ecx, %ecx
je 0xffe73
movq 0x90(%rbx), %rax
movq 0x10(%rax), %rsi
movq %rbp, %rdi
movl %r14d, %edx
callq 0x1049cc
incq %r14
cmpq $0x13, %r14
jne 0xffe54
movq 0x90(%rbx), %rax
movq 0x10(%rax), %rdi
callq 0x1049c7
testq %rax, %rax
jle 0x1003b9
movq 0x90(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %rbp, %rdi
xorl %ecx, %ecx
leaq 0x4b804(%rip), %r8      # 0x14b6b4
callq 0x104a46
testl %eax, %eax
je 0x100403
movl 0x1c(%rsp), %r14d
movl %r14d, %esi
movl $0x11e, %edx            # imm = 0x11E
movq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x104d0e
movq (%rsp), %rbx
movq %rax, 0x98(%rbx)
movl %r13d, %esi
movl $0x20, %edx
movq %r15, %rdi
callq 0x104d0e
movq %rax, 0xa0(%rbx)
movq %r15, %rdi
leaq 0x4b7ce(%rip), %rsi     # 0x14b6d1
xorl %eax, %eax
callq 0xe889f
movq %r15, %rdi
movl $0x1, %esi
callq 0xe8a15
addl %r14d, %r13d
movq %r13, 0x48(%rsp)
je 0x1003dd
movq 0x38(%rsp), %rax
negl %eax
movq %rax, 0x38(%rsp)
xorl %r12d, %r12d
movb $0x1, %al
xorl %ebp, %ebp
xorl %r13d, %r13d
movl %eax, 0x40(%rsp)
movl 0x1c(%rsp), %ebx
cmpl %ebx, %r13d
leaq 0x4ba0e(%rip), %r15     # 0x14b95b
leaq 0x4b7a5(%rip), %rax     # 0x14b6f9
cmovbq %rax, %r15
movl $0x0, %eax
cmovbl %eax, %ebx
testl %r12d, %r12d
je 0xfff72
decl %r12d
movq 0x8(%rsp), %rbx
jmp 0x100010
movq (%rsp), %r12
movq 0x90(%r12), %rsi
movq %r12, %rdi
callq 0x101e47
cmpl $0x0, 0x30(%r12)
jne 0x100403
movl %eax, %r14d
cmpl $0xf, %eax
ja 0xfffc3
movl %r13d, %ecx
subl %ebx, %ecx
xorl %r12d, %r12d
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x4b750(%rip), %rsi     # 0x14b701
movq %r15, %rdx
movl %r14d, %r8d
xorl %eax, %eax
callq 0xe889f
movl %r14d, %ebp
jmp 0x100010
cmpl $0x12, %r14d
je 0x1000a0
cmpl $0x11, %r14d
je 0x10008d
cmpl $0x10, %r14d
jne 0x100403
movq 0x10(%rsp), %rdi
movl $0x2, %esi
callq 0xf1bed
movq %rax, %r12
leal 0x3(%rax), %edx
addl $0x2, %r12d
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x4b70a(%rip), %rsi     # 0x14b713
xorl %eax, %eax
callq 0xe889f
testl %ebp, %ebp
je 0x100049
cmpl 0x1c(%rsp), %r13d
jae 0x10004d
movq (%rsp), %rax
movq 0x98(%rax), %rax
movq 0x10(%rax), %rsi
movq %rbx, %rdi
movl %r13d, %edx
movl %ebp, %ecx
callq 0x1049cc
cmpl $0x100, %r13d           # imm = 0x100
jne 0x100075
testl %eax, %eax
je 0x100075
jmp 0x1000db
xorl %ebp, %ebp
jmp 0x10007d
movq (%rsp), %rax
movq 0xa0(%rax), %rax
movq 0x10(%rax), %rsi
movq 0x38(%rsp), %rax
leal (%rax,%r13), %edx
addl $0xfffffeff, %edx       # imm = 0xFFFFFEFF
movq %rbx, %rdi
movl %ebp, %ecx
callq 0x1049cc
testl %eax, %eax
je 0x100403
incl %r13d
cmpl %r13d, 0x48(%rsp)
jne 0xfff3f
jmp 0x1000f3
movl $0x2, %r12d
movl $0x3, %esi
movl $0x3, %r14d
jmp 0x1000b1
movl $0xa, %r12d
movl $0xb, %r14d
movl $0x7, %esi
movq 0x10(%rsp), %rdi
callq 0xf1bed
addl %eax, %r14d
addl %eax, %r12d
xorl %ebp, %ebp
movq 0x8(%rsp), %rdi
leaq 0x4b661(%rip), %rsi     # 0x14b730
movl %r14d, %edx
xorl %eax, %eax
callq 0xe889f
jmp 0x10007d
movl $0x101, %r13d           # imm = 0x101
xorl %eax, %eax
cmpl $0x101, 0x48(%rsp)      # imm = 0x101
jne 0xfff3b
jmp 0x1000fe
testb $0x1, 0x40(%rsp)
jne 0x1003e6
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq (%rsp), %rax
movq 0x98(%rax), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
leaq 0x4b63d(%rip), %r8      # 0x14b76c
callq 0x104a46
testl %eax, %eax
je 0x100403
movq (%rsp), %rbx
movq 0xa0(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
xorl %ecx, %ecx
leaq 0x4b625(%rip), %r8      # 0x14b785
callq 0x104a46
movl %eax, %r14d
movl 0x2c(%rsp), %esi
movq %rbp, %rdi
callq 0xe8a25
testl %r14d, %r14d
movq 0x20(%rsp), %r13
movq 0x10(%rsp), %r12
je 0x100422
cmpb $0x0, 0x50(%rbx)
jne 0x100422
cmpl $0x0, 0x30(%rbx)
jne 0x100422
movq 0x98(%rbx), %rsi
movq %rbx, %rdi
callq 0x101e47
movl %eax, %r14d
cmpl $0xff, %eax
ja 0x1001df
movq (%rbx), %rax
cmpl $0x4, (%rax)
jl 0x1001d0
movq %rbp, %rdi
leaq 0x4b444(%rip), %rsi     # 0x14b60a
movl %r14d, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x70(%rbx), %rdi
movzbl %r14b, %esi
callq 0xfae4e
jmp 0x100187
cmpl $0x100, %r14d           # imm = 0x100
je 0x100320
cmpl $0x11d, %r14d           # imm = 0x11D
ja 0x100320
cmpl $0x108, %r14d           # imm = 0x108
ja 0x10020e
movl %r14d, %r15d
addl $0xffffff02, %r15d      # imm = 0xFFFFFF02
jmp 0x10025f
cmpl $0x11c, %r14d           # imm = 0x11C
ja 0x10023a
leal -0x105(%r14), %esi
shrl $0x2, %esi
movl %r14d, %r12d
decl %r12d
andl $0x3, %r12d
orl $0x4, %r12d
movl %esi, %ecx
shll %cl, %r12d
addl $0x3, %r12d
jmp 0x10024f
cmpb $0x0, 0x7c(%rbx)
je 0x100315
movl $0x3, %r12d
movl $0x10, %esi
movq 0x10(%rsp), %rdi
callq 0xf1bed
movq %rax, %r15
addl %r12d, %r15d
movq 0xa0(%rbx), %rsi
movq %rbx, %rdi
callq 0x101e47
movl %eax, %r12d
cmpl $0x4, %eax
jb 0x1002d1
cmpl $0x1e, %r12d
jb 0x100288
cmpl $0x1f, %r12d
ja 0x1002ae
cmpb $0x0, 0x7c(%rbx)
je 0x1002ae
movl %r12d, %ecx
shrl %ecx
decl %ecx
andl $0x1, %r12d
orl $0x2, %r12d
shll %cl, %r12d
movq 0x10(%rsp), %rdi
movl %ecx, %esi
callq 0xf1bed
addl %r12d, %eax
movl %eax, %r12d
jmp 0x1002d1
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
xorl %r12d, %r12d
movq %rbp, %rdi
leaq 0x4b4db(%rip), %rcx     # 0x14b79e
xorl %eax, %eax
callq 0xfa21a
movl $0x1, 0x30(%rbx)
movq (%rbx), %rax
cmpl $0x4, (%rax)
jl 0x1002f5
leal 0x1(%r12), %ecx
movq %rbp, %rdi
leaq 0x4b329(%rip), %rsi     # 0x14b611
movl %r14d, %edx
movl %r15d, %r8d
xorl %eax, %eax
callq 0xe8617
movq 0x70(%rbx), %rdi
notl %r12d
addl 0x10(%rdi), %r12d
movl %r12d, %esi
movl %r15d, %edx
callq 0xfae7b
movq 0x10(%rsp), %r12
jmp 0x100187
movl $0x102, %r15d           # imm = 0x102
jmp 0x10025f
cmpl $0x100, %r14d           # imm = 0x100
jne 0x10056f
movq (%rbx), %rax
cmpl $0x4, (%rax)
jl 0x10034b
movq %rbp, %rdi
leaq 0x4b2e5(%rip), %rsi     # 0x14b624
movl $0x100, %edx            # imm = 0x100
xorl %eax, %eax
callq 0xe8617
movq %rbp, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
cmpl $0x0, 0x50(%rsp)
je 0xffa4a
jmp 0x10042f
movq (%rsp), %rbx
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
leaq 0x4b1cd(%rip), %rcx     # 0x14b548
movq 0x20(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0xfa21a
movq %r14, %rdi
jmp 0x100520
movb $0x1, 0x50(%rbx)
jmp 0x100422
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
leaq 0x4b1df(%rip), %rcx     # 0x14b589
movq %rbp, %rdi
movl %r14d, %r8d
xorl %eax, %eax
callq 0xfa21a
jmp 0x100422
leaq 0x4b2d6(%rip), %rcx     # 0x14b696
jmp 0x1003f1
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
leaq 0x4b20b(%rip), %rcx     # 0x14b5dc
movq %rbp, %rdi
xorl %eax, %eax
callq 0xfa21a
jmp 0x100422
leaq 0x4b360(%rip), %rcx     # 0x14b744
jmp 0x1003f1
leaq 0x4b357(%rip), %rcx     # 0x14b744
movq (%rsp), %rbx
movq (%rbx), %rdi
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
xorl %eax, %eax
callq 0xfa21a
movl 0x2c(%rsp), %esi
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0xe8a25
movq (%rsp), %rbx
movq 0x20(%rsp), %r13
movq 0x10(%rsp), %r12
movq %rbp, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
testb $0x1, 0x44(%rsp)
sete %cl
movq 0x70(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movl 0x30(%rbx), %eax
testl %eax, %eax
setne %dl
orb %cl, %dl
jne 0x1004e4
movq %r12, %rdi
callq 0xf1c84
movq 0x40(%rbx), %rdx
leaq 0x4b34c(%rip), %rsi     # 0x14b7b0
movq %r13, %rdi
xorl %eax, %eax
callq 0xe8617
movq %r13, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x40(%rbx), %rax
addq $0x4, %rax
cmpq 0x48(%rbx), %rax
jg 0x100504
movq 0x38(%rbx), %rdi
movq 0x30(%rsp), %rsi
callq 0xeed31
movq %rax, %r14
leaq 0x2267a(%rip), %rsi     # 0x122b1b
movq %r13, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0xe87e4
movq 0xc0(%rbx), %rdi
callq 0xeb865
movl %eax, %ebp
leaq 0x22770(%rip), %rsi     # 0x122c33
movq %r13, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe87e4
cmpl %r14d, %ebp
jne 0x100504
movq %r13, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movl 0x30(%rbx), %eax
testl %eax, %eax
je 0x10052c
movq 0x20(%rbx), %rdx
leaq 0x4affa(%rip), %rcx     # 0x14b4ed
movq %r13, %rdi
movq 0x58(%rsp), %rsi
xorl %eax, %eax
callq 0xfa21a
jmp 0x100555
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
leaq 0x4b2b1(%rip), %rcx     # 0x14b7c4
movq %r13, %rdi
xorl %eax, %eax
callq 0xfa21a
movq %r13, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
jmp 0x100555
movq %r12, %rdi
callq 0xf1c84
movq 0x40(%rbx), %rax
movq 0x8(%rbx), %rcx
movq 0x18(%rbx), %rdx
subq 0x8(%rcx), %rax
xorl %ecx, %ecx
testq %rax, %rax
cmovgq %rax, %rcx
movq %rcx, 0x8(%rdx)
movb $0x1, 0x4(%rdx)
movq %rbx, %rdi
callq 0xff6fb
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4b0b6(%rip), %rsi     # 0x14b62c
movq %rbp, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0xe8617
movl $0x1, 0x30(%rbx)
jmp 0x100422