// File: /workspace/github_c_makefile_star2_O1/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 0xe969b
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
movl $0x9, %edx
callq 0xeb7d1
movl %eax, (%r14)
movq 0x18(%rbx), %rax
cmpq $0x10, 0x18(%rax)
jge 0x9aaff
cmpb $0x0, 0x4(%r14)
je 0x9aae6
leaq 0x965dd(%rip), %rsi     # 0x1310b9
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe9df7
movq %rbx, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe9752
leaq 0xa0cdd(%rip), %r15     # 0x13b7e3
leaq 0x10(%rsp), %r12
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r15, %rsi
movq %rbp, %rdx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq %rbp, 0x10(%rsp)
movq $0x0, 0x8(%r14)
movl $0x28, %esi
movq %rbx, %rdi
callq 0xe969b
movq %rax, %r13
movq %rbx, %rdi
callq 0xf6870
movq %rax, 0x10(%r13)
movq %rbx, %rdi
callq 0xf6870
movq %rax, 0x18(%r13)
movq %rbx, %rdi
callq 0xf6870
movq %rax, 0x20(%r13)
movq 0x18(%rbx), %rdi
movq 0x18(%r13), %rsi
movl (%r14), %edx
movq %r12, %rcx
callq 0x9b049
testl %eax, %eax
je 0x9ac85
movq 0x18(%r13), %rdi
callq 0xf7557
movq %rbx, %rdi
leaq 0x9653c(%rip), %rsi     # 0x1310d5
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq 0x20(%r13), %rsi
movl (%r14), %edx
movq %r12, %rcx
callq 0x9b049
testl %eax, %eax
je 0x9ac85
movq 0x20(%r13), %rdi
callq 0xf7557
movq %rbx, %rdi
leaq 0x89324(%rip), %rsi     # 0x123ef5
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq 0x10(%r13), %rsi
movl $0x1, %edx
movq %r12, %rcx
callq 0x9b049
testl %eax, %eax
je 0x9ac85
movq 0x10(%r13), %rdi
callq 0xf7557
movq %rbx, %rdi
leaq 0x964da(%rip), %rsi     # 0x1310e5
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x10(%r13), %rdi
callq 0xf6883
movq 0x18(%rbx), %rdi
movq 0x10(%r13), %rsi
movl $0x1, %edx
movq %r12, %rcx
callq 0x9b049
testl %eax, %eax
je 0x9ac85
movq 0x10(%rsp), %rax
movq %rax, (%r13)
movq 0x10(%r13), %rdi
callq 0xf74bd
movq %rax, %rdi
callq 0xea786
movq %rax, 0x8(%r13)
movq %rbx, %rdi
leaq 0xaf9d6(%rip), %rsi     # 0x14a635
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq 0x8(%r13), %rcx
cmpq $0x8, %rcx
jl 0x9ac85
movq (%r13), %rdx
leaq (%rdx,%rcx), %rax
movq 0x18(%rbx), %rsi
cmpq 0x18(%rsi), %rax
jle 0x9aced
movb $0x1, 0x4(%r14)
testq %r13, %r13
je 0x9acb5
movq 0x10(%r13), %rdi
callq 0xf6bb0
movq 0x18(%r13), %rdi
callq 0xf6bb0
movq 0x20(%r13), %rdi
callq 0xf6bb0
movq %rbx, %rdi
movq %r13, %rsi
callq 0xe9752
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq 0x8(%r14), %rax
testq %rax, %rax
jle 0x9aace
leaq (%rax,%rbp), %rcx
addq $0x10, %rcx
addq %rax, %rbp
movq 0x18(%rbx), %rax
cmpq 0x18(%rax), %rcx
jle 0x9ab0d
jmp 0x9aace
subq %rbp, %rax
movq %rax, 0x8(%r14)
movq %rbx, %rdi
leaq 0x963fa(%rip), %rsi     # 0x1310f8
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq %rbx, %rdi
callq 0xea9a9
movq %rax, %r15
movq %rax, 0x8(%rsp)
movq 0x20(%r13), %rdx
movq %rbx, %rdi
movq %rax, %rsi
xorl %ecx, %ecx
callq 0xea9e4
movb $0x1, 0x8(%r15)
movl $0x70, %esi
movq %rbx, %rdi
callq 0xe969b
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 0x96052(%rip), %rsi     # 0x130db9
movq %r15, %rdx
callq 0xea5fa
movq %rbx, %rdi
movq %r15, %rsi
leaq 0xa0a67(%rip), %r15     # 0x13b7e3
callq 0xe9752
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0xea9b3
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
jmp 0x9ac8a