// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/mscompress.c
// Function: de_run_is_ibt
static void de_run_is_ibt(deark *c, de_module_params *mparams)
{
	struct ibt_ctx *d = NULL;
	i64 pos = 0;

	d = de_malloc(c, sizeof(struct ibt_ctx));
	d->input_encoding = de_get_input_encoding(c, NULL, DE_ENCODING_WINDOWS1252);

	while(1) {
		if(pos+16 > c->infile->len) break;
		de_dbg(c, "member at %"I64_FMT, pos);
		de_dbg_indent(c, 1);
		do_ibt_member(c, d, pos);
		de_dbg_indent(c, -1);
		if(d->last_member_size<=0) goto done;
		pos += d->last_member_size;
	}

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
pushq $0x10
popq %rsi
callq 0xdecaf
movq %rax, %r14
pushq $0x9
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xe08d2
movl %eax, (%r14)
pushq $0x1
popq %r15
pushq $0x28
popq %r13
leaq 0x8(%rsp), %rbp
xorl %r12d, %r12d
leaq 0x10(%r12), %rax
movq 0x18(%rbx), %rcx
cmpq 0x18(%rcx), %rax
jg 0x94ada
movq %rbx, %rdi
leaq 0x9a019(%rip), %rsi     # 0x12e86d
movq %r12, %rdx
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
movl %r15d, %esi
callq 0xdeba7
movq %r12, 0x8(%rsp)
andq $0x0, 0x8(%r14)
movq %rbx, %rdi
movq %r13, %rsi
callq 0xdecaf
movq %rax, %r15
movq %rbx, %rdi
callq 0xeac74
movq %rax, 0x10(%r15)
movq %rbx, %rdi
callq 0xeac74
movq %rax, 0x18(%r15)
movq %rbx, %rdi
callq 0xeac74
movq %rax, 0x20(%r15)
movq 0x18(%rbx), %rdi
movq 0x18(%r15), %rsi
movl (%r14), %edx
movq %rbp, %rcx
callq 0x94dcd
testl %eax, %eax
je 0x949cb
movq 0x18(%r15), %rdi
callq 0xeb877
movq %rbx, %rdi
leaq 0x8f852(%rip), %rsi     # 0x124125
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq 0x20(%r15), %rsi
movl (%r14), %edx
movq %rbp, %rcx
callq 0x94dcd
testl %eax, %eax
je 0x949cb
movq 0x20(%r15), %rdi
callq 0xeb877
movq %rbx, %rdi
leaq 0x8260a(%rip), %rsi     # 0x116f15
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x18(%rbx), %rdi
movq 0x10(%r15), %rsi
pushq $0x1
popq %r13
movl %r13d, %edx
movq %rbp, %rcx
callq 0x94dcd
testl %eax, %eax
je 0x949d5
movq 0x10(%r15), %rdi
callq 0xeb877
movq %rbx, %rdi
leaq 0x8f7ee(%rip), %rsi     # 0x124135
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x10(%r15), %rdi
callq 0xeac85
movq 0x18(%rbx), %rdi
movq 0x10(%r15), %rsi
movl %r13d, %edx
movq %rbp, %rcx
callq 0x94dcd
testl %eax, %eax
je 0x949e3
movq 0x8(%rsp), %rax
movq %rax, (%r15)
movq 0x10(%r15), %rdi
callq 0xeb7e4
movq %rax, %rdi
callq 0xdfb3b
movq %rax, 0x8(%r15)
movq %rbx, %rdi
leaq 0xa8d7d(%rip), %rsi     # 0x13d715
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq 0x8(%r15), %rcx
cmpq $0x8, %rcx
pushq $0x28
popq %r13
jl 0x949c1
movq (%r15), %rdx
leaq (%rdx,%rcx), %rax
movq 0x18(%rbx), %rsi
cmpq 0x18(%rsi), %rax
jle 0x949f1
movb $0x1, 0x4(%r14)
jmp 0x94a90
movb $0x1, 0x4(%r14)
jmp 0x94a95
movb $0x1, 0x4(%r14)
pushq $0x28
popq %r13
jmp 0x94a95
movb $0x1, 0x4(%r14)
pushq $0x28
popq %r13
jmp 0x94a90
subq %r12, %rax
movq %rax, 0x8(%r14)
movq %rbx, %rdi
leaq 0x8f746(%rip), %rsi     # 0x124148
xorl %eax, %eax
callq 0xde896
movq %rbx, %rdi
pushq $0x1
popq %rsi
callq 0xdeba7
movq %rbx, %rdi
callq 0xdfd1a
movq %rax, %rbp
movq %rax, 0x10(%rsp)
movq 0x20(%r15), %rdx
movq %rbx, %rdi
movq %rax, %rsi
xorl %ecx, %ecx
callq 0xdfd55
movb $0x1, 0x8(%rbp)
movq %rbx, %rdi
pushq $0x70
popq %rsi
callq 0xdecaf
movq %rax, %rbp
movq 0x10(%rsp), %rax
movq %rax, 0x28(%rbp)
movq 0x18(%rbx), %rcx
movq (%r15), %r8
movq 0x8(%r15), %r9
movq %rbx, %rdi
leaq 0x8f3a4(%rip), %rsi     # 0x123e09
movq %rbp, %rdx
callq 0xdf9b8
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xded32
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0xdfd24
movq %rbx, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
leaq 0x8(%rsp), %rbp
movq 0x10(%r15), %rdi
callq 0xeaf3c
movq 0x18(%r15), %rdi
callq 0xeaf3c
movq 0x20(%r15), %rdi
callq 0xeaf3c
movq %rbx, %rdi
movq %r15, %rsi
callq 0xded32
movq %rbx, %rdi
pushq $-0x1
popq %rsi
callq 0xdeba7
movq 0x8(%r14), %rax
addq %rax, %r12
testq %rax, %rax
pushq $0x1
popq %r15
jg 0x94837
cmpb $0x0, 0x4(%r14)
je 0x94af2
leaq 0x8f621(%rip), %rsi     # 0x124109
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
movq %rbx, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xded32