LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/mrkite[P]regs/src/api.cc
// Function: API::setRef(std::shared_ptr<TheHandle>, std::shared_ptr<symbol::Symbol>)
void API::setRef(Handle h, std::shared_ptr<symbol::Symbol> s) {
  auto r = std::static_pointer_cast<symbol::Ref>(s);
  auto id = h->r32();
  if (id == 0) {
    r->symbol = nullptr;
  } else {
    r->symbol = lookup(id);
    r->pointer = h->r32();
    r->array = static_cast<int32_t>(h->r32());
    r->reg = h->rs();
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %r12
movq (%rdx), %r14
movq 0x8(%rdx), %rbx
testq %rbx, %rbx
je 0x1087a
movq 0x1075c(%rip), %rax     # 0x20fc8
cmpb $0x0, (%rax)
je 0x10876
incl 0x8(%rbx)
jmp 0x1087a
lock
incl 0x8(%rbx)
movq (%r15), %rdi
callq 0x9904
testl %eax, %eax
je 0x10915
movq %rsp, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x11334
movaps (%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
movq 0x30(%r14), %rdi
movups %xmm0, 0x28(%r14)
testq %rdi, %rdi
je 0x108b5
callq 0x6752
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x108c4
callq 0x6752
movq (%r15), %rdi
callq 0x9904
movl %eax, 0x38(%r14)
movq (%r15), %rdi
callq 0x9904
movl %eax, 0x3c(%r14)
movq (%r15), %rsi
movq %rsp, %rdi
callq 0x99ac
addq $0x40, %r14
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x5280
movq (%r15), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1092b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5230
jmp 0x1092b
xorps %xmm0, %xmm0
movq 0x30(%r14), %rdi
movups %xmm0, 0x28(%r14)
testq %rdi, %rdi
je 0x1092b
callq 0x6752
testq %rbx, %rbx
je 0x10938
movq %rbx, %rdi
callq 0x6752
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x10948
jmp 0x10948
movq %rax, %r14
testq %rbx, %rbx
je 0x10958
movq %rbx, %rdi
callq 0x6752
movq %r14, %rdi
callq 0x53e0
// File: /workspace/github_c_makefile_star2_O1/mrkite[P]regs/src/api.cc
// Function: API::search(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned int)
void API::search(std::string keyword, uint32_t org) {
  for (auto &s : symbols) {
    auto it = std::search(s.first.begin(), s.first.end(),
                          keyword.begin(), keyword.end(),
                          [](char a, char b) {
                            return std::toupper(a) == std::toupper(b);
                          });
    if (it != s.first.end()) {
      dumpSymbol(s.second, org);
      printf("\n");
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %edx, 0xc(%rsp)
movq 0x18(%rdi), %rax
movq %rdi, 0x20(%rsp)
leaq 0x8(%rdi), %rcx
movq %rcx, 0x30(%rsp)
cmpq %rcx, %rax
je 0x11529
movq %rsi, %rbx
movq %rsi, 0x28(%rsp)
movq 0x20(%rax), %r13
movq %rax, 0x38(%rsp)
movq 0x28(%rax), %rcx
leaq (%rcx,%r13), %rbp
movq 0x8(%rbx), %rax
testq %rcx, %rcx
sete %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
je 0x113ee
movq %r13, %r14
jmp 0x114ad
movq (%rbx), %rbx
cmpq $0x1, %rax
jne 0x1140d
movq %r13, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x11e67
movq %rax, %r14
jmp 0x114ad
movl $0x2, %ecx
subq %rax, %rcx
movq %rcx, 0x50(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x11e67
cmpq %rbp, %rax
je 0x114aa
movq %rax, %r13
incq %rax
cmpq %rbp, %rax
je 0x11488
movq %rax, 0x40(%rsp)
movq %r14, 0x48(%rsp)
movl $0x1, %r15d
movsbl (%r13,%r15), %edi
movsbl (%rbx,%r15), %r14d
callq 0x5420
movl %eax, %r12d
movl %r14d, %edi
callq 0x5420
cmpl %eax, %r12d
setne %al
jne 0x1148f
movq 0x50(%rsp), %rax
addq %r15, %rax
cmpq $0x1, %rax
je 0x1149b
leaq (%r15,%r13), %rax
incq %rax
incq %r15
cmpq %rbp, %rax
jne 0x11448
xorl %eax, %eax
movq %rbp, %r14
jmp 0x114a0
movq 0x40(%rsp), %r13
movq 0x48(%rsp), %r14
jmp 0x114a0
xorl %eax, %eax
movq %r13, %r14
testb %al, %al
jne 0x1141a
jmp 0x114ad
movq %rbp, %r14
cmpq %rbp, %r14
movq 0x28(%rsp), %rbx
movq 0x38(%rsp), %r14
je 0x11516
movq 0x40(%r14), %rax
movq %rax, 0x10(%rsp)
movq 0x48(%r14), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x114e8
movq 0xfaee(%rip), %rcx      # 0x20fc8
cmpb $0x0, (%rcx)
je 0x114e4
incl 0x8(%rax)
jmp 0x114e8
lock
incl 0x8(%rax)
movq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl 0xc(%rsp), %edx
xorl %ecx, %ecx
callq 0x11552
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1150c
callq 0x6752
movl $0xa, %edi
callq 0x52e0
movq %r14, %rdi
callq 0x51a0
cmpq 0x30(%rsp), %rax
jne 0x113c1
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1154a
callq 0x6752
movq %rbx, %rdi
callq 0x53e0
// File: /workspace/github_c_makefile_star2_O1/mrkite[P]regs/src/api.cc
// Function: API::dumpRef(std::shared_ptr<symbol::Ref>)
void API::dumpRef(std::shared_ptr<symbol::Ref> ref) {
  for (int i = 0; i < ref->pointer; i++) {
    printf("^");
  }
  printf("%s", ref->symbol->name.c_str());
  if (ref->array > 0) {
    printf("[%d]", ref->array);
  } else if (ref->array == 0) {
    printf("[]");
  }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rsi), %rax
cmpl $0x0, 0x38(%rax)
je 0x11e17
xorl %ebp, %ebp
movl $0x5e, %edi
callq 0x52e0
incl %ebp
movq (%rbx), %rax
cmpl 0x38(%rax), %ebp
jb 0x11e03
movq 0x28(%rax), %rax
movq (%rax), %rsi
leaq 0x5da5(%rip), %rdi      # 0x17bca
xorl %eax, %eax
callq 0x5060
movq (%rbx), %rax
movl 0x3c(%rax), %esi
testl %esi, %esi
jle 0x11e4a
leaq 0x5d90(%rip), %rdi      # 0x17bcd
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5060
je 0x11e53
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x5d78(%rip), %rdi      # 0x17bd2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5060
// File: /workspace/github_c_makefile_star2_O1/mrkite[P]regs/src/scanner.cc
// Function: Scanner::getAddress(unsigned int)
Handle Scanner::getAddress(uint32_t address) {
  for (auto &s : segments) {
    if (address >= s.mapped && address < s.mapped + s.length) {
      s.data->seek(address - s.mapped);
      return s.data;
    }
  }
  return nullptr;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rsi), %r14
movq 0x38(%rsi), %rax
cmpq %rax, %r14
sete %bpl
je 0x14058
movl 0x60(%r14), %ecx
movl %edx, %esi
subl %ecx, %esi
jb 0x1401a
addl 0x8(%r14), %ecx
cmpl %edx, %ecx
ja 0x14020
addq $0x68, %r14
jmp 0x13fff
movq 0x50(%r14), %rdi
callq 0x9aca
movq 0x50(%r14), %rax
movq %rax, (%rbx)
movq 0x58(%r14), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x14052
movq 0xcf84(%rip), %rcx      # 0x20fc8
cmpb $0x0, (%rcx)
je 0x1404e
incl 0x8(%rax)
jmp 0x14052
lock
incl 0x8(%rax)
testb $0x1, %bpl
je 0x1405e
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mrkite[P]regs/src/scanner.cc
// Function: Scanner::hex[abi:cxx11](unsigned int, unsigned long)
std::string Scanner::hex(uint32_t value, size_t len) {
  static const char *digits = "0123456789abcdef";
  if (len == 6) {
    std::string ret="00/0000";
    for (size_t i = 0, j = 5 << 2; i < 6; i++, j -= 4) {
      ret[i < 2 ? i : i + 1] = digits[(value >> j) & 0xf];
    }
    return ret;
  }
  std::string ret(len, '0');
  for (size_t i = 0, j = (len - 1) << 2; i < len; i++, j -= 4) {
    ret[i] = digits[(value >> j) & 0xf];
  }
  return ret;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
cmpq $0x6, %rcx
jne 0x140cc
leaq 0x32c0(%rip), %rsi      # 0x17343
leaq 0x32c0(%rip), %rdx      # 0x1734a
movq %rbx, %rdi
callq 0x6952
movl $0x14, %ecx
xorl %edx, %edx
leaq 0x3291(%rip), %rax      # 0x17331
movl %ebp, %esi
shrl %cl, %esi
andl $0xf, %esi
movb (%rsi,%rax), %sil
leaq 0x1(%rdx), %rdi
cmpq $0x2, %rdx
cmovaeq %rdi, %rdx
movq (%rbx), %r8
movb %sil, (%r8,%rdx)
addl $-0x4, %ecx
movq %rdi, %rdx
cmpq $0x6, %rdi
jne 0x140a0
jmp 0x14112
movq %rcx, %r14
movq %rbx, %rdi
movq %rcx, %rsi
movl $0x30, %edx
callq 0x5270
testq %r14, %r14
je 0x14112
leal -0x4(,%r14,4), %ecx
xorl %eax, %eax
leaq 0x323c(%rip), %rdx      # 0x17331
movl %ebp, %esi
shrl %cl, %esi
andl $0xf, %esi
movb (%rsi,%rdx), %sil
movq (%rbx), %rdi
movb %sil, (%rdi,%rax)
incq %rax
addl $-0x4, %ecx
cmpq %rax, %r14
jne 0x140f5
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mrkite[P]regs/src/scanner.cc
// Function: Scanner::getBlock(unsigned int)
std::shared_ptr<Block> Scanner::getBlock(uint32_t address) {
  auto res = std::find_if(blocks.begin(), blocks.end(),
                          [address](const std::shared_ptr<Block> n) {
                            return n->address == address;
                          });
  if (res != blocks.end()) {
    return *res;
  }
  auto block = std::make_shared<Block>(address);
  block->branchLen = 0;
  block->length = 0;
  blocks.push_back(block);
  return block;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
movq 0xb8(%rsi), %r15
movq 0xc0(%rsi), %rbx
movl %edx, 0x14(%rsp)
movl %edx, 0x4(%rsp)
movq %rbx, %rbp
subq %r15, %rbp
sarq $0x6, %rbp
testq %rbp, %rbp
jle 0x14610
incq %rbp
leaq 0x4(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x1524e
testb %al, %al
jne 0x1465c
leaq 0x10(%r15), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x1524e
testb %al, %al
jne 0x1465f
leaq 0x20(%r15), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x1524e
testb %al, %al
jne 0x1465f
leaq 0x30(%r15), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x1524e
testb %al, %al
jne 0x1465f
addq $0x40, %r15
decq %rbp
cmpq $0x1, %rbp
jg 0x145b3
movq %rbx, %rax
subq %r15, %rax
sarq $0x4, %rax
cmpq $0x1, %rax
je 0x14666
cmpq $0x2, %rax
movq 0x8(%rsp), %r12
je 0x14646
cmpq $0x3, %rax
jne 0x14684
leaq 0x4(%rsp), %rdi
movq %r15, %rsi
callq 0x1524e
testb %al, %al
jne 0x14657
addq $0x10, %r15
leaq 0x4(%rsp), %rdi
movq %r15, %rsi
callq 0x1524e
testb %al, %al
je 0x1466d
movq %r15, %r13
jmp 0x14687
movq %r15, %r13
movq 0x8(%rsp), %r12
jmp 0x14687
movq 0x8(%rsp), %r12
jmp 0x14671
addq $0x10, %r15
leaq 0x4(%rsp), %rdi
movq %r15, %rsi
callq 0x1524e
testb %al, %al
cmovneq %r15, %rbx
movq %rbx, %r13
cmpq 0xc0(%r14), %r13
je 0x146b7
movq (%r13), %rax
movq %rax, (%r12)
movq 0x8(%r13), %rax
movq %rax, 0x8(%r12)
testq %rax, %rax
je 0x1471e
movq 0xc91b(%rip), %rcx      # 0x20fc8
cmpb $0x0, (%rcx)
je 0x1471a
incl 0x8(%rax)
jmp 0x1471e
addq $0xb8, %r14
xorl %ebx, %ebx
movq %rbx, (%r12)
movl $0x50, %edi
callq 0x5220
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0xc67d(%rip), %rcx      # 0x20d60
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
movl 0x14(%rsp), %edx
movl %edx, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x40(%rax)
movq %rax, 0x8(%r12)
movq %rcx, (%r12)
movq %rbx, 0x14(%rax)
movq %r14, %rdi
movq %r12, %rsi
callq 0x153bc
jmp 0x1471e
lock
incl 0x8(%rax)
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x8(%r12), %rdi
testq %rdi, %rdi
je 0x14742
callq 0x6752
movq %r14, %rdi
callq 0x53e0
// File: /workspace/github_c_makefile_star2_O1/openshmem-org[P]openshmem-examples/c/collect32.c
// Function: main
int
main(void)
{
    int i;

    shmem_init();
    npes = shmem_n_pes();
    me = shmem_my_pe();

    for (i = 0; i < DST_SIZE; i++) {
        dst[i] = -1;
    }

    for (i = 0; i < SHMEM_BCAST_SYNC_SIZE; i += 1) {
        pSync[i] = SHMEM_SYNC_VALUE;
    }

    shmem_barrier_all();

    if (me < 4) {
        shmem_collect32(dst, src, me + 1, 0, 0, 4, pSync);
        show_dst("AFTER");
    }

    shmem_finalize();

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
callq 0x10a0
callq 0x1050
movl %eax, 0x2ecb(%rip)      # 0x4090
callq 0x1070
movl %eax, 0x2ec4(%rip)      # 0x4094
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, 0x2ec4(%rip)     # 0x40a0
movdqa %xmm0, 0x2ecc(%rip)     # 0x40b0
movdqa %xmm0, 0x2ed4(%rip)     # 0x40c0
movdqa %xmm0, 0x2edc(%rip)     # 0x40d0
movdqa %xmm0, 0x2ee4(%rip)     # 0x40e0
movdqa %xmm0, 0x2eec(%rip)     # 0x40f0
callq 0x1090
movslq 0x2e84(%rip), %rdx      # 0x4094
cmpq $0x3, %rdx
jg 0x1292
incq %rdx
leaq 0x2ed0(%rip), %rax      # 0x40f0
movq %rax, (%rsp)
leaq 0x2e75(%rip), %rbx      # 0x40a0
leaq 0x2e3e(%rip), %rsi      # 0x4070
movq %rbx, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x4, %r9d
callq 0x1080
movl 0x2e49(%rip), %edx      # 0x4094
movl 0x2e3f(%rip), %ecx      # 0x4090
leaq 0xdb2(%rip), %rdi       # 0x200a
leaq 0xda5(%rip), %rsi       # 0x2004
xorl %eax, %eax
callq 0x1030
leaq 0xdaf(%rip), %r14       # 0x201c
xorl %r15d, %r15d
movl (%r15,%rbx), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1030
addq $0x4, %r15
cmpq $0x50, %r15
jne 0x1270
movl $0xa, %edi
callq 0x1040
callq 0x1060
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/tools/designer/designer.cpp
// Function: Designer::TimerProc()
void Designer::TimerProc()
{
	Designer_EditComponent	*object;
	Bool			 mouseOnWindow = False;

	for (Int i = 0; i < dlgs.Length(); i++)
	{
		object = dlgs.GetNth(i);

		Point	 mousePos = object->GetWindow()->GetMousePosition();

		if (mousePos.x > 0 && mousePos.y > 0 && mousePos.x < object->GetWindow()->GetWidth() && mousePos.y < object->GetWindow()->GetHeight())
		{
			mouseOnWindow = True;

			break;
		}
	}

	if (!mouseOnWindow && (statusbar->GetText() != "Ready")) statusbar->SetText("Ready");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpl $0x0, 0x668(%rdi)
jle 0x4d68
leaq 0x660(%rbx), %r14
movl $0x0, 0xc(%rsp)
xorl %ebp, %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x6154
movq (%rax), %r15
movq %r15, %rdi
callq 0x6738
movq %rax, %rdi
callq 0x4130
movq %rax, %r13
movq %rax, %r12
shrq $0x20, %r12
testl %r13d, %r13d
setg %al
testl %r12d, %r12d
setg %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x4d51
movq %r15, %rdi
callq 0x6738
cmpl %r13d, 0xb0(%rax)
jle 0x4d51
movq %r15, %rdi
callq 0x6738
cmpl %r12d, 0xb4(%rax)
jle 0x4d51
movb $0x1, %al
movl %eax, 0xc(%rsp)
xorl %eax, %eax
jmp 0x4d53
movb $0x1, %al
testb %al, %al
je 0x4d61
incl %ebp
cmpl 0x668(%rbx), %ebp
jl 0x4ceb
testb $0x1, 0xc(%rsp)
jne 0x4dbf
movq 0x5d8(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x32e8(%rip), %rsi      # 0x8067
movq %rax, %rdi
callq 0x4230
testb %al, %al
je 0x4dbf
movq 0x5d8(%rbx), %rbx
leaq 0x32ce(%rip), %rsi      # 0x8067
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x4340
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0xa0(%rax)
leaq 0x10(%rsp), %rdi
callq 0x4200
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4200
movq %rbx, %rdi
callq 0x4150
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/tools/designer/designer.cpp
// Function: Designer::ExitProc()
Bool Designer::ExitProc()
{
	for (Int i = 0; i < dlgs.Length(); i++)
	{
		delete dlgs.GetNth(i);
	}

	dlgs.RemoveAll();

	return True;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
leaq 0x660(%rdi), %rbx
cmpl $0x0, 0x668(%rdi)
jle 0x4f6c
movq %rdi, %r14
xorl %ebp, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x6154
movq (%rax), %rdi
testq %rdi, %rdi
je 0x4f61
movq (%rdi), %rax
callq *0x10(%rax)
incl %ebp
cmpl 0x668(%r14), %ebp
jl 0x4f49
movq %rbx, %rdi
callq 0x5586
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/tools/designer/designer.cpp
// Function: Designer::~Designer()
Designer::~Designer()
{
	timer1->Stop();

	DeleteObject(title);
	DeleteObject(wnd);
	DeleteObject(menubar);
	DeleteObject(iconbar);
	DeleteObject(statusbar);
	DeleteObject(timer1);

	delete menu_file;
	delete menu_dialog;
	delete menu_widgets;
	delete menu_widgets_add;
	delete menu_widgets_add_smooth;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x6731(%rip), %rax      # 0xb6b8
movq %rax, (%rdi)
movq 0x608(%rdi), %rdi
callq 0x41a0
movq 0x5c0(%rbx), %rdi
callq 0x43b0
movq 0x5b8(%rbx), %rdi
callq 0x43b0
movq 0x5c8(%rbx), %rdi
callq 0x43b0
movq 0x5d0(%rbx), %rdi
callq 0x43b0
movq 0x5d8(%rbx), %rdi
callq 0x43b0
movq 0x608(%rbx), %rdi
callq 0x43b0
movq 0x5e0(%rbx), %rdi
testq %rdi, %rdi
je 0x4ff0
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x5e8(%rbx), %rdi
testq %rdi, %rdi
je 0x5002
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x5f0(%rbx), %rdi
testq %rdi, %rdi
je 0x5014
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x5f8(%rbx), %rdi
testq %rdi, %rdi
je 0x5026
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x600(%rbx), %rdi
testq %rdi, %rdi
je 0x5038
movq (%rdi), %rax
callq *0x10(%rax)
leaq 0x660(%rbx), %rdi
callq 0x5542
leaq 0x628(%rbx), %rdi
callq 0x4200
movq %rbx, %rdi
popq %rbx
jmp 0x4220
movq %rax, %rdi
callq 0x557a
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/tools/designer/edit_component.cpp
// Function: Designer_EditComponent::AddObject(short)
Widget *Designer_EditComponent::AddObject(Short objid)
{
	Widget	*newobj;
	Widget	*registrar;
	Point	 pos;
	Size	 size;

	switch (objid)
	{
		case SMOOTH_BUTTON:
			registrar = wnd;

			pos.x	  = 100;
			pos.y	  = 100;
			size.cx	  = 0;
			size.cy	  = 0;

			newobj	  = new Button("Button", pos, size);

			break;
		case SMOOTH_LAYER:
			registrar = wnd;
			newobj	  = new Layer("Layer");

			break;
		case SMOOTH_MENUBAR:
			registrar = wnd;
			newobj	  = new Menubar();

			break;
		default:
			QuickMessage("Unknown object ID!", "Error", Message::Buttons::Ok, Message::Icon::Error);

			return NIL;
	}

	registrar->Add(newobj);

	objects.Add(newobj);

	return newobj;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x30(%rsp)
movq %rax, 0x28(%rsp)
cmpl $0x3, %esi
je 0x67e8
cmpl $0x2, %esi
je 0x67c5
cmpl $0x1, %esi
jne 0x6851
movq 0x5b8(%rbx), %r14
movabsq $0x6400000064, %rax     # imm = 0x6400000064
movq %rax, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
movl $0x5c8, %edi            # imm = 0x5C8
callq 0x4250
movq %rax, %r15
leaq 0x18fc(%rip), %rsi      # 0x809e
leaq 0x8(%rsp), %rdi
callq 0x4340
leaq 0x8(%rsp), %rsi
leaq 0x30(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movq %r15, %rdi
callq 0x4190
jmp 0x681a
movq 0x5b8(%rbx), %r14
movl $0x688, %edi            # imm = 0x688
callq 0x4250
movq %rax, %r15
movq %rax, %rdi
callq 0x4140
movq %r15, 0x20(%rsp)
jmp 0x6829
movq 0x5b8(%rbx), %r14
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x4250
movq %rax, %r15
leaq 0x18a2(%rip), %rsi      # 0x80a5
leaq 0x8(%rsp), %rdi
callq 0x4340
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x4100
movq %r15, 0x20(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x4200
leaq 0x20(%rsp), %r15
movq (%r15), %rsi
movq (%r14), %rax
movq %r14, %rdi
callq *0x30(%rax)
addq $0x5c8, %rbx            # imm = 0x5C8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6d48
movq (%r15), %rax
jmp 0x689f
leaq 0x1a08(%rip), %rsi      # 0x8260
leaq 0x8(%rsp), %rdi
callq 0x4340
leaq 0x1a0a(%rip), %rsi      # 0x8273
leaq 0x38(%rsp), %rdi
callq 0x4340
leaq 0x8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
xorl %edx, %edx
movl $0x7f01, %ecx           # imm = 0x7F01
callq 0x41c0
leaq 0x38(%rsp), %rdi
callq 0x4200
leaq 0x8(%rsp), %rdi
callq 0x4200
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x4200
jmp 0x68d9
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4200
jmp 0x68e8
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4200
jmp 0x68f2
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4200
jmp 0x6909
movq %rax, %rbx
movl $0x5c8, %esi            # imm = 0x5C8
jmp 0x6901
movq %rax, %rbx
movl $0x5b8, %esi            # imm = 0x5B8
jmp 0x6901
movq %rax, %rbx
movl $0x688, %esi            # imm = 0x688
movq %r15, %rdi
callq 0x4050
movq %rbx, %rdi
callq 0x4150
nop
// File: /workspace/github_c_makefile_star2_O1/yurrriq[P]knrc/src/charfreq.c
// Function: prchar
void prchar(int c)
{
    switch (c) {
    case ' ':
        printf("%11s", "<space>");
        break;
    case '\b':
        printf("%11s", "<backspace>");
        break;
    case '\n':
        printf("%11s", "<newline>");
        break;
    case '\t':
        printf("%11s", "<tab>");
        break;
    default:
        /* FIXME: why can't I return this? */
        /* return ((char[2]) { (char) c, '\0' }); */
        printf("%11c", c);
        break;
    }
}

// Assembly:
movl %edi, %esi
cmpl $0x9, %edi
jg 0x119d
cmpl $0x8, %esi
je 0x11c5
cmpl $0x9, %esi
jne 0x11b7
leaq 0xe70(%rip), %rdi       # 0x2004
leaq 0xe8c(%rip), %rsi       # 0x2027
jmp 0x11e3
cmpl $0xa, %esi
je 0x11d5
cmpl $0x20, %esi
jne 0x11b7
leaq 0xe56(%rip), %rdi       # 0x2004
leaq 0xe54(%rip), %rsi       # 0x2009
jmp 0x11e3
leaq 0xe6f(%rip), %rdi       # 0x202d
xorl %eax, %eax
jmp 0x1040
leaq 0xe38(%rip), %rdi       # 0x2004
leaq 0xe3e(%rip), %rsi       # 0x2011
jmp 0x11e3
leaq 0xe28(%rip), %rdi       # 0x2004
leaq 0xe3a(%rip), %rsi       # 0x201d
xorl %eax, %eax
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O1/yurrriq[P]knrc/src/charfreq.c
// Function: main
int main()
{
    int c;
    int freq[MAX_ASCII + 1] = { 0 };

    while ((c = getchar()) != EOF)
        ++freq[c];

    for (int i = 0; i <= MAX_ASCII; ++i) {
        if (!freq[i])
            continue;

        prchar(i);
        fputs(": ", stdout);
        for (int j = 0; j < freq[i]; ++j)
            putchar('#');
        putchar('\n');
    }


    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsp, %rdi
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x1060
callq 0x1070
cmpl $-0x1, %eax
je 0x1217
cltq
incl (%rsp,%rax,4)
jmp 0x1206
xorl %ebx, %ebx
movq 0x2dc0(%rip), %r15      # 0x3fe0
leaq 0xe0b(%rip), %r14       # 0x2032
movl (%rsp,%rbx,4), %ebp
testl %ebp, %ebp
je 0x125c
movl %ebx, %edi
callq 0x117c
movq (%r15), %rsi
movq %r14, %rdi
callq 0x1050
testl %ebp, %ebp
jle 0x1252
movl $0x23, %edi
callq 0x1030
decl %ebp
jne 0x1244
movl $0xa, %edi
callq 0x1030
incq %rbx
cmpq $0x80, %rbx
jne 0x1227
xorl %eax, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/truenas[P]binaries/src/plx_eeprom.c
// Function: plx_eeprom_read
static uint32_t
plx_eeprom_read(void *mem, u_int addr)
{
	uint32_t val;

	if ((addr > 0x00ffffff) || (addr & 0x3) != 0)
		errx(EX_OSERR, "Incorrect EEPROM address %x", addr);

	/* Write address byte 3. */
	val = read4(mem, 0x26c);
	write4(mem, 0x26c, (val & ~0xff) | (addr >> 24));

	/* Initiate read. */
	addr >>= 2;
	val = read4(mem, 0x260);
	val &= 0xffe00000;
	val |= ((addr & 0x2000) << 7) | (3 << 13) | (addr & 0x1fff);
	write4(mem, 0x260, val);

	/* Wait for completion. */
	val = 100;
	while ((read4(mem, 0x260) & 0x40000) != 0 && val > 0) {
		usleep(100);
		val--;
	}
	if (val == 0)
		errx(EX_OSERR, "EEPROM write timeout");

	/* Read result. */
	val = read4(mem, 0x264);
	return (val);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %edx
testl $0xff000003, %esi       # imm = 0xFF000003
jne 0x1927
movq %rdi, %rbx
andl $0xffffff00, 0x26c(%rdi) # imm = 0xFFFFFF00
movl %edx, %eax
shrl $0x2, %eax
movl $0xffe00000, %ecx       # imm = 0xFFE00000
andl 0x260(%rdi), %ecx
shll $0x5, %edx
andl $0x100000, %edx         # imm = 0x100000
andl $0x1fff, %eax           # imm = 0x1FFF
orl %edx, %eax
addl %ecx, %eax
addl $0x6000, %eax           # imm = 0x6000
movl %eax, 0x260(%rdi)
btl $0x12, 0x260(%rdi)
jae 0x1919
movl $0x64, %r14d
movl $0x64, %edi
callq 0x1160
leal -0x1(%r14), %eax
btl $0x12, 0x260(%rbx)
jae 0x1915
cmpl $0x1, %r14d
movl %eax, %r14d
jne 0x18f4
testl %eax, %eax
je 0x193a
movl 0x264(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x7a3(%rip), %rsi       # 0x20d1
movl $0x47, %edi
xorl %eax, %eax
callq 0x1070
leaq 0x7ac(%rip), %rsi       # 0x20ed
movl $0x47, %edi
xorl %eax, %eax
callq 0x1070
// File: /workspace/github_c_makefile_star2_O1/truenas[P]binaries/src/plx_eeprom.c
// Function: plx_config_print
static void
plx_config_print(char *buf, int n)
{
	int i, r, port, error;
	uint32_t val;

	printf("   #\tPort\tReg\tValue\n");
	printf("--------------------------------\n");
	n /= 6;
	for (i = 0; i < n; i++) {
		printf(" %3d\t", i);
		val = le16dec(&buf[i * 6]);
		port = val >> 10;
		if ((port & 0x38) == 0x20)
			printf("A-LUT %d", port & 0x3);
		else if (port == 0x2c)
			printf("DMA RAM");
		else if ((port & 0x38) == 0x28)
			printf("DMA %d", port & 0x7);
		else if ((port & 0x38) == 0x30)
			printf("S%dP0", port & 0x7);
		else if ((port & 0x38) == 0x38)
			printf("NT%d %c", (port >> 1) & 0x1,
			    (port & 0x1) ? 'V' : 'L');
		else
			printf("%d", port);
		printf("\t%03x\t%08x\n",
		    (val & 0x3ff) * 4, le32dec(&buf[i * 6] + 2));
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x86e(%rip), %rdi       # 0x21d2
callq 0x1040
leaq 0x876(%rip), %rdi       # 0x21e6
callq 0x1040
cmpl $0x6, %ebp
jae 0x1989
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, %eax
movl $0xaaaaaaab, %r13d      # imm = 0xAAAAAAAB
imulq %rax, %r13
shrq $0x22, %r13
addq $0x5, %rbx
leaq 0x7df(%rip), %r12       # 0x2183
xorl %ebp, %ebp
leaq 0x7aa(%rip), %rdi       # 0x2157
movl %ebp, %esi
xorl %eax, %eax
callq 0x1080
movzbl -0x4(%rbx), %r15d
movzbl -0x5(%rbx), %r14d
movl %r15d, %esi
shrl $0x2, %esi
movl %esi, %eax
andl $-0x8, %eax
cmpl $0x20, %eax
jne 0x19e3
andl $0x3, %esi
leaq 0x783(%rip), %rdi       # 0x215d
xorl %eax, %eax
callq 0x1080
jmp 0x19f6
cmpl $0x2c, %esi
jne 0x1a20
leaq 0x777(%rip), %rdi       # 0x2166
xorl %eax, %eax
callq 0x1080
andl $0x3, %r15d
shll $0xa, %r15d
leal (%r15,%r14,4), %esi
movl -0x3(%rbx), %edx
movq %r12, %rdi
xorl %eax, %eax
callq 0x1080
incq %rbp
addq $0x6, %rbx
cmpq %rbp, %r13
jne 0x19a6
jmp 0x197a
cmpl $0x38, %eax
je 0x1a47
cmpl $0x30, %eax
je 0x1a3b
cmpl $0x28, %eax
jne 0x1a71
andl $0x7, %esi
leaq 0x735(%rip), %rdi       # 0x216e
jmp 0x19da
andl $0x7, %esi
leaq 0x730(%rip), %rdi       # 0x2175
jmp 0x19da
movl %r15d, %esi
shrl $0x3, %esi
andl $0x1, %esi
testb $0x4, %r15b
movl $0x56, %edx
movl $0x4c, %eax
cmovel %eax, %edx
leaq 0x713(%rip), %rdi       # 0x217b
xorl %eax, %eax
callq 0x1080
jmp 0x19f6
leaq 0x6fa(%rip), %rdi       # 0x2172
jmp 0x19da
// File: /workspace/github_c_makefile_star2_O1/orangeduck[P]mpc/examples/doge.c
// Function: main
int main(int argc, char **argv) {

  mpc_result_t r;
  
  mpc_parser_t* Adjective = mpc_new("adjective");
  mpc_parser_t* Noun      = mpc_new("noun");
  mpc_parser_t* Phrase    = mpc_new("phrase");
  mpc_parser_t* Doge      = mpc_new("doge");

  mpca_lang(MPCA_LANG_DEFAULT,
    " adjective : \"wow\" | \"many\" | \"so\" | \"such\";                 "
    " noun      : \"lisp\" | \"language\" | \"c\" | \"book\" | \"build\"; "
    " phrase    : <adjective> <noun>;                                     "
    " doge      : /^/ <phrase>* /$/;                                      ",
    Adjective, Noun, Phrase, Doge, NULL);
  
  if (argc > 1) {
    
    if (mpc_parse_contents(argv[1], Doge, &r)) {
      mpc_ast_print(r.output);
      mpc_ast_delete(r.output);
    } else {
      mpc_err_print(r.error);
      mpc_err_delete(r.error);
    }
  
  } else {

    if (mpc_parse_pipe("<stdin>", stdin, Doge, &r)) {
      mpc_ast_print(r.output);
      mpc_ast_delete(r.output);
    } else {
      mpc_err_print(r.error);
      mpc_err_delete(r.error);
    }
  
  }

  mpc_cleanup(4, Adjective, Noun, Phrase, Doge);
  
  return 0;
  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r13
movl %edi, %ebp
leaq 0x9cce(%rip), %rdi      # 0xb004
callq 0x2f41
movq %rax, %rbx
leaq 0x9cc9(%rip), %rdi      # 0xb00e
callq 0x2f41
movq %rax, %r14
leaq 0x9cbf(%rip), %rdi      # 0xb013
callq 0x2f41
movq %rax, %r15
leaq 0x9cb7(%rip), %rdi      # 0xb01a
callq 0x2f41
movq %rax, %r12
movq $0x0, (%rsp)
leaq 0x9ca5(%rip), %rsi      # 0xb01f
xorl %edi, %edi
movq %rbx, %rdx
movq %r14, %rcx
movq %r15, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x8b48
cmpl $0x2, %ebp
jl 0x13aa
movq 0x8(%r13), %rdi
leaq 0x10(%rsp), %r13
movq %r12, %rsi
movq %r13, %rdx
callq 0x2d09
jmp 0x13cb
movq 0xec2f(%rip), %rax      # 0xffe0
movq (%rax), %rsi
leaq 0x9d67(%rip), %rdi      # 0xb122
leaq 0x10(%rsp), %r13
movq %r12, %rdx
movq %r13, %rcx
callq 0x2c41
movq (%r13), %rdi
testl %eax, %eax
je 0x13e4
callq 0x6d2e
movq 0x10(%rsp), %rdi
callq 0x68c7
jmp 0x13f3
callq 0x146f
movq 0x10(%rsp), %rdi
callq 0x141c
movl $0x4, %edi
movq %rbx, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x3390
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/theck01[P]offbrand_lib/src/tests/obtest_test.c
// Function: main
int main(){

  int i;
  obtest *test_obj, *a, *b;
  test_obj = obtest_new(1);
  a = obtest_new(3);
  b = obtest_new(3);

  /* ob_retain object, reference count should be 4 */
  for(i=0; i<3; i++){
    ob_retain((obj *)test_obj);
  }

  if(ob_reference_count((obj *)test_obj) != 4){
    fprintf(stderr, "obtest_test: reference count not incrememted correctly by "
                    "ob_retain\nTEST FAILED\n");
    exit(1);
  }

  /* ob_release object until test_obj is deallocated or until ob_release has been
   * called more than 4 times */
  i=0;
  while(++i < 5 && ob_release((obj *)test_obj) != NULL){}

  if(i<4){
    fprintf(stderr, "obtest_test: test_obj ob_released before reference count "
                    "reached zero, TEST FAILED\n");
    exit(1);
	}
  else if(i>4){
    fprintf(stderr, "obtest_test: test_obj not ob_released when reference count "
                    "reached zero\n");
    exit(1);
	}

  if(!ob_has_same_class((obj *)a, (obj *)b)){
    fprintf(stderr, "obtest_test: Two obtest objects were not of the same "
                    "class, TEST FAILED\n");
    exit(1);
  }

  if(!ob_has_class((obj *)a, "obtest")){
    fprintf(stderr, "obtest_test: An obtest object was not considered to be an "
                    "obtest object during check, TEST FAILED\n");
    exit(1);
  }

  ob_hash((obj *)a);

  printf("obtest: TEST PASSED\n");
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0x1, %edi
callq 0x13b0
movq %rax, %r15
movl $0x3, %ebp
movl $0x3, %edi
callq 0x13b0
movq %rax, %rbx
movl $0x3, %edi
callq 0x13b0
movq %rax, %r14
movq %r15, %rdi
callq 0x179f
decl %ebp
jne 0x130f
movq %r15, %rdi
callq 0x17d6
cmpl $0x4, %eax
jne 0x1395
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x3, %ebp
je 0x1343
movq %r15, %rdi
callq 0x176a
incl %ebp
testq %rax, %rax
jne 0x132d
jmp 0x1348
movl $0x4, %ebp
cmpl $0x2, %ebp
jbe 0x139a
cmpl $0x3, %ebp
jne 0x139f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x180c
testb %al, %al
je 0x13a4
leaq 0xdd3(%rip), %rsi       # 0x213b
movq %rbx, %rdi
callq 0x17e4
testb %al, %al
je 0x13a9
movq %rbx, %rdi
callq 0x16a8
leaq 0xe22(%rip), %rdi       # 0x21a5
callq 0x1040
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x10c0
callq 0x1154
callq 0x10e5
callq 0x112f
callq 0x110a
nop
// File: /workspace/github_c_makefile_star2_O1/cogbee[P]vmir-latest/src/main.c
// Function: usage
static void
usage(const char *argv0)
{
  printf("\n");
  printf("Usage ... %s [OPTIONS] <file.bc>\n", argv0);
  printf("\n");
  printf("  -f FUNCTION         Function to diagnose [ALL]\n");
  printf("  -l                  Dump lowered function(s)\n");
  printf("  -p                  Dump parsed function(s)\n");
  printf("  -i                  List all functions\n");
  printf("  -n                  Don't try to run code\n");
  printf("\n");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0xa, %edi
callq 0x3040
leaq 0x1f616(%rip), %rdi     # 0x230c2
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3190
movl $0xa, %edi
callq 0x3040
leaq 0x1f749(%rip), %rdi     # 0x23210
callq 0x30e0
leaq 0x1f76e(%rip), %rdi     # 0x23241
callq 0x30e0
leaq 0x1f791(%rip), %rdi     # 0x23270
callq 0x30e0
leaq 0x1f7b3(%rip), %rdi     # 0x2329e
callq 0x30e0
leaq 0x1f7d0(%rip), %rdi     # 0x232c7
callq 0x30e0
movl $0xa, %edi
popq %rbx
jmp 0x3040
nop
// File: /workspace/github_c_makefile_star2_O1/cogbee[P]vmir-latest/src/vmir_function.c
// Function: vmir_find_function
ir_function_t *
vmir_find_function(ir_unit_t *iu, const char *name)
{
  for(int i = 0; i < VECTOR_LEN(&iu->iu_functions); i++) {
    ir_function_t *f = VECTOR_ITEM(&iu->iu_functions, i);
    if(f->if_name != NULL && !strcmp(f->if_name, name))
      return f;
  }
  return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x2e0(%rdi), %r15
testq %r15, %r15
je 0x3b69
movq %rsi, %rbx
movq 0x2d8(%rdi), %r12
xorl %r13d, %r13d
movq (%r12,%r13,8), %rbp
movq 0x20(%rbp), %rdi
testq %rdi, %rdi
je 0x3b54
movq %rbx, %rsi
callq 0x3300
testl %eax, %eax
je 0x3b58
movb $0x1, %al
jmp 0x3b5d
xorl %eax, %eax
movq %rbp, %r14
testb %al, %al
je 0x3b6c
incq %r13
cmpq %r13, %r15
jne 0x3b3b
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/cogbee[P]vmir-latest/src/vmir.c
// Function: vmir_log
static void
vmir_log(ir_unit_t *iu, vmir_log_level_t level, const char *fmt, ...)
{
  if(level > iu->iu_log_level)
    return;

  va_list ap;
  char tmp[1024];
  va_start(ap, fmt);
  vsnprintf(tmp, sizeof(tmp), fmt, ap);
  va_end(ap);

  if(iu->iu_logger) {
    iu->iu_logger(iu, level, tmp);
  } else {
    printf("%s\n", tmp);
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x4d8, %rsp            # imm = 0x4D8
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x408f
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %r8, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
cmpl %esi, 0x630(%rdi)
jb 0x4107
movl %esi, %ebx
movq %rdi, %r14
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rsp, %rcx
movq %rax, (%rcx)
leaq 0x4f0(%rsp), %rax
movq %rax, 0x8(%rcx)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rcx)
leaq 0xd0(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x3120
movq 0x628(%r14), %rax
testq %rax, %rax
je 0x40fa
leaq 0xd0(%rsp), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq *%rax
jmp 0x4107
leaq 0xd0(%rsp), %rdi
callq 0x30e0
addq $0x4d8, %rsp            # imm = 0x4D8
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/cogbee[P]vmir-latest/src/vmir_type.c
// Function: type_str
static const char *
type_str(ir_unit_t *iu, const ir_type_t *it)
{
  int len = type_print(NULL, iu, it);
  char *dst = tmpstr(iu, len);
  const char *ret = dst;
  type_print(&dst, iu, it);
  return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %edi, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xce99
movq %r14, %rdi
movl %eax, %esi
callq 0xd275
movq %rax, %r15
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movq %r14, %rsi
movq %rbx, %rdx
callq 0xce99
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_mem_alloc
uint32_t
vmir_mem_alloc(ir_unit_t *iu, uint32_t size, void *hostaddr_)
{
  void **hostaddr = hostaddr_;
  void *p = vmir_heap_malloc(iu, size);
  if(p == NULL) {
    if(hostaddr)
      *hostaddr = NULL;
    return 0;
  }
  if(hostaddr)
    *hostaddr = p;
  return p - iu->iu_mem;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
callq 0xa084
testq %rax, %rax
je 0x417d
testq %rbx, %rbx
je 0x4177
movq %rax, (%rbx)
subl 0x20(%r14), %eax
jmp 0x418b
xorl %eax, %eax
testq %rbx, %rbx
je 0x418b
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_fd_get
static vmir_fd_t *
vfd_get(ir_unit_t *iu, unsigned int fd, int type)
{
  if(fd >= VECTOR_LEN(&iu->iu_vfds))
    return NULL;
  vmir_fd_t *vfd = &VECTOR_ITEM(&iu->iu_vfds, fd);
  if(vfd->type == 0 || (type != -1 && vfd->type != type))
    return NULL; // Bad/Closed fd
  return vfd;
}

// Assembly:
movl %esi, %eax
cmpq %rax, 0xd8(%rdi)
jbe 0x9e1e
movq 0xd0(%rdi), %rsi
leaq (%rax,%rax,2), %rax
movzbl 0x10(%rsi,%rax,8), %ecx
testl %ecx, %ecx
je 0x9e1e
leaq (%rsi,%rax,8), %rsi
xorl %eax, %eax
cmpl %edx, %ecx
cmoveq %rsi, %rax
cmpl $-0x1, %edx
cmoveq %rsi, %rax
jmp 0x9e20
xorl %eax, %eax
testq %rax, %rax
je 0x9e29
movq (%rax), %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_fd_create
int
vmir_fd_create(ir_unit_t *iu, intptr_t handle, int type,
               vmir_fd_release_t *relfunc)
{
  int fd = vfd_create(iu, type);
  vmir_fd_t *vfd = &VECTOR_ITEM(&iu->iu_vfds, fd);
  vfd->fh = handle;
  vfd->release = relfunc;
  return fd;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movslq 0xe8(%rdi), %r12
cmpq $-0x1, %r12
je 0x9e66
movq 0xd0(%r15), %rax
leaq (%r12,%r12,2), %rcx
movl (%rax,%rcx,8), %eax
movl %eax, 0xe8(%r15)
jmp 0x9eca
movq 0xd8(%r15), %r12
leaq 0x1(%r12), %r13
cmpq 0xe0(%r15), %r13
jbe 0x9ea8
leaq (,%r13,2), %rax
movq %rax, 0xe0(%r15)
movq %r13, %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rsi
movq 0xd0(%r15), %rdi
callq 0x33c0
movq %rax, 0xd0(%r15)
movq %r13, 0xd8(%r15)
movq 0xd0(%r15), %rax
leaq (%r12,%r12,2), %rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rax,%rcx,8)
movq $0x0, 0x10(%rax,%rcx,8)
movq 0xd0(%r15), %rcx
movslq %r12d, %rax
leaq (%rax,%rax,2), %rdx
movb %bpl, 0x10(%rcx,%rdx,8)
movq %r14, (%rcx,%rdx,8)
movq %rbx, 0x8(%rcx,%rdx,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_fd_close
void
vmir_fd_close(ir_unit_t *iu, int fd)
{
  vmir_fd_t *vfd = vfd_get(iu, fd, -1);
  if(vfd == NULL)
    return;
  if(vfd->release)
    vfd->release(iu, vfd->fh);
  vfd->type = 0;
  vfd->freelist = iu->iu_vfd_free;
  iu->iu_vfd_free = fd;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %eax
cmpq %rax, 0xd8(%rdi)
jbe 0x9f53
movq 0xd0(%r14), %rcx
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rax
xorl %r15d, %r15d
cmpb $0x0, 0x10(%rax)
cmovneq %rax, %r15
jmp 0x9f56
xorl %r15d, %r15d
testq %r15, %r15
je 0x9f82
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x9f6c
movq (%r15), %rsi
movq %r14, %rdi
callq *%rax
movb $0x0, 0x10(%r15)
movl 0xe8(%r14), %eax
movl %eax, (%r15)
movl %ebx, 0xe8(%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_function_tab_lookup
vm_ext_function_t *
vmir_function_tab_lookup(const char *function,
                         const vmir_function_tab_t *array, int length)
{
  for(int i = 0; i < length; i++) {
    const vmir_function_tab_t *ft = array + i;
    if(!strcmp(function, ft->name)) {
      return ft->extfunc;
    }
  }
  return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testl %edx, %edx
jle 0x9fc7
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r12d
shlq $0x4, %r12
xorl %r13d, %r13d
movq (%rbx,%r13), %rsi
movq %r14, %rdi
callq 0x3300
testl %eax, %eax
jne 0x9fba
movq 0x8(%rbx,%r13), %r15
testl %eax, %eax
je 0x9fca
addq $0x10, %r13
cmpq %r13, %r12
jne 0x9fa5
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_walk_fds
void
vmir_walk_fds(ir_unit_t *iu,
              void (*fn)(void *opaque, int fd, int type),
              void *opaque)
{
  for(int i = 0; i < VECTOR_LEN(&iu->iu_vfds); i++) {
    vmir_fd_t *vfd = &VECTOR_ITEM(&iu->iu_vfds, i);
    if(vfd->type != 0)
      fn(opaque, i, vfd->type);
  }
}

// Assembly:
cmpq $0x0, 0xd8(%rdi)
je 0xa083
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x10, %r13d
xorl %r12d, %r12d
movq 0xd0(%r15), %rax
movzbl (%rax,%r13), %edx
testl %edx, %edx
je 0xa06a
movq %rbx, %rdi
movl %r12d, %esi
callq *%r14
incq %r12
addq $0x18, %r13
cmpq %r12, 0xd8(%r15)
ja 0xa051
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_heap_malloc
static void *
vmir_heap_malloc(ir_unit_t *iu, int size)
{
  heap_t *h = iu->iu_heap;
  heap_block_t *hb;
  size += sizeof(heap_block_t);
  size = VMIR_ALIGN(size, 16);

  TAILQ_FOREACH(hb, &h->h_blocks, hb_link) {
    if(hb->hb_magic != HEAP_MAGIC_FREE)
      continue;

    if(size <= hb->hb_size) {
      int remain = hb->hb_size - size;
      if(remain < sizeof(heap_block_t) * 2) {
        size = hb->hb_size;
      } else {
        heap_block_t *split = (void *)hb + size;
        split->hb_magic = HEAP_MAGIC_FREE;
        split->hb_size = remain;
        TAILQ_INSERT_AFTER(&h->h_blocks, hb, split, hb_link);
      }

      hb->hb_magic = HEAP_MAGIC_ALLOC;
      hb->hb_size = size;
      return (void *)(hb + 1);
    }
  }
  return NULL;
}

// Assembly:
movq 0x90(%rdi), %rcx
movq (%rcx), %rax
testq %rax, %rax
je 0xa0b7
addl $0x27, %esi
movslq %esi, %rdx
andq $-0x10, %rdx
cmpl $0xf4eef4ee, (%rax)     # imm = 0xF4EEF4EE
jne 0xa0ae
movl 0x4(%rax), %esi
movl %esi, %edi
subl %edx, %edi
jge 0xa0ba
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0xa09d
xorl %eax, %eax
retq
cmpl $0x30, %edi
jb 0xa0fe
leaq (%rax,%rdx), %rsi
leaq (%rax,%rdx), %r8
addq $0x8, %r8
movl $0xf4eef4ee, -0x8(%r8)  # imm = 0xF4EEF4EE
movl %edi, -0x4(%r8)
leaq 0x8(%rax), %rdi
movq 0x8(%rax), %r9
movq %r9, (%r8)
addq $0x8, %rcx
leaq 0x10(%r9), %r10
testq %r9, %r9
cmoveq %rcx, %r10
movq %r8, (%r10)
movq %rsi, 0x8(%rax)
movq %rdi, 0x8(%r8)
movl %edx, %esi
movl $0xa110ced, (%rax)      # imm = 0xA110CED
movl %esi, 0x4(%rax)
addq $0x18, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/cogbee[P]vmir-latest/src/vmir_libc.c
// Function: vmir_heap_free
static void
vmir_heap_free(ir_unit_t *iu, void *ptr)
{
  if(ptr == NULL)
    return;
  heap_t *h = iu->iu_heap;
  heap_block_t *hb = ptr;
  hb--;
  assert(hb->hb_magic == HEAP_MAGIC_ALLOC);
  hb->hb_magic = HEAP_MAGIC_FREE;

  vmir_heap_merge_next(h, hb);
  heap_block_t *prev = TAILQ_PREV(hb, heap_block_queue, hb_link);
  if(prev != NULL) {
    assert(prev < hb);
    vmir_heap_merge_next(h, prev);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0xa162
movq %rsi, %r14
cmpl $0xa110ced, -0x18(%rsi) # imm = 0xA110CED
jne 0xa168
movq 0x90(%rdi), %rbx
leaq -0x18(%r14), %r15
movl $0xf4eef4ee, -0x18(%r14) # imm = 0xF4EEF4EE
movq %rbx, %rdi
movq %r15, %rsi
callq 0xeec3
movq -0x8(%r14), %rax
movq 0x8(%rax), %rax
movq (%rax), %rsi
testq %rsi, %rsi
je 0xa162
cmpq %r15, %rsi
jae 0xa187
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xeec3
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1b136(%rip), %rdi     # 0x252a5
leaq 0x1b150(%rip), %rsi     # 0x252c6
leaq 0x1b2ac(%rip), %rcx     # 0x25429
movl $0xe4, %edx
callq 0x31e0
leaq 0x1b2c4(%rip), %rdi     # 0x25452
leaq 0x1b131(%rip), %rsi     # 0x252c6
leaq 0x1b28d(%rip), %rcx     # 0x25429
movl $0xea, %edx
callq 0x31e0
// File: /workspace/github_c_makefile_star2_O1/cogbee[P]vmir-latest/src/vmir.c
// Function: vmir_destroy
void
vmir_destroy(ir_unit_t *iu)
{
  libc_terminate(iu);

  for(int i = 0; i < VECTOR_LEN(&iu->iu_functions); i++) {
    function_destroy(VECTOR_ITEM(&iu->iu_functions, i));
  }

  free(iu->iu_vm_funcs);
  free(iu->iu_function_table);
  VECTOR_CLEAR(&iu->iu_functions);

  for(int i = 0; i < VECTOR_LEN(&iu->iu_types); i++) {
    ir_type_t *it = &VECTOR_ITEM(&iu->iu_types, i);
    type_clean(it);
  }

  VECTOR_CLEAR(&iu->iu_types);

  free(iu->iu_triple);
  free(iu->iu_debugged_function);

  VECTOR_CLEAR(&iu->iu_vfds);
  free(iu);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xf0(%rdi), %rax
testq %rax, %rax
je 0xa1ce
movq (%rax), %rdi
callq 0x3160
movq 0xf0(%rbx), %rax
jmp 0xa1b8
cmpq $0x0, 0x2e0(%rbx)
je 0xa228
xorl %r15d, %r15d
movq 0x2d8(%rbx), %rax
movq (%rax,%r15,8), %r14
movq 0x48(%r14), %rdi
testq %rdi, %rdi
je 0xa1f9
movq %r14, %rsi
callq 0xef21
jmp 0xa1e6
movq 0x20(%r14), %rdi
callq 0x3030
movq 0x60(%r14), %rdi
callq 0x3030
movq 0x78(%r14), %rdi
callq 0x3030
movq %r14, %rdi
callq 0x3030
incq %r15
cmpq %r15, 0x2e0(%rbx)
ja 0xa1db
movq 0x28(%rbx), %rdi
callq 0x3030
movq 0x30(%rbx), %rdi
callq 0x3030
xorps %xmm0, %xmm0
movups %xmm0, 0x2e0(%rbx)
movq 0x2d8(%rbx), %rdi
callq 0x3030
cmpq $0x0, 0x170(%rbx)
je 0xa29b
movl $0x10, %r14d
xorl %r15d, %r15d
movq 0x168(%rbx), %r12
movl -0x10(%r12,%r14), %eax
cmpl $0xc, %eax
je 0xa281
testl %eax, %eax
jne 0xa28b
movq (%r12,%r14), %rdi
callq 0x3030
movq -0x8(%r12,%r14), %rdi
callq 0x3030
incq %r15
addq $0x28, %r14
cmpq %r15, 0x170(%rbx)
ja 0xa263
xorps %xmm0, %xmm0
movups %xmm0, 0x170(%rbx)
movq 0x168(%rbx), %rdi
callq 0x3030
movq 0x128(%rbx), %rdi
callq 0x3030
movq 0x108(%rbx), %rdi
callq 0x3030
xorps %xmm0, %xmm0
movups %xmm0, 0xd8(%rbx)
movq 0xd0(%rbx), %rdi
callq 0x3030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3030
// File: /workspace/github_c_makefile_star2_O1/cogbee[P]vmir-latest/src/vmir.c
// Function: vmir_create
ir_unit_t *
vmir_create(void *membase, uint32_t memsize,
            uint32_t rsize, uint32_t asize,
            void *opaque)
{
  ir_unit_t *iu = calloc(1, sizeof(ir_unit_t));
  iu->iu_log_level = VMIR_LOG_INFO;
  iu->iu_external_function_resolver = vmir_default_external_function_resolver;

  iu->iu_opaque = opaque;
  iu->iu_mem = membase;
  iu->iu_memsize = memsize;
  iu->iu_rsize = rsize;
  iu->iu_asize = asize;
  iu->iu_text_alloc_memsize = 1024 * 1024;
  iu->iu_text_alloc = malloc(iu->iu_text_alloc_memsize);

  iu->iu_mem_low = iu->iu_mem;
  iu->iu_mem_high = iu->iu_mem + memsize;

  return iu;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %r12
movl $0x1, %edi
movl $0x638, %esi            # imm = 0x638
callq 0x32f0
movq %rax, %r13
movl $0x2, 0x630(%rax)
leaq -0x357(%rip), %rax      # 0x9fd7
movq %rax, (%r13)
movq %rbx, 0x48(%r13)
movq %r12, 0x20(%r13)
movl %r15d, 0xa4(%r13)
movl %r14d, 0x9c(%r13)
movl %ebp, 0xa0(%r13)
movq $0x100000, 0x448(%r13) # imm = 0x100000
movl $0x100000, %edi         # imm = 0x100000
callq 0x3380
movq %rax, 0x438(%r13)
movq %r12, 0x8(%r13)
movl %r15d, %eax
addq %r12, %rax
movq %rax, 0x10(%r13)
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/cogbee[P]vmir-latest/src/vmir_bitstream.c
// Function: read_bits
static uint32_t
read_bits(bcbitstream_t *bs, int num)
{
  int r = 0;
  int off = 0;
  // printf("bs->bytes_offset=%d\n", bs->bytes_offset);

  while(num > 0) {
    if(bs->bytes_offset >= bs->bytes_length)
      return 0;

    if(bs->remain == 0) {
      bs->tmp = bs->rdata[bs->bytes_offset];
      bs->bytes_offset++;
      bs->remain = 8;
    }

    int pick = VMIR_MIN(num, bs->remain);
    r |= (bs->tmp & ((1 << pick) - 1)) << off;
    bs->tmp = bs->tmp >> pick;
    off += pick;
    num -= pick;
    bs->remain -= pick;
  }
  return r;
}

// Assembly:
testl %esi, %esi
jle 0xc173
pushq %rbp
pushq %rbx
movl 0x8(%rdi), %r9d
movl 0xc(%rdi), %r10d
xorl %edx, %edx
xorl %eax, %eax
cmpl %r9d, %r10d
jge 0xc176
cmpl $0x0, 0x10(%rdi)
jne 0xc133
movq (%rdi), %rcx
movslq %r10d, %r8
movb (%rcx,%r8), %cl
movb %cl, 0x14(%rdi)
incl %r10d
movl %r10d, 0xc(%rdi)
movl $0x8, 0x10(%rdi)
movl 0x10(%rdi), %r11d
cmpl %r11d, %esi
movl %r11d, %r8d
cmovll %esi, %r8d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %r8d, %ecx
shll %cl, %ebx
movzbl 0x14(%rdi), %ebp
notl %ebx
andl %ebp, %ebx
movl %edx, %ecx
shll %cl, %ebx
orl %ebx, %eax
movl %r8d, %ecx
shrl %cl, %ebp
movb %bpl, 0x14(%rdi)
addl %r8d, %edx
subl %r8d, %r11d
movl %r11d, 0x10(%rdi)
subl %r8d, %esi
jg 0xc10d
jmp 0xc178
xorl %eax, %eax
retq
xorl %eax, %eax
popq %rbx
popq %rbp
retq