// File: /workspace/github_c_makefile_star2_O3/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
movl $0x10, %esi
callq 0xe8b2b
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
movl $0x9, %edx
callq 0xeb220
movl %eax, (%r14)
movq 0x18(%rbx), %rax
cmpq $0x10, 0x18(%rax)
jge 0x9a16a
cmpb $0x0, 0x4(%r14)
je 0x9a151
leaq 0x972b2(%rip), %rsi     # 0x1313f9
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9295
movq %rbx, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe8be2
leaq 0xa19ec(%rip), %r15     # 0x13bb5d
leaq 0x10(%rsp), %r12
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r15, %rsi
movq %rbp, %rdx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq %rbp, 0x10(%rsp)
movq $0x0, 0x8(%r14)
movl $0x28, %esi
movq %rbx, %rdi
callq 0xe8b2b
movq %rax, %r13
movq %rbx, %rdi
callq 0xf6410
movq %rax, 0x10(%r13)
movq %rbx, %rdi
callq 0xf6410
movq %rax, 0x18(%r13)
movq %rbx, %rdi
callq 0xf6410
movq %rax, 0x20(%r13)
movq 0x18(%rbx), %rdi
movq 0x18(%r13), %rsi
movl (%r14), %edx
movq %r12, %rcx
callq 0x9a6ab
testl %eax, %eax
je 0x9a2f0
movq 0x18(%r13), %rdi
callq 0xf70f6
movq %rbx, %rdi
leaq 0x97211(%rip), %rsi     # 0x131415
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq 0x20(%r13), %rsi
movl (%r14), %edx
movq %r12, %rcx
callq 0x9a6ab
testl %eax, %eax
je 0x9a2f0
movq 0x20(%r13), %rdi
callq 0xf70f6
movq %rbx, %rdi
leaq 0x89edb(%rip), %rsi     # 0x124117
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq 0x10(%r13), %rsi
movl $0x1, %edx
movq %r12, %rcx
callq 0x9a6ab
testl %eax, %eax
je 0x9a2f0
movq 0x10(%r13), %rdi
callq 0xf70f6
movq %rbx, %rdi
leaq 0x971af(%rip), %rsi     # 0x131425
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x10(%r13), %rdi
callq 0xf6423
movq 0x18(%rbx), %rdi
movq 0x10(%r13), %rsi
movl $0x1, %edx
movq %r12, %rcx
callq 0x9a6ab
testl %eax, %eax
je 0x9a2f0
movq 0x10(%rsp), %rax
movq %rax, (%r13)
movq 0x10(%r13), %rdi
callq 0xf705c
movq %rax, %rdi
callq 0xe9c2f
movq %rax, 0x8(%r13)
movq %rbx, %rdi
leaq 0xb091b(%rip), %rsi     # 0x14abe5
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x8(%r13), %rcx
cmpq $0x8, %rcx
jl 0x9a2f0
movq (%r13), %rdx
leaq (%rdx,%rcx), %rax
movq 0x18(%rbx), %rsi
cmpq 0x18(%rsi), %rax
jle 0x9a353
movb $0x1, 0x4(%r14)
movq 0x10(%r13), %rdi
callq 0xf6753
movq 0x18(%r13), %rdi
callq 0xf6753
movq 0x20(%r13), %rdi
callq 0xf6753
movq %rbx, %rdi
movq %r13, %rsi
callq 0xe8be2
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq 0x8(%r14), %rax
testq %rax, %rax
jle 0x9a139
leaq (%rax,%rbp), %rcx
addq $0x10, %rcx
addq %rax, %rbp
movq 0x18(%rbx), %rax
cmpq 0x18(%rax), %rcx
jle 0x9a178
jmp 0x9a139
subq %rbp, %rax
movq %rax, 0x8(%r14)
movq %rbx, %rdi
leaq 0x970d4(%rip), %rsi     # 0x131438
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq %rbx, %rdi
callq 0xea504
movq %rax, %r15
movq %rax, 0x8(%rsp)
movq 0x20(%r13), %rdx
movq %rbx, %rdi
movq %rax, %rsi
xorl %ecx, %ecx
callq 0xea53f
movb $0x1, 0x8(%r15)
movl $0x70, %esi
movq %rbx, %rdi
callq 0xe8b2b
movq %rax, %r15
movq 0x8(%rsp), %rax
movq %rax, 0x28(%r15)
movq 0x18(%rbx), %rcx
movq (%r13), %r8
movq 0x8(%r13), %r9
movq %rbx, %rdi
leaq 0x96d2c(%rip), %rsi     # 0x1310f9
movq %r15, %rdx
callq 0xe9aa3
movq %rbx, %rdi
movq %r15, %rsi
leaq 0xa177b(%rip), %r15     # 0x13bb5d
callq 0xe8be2
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0xea50e
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
jmp 0x9a2f5