// File: /workspace/github_c_makefile_star2_O2/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 $0xf8, %rsp
movq %r8, %r13
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl $0xd0, %esi
callq 0xdecaf
movq %rax, %rbp
leaq 0x4a64f(%rip), %rcx     # 0x13e00e
movq %rcx, 0x20(%rax)
movq %r14, 0x40(%rsp)
movq %r14, (%rax)
movq %r15, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq %r12, 0x68(%rsp)
movq %rax, 0x18(%rsp)
movq %r12, 0x18(%rax)
movl (%r13), %eax
movl %eax, 0x38(%rsp)
testb $0x4, %al
je 0xf39f1
movb $0x1, 0x7c(%rbp)
movq 0x18(%rsp), %rax
leaq 0x38(%rax), %rbx
movb $0x1, 0x58(%rbp)
movq (%r15), %rax
movq %rax, 0x38(%rbp)
movq 0x8(%r15), %rdx
movq %rdx, 0x40(%rbp)
movq 0x10(%r15), %rax
addq %rdx, %rax
movq %rax, 0x48(%rbp)
testb $0x1, 0x38(%rsp)
movq %rbp, 0x10(%rsp)
movq 0x40(%rsp), %r14
movq %rbx, 0x20(%rsp)
je 0xf3b69
movq %r13, 0x8(%rsp)
leaq 0x4a5f6(%rip), %rsi     # 0x13e034
movq %r14, %rdi
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0xdeba7
movq %rbx, %r12
pushq $0x8
popq %rbx
movq %r12, %rdi
movl %ebx, %esi
callq 0xe6a4a
movq %rax, %r15
movq %r12, %rdi
movl %ebx, %esi
callq 0xe6a4a
movq %rax, %r12
movl $0xff, %r13d
movl %r15d, %ebx
andl %r13d, %ebx
movl %r15d, %ebp
andl $0xf, %ebp
leaq 0x4a5bb(%rip), %rsi     # 0x13e047
movq %r14, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0xde9f1
movl %ebx, %edx
shrl $0x4, %edx
leaq 0x4a5aa(%rip), %rsi     # 0x13e04e
movq %r14, %rdi
xorl %eax, %eax
callq 0xde9f1
andl %r12d, %r13d
movl %r12d, %edx
andl $0x1f, %edx
leaq 0x4a59a(%rip), %rsi     # 0x13e058
movq %r14, %rdi
xorl %eax, %eax
callq 0xde9f1
movl %r12d, %edx
shrl $0x5, %edx
andl $0x1, %edx
leaq 0x4a58b(%rip), %rsi     # 0x13e063
movq %r14, %rdi
xorl %eax, %eax
callq 0xde9f1
movl %r12d, %edx
shrl $0x6, %edx
andl $0x3, %edx
leaq 0x4a57b(%rip), %rsi     # 0x13e06d
movq %r14, %rdi
xorl %eax, %eax
callq 0xde9f1
shll $0x8, %r15d
orl %r13d, %r15d
movw $0x1f, %cx
movl %r15d, %eax
xorl %edx, %edx
divw %cx
btl $0x5, %r12d
jb 0xf44b4
cmpl $0x8, %ebp
jne 0xf44b4
testw %dx, %dx
jne 0xf44b4
cmpl $0x80, %ebx
jae 0xf44b4
pushq $-0x1
popq %rsi
movq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0xdeba7
pushq $0x15
popq %rsi
movq %r14, %rdi
callq 0xe0ae9
movq 0x10(%rsp), %rbp
movq %rax, 0xc0(%rbp)
movq 0x20(%rsp), %rbx
movq 0x8(%rsp), %r13
movq 0x8(%r13), %rax
testq %rax, %rax
je 0xf3b7b
movl $0x1, 0x78(%rbp)
jmp 0xf3b96
xorl %esi, %esi
cmpb $0x0, 0x7c(%rbp)
setne %sil
shll $0xf, %esi
addl $0x8000, %esi           # imm = 0x8000
movq %r14, %rdi
callq 0xef27c
movq 0x18(%rsp), %rdx
leaq 0x40(%rdx), %rcx
movq %rcx, 0x60(%rsp)
movq %rax, 0x70(%rbp)
movq %rbp, (%rax)
leaq 0x16e1(%rip), %rcx      # 0xf5293
movq %rcx, 0x8(%rax)
movq (%rbp), %r15
leaq 0x90(%rdx), %rax
movq %rax, 0x58(%rsp)
leaq 0x98(%rdx), %rax
movq %rax, 0x30(%rsp)
addq $0xa0, %rdx
movq %rdx, 0x18(%rsp)
cmpb $0x0, 0x50(%rbp)
movl 0x30(%rbp), %eax
jne 0xf44e9
testl %eax, %eax
jne 0xf44e9
movq %rbp, %rdi
callq 0xf5ddd
testl %eax, %eax
jne 0xf44e2
movq %rbp, %rdi
callq 0xf5e7a
movq %rbx, %rdi
leaq 0xd0(%rsp), %r12
movq %r12, %rsi
pushq $0x20
popq %rdx
callq 0xe6b25
movq %rbx, %rdi
pushq $0x1
popq %r13
movl %r13d, %esi
callq 0xe6a4a
movq %rax, %rbp
movq %rbx, %rdi
pushq $0x2
popq %rsi
callq 0xe6a4a
movq %rax, %r14
movq %r15, %rdi
leaq 0x4a450(%rip), %rsi     # 0x13e09b
movq %r12, %rdx
movl %r14d, %ecx
movq %rbp, 0x78(%rsp)
movl %ebp, %r8d
xorl %eax, %eax
callq 0xde896
movq %r15, %r12
movq %r15, %rdi
movl %r13d, %esi
callq 0xdeba7
cmpl $0x2, %r14d
je 0xf3fba
cmpl $0x1, %r14d
movq 0x10(%rsp), %rbp
je 0xf3d35
testl %r14d, %r14d
movq %r12, %r15
jne 0xf4358
movq %rbx, %rdi
callq 0xe6abe
movq %rbx, %rdi
pushq $0x10
popq %r12
movl %r12d, %esi
callq 0xe6a4a
movq %rax, %r14
movq %r15, %rdi
leaq 0x4a41d(%rip), %rsi     # 0x13e0d4
movl %r14d, %edx
xorl %eax, %eax
callq 0xde9f1
movq %rbx, %rdi
movl %r12d, %esi
callq 0xe6a4a
movq %rbx, %r12
movq %rax, %rbx
movq %r15, %rdi
leaq 0x4a416(%rip), %rsi     # 0x13e0f2
movl %ebx, %edx
xorl %eax, %eax
callq 0xde9f1
xorl %r14d, %ebx
cmpl $0xffff, %ebx           # imm = 0xFFFF
jne 0xf4376
movl %r14d, %ebx
movq %r12, %rdi
callq 0xe6abe
testq %rbx, %rbx
jle 0xf4474
movq 0x40(%rbp), %rax
cmpq 0x48(%rbp), %rax
jge 0xf4391
movq 0x38(%rbp), %rdi
movq 0x60(%rsp), %rsi
callq 0xe3f2a
movq 0x70(%rbp), %rdi
movzbl %al, %esi
callq 0xef336
decq %rbx
jmp 0xf3cff
movl $0x120, %esi            # imm = 0x120
movl $0x120, %edx            # imm = 0x120
movq %r12, %r15
movq %r12, %rdi
callq 0xf8601
movq 0x30(%rsp), %rbx
movq %rax, (%rbx)
movl $0x90, %ecx
movq %r12, %rdi
movq %rax, %rsi
xorl %edx, %edx
pushq $0x8
popq %r14
movl %r14d, %r8d
callq 0xf5f56
movq (%rbx), %rsi
movq %r12, %rdi
movl $0x90, %edx
pushq $0x70
popq %rcx
pushq $0x9
popq %r8
callq 0xf5f56
movq (%rbx), %rsi
movq %r12, %rdi
movl $0x100, %edx            # imm = 0x100
pushq $0x18
popq %rcx
pushq $0x7
popq %r8
callq 0xf5f56
movq (%rbx), %rsi
movq %r12, %rdi
movl $0x118, %edx            # imm = 0x118
pushq $0x8
popq %rcx
movl %r14d, %r8d
callq 0xf5f56
movq (%rbx), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %r12, %rdi
xorl %ecx, %ecx
leaq 0x4a4de(%rip), %r8      # 0x13e2a4
callq 0xf8362
movb $0x1, %bl
testl %eax, %eax
je 0xf4476
movq %r15, %rdi
pushq $0x20
popq %r12
movq %r12, %rsi
movq %r12, %rdx
callq 0xf8601
movq 0x18(%rsp), %r14
movq %rax, (%r14)
movq %r15, %rdi
movq %rax, %rsi
xorl %edx, %edx
movq %r12, %rcx
pushq $0x5
popq %r8
callq 0xf5f56
movq (%r14), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %r15, %rdi
xorl %ecx, %ecx
leaq 0x4a4a3(%rip), %r8      # 0x13e2bd
callq 0xf8362
testl %eax, %eax
je 0xf4476
movb $0x1, %bl
cmpb $0x0, 0x50(%rbp)
jne 0xf4476
cmpl $0x0, 0x30(%rbp)
jne 0xf4476
movq %rbp, %rdi
movq 0x30(%rsp), %rsi
callq 0xf5df8
movl %eax, %r13d
cmpl $0xff, %eax
ja 0xf3e80
movq (%rbp), %rax
cmpl $0x4, (%rax)
jl 0xf3e71
movq %r15, %rdi
leaq 0x4a2d3(%rip), %rsi     # 0x13e13a
movl %r13d, %edx
xorl %eax, %eax
callq 0xde896
movq 0x70(%rbp), %rdi
movzbl %r13b, %esi
callq 0xef336
jmp 0xf3e27
cmpl $0x100, %r13d           # imm = 0x100
je 0xf4448
cmpl $0x11d, %r13d           # imm = 0x11D
ja 0xf4448
cmpl $0x108, %r13d           # imm = 0x108
ja 0xf3eb4
movl %r13d, %r14d
addl $0xffffff02, %r14d      # imm = 0xFFFFFF02
movq 0x20(%rsp), %rbx
jmp 0xf3f01
cmpl $0x11c, %r13d           # imm = 0x11C
ja 0xf3edb
leal -0x105(%r13), %esi
shrl $0x2, %esi
movl %r13d, %ebx
decl %ebx
andl $0x3, %ebx
orl $0x4, %ebx
movl %esi, %ecx
shll %cl, %ebx
addl $0x3, %ebx
jmp 0xf3eeb
cmpb $0x0, 0x7c(%rbp)
pushq $0x10
popq %rsi
pushq $0x3
popq %rbx
je 0xf3faf
movq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0xe6a4a
movq %rax, %r14
addl %ebx, %r14d
movq %r12, %rbx
movq %rbp, %rdi
movq 0x18(%rsp), %rsi
callq 0xf5df8
movl %eax, %r12d
cmpl $0x4, %eax
jb 0xf3f6f
cmpl $0x1e, %r12d
jb 0xf3f28
cmpl $0x1f, %r12d
ja 0xf3f4c
cmpb $0x0, 0x7c(%rbp)
je 0xf3f4c
movl %r12d, %ecx
shrl %ecx
decl %ecx
andl $0x1, %r12d
orl $0x2, %r12d
shll %cl, %r12d
movq %rbx, %rdi
movl %ecx, %esi
callq 0xe6a4a
addl %r12d, %eax
movl %eax, %r12d
jmp 0xf3f6f
movq 0x18(%rbp), %rsi
movq 0x20(%rbp), %rdx
xorl %r12d, %r12d
movq %r15, %rdi
leaq 0x4a36d(%rip), %rcx     # 0x13e2ce
xorl %eax, %eax
callq 0xee823
movl $0x1, 0x30(%rbp)
movq (%rbp), %rax
cmpl $0x4, (%rax)
jl 0xf3f94
leal 0x1(%r12), %ecx
movq %r15, %rdi
leaq 0x4a1ba(%rip), %rsi     # 0x13e141
movl %r13d, %edx
movl %r14d, %r8d
xorl %eax, %eax
callq 0xde896
movq 0x70(%rbp), %rdi
notl %r12d
addl 0x10(%rdi), %r12d
movl %r12d, %esi
movl %r14d, %edx
callq 0xef363
jmp 0xf3e27
movl $0x102, %r14d           # imm = 0x102
jmp 0xf3ead
movq %r12, %r15
movq %r12, %rdi
leaq 0x3c(%rsp), %rsi
callq 0xdebae
movq 0x10(%rsp), %rbp
movq %rbp, %rdi
callq 0xf5e7a
xorps %xmm0, %xmm0
movups %xmm0, 0xbc(%rsp)
movaps %xmm0, 0xb0(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movq %rbx, %rdi
pushq $0x5
popq %r14
movl %r14d, %esi
callq 0xe6a4a
movq %rax, 0x8(%rsp)
leal 0x101(%rax), %edx
movq %r12, %rdi
leaq 0x4a14a(%rip), %rsi     # 0x13e170
movl %edx, 0x2c(%rsp)
xorl %eax, %eax
callq 0xde9f1
movq %rbx, %rdi
movl %r14d, %esi
callq 0xe6a4a
movq %rax, 0x48(%rsp)
leal 0x1(%rax), %r14d
movq %r12, %rdi
leaq 0x4a137(%rip), %rsi     # 0x13e186
movl %r14d, %edx
xorl %eax, %eax
callq 0xde9f1
movq %rbx, %rdi
pushq $0x4
popq %rsi
callq 0xe6a4a
movq %rax, %r12
addl $0x4, %r12d
movq %r15, %rdi
leaq 0x4a124(%rip), %rsi     # 0x13e199
movl %r12d, %edx
xorl %eax, %eax
callq 0xde9f1
movq %r15, %rdi
pushq $0x13
popq %rdx
movq %rdx, %rsi
callq 0xf8601
movq %rax, 0x90(%rbp)
xorl %r13d, %r13d
cmpq %r13, %r12
je 0xf40dd
movq %rbx, %rdi
pushq $0x3
popq %rsi
callq 0xe6a4a
leaq 0x4a472(%rip), %rcx     # 0x13e520
movzbl (%r13,%rcx), %ecx
movl %eax, 0x80(%rsp,%rcx,4)
cmpl $0x3, (%r15)
jl 0xf40d8
movq %r15, %rdi
leaq 0x4a0e7(%rip), %rsi     # 0x13e1b2
movl %r13d, %edx
movl %eax, %r8d
xorl %eax, %eax
callq 0xdea83
incq %r13
jmp 0xf4097
xorl %ebx, %ebx
movq 0x58(%rsp), %r12
cmpq $0x13, %rbx
je 0xf410c
movl 0x80(%rsp,%rbx,4), %ecx
testl %ecx, %ecx
je 0xf4107
movq (%r12), %rax
movq 0x10(%rax), %rsi
movq %r15, %rdi
movl %ebx, %edx
callq 0xf82ee
incq %rbx
jmp 0xf40e4
movq (%r12), %rax
movq 0x10(%rax), %rdi
callq 0xf82e9
leaq 0x4a0a6(%rip), %rcx     # 0x13e1c6
testq %rax, %rax
jle 0xf4420
movq (%r12), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %r15, %rdi
xorl %ecx, %ecx
leaq 0x4a0a3(%rip), %r8      # 0x13e1e4
callq 0xf8362
testl %eax, %eax
je 0xf4433
movl 0x2c(%rsp), %esi
movl $0x11e, %edx            # imm = 0x11E
movq %r15, %rdi
callq 0xf8601
movq 0x30(%rsp), %rcx
movq %rax, (%rcx)
movl %r14d, %esi
movq %r15, %rdi
pushq $0x20
popq %rdx
callq 0xf8601
movq 0x18(%rsp), %rcx
movq %rax, (%rcx)
xorl %r13d, %r13d
movq %r15, %rdi
leaq 0x4a077(%rip), %rsi     # 0x13e201
xorl %eax, %eax
callq 0xdea83
movq %r15, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movl $0xfffffeff, %eax       # imm = 0xFFFFFEFF
movq 0x8(%rsp), %rcx
subl %ecx, %eax
movq %rax, 0x70(%rsp)
movq 0x48(%rsp), %rax
addl %ecx, %eax
addl $0x102, %eax            # imm = 0x102
movl %eax, 0x48(%rsp)
movl $0x0, 0x8(%rsp)
xorl %r12d, %r12d
movq $0x0, 0x50(%rsp)
cmpl %r13d, 0x48(%rsp)
je 0xf439c
movl 0x2c(%rsp), %ebp
cmpl %ebp, %r13d
leaq 0x4a2a1(%rip), %rbx     # 0x13e48b
leaq 0x4a038(%rip), %rax     # 0x13e229
cmovbq %rax, %rbx
movl $0x0, %eax
cmovbl %eax, %ebp
testl %r12d, %r12d
je 0xf420a
decl %r12d
jmp 0xf42a7
movq 0x10(%rsp), %r12
movq %r12, %rdi
movq 0x58(%rsp), %rsi
callq 0xf5df8
cmpl $0x0, 0x30(%r12)
jne 0xf4433
movl %eax, %r14d
cmpl $0xf, %eax
ja 0xf4256
movl %r13d, %ecx
subl %ebp, %ecx
xorl %r12d, %r12d
movq %r15, %rdi
leaq 0x49fef(%rip), %rsi     # 0x13e231
movq %rbx, %rdx
movl %r14d, %r8d
xorl %eax, %eax
callq 0xdea83
movl %r14d, 0x8(%rsp)
jmp 0xf42a7
cmpl $0x12, %r14d
je 0xf431a
pushq $0x3
popq %rbx
movl %ebx, %esi
pushq $0x2
popq %rax
movl %eax, %r12d
cmpl $0x11, %r14d
je 0xf4326
cmpl $0x10, %r14d
jne 0xf4433
movq 0x20(%rsp), %rdi
pushq $0x2
popq %rsi
callq 0xe6a4a
movq %rax, %r12
leal 0x3(%rax), %edx
addl $0x2, %r12d
movq %r15, %rdi
leaq 0x49fa3(%rip), %rsi     # 0x13e243
xorl %eax, %eax
callq 0xdea83
cmpl $0x0, 0x8(%rsp)
je 0xf42e6
cmpl 0x2c(%rsp), %r13d
jae 0xf42f0
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rsi
movq %r15, %rdi
movl %r13d, %edx
movl 0x8(%rsp), %ecx
callq 0xf82ee
cmpl $0x100, %r13d           # imm = 0x100
jne 0xf4311
testl %eax, %eax
je 0xf4311
movb $0x1, %al
movq %rax, 0x50(%rsp)
jmp 0xf4350
movl $0x0, 0x8(%rsp)
jmp 0xf4350
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rsi
movq 0x70(%rsp), %rax
leal (%rax,%r13), %edx
movq %r15, %rdi
movl 0x8(%rsp), %ecx
callq 0xf82ee
testl %eax, %eax
jne 0xf4350
jmp 0xf4433
pushq $0x7
popq %rsi
pushq $0xb
popq %rbx
pushq $0xa
popq %rax
movl %eax, %r12d
movq 0x20(%rsp), %rdi
callq 0xe6a4a
addl %eax, %ebx
addl %eax, %r12d
movl $0x0, 0x8(%rsp)
movq %r15, %rdi
leaq 0x49f19(%rip), %rsi     # 0x13e260
movl %ebx, %edx
xorl %eax, %eax
callq 0xdea83
incl %r13d
jmp 0xf41d1
movq 0x18(%rbp), %rsi
movq 0x20(%rbp), %rdx
movq %r15, %rdi
leaq 0x49d4f(%rip), %rcx     # 0x13e0b9
movl %r14d, %r8d
xorl %eax, %eax
callq 0xee823
jmp 0xf4395
movq 0x18(%rbp), %rsi
movq 0x20(%rbp), %rdx
movq %r15, %rdi
leaq 0x49d84(%rip), %rcx     # 0x13e10c
xorl %eax, %eax
callq 0xee823
jmp 0xf4395
movb $0x1, 0x50(%rbp)
movb $0x1, %bl
jmp 0xf4476
leaq 0x49ed1(%rip), %rcx     # 0x13e274
cmpb $0x0, 0x50(%rsp)
movq 0x10(%rsp), %rbp
je 0xf4420
movq %r15, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %r15, %rdi
xorl %ecx, %ecx
leaq 0x49ec6(%rip), %r8      # 0x13e29c
callq 0xf8362
testl %eax, %eax
je 0xf4433
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %r15, %rdi
xorl %ecx, %ecx
leaq 0x49eba(%rip), %r8      # 0x13e2b5
callq 0xf8362
movl %eax, %ebx
movl 0x3c(%rsp), %esi
movq %r15, %rdi
callq 0xdebb7
testl %ebx, %ebx
movq 0x10(%rsp), %rbp
jne 0xf3e27
jmp 0xf4395
movq (%rbp), %rdi
movq 0x18(%rbp), %rsi
movq 0x20(%rbp), %rdx
xorl %eax, %eax
callq 0xee823
movl 0x3c(%rsp), %esi
movq %r15, %rdi
callq 0xdebb7
movb $0x1, %bl
movq 0x10(%rsp), %rbp
jmp 0xf4476
cmpl $0x100, %r13d           # imm = 0x100
jne 0xf4497
movq (%rbp), %rax
cmpl $0x4, (%rax)
jl 0xf4474
xorl %ebx, %ebx
movq %r15, %rdi
leaq 0x49cee(%rip), %rsi     # 0x13e154
movl $0x100, %edx            # imm = 0x100
xorl %eax, %eax
callq 0xde896
jmp 0xf4476
xorl %ebx, %ebx
movq %r15, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
testb %bl, %bl
movq 0x20(%rsp), %rbx
jne 0xf44e6
cmpl $0x0, 0x78(%rsp)
je 0xf3bde
jmp 0xf44e6
movq %r15, %rdi
leaq 0x49cbb(%rip), %rsi     # 0x13e15c
movl %r13d, %edx
xorl %eax, %eax
callq 0xde896
movl $0x1, 0x30(%rbp)
jmp 0xf4476
movq 0x10(%rsp), %rbp
movq 0x18(%rbp), %rsi
movq 0x20(%rbp), %rdx
leaq 0x49bb0(%rip), %rcx     # 0x13e078
movq 0x40(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0xee823
pushq $-0x1
popq %rsi
movq %rbx, %rdi
jmp 0xf45e9
xorl %eax, %eax
jmp 0xf44e9
movl 0x30(%rbp), %eax
testb $0x1, 0x38(%rsp)
sete %cl
movq 0x70(%rbp), %rdx
testl %eax, %eax
setne %sil
xorps %xmm0, %xmm0
movups %xmm0, (%rdx)
orb %cl, %sil
movq 0x40(%rsp), %r14
jne 0xf45aa
movq %rbx, %rdi
callq 0xe6abe
movq 0x40(%rbp), %rdx
leaq 0x49dbe(%rip), %rsi     # 0x13e2e0
movq %r14, %rdi
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0xdeba7
movq 0x40(%rbp), %rax
addq $0x4, %rax
cmpq 0x48(%rbp), %rax
jg 0xf45ca
movq 0x38(%rbp), %rdi
movq 0x60(%rsp), %rsi
callq 0xe4071
movq %rax, %rbx
leaq 0x213fa(%rip), %rsi     # 0x11595b
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0xde9f1
movq 0xc0(%rbp), %rdi
callq 0xe0e95
movl %eax, %ebp
leaq 0x214f1(%rip), %rsi     # 0x115a73
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xde9f1
cmpl %ebx, %ebp
movq 0x20(%rsp), %rbx
movq 0x10(%rsp), %rbp
jne 0xf45ca
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0xdeba7
movl 0x30(%rbp), %eax
testl %eax, %eax
je 0xf45f0
movq 0x20(%rbp), %rdx
leaq 0x49a64(%rip), %rcx     # 0x13e01d
movq %r14, %rdi
movq 0x68(%rsp), %rsi
xorl %eax, %eax
callq 0xee823
jmp 0xf4619
movq 0x18(%rbp), %rsi
movq 0x20(%rbp), %rdx
leaq 0x49d1b(%rip), %rcx     # 0x13e2f4
movq %r14, %rdi
xorl %eax, %eax
callq 0xee823
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0xdeba7
jmp 0xf4619
movq %rbx, %rdi
callq 0xe6abe
movq 0x40(%rbp), %rax
movq 0x8(%rbp), %rcx
movq 0x18(%rbp), %rdx
subq 0x8(%rcx), %rax
xorl %ecx, %ecx
testq %rax, %rax
cmovgq %rax, %rcx
movq %rcx, 0x8(%rdx)
movb $0x1, 0x4(%rdx)
movq %rbp, %rdi
callq 0xf3885
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq