// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/flif.c
// Function: de_run_flif
static void de_run_flif(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 pos;
	i64 bytes_consumed;

	d = de_malloc(c, sizeof(lctx));

	pos = 0;

	if(!do_read_header(c, d, pos, &bytes_consumed)) goto done;
	pos += bytes_consumed;


	if(!do_read_metadata(c, d, pos, &bytes_consumed)) goto done;
	pos += bytes_consumed;

	if(!do_second_header(c, d, pos, &bytes_consumed)) goto done;

done:
	de_free(c, d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movl $0x30, %esi
callq 0xe8b2b
movq %rax, %r14
leaq 0xeb3f5(%rip), %rsi     # 0x1396ee
movq %rbx, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rdi
movl $0x4, %esi
callq 0xeead3
movl %eax, %ebp
shrb $0x4, %al
movzbl %al, %edx
leal -0x3(%rdx), %eax
cmpl $0x3, %eax
ja 0x4e362
leaq 0xd0961(%rip), %rcx     # 0x11ec98
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, (%r14)
jmp 0x4e373
movl $0x1, 0x4(%r14)
jmp 0x4e373
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, (%r14)
jmp 0x4e373
leaq 0xd0956(%rip), %rsi     # 0x11ecbf
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8faa
movl (%r14), %edx
leaq 0xd0967(%rip), %rsi     # 0x11ece4
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movl 0x4(%r14), %edx
leaq 0xd0961(%rip), %rsi     # 0x11ecf3
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
andb $0xf, %bpl
movzbl %bpl, %edx
movq %rdx, 0x8(%r14)
leaq 0xd0951(%rip), %rsi     # 0x11ed00
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movl $0x5, %esi
callq 0xeead3
movzbl %al, %r15d
cmpb $0x30, %r15b
jne 0x4e3da
leaq 0xd093f(%rip), %rsi     # 0x11ed17
jmp 0x4e409
addb $-0x31, %al
cmpb $0x1, %al
ja 0x4e402
leal -0x30(%r15), %ecx
movq %rcx, 0x10(%r14)
leaq 0xe7f2d(%rip), %rdx     # 0x13631c
leaq 0x10(%rsp), %rdi
movl $0x50, %esi
xorl %eax, %eax
callq 0xe8193
jmp 0x4e418
leaq 0xddd48(%rip), %rsi     # 0x12c151
leaq 0x10(%rsp), %rdi
movl $0x50, %edx
callq 0xe8219
leaq 0xd08ff(%rip), %rsi     # 0x11ed1e
leaq 0x10(%rsp), %rcx
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe8617
leaq 0x8(%rsp), %rdx
movq %rsp, %rcx
movl $0x6, %esi
movq %rbx, %rdi
callq 0x4e606
testl %eax, %eax
je 0x4e58a
leaq 0x8(%rsp), %rdx
movq (%rdx), %rax
incq %rax
movq %rax, 0x18(%r14)
movq %rsp, %rcx
movq (%rcx), %r15
addq $0x6, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4e606
testl %eax, %eax
je 0x4e58a
movq 0x8(%rsp), %rdx
incq %rdx
movq %rdx, 0x20(%r14)
addq (%rsp), %r15
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0xe8f88
cmpl $0x0, 0x4(%r14)
je 0x4e4dc
leaq 0x8(%rsp), %rdx
movq %rsp, %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4e606
testl %eax, %eax
je 0x4e58a
movq 0x8(%rsp), %rdx
addq $0x2, %rdx
movq %rdx, 0x28(%r14)
addq (%rsp), %r15
leaq 0xc5670(%rip), %rsi     # 0x113b40
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
jmp 0x4e4e4
movq $0x1, 0x28(%r14)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0xe8a1c
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeead3
cmpb $0x20, %al
jae 0x4e5ad
leaq 0xd0843(%rip), %rsi     # 0x11ed5c
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8617
movl 0x10(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
leaq 0xd085c(%rip), %rsi     # 0x11ed92
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0xeead3
movzbl %al, %ebp
leaq 0xd0854(%rip), %rsi     # 0x11edba
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0xe8617
testb %bpl, %bpl
je 0x4e58a
leaq 0xd0830(%rip), %rsi     # 0x11edae
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0xe9295
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe8be2
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd07c7(%rip), %rsi     # 0x11ed7b
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe8617
leaq 0xfac42(%rip), %rsi     # 0x14920a
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9295
movl 0x10(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
jmp 0x4e597