LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_compiler.c
// Function: compileIfStatement
static void compileIfStatement(Compiler* compiler, bool elsif) {

  skipNewLines(compiler);
  compileExpression(compiler); //< Condition.
  emitOpcode(compiler, OP_JUMP_IF_NOT);
  int ifpatch = emitShort(compiler, 0xffff); //< Will be patched.

  compileBlockBody(compiler, BLOCK_IF);

  if (match(compiler, TK_ELSIF)) {

    // Jump pass else.
    emitOpcode(compiler, OP_JUMP);
    int exit_jump = emitShort(compiler, 0xffff); //< Will be patched.

    // if (false) jump here.
    patchJump(compiler, ifpatch);

    compilerEnterBlock(compiler);
    compileIfStatement(compiler, true);
    compilerExitBlock(compiler);

    patchJump(compiler, exit_jump);

  } else if (match(compiler, TK_ELSE)) {

    // Jump pass else.
    emitOpcode(compiler, OP_JUMP);
    int exit_jump = emitShort(compiler, 0xffff); //< Will be patched.

    patchJump(compiler, ifpatch);
    compileBlockBody(compiler, BLOCK_ELSE);
    patchJump(compiler, exit_jump);

  } else {
    patchJump(compiler, ifpatch);
  }

  // elsif will not consume the 'end' keyword as it'll be leaved to be consumed
  // by it's 'if'.
  if (!elsif) {
    skipNewLines(compiler);
    consume(compiler, TK_END, "Expected 'end' after statement end.");
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x11bcc
movq %rbx, %rdi
movl $0x1, %esi
callq 0x11eb4
movq %rbx, %rdi
movl $0x2e, %esi
callq 0x10fbe
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11014
movq %rbx, %rdi
movl $0xff, %esi
callq 0x10fbe
movq %rbx, %rdi
movl $0xff, %esi
callq 0x10fbe
movl %eax, %r14d
decl %r14d
movq %rbx, %rdi
movl $0x2, %esi
callq 0x114e1
movl 0x50(%rbx), %eax
cmpl $0x43, %eax
je 0x11e19
cmpl $0x42, %eax
jne 0x11e73
movq %rbx, %rdi
callq 0x10771
movq %rbx, %rdi
movl $0x2b, %esi
callq 0x10fbe
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11014
movq %rbx, %rdi
movl $0xff, %esi
callq 0x10fbe
movq %rbx, %rdi
movl $0xff, %esi
callq 0x10fbe
movl %eax, %r15d
decl %r15d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x11f33
incl 0xa0(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x11d3f
movq %rbx, %rdi
callq 0x11588
jmp 0x11e70
movq %rbx, %rdi
callq 0x10771
movq %rbx, %rdi
movl $0x2b, %esi
callq 0x10fbe
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11014
movq %rbx, %rdi
movl $0xff, %esi
callq 0x10fbe
movq %rbx, %rdi
movl $0xff, %esi
callq 0x10fbe
movl %eax, %r15d
decl %r15d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x11f33
movq %rbx, %rdi
movl $0x3, %esi
callq 0x114e1
movl %r15d, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x11f33
testb %bpl, %bpl
je 0x11e8e
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x11bcc
leaq 0xb2f7(%rip), %rdx      # 0x1d194
movq %rbx, %rdi
movl $0x35, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x10df5
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_compiler.c
// Function: parsePrecedence
static void parsePrecedence(Compiler* compiler, Precedence precedence) {
  lexToken(compiler);
  GrammarFn prefix = getRule(compiler->previous.type)->prefix;

  if (prefix == NULL) {
    parseError(compiler, "Expected an expression.");
    return;
  }

  // Reset to false and this will set to true by the exprCall() function,
  // If the next infix is call '('.
  compiler->is_last_call = false;
  compiler->l_value = precedence <= PREC_LOWEST;

  prefix(compiler);

  while (getRule(compiler->current.type)->precedence >= precedence) {
    lexToken(compiler);
    GrammarFn infix = getRule(compiler->previous.type)->infix;
    infix(compiler);
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0x10771
movslq 0x30(%rbx), %rax
leaq (%rax,%rax,2), %rax
leaq 0x1732f(%rip), %r14     # 0x29200
movq (%r14,%rax,8), %rax
testq %rax, %rax
je 0x11f1e
movb $0x0, 0x38ce(%rbx)
cmpl $0x2, %ebp
setb 0x38cd(%rbx)
movq %rbx, %rdi
callq *%rax
movslq 0x50(%rbx), %rax
leaq (%rax,%rax,2), %rax
cmpl %ebp, 0x10(%r14,%rax,8)
jb 0x11f19
movq %rbx, %rdi
callq 0x10771
movslq 0x30(%rbx), %rax
leaq (%rax,%rax,2), %rax
movq %rbx, %rdi
callq *0x8(%r14,%rax,8)
jmp 0x11ef0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xb257(%rip), %rsi      # 0x1d17c
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x10d4f
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_compiler.c
// Function: patchJump
static void patchJump(Compiler* compiler, int addr_index) {
  int offset = (int)_FN->opcodes.count - (addr_index + 2 /*bytes index*/);
  ASSERT(offset < MAX_JUMP, "Too large address offset to jump to.");

  _FN->opcodes.data[addr_index] = (offset >> 8) & 0xff;
  _FN->opcodes.data[addr_index + 1] = offset & 0xff;
}

// Assembly:
movq 0x18c0(%rdi), %rax
movq 0x8(%rax), %rax
movq 0x38(%rax), %rcx
movl 0x8(%rcx), %eax
subl %esi, %eax
addl $-0x2, %eax
cmpl $0x10000, %eax          # imm = 0x10000
jge 0x11f71
movq (%rcx), %rcx
movslq %esi, %rdx
movb %ah, (%rcx,%rdx)
movq 0x18c0(%rdi), %rcx
movq 0x8(%rcx), %rcx
movq 0x38(%rcx), %rcx
movq (%rcx), %rcx
movb %al, 0x1(%rcx,%rdx)
retq
pushq %rax
callq 0x4df7
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_compiler.c
// Function: emitStoreVariable
static void emitStoreVariable(Compiler* compiler, int index, bool global) {
  if (global) {
    emitOpcode(compiler, OP_STORE_GLOBAL);
    emitByte(compiler, index);

  } else {
    if (index < 9) { //< 0..8 locals have single opcode.
      emitOpcode(compiler, (Opcode)(OP_STORE_LOCAL_0 + index));
    } else {
      emitOpcode(compiler, OP_STORE_LOCAL_N);
      emitByte(compiler, index);
    }
  }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
testl %edx, %edx
je 0x11f8d
movq %rbx, %rdi
movl $0x21, %esi
jmp 0x11fb7
cmpl $0x8, %ebp
jg 0x11faf
addl $0x16, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x10fbe
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x11014
movq %rbx, %rdi
movl $0x1f, %esi
callq 0x10fbe
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11014
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x10fbe
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_compiler.c
// Function: emitPushVariable
static void emitPushVariable(Compiler* compiler, int index, bool global) {
  if (global) {
    emitOpcode(compiler, OP_PUSH_GLOBAL);
    emitByte(compiler, index);

  } else {
    if (index < 9) { //< 0..8 locals have single opcode.
      emitOpcode(compiler, (Opcode)(OP_PUSH_LOCAL_0 + index));
    } else {
      emitOpcode(compiler, OP_PUSH_LOCAL_N);
      emitByte(compiler, index);
    }
  }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
testl %edx, %edx
je 0x11fec
movq %rbx, %rdi
movl $0x20, %esi
jmp 0x12016
cmpl $0x8, %ebp
jg 0x1200e
addl $0xc, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x10fbe
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x11014
movq %rbx, %rdi
movl $0x15, %esi
callq 0x10fbe
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11014
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x10fbe
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_compiler.c
// Function: emitAssignment
static void emitAssignment(Compiler* compiler, TokenType assignment) {
  switch (assignment) {
    case TK_PLUSEQ:   emitOpcode(compiler, OP_ADD);        break;
    case TK_MINUSEQ:  emitOpcode(compiler, OP_SUBTRACT);   break;
    case TK_STAREQ:   emitOpcode(compiler, OP_MULTIPLY);   break;
    case TK_DIVEQ:    emitOpcode(compiler, OP_DIVIDE);     break;
    case TK_MODEQ:    emitOpcode(compiler, OP_MOD);        break;
    case TK_ANDEQ:    emitOpcode(compiler, OP_BIT_AND);    break;
    case TK_OREQ:     emitOpcode(compiler, OP_BIT_OR);     break;
    case TK_XOREQ:    emitOpcode(compiler, OP_BIT_XOR);    break;
    case TK_SRIGHTEQ: emitOpcode(compiler, OP_BIT_RSHIFT); break;
    case TK_SLEFTEQ:  emitOpcode(compiler, OP_BIT_LSHIFT); break;
    default:
      UNREACHABLE();
      break;
  }
}

// Assembly:
pushq %rbx
addl $-0x21, %esi
cmpl $0xc, %esi
jae 0x12067
movl $0xcff, %eax            # imm = 0xCFF
btl %esi, %eax
jae 0x12067
movq %rdi, %rbx
movl %esi, %eax
leaq 0xad58(%rip), %rcx      # 0x1cdac
movl (%rcx,%rax,4), %esi
callq 0x10fbe
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
jmp 0x11014
callq 0x4e2d
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_compiler.c
// Function: reportError
static void reportError(Compiler* compiler, const char* file, int line,
                        const char* fmt, va_list args) {

  // On REPL mode only the first error is reported.
  if (compiler->options && compiler->options->repl_mode &&
      compiler->has_errors) {
    return;
  }

  compiler->has_errors = true;

  // If the source is incomplete we're not printing an error message,
  // instead return PK_RESULT_UNEXPECTED_EOF to the host.
  if (compiler->need_more_lines) {
    ASSERT(compiler->options && compiler->options->repl_mode, OOPS);
    return;
  }

  PKVM* vm = compiler->vm;
  if (vm->config.error_fn == NULL) return;

  // TODO: fix the buffer size. A non terminated large string could cause this
  // crash.

  char message[ERROR_MESSAGE_SIZE];
  int length = vsnprintf(message, sizeof(message), fmt, args);
  __ASSERT(length >= 0, "Error message buffer failed at vsnprintf().");
  vm->config.error_fn(vm, PK_ERROR_COMPILE, file, line, message);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movl %edx, %ebx
movq %rsi, %r14
movq 0x98(%rdi), %rax
testq %rax, %rax
je 0x125b8
cmpb $0x1, 0x1(%rax)
jne 0x1260d
cmpb $0x0, 0x90(%rdi)
jne 0x12600
movb $0x1, 0x90(%rdi)
cmpb $0x0, 0x91(%rdi)
je 0x125c8
jmp 0x12600
movb $0x1, 0x90(%rdi)
cmpb $0x1, 0x91(%rdi)
je 0x1261d
movq (%rdi), %r15
cmpq $0x0, 0xd0(%r15)
je 0x12600
movq %rsp, %rdi
movl $0x200, %esi            # imm = 0x200
movq %rcx, %rdx
movq %r8, %rcx
callq 0x20d0
testl %eax, %eax
js 0x12622
movq %rsp, %r8
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
movl %ebx, %ecx
callq *0xd0(%r15)
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %r15
retq
movb $0x1, 0x90(%rdi)
cmpb $0x0, 0x91(%rdi)
je 0x125c8
callq 0x4e92
callq 0x4e5c
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_compiler.c
// Function: compilerImportAll
static void compilerImportAll(Compiler* compiler, Script* script) {

  ASSERT(script != NULL, OOPS);
  ASSERT(compiler->scope_depth == DEPTH_GLOBAL, OOPS);

  // Import all types.
  for (uint32_t i = 0; i < script->classes.count; i++) {
    uint32_t name_ind = script->classes.data[i]->name;
    String* name = script->names.data[name_ind];
    compilerImportSingleEntry(compiler, name->data, name->length);
  }

  // Import all functions.
  for (uint32_t i = 0; i < script->functions.count; i++) {
    const char* name = script->functions.data[i]->name;
    uint32_t length = (uint32_t)strlen(name);
    compilerImportSingleEntry(compiler, name, length);
  }

  // Import all globals.
  for (uint32_t i = 0; i < script->globals.count; i++) {
    ASSERT(i < script->global_names.count, OOPS);
    ASSERT(script->global_names.data[i] < script->names.count, OOPS);
    const String* name = script->names.data[script->global_names.data[i]];

    compilerImportSingleEntry(compiler, name->data, name->length);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $-0x1, 0xa0(%rdi)
jne 0x12b4b
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x0, 0x58(%rsi)
je 0x12ac0
xorl %r15d, %r15d
movq 0x50(%rbx), %rax
movq 0x60(%rbx), %rcx
movq (%rax,%r15,8), %rax
movl 0x18(%rax), %eax
movq (%rcx,%rax,8), %rsi
movl 0x14(%rsi), %edx
addq $0x1c, %rsi
movq %r14, %rdi
callq 0x12bdf
incq %r15
movl 0x58(%rbx), %eax
cmpq %rax, %r15
jb 0x12a93
cmpl $0x0, 0x48(%rbx)
je 0x12af5
xorl %r12d, %r12d
movq 0x40(%rbx), %rax
movq (%rax,%r12,8), %rax
movq 0x10(%rax), %r15
movq %r15, %rdi
callq 0x2140
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x12bdf
incq %r12
movl 0x48(%rbx), %eax
cmpq %rax, %r12
jb 0x12ac9
cmpl $0x0, 0x28(%rbx)
je 0x12b35
xorl %r15d, %r15d
movl 0x38(%rbx), %eax
cmpq %rax, %r15
jae 0x12b46
movq 0x30(%rbx), %rax
movl (%rax,%r15,4), %eax
cmpl 0x68(%rbx), %eax
jae 0x12b41
movq 0x60(%rbx), %rcx
movq (%rcx,%rax,8), %rsi
movl 0x14(%rsi), %edx
addq $0x1c, %rsi
movq %r14, %rdi
callq 0x12bdf
incq %r15
movl 0x28(%rbx), %eax
cmpq %rax, %r15
jb 0x12afe
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x5078
callq 0x5042
callq 0x500c
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_compiler.c
// Function: compilerImportName
static int compilerImportName(Compiler* compiler, int line,
                              const char* name, uint32_t length) {
  ASSERT(compiler->scope_depth == DEPTH_GLOBAL, OOPS);

  NameSearchResult result = compilerSearchName(compiler, name, length);
  switch (result.type) {
    case NAME_NOT_DEFINED:
      return compilerAddVariable(compiler, name, length, line);

    case NAME_LOCAL_VAR:
      UNREACHABLE();

    case NAME_GLOBAL_VAR:
      return result.index;

    case NAME_FUNCTION:
    case NAME_CLASS:
    case NAME_BUILTIN:
      parseError(compiler, "Name '%.*s' already exists.", length, name);
      return -1;
  }

  UNREACHABLE();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $-0x1, 0xa0(%rdi)
jne 0x12bd0
movl %ecx, %ebx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
movq %rdx, %rsi
movl %ecx, %edx
callq 0x1132e
cmpl $0x5, %eax
ja 0x12bda
movl %eax, %ecx
leaq 0xa212(%rip), %rdx      # 0x1cd94
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0xa383(%rip), %rsi      # 0x1cf15
movq %r15, %rdi
movl %ebx, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x10d4f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x12bac
shrq $0x20, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movl %ebp, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11440
callq 0x50ae
callq 0x50e4
callq 0x5113
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_compiler.c
// Function: compilerImportSingleEntry
static void compilerImportSingleEntry(Compiler* compiler,
                                      const char* name, uint32_t length) {

  // Special names are begins with '$' like function body (only for now).
  // Skip them.
  if (name[0] == '$') return;

  // Line number of the variables which will be bind to the imported symbol.
  int line = compiler->previous.line;

  // Add the name to the **current** script's name buffer.
  int name_index = (int)scriptAddName(compiler->script, compiler->vm,
                                      name, length);

  // Get the function from the script.
  emitOpcode(compiler, OP_GET_ATTRIB_KEEP);
  emitShort(compiler, name_index);

  int index = compilerImportName(compiler, line, name, length);
  if (index != -1) emitStoreVariable(compiler, index, true);
  emitOpcode(compiler, OP_POP);
}

// Assembly:
cmpb $0x24, (%rsi)
jne 0x12be5
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x44(%rdi), %r15d
movq 0x18b0(%rdi), %rdi
movq (%rbx), %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x9306
movl %eax, %r12d
movq %rbx, %rdi
movl $0x31, %esi
callq 0x10fbe
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11014
movl %r12d, %esi
shrl $0x8, %esi
movl $0xff, %r13d
andl %r13d, %esi
movq %rbx, %rdi
callq 0x10fbe
andl %r13d, %r12d
movq %rbx, %rdi
movl %r12d, %esi
callq 0x10fbe
movq %rbx, %rdi
movl %r15d, %esi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x12b50
cmpl $-0x1, %eax
je 0x12c73
movq %rbx, %rdi
movl %eax, %esi
movl $0x1, %edx
callq 0x11f77
movq %rbx, %rdi
movl $0x25, %esi
callq 0x10fbe
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11014
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_core.c
// Function: newModuleInternal
static Script* newModuleInternal(PKVM* vm, const char* name) {

  // Create a new Script for the module.
  String* _name = newString(vm, name);
  vmPushTempRef(vm, &_name->_super);

  // Check if any module with the same name already exists and assert to the
  // hosting application.
  if (!IS_UNDEF(mapGet(vm->core_libs, VAR_OBJ(_name)))) {
    vmPopTempRef(vm); // _name
    __ASSERT(false, stringFormat(vm,
             "A module named '$' already exists", name)->data);
  }

  Script* scr = newScript(vm, _name, true);
  vmPopTempRef(vm); // _name

  // Add the script to core_libs.
  vmPushTempRef(vm, &scr->_super);
  mapSet(vm, vm->core_libs, VAR_OBJ(_name), VAR_OBJ(scr));
  vmPopTempRef(vm);

  return scr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
testq %rsi, %rsi
je 0x12cd8
movq %r15, %rdi
callq 0x2140
movq %rax, %rdx
jmp 0x12cda
xorl %edx, %edx
movabsq $-0x4000000000000, %r14 # imm = 0xFFFC000000000000
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7f0c
movq %rax, %r13
movq %rbx, %rdi
movq %rax, %rsi
callq 0xb71b
movq 0x130(%rbx), %rdi
movq %r13, %r12
orq %r14, %r12
movq %r12, %rsi
callq 0x9e0f
movabsq $0x7ffd000000000000, %rcx # imm = 0x7FFD000000000000
cmpq %rcx, %rax
jne 0x12d74
movq %rbx, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x8ff9
movq %rax, %r15
movq %rbx, %rdi
callq 0xb78e
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb71b
movq 0x130(%rbx), %rsi
orq %r15, %r14
movq %rbx, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0x9f38
movq %rbx, %rdi
callq 0xb78e
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5142
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_core.c
// Function: pkModuleAddGlobal
PK_PUBLIC void pkModuleAddGlobal(PKVM* vm, PkHandle* module,
                                 const char* name, PkHandle* value) {
  __ASSERT(module != NULL, "Argument module was NULL.");
  __ASSERT(value != NULL, "Argument value was NULL.");
  Var scr = module->value;
  __ASSERT(IS_OBJ_TYPE(scr, OBJ_SCRIPT), "Given handle is not a module");

  moduleAddGlobalInternal(vm, (Script*)AS_OBJ(scr), name, value->value);
}

// Assembly:
pushq %rax
testq %rsi, %rsi
je 0x12db8
testq %rcx, %rcx
je 0x12dbd
movq (%rsi), %rsi
movq %rsi, %rax
shrq $0x32, %rax
cmpl $0x3fff, %eax           # imm = 0x3FFF
jb 0x12db3
movabsq $0xffffffffffff, %rax   # imm = 0xFFFFFFFFFFFF
andq %rax, %rsi
cmpl $0x4, (%rsi)
jne 0x12db3
movq (%rcx), %rcx
popq %rax
jmp 0x12dc2
callq 0x519b
callq 0x5203
callq 0x51cf
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_core.c
// Function: pkModuleAddFunction
void pkModuleAddFunction(PKVM* vm, PkHandle* module, const char* name,
                         pkNativeFn fptr, int arity) {
  __ASSERT(module != NULL, "Argument module was NULL.");
  Var scr = module->value;
  __ASSERT(IS_OBJ_TYPE(scr, OBJ_SCRIPT), "Given handle is not a module");
  moduleAddFunctionInternal(vm, (Script*)AS_OBJ(scr), name, fptr, arity,
                            NULL /*TODO: Public API for function docstring.*/);
}

// Assembly:
pushq %rax
testq %rsi, %rsi
je 0x12e35
movq (%rsi), %rsi
movq %rsi, %rax
shrq $0x32, %rax
cmpl $0x3fff, %eax           # imm = 0x3FFF
jb 0x12e30
movabsq $0xffffffffffff, %rax   # imm = 0xFFFFFFFFFFFF
andq %rax, %rsi
cmpl $0x4, (%rsi)
jne 0x12e30
xorl %r9d, %r9d
popq %rax
jmp 0x12e3a
callq 0x5237
callq 0x526b
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_core.c
// Function: moduleAddFunctionInternal
static void moduleAddFunctionInternal(PKVM* vm, Script* script,
                                      const char* name, pkNativeFn fptr,
                                      int arity, const char* docstring) {

  // Ensure the name isn't predefined.
  assertModuleNameDef(vm, script, name);

  Function* fn = newFunction(vm, name, (int)strlen(name),
                             script, true, docstring);
  fn->native = fptr;
  fn->arity = arity;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
callq 0x187fd
movq %r15, %rdi
callq 0x2140
movq %r13, %rdi
movq %r15, %rsi
movl %eax, %edx
movq %r12, %rcx
movl $0x1, %r8d
movq %rbx, %r9
callq 0x91e2
movq %r14, 0x38(%rax)
movl %ebp, 0x20(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_core.c
// Function: pkGetFunction
PkHandle* pkGetFunction(PKVM* vm, PkHandle* module,
                                  const char* name) {
  __ASSERT(module != NULL, "Argument module was NULL.");
  Var scr = module->value;
  __ASSERT(IS_OBJ_TYPE(scr, OBJ_SCRIPT), "Given handle is not a module");
  Script* script = (Script*)AS_OBJ(scr);

  for (uint32_t i = 0; i < script->functions.count; i++) {
    const char* fn_name = script->functions.data[i]->name;
    if (strcmp(name, fn_name) == 0) {
      return vmNewHandle(vm, VAR_OBJ(script->functions.data[i]));
    }
  }

  return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x12f3e
movq %rdi, (%rsp)
movq (%rsi), %rax
movq %rax, %rcx
shrq $0x32, %rcx
cmpl $0x3fff, %ecx           # imm = 0x3FFF
jb 0x12f39
movabsq $0xffffffffffff, %rcx   # imm = 0xFFFFFFFFFFFF
andq %rcx, %rax
cmpl $0x4, (%rax)
jne 0x12f39
movl 0x48(%rax), %r12d
testq %r12, %r12
je 0x12f08
movq %rdx, %r14
movabsq $-0x4000000000001, %r13 # imm = 0xFFFBFFFFFFFFFFFF
movq 0x40(%rax), %rbp
xorl %ebx, %ebx
movq (%rbp,%rbx,8), %r15
movq 0x10(%r15), %rsi
movq %r14, %rdi
callq 0x2230
testl %eax, %eax
je 0x12f19
incq %rbx
cmpq %rbx, %r12
jne 0x12eeb
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
incq %r13
orq %r13, %r15
movq (%rsp), %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb517
callq 0x529f
callq 0x52d3
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_core.c
// Function: pkCheckArgcRange
bool pkCheckArgcRange(PKVM* vm, int argc, int min, int max) {
  ASSERT(min <= max, "invalid argc range (min > max).");

  if (argc < min) {
    char buff[STR_INT_BUFF_SIZE]; sprintf(buff, "%d", min);
    VM_SET_ERROR(vm, stringFormat(vm, "Expected at least %s argument(s).",
                                       buff));
    return false;

  } else if (argc > max) {
    char buff[STR_INT_BUFF_SIZE]; sprintf(buff, "%d", max);
    VM_SET_ERROR(vm, stringFormat(vm, "Expected at most %s argument(s).",
                                       buff));
    return false;
  }

  return true;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
cmpl %ecx, %edx
jg 0x12ff9
movq %rdi, %rbx
cmpl %edx, %esi
jge 0x12fa3
leaq 0xcaa1(%rip), %rsi      # 0x1fa21
leaq 0xc(%rsp), %rdi
xorl %eax, %eax
callq 0x2360
movq 0x5f0(%rbx), %rax
cmpq $0x0, 0x58(%rax)
jne 0x12ffe
leaq 0xaa29(%rip), %rsi      # 0x1d9ca
jmp 0x12fd4
movb $0x1, %bpl
cmpl %ecx, %esi
jle 0x12ff0
leaq 0xca70(%rip), %rsi      # 0x1fa21
leaq 0xc(%rsp), %rdi
movl %ecx, %edx
xorl %eax, %eax
callq 0x2360
movq 0x5f0(%rbx), %rax
cmpq $0x0, 0x58(%rax)
jne 0x13003
leaq 0xaa18(%rip), %rsi      # 0x1d9ec
xorl %ebp, %ebp
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x94f4
movq 0x5f0(%rbx), %rcx
movq %rax, 0x58(%rcx)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
callq 0x53a9
callq 0x5373
callq 0x533d
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_core.c
// Function: pkGetArgBool
bool pkGetArgBool(PKVM* vm, int arg, bool* value) {
  CHECK_GET_ARG_API_ERRORS();

  Var val = ARG(arg);
  *value = toBool(val);
  return true;
}

// Assembly:
pushq %rbx
movq 0x5f0(%rdi), %rax
testq %rax, %rax
je 0x1308a
movq %rdx, %rbx
testl %esi, %esi
je 0x1306b
jle 0x13085
movq 0x30(%rax), %rcx
subq 0x38(%rax), %rcx
shrq $0x3, %rcx
cmpl %esi, %ecx
jle 0x13085
testq %rbx, %rbx
je 0x1308f
movq 0x38(%rax), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rdi
callq 0xb290
movb %al, (%rbx)
movb $0x1, %al
popq %rbx
retq
callq 0x544b
callq 0x54b7
callq 0x5481
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_core.c
// Function: pkGetArgNumber
bool pkGetArgNumber(PKVM* vm, int arg, double* value) {
  CHECK_GET_ARG_API_ERRORS();

  Var val = ARG(arg);
  if (IS_NUM(val)) {
    *value = AS_NUM(val);

  } else if (IS_BOOL(val)) {
    *value = AS_BOOL(val) ? 1 : 0;

  } else {
    ERR_INVALID_ARG_TYPE("number");
    return false;
  }

  return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq 0x5f0(%rdi), %rax
testq %rax, %rax
je 0x131c1
movq %rdx, %r14
movl %esi, %edx
movq %rdi, %rbx
testl %esi, %esi
je 0x130d2
jle 0x131bc
movq 0x30(%rax), %rcx
subq 0x38(%rax), %rcx
shrq $0x3, %rcx
cmpl %edx, %ecx
jle 0x131bc
testq %r14, %r14
je 0x131c6
movq 0x38(%rax), %rcx
movl %edx, %esi
movq (%rcx,%rsi,8), %rdi
movq %rdi, %rcx
notq %rcx
movabsq $0x7ffc000000000000, %rsi # imm = 0x7FFC000000000000
testq %rsi, %rcx
jne 0x13126
movq %rdi, %rcx
shrq %rcx
movabsq $0x3ffe800000000001, %rsi # imm = 0x3FFE800000000001
cmpq %rsi, %rcx
jne 0x13135
movabsq $0x7ffd000000000002, %rax # imm = 0x7FFD000000000002
incq %rax
cmpq %rax, %rdi
je 0x1317b
xorps %xmm0, %xmm0
jmp 0x1312b
callq 0x8fa4
movsd %xmm0, (%r14)
movb $0x1, %bpl
jmp 0x131b1
testl %edx, %edx
je 0x13185
leaq 0xc8e1(%rip), %rsi      # 0x1fa21
leaq 0x4(%rsp), %rdi
xorl %eax, %eax
callq 0x2360
movq 0x5f0(%rbx), %rax
cmpq $0x0, 0x58(%rax)
jne 0x131cb
leaq 0xa904(%rip), %rsi      # 0x1da65
leaq 0xa91b(%rip), %rdx      # 0x1da83
xorl %ebp, %ebp
leaq 0x4(%rsp), %rcx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x94f4
jmp 0x131a6
movsd 0x8f3d(%rip), %xmm0     # 0x1c0c0
jmp 0x1312b
cmpq $0x0, 0x58(%rax)
jne 0x131d0
leaq 0xa8f7(%rip), %rsi      # 0x1da8a
leaq 0xa8e9(%rip), %rdx      # 0x1da83
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0x94f4
movq 0x5f0(%rbx), %rcx
movq %rax, 0x58(%rcx)
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x54ed
callq 0x55c5
callq 0x558f
callq 0x5523
callq 0x5559
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_core.c
// Function: pkGetArgString
bool pkGetArgString(PKVM* vm, int arg, const char** value, uint32_t* length) {
  CHECK_GET_ARG_API_ERRORS();

  Var val = ARG(arg);
  if (IS_OBJ_TYPE(val, OBJ_STRING)) {
    String* str = (String*)AS_OBJ(val);
    *value = str->data;
    if (length) *length = str->length;

  } else {
    ERR_INVALID_ARG_TYPE("string");
    return false;
  }

  return true;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movl %esi, %eax
movq 0x5f0(%rdi), %rsi
testq %rsi, %rsi
je 0x132dc
movq %rdi, %rbx
testl %eax, %eax
je 0x1320e
jle 0x132d7
movq 0x30(%rsi), %rdi
subq 0x38(%rsi), %rdi
shrq $0x3, %rdi
cmpl %eax, %edi
jle 0x132d7
testq %rdx, %rdx
je 0x132e1
movq 0x38(%rsi), %rdi
movl %eax, %r8d
movq (%rdi,%r8,8), %rdi
movq %rdi, %r8
shrq $0x32, %r8
cmpl $0x3fff, %r8d           # imm = 0x3FFF
jb 0x13244
movabsq $0xffffffffffff, %r8    # imm = 0xFFFFFFFFFFFF
andq %r8, %rdi
cmpl $0x0, (%rdi)
je 0x132c1
testl %eax, %eax
je 0x1328c
leaq 0xc7d2(%rip), %rsi      # 0x1fa21
leaq 0xc(%rsp), %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x2360
movq 0x5f0(%rbx), %rax
cmpq $0x0, 0x58(%rax)
jne 0x132e6
leaq 0xa7f3(%rip), %rsi      # 0x1da65
leaq 0xa933(%rip), %rdx      # 0x1dbac
xorl %ebp, %ebp
leaq 0xc(%rsp), %rcx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x94f4
jmp 0x132ad
cmpq $0x0, 0x58(%rsi)
jne 0x132eb
leaq 0xa7f0(%rip), %rsi      # 0x1da8a
leaq 0xa90b(%rip), %rdx      # 0x1dbac
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0x94f4
movq 0x5f0(%rbx), %rcx
movq %rax, 0x58(%rcx)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
leaq 0x1c(%rdi), %rax
movq %rax, (%rdx)
movb $0x1, %bpl
testq %rcx, %rcx
je 0x132b8
movl 0x14(%rdi), %eax
movl %eax, (%rcx)
jmp 0x132b8
callq 0x55fb
callq 0x56d3
callq 0x569d
callq 0x5631
callq 0x5667
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_core.c
// Function: pkGetArgInst
bool pkGetArgInst(PKVM* vm, int arg, uint32_t id, void** value) {
  CHECK_GET_ARG_API_ERRORS();

  Var val = ARG(arg);
  bool is_native_instance = false;

  if (IS_OBJ_TYPE(val, OBJ_INST)) {
    Instance* inst = ((Instance*)AS_OBJ(val));
    if (inst->is_native && inst->native_id == id) {
      *value = inst->native;
      is_native_instance = true;
    }
  }

  if (!is_native_instance) {
    const char* ty_name = "$(?)";
    if (vm->config.inst_name_fn != NULL) {
      ty_name = vm->config.inst_name_fn(id);
    }

    ERR_INVALID_ARG_TYPE(ty_name);
    return false;
  }

  return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq 0x5f0(%rdi), %rax
testq %rax, %rax
je 0x13418
movl %esi, %ebp
movq %rdi, %rbx
testl %esi, %esi
je 0x1332b
jle 0x13413
movq 0x30(%rax), %rsi
subq 0x38(%rax), %rsi
shrq $0x3, %rsi
cmpl %ebp, %esi
jle 0x13413
testq %rcx, %rcx
je 0x1341d
movq 0x38(%rax), %rax
movl %ebp, %esi
movq (%rax,%rsi,8), %rax
movq %rax, %rsi
shrq $0x32, %rsi
cmpl $0x3fff, %esi           # imm = 0x3FFF
jb 0x13379
movabsq $0xffffffffffff, %rsi   # imm = 0xFFFFFFFFFFFF
andq %rsi, %rax
cmpl $0x8, (%rax)
jne 0x13379
cmpb $0x1, 0x18(%rax)
jne 0x13379
cmpl %edx, 0x1c(%rax)
jne 0x13379
movq 0x20(%rax), %rax
movq %rax, (%rcx)
movb $0x1, %bpl
jmp 0x13408
movq 0xf0(%rbx), %rax
testq %rax, %rax
je 0x1338e
movl %edx, %edi
callq *%rax
movq %rax, %r14
jmp 0x13395
leaq 0x8eb0(%rip), %r14      # 0x1c245
testl %ebp, %ebp
je 0x133d9
leaq 0xc681(%rip), %rsi      # 0x1fa21
leaq 0x4(%rsp), %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2360
movq 0x5f0(%rbx), %rax
cmpq $0x0, 0x58(%rax)
jne 0x13422
leaq 0xa6a2(%rip), %rsi      # 0x1da65
xorl %ebp, %ebp
leaq 0x4(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x94f4
jmp 0x133fd
movq 0x5f0(%rbx), %rax
cmpq $0x0, 0x58(%rax)
jne 0x13427
leaq 0xa69c(%rip), %rsi      # 0x1da8a
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x94f4
movq 0x5f0(%rbx), %rcx
movq %rax, 0x58(%rcx)
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x5709
callq 0x57e1
callq 0x57ab
callq 0x573f
callq 0x5775
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_core.c
// Function: pkGetArgValue
bool pkGetArgValue(PKVM* vm, int arg, PkVarType type, PkVar* value) {
  CHECK_GET_ARG_API_ERRORS();

  Var val = ARG(arg);
  if (pkGetValueType((PkVar)&val) != type) {
    char buff[STR_INT_BUFF_SIZE]; sprintf(buff, "%d", arg);
    VM_SET_ERROR(vm, stringFormat(vm, "Expected a $ at argument $.",
                 getPkVarTypeName(type), buff));
    return false;
  }

  *value = (PkVar)&val;
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x5f0(%rdi), %rax
testq %rax, %rax
je 0x1350a
movq %rcx, %r15
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
testl %esi, %esi
je 0x13472
jle 0x13505
movq 0x30(%rax), %rcx
subq 0x38(%rax), %rcx
shrq $0x3, %rcx
cmpl %ebp, %ecx
jle 0x13505
testq %r15, %r15
je 0x1350f
movq 0x38(%rax), %rax
movl %ebp, %ecx
movq (%rax,%rcx,8), %rax
leaq 0x10(%rsp), %r13
movq %rax, (%r13)
movq %r13, %rdi
callq 0x7e2c
movl %eax, %r12d
cmpl %ebx, %eax
jne 0x134a2
movq %r13, (%r15)
jmp 0x134f0
leaq 0xc578(%rip), %rsi      # 0x1fa21
leaq 0x4(%rsp), %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2360
movq 0x5f0(%r14), %rax
cmpq $0x0, 0x58(%rax)
jne 0x13514
movl %ebx, %edi
callq 0xa864
leaq 0xa5f1(%rip), %rsi      # 0x1dac4
leaq 0x4(%rsp), %rcx
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x94f4
movq 0x5f0(%r14), %rcx
movq %rax, 0x58(%rcx)
cmpl %ebx, %r12d
sete %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x5817
callq 0x58b9
callq 0x5883
callq 0x584d
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_core.c
// Function: pkFiberGetReturnValue
PkVar pkFiberGetReturnValue(const PkHandle* fiber) {
  __ASSERT(fiber != NULL, "Handle fiber was NULL.");
  Var fb = fiber->value;
  __ASSERT(IS_OBJ_TYPE(fb, OBJ_FIBER), "Given handle is not a fiber");
  Fiber* _fiber = (Fiber*)AS_OBJ(fb);
  return (PkVar)_fiber->ret;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x1368e
movq (%rdi), %rax
movq %rax, %rcx
shrq $0x32, %rcx
cmpl $0x3fff, %ecx           # imm = 0x3FFF
jb 0x13689
movabsq $0xffffffffffff, %rcx   # imm = 0xFFFFFFFFFFFF
andq %rcx, %rax
cmpl $0x6, (%rax)
jne 0x13689
movq 0x38(%rax), %rax
popq %rcx
retq
callq 0x5925
callq 0x595b
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_core.c
// Function: pkFiberIsDone
bool pkFiberIsDone(const PkHandle* fiber) {
  __ASSERT(fiber != NULL, "Handle fiber was NULL.");
  Var fb = fiber->value;
  __ASSERT(IS_OBJ_TYPE(fb, OBJ_FIBER), "Given handle is not a fiber");
  Fiber* _fiber = (Fiber*)AS_OBJ(fb);
  return _fiber->state == FIBER_DONE;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x136cb
movq (%rdi), %rax
movq %rax, %rcx
shrq $0x32, %rcx
cmpl $0x3fff, %ecx           # imm = 0x3FFF
jb 0x136c6
movabsq $0xffffffffffff, %rcx   # imm = 0xFFFFFFFFFFFF
andq %rcx, %rax
cmpl $0x6, (%rax)
jne 0x136c6
cmpl $0x3, 0x10(%rax)
sete %al
popq %rcx
retq
callq 0x5991
callq 0x59c7
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_core.c
// Function: findBuiltinFunction
int findBuiltinFunction(const PKVM* vm, const char* name, uint32_t length) {
   for (uint32_t i = 0; i < vm->builtins_count; i++) {
     if (length == vm->builtins[i].length &&
       strncmp(name, vm->builtins[i].name, length) == 0) {
       return i;
     }
   }
   return -1;
 }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x5e8(%rdi), %r13d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %r13, %r13
je 0x1372d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movl %edx, %r12d
addq $0x140, %r15            # imm = 0x140
xorl %ebx, %ebx
cmpl %ebp, (%r15)
jne 0x13718
movq -0x8(%r15), %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x2090
testl %eax, %eax
je 0x1372b
incq %rbx
addq $0x18, %r15
cmpq %rbx, %r13
jne 0x13700
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1372d
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_core.c
// Function: getCoreLib
Script* getCoreLib(const PKVM* vm, String* name) {
  Var lib = mapGet(vm->core_libs, VAR_OBJ(name));
  if (IS_UNDEF(lib)) return NULL;
  ASSERT(IS_OBJ_TYPE(lib, OBJ_SCRIPT), OOPS);
  return (Script*)AS_OBJ(lib);
}

// Assembly:
pushq %rbx
movabsq $-0x4000000000001, %rbx # imm = 0xFFFBFFFFFFFFFFFF
movq 0x130(%rdi), %rdi
leaq 0x1(%rbx), %rax
orq %rax, %rsi
callq 0x9e0f
movabsq $0x7ffd000000000000, %rcx # imm = 0x7FFD000000000000
cmpq %rcx, %rax
jne 0x137a9
xorl %eax, %eax
jmp 0x137c0
cmpq %rbx, %rax
jbe 0x137c2
movabsq $0xffffffffffff, %rcx   # imm = 0xFFFFFFFFFFFF
andq %rcx, %rax
cmpl $0x4, (%rax)
jne 0x137c2
popq %rbx
retq
callq 0x5a69
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_core.c
// Function: varSubtract
Var varSubtract(PKVM* vm, Var v1, Var v2) {
  double d1, d2;

  if (isNumeric(v1, &d1)) {
    if (validateNumeric(vm, v2, &d2, RIGHT_OPERAND)) {
      return VAR_NUM(d1 - d2);
    }
    return VAR_NULL;
  }

  UNSUPPORTED_OPERAND_TYPES("-");
  return VAR_NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rdi, %r14
movabsq $0x7ffc000000000000, %rbx # imm = 0x7FFC000000000000
movq %rsi, %rax
notq %rax
testq %rbx, %rax
jne 0x16577
movq %rsi, %rax
shrq %rax
movabsq $0x3ffe800000000001, %rcx # imm = 0x3FFE800000000001
cmpq %rcx, %rax
jne 0x165ed
movabsq $0x7ffd000000000002, %rax # imm = 0x7FFD000000000002
incq %rax
cmpq %rax, %rsi
je 0x1666b
xorpd %xmm1, %xmm1
jmp 0x16583
movq %rsi, %rdi
callq 0x8fa4
movapd %xmm0, %xmm1
movq %r15, %rax
notq %rax
testq %rax, %rbx
jne 0x165c3
movq %r15, %rax
shrq %rax
movabsq $0x3ffe800000000001, %rcx # imm = 0x3FFE800000000001
cmpq %rcx, %rax
jne 0x1662b
movabsq $0x7ffd000000000002, %rax # imm = 0x7FFD000000000002
incq %rax
cmpq %rax, %r15
je 0x16678
xorpd %xmm0, %xmm0
jmp 0x165d5
movq %r15, %rdi
movsd %xmm1, (%rsp)
callq 0x8fa4
movsd (%rsp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8f9f
movq 0x5f0(%r14), %rax
cmpq $0x0, 0x58(%rax)
jne 0x16685
movq %rsi, %rdi
callq 0xa89c
movq %rax, %r12
movq %r15, %rdi
callq 0xa89c
leaq 0x76b1(%rip), %rsi      # 0x1dcca
movq %r14, %rdi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x94f4
jmp 0x16651
movq 0x5f0(%r14), %rax
cmpq $0x0, 0x58(%rax)
jne 0x1668a
leaq 0x8d9a(%rip), %rsi      # 0x1f3da
leaq 0x762f(%rip), %rdx      # 0x1dc76
movq %r14, %rdi
xorl %eax, %eax
callq 0x94f4
movq 0x5f0(%r14), %rcx
movq %rax, 0x58(%rcx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movsd 0x5a4d(%rip), %xmm1     # 0x1c0c0
jmp 0x16583
movsd 0x5a40(%rip), %xmm0     # 0x1c0c0
jmp 0x165d5
callq 0x6639
callq 0x666f
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_core.c
// Function: varModulo
Var varModulo(PKVM* vm, Var v1, Var v2) {
  double d1, d2;

  if (isNumeric(v1, &d1)) {
    if (validateNumeric(vm, v2, &d2, RIGHT_OPERAND)) {
      return VAR_NUM(fmod(d1, d2));
    }
    return VAR_NULL;
  }

  if (IS_OBJ_TYPE(v1, OBJ_STRING)) {
    //const String* str = (const String*)AS_OBJ(v1);
    TODO; // "fmt" % v2.
  }

  UNSUPPORTED_OPERAND_TYPES("%");
  return VAR_NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rdi, %r14
movabsq $0x7ffc000000000000, %rbx # imm = 0x7FFC000000000000
movq %rsi, %rax
notq %rax
testq %rbx, %rax
jne 0x169c6
movq %rsi, %rax
shrq %rax
movabsq $0x3ffe800000000001, %rcx # imm = 0x3FFE800000000001
cmpq %rcx, %rax
jne 0x16a37
movabsq $0x7ffd000000000002, %rax # imm = 0x7FFD000000000002
incq %rax
cmpq %rax, %rsi
je 0x16ad9
xorps %xmm0, %xmm0
jmp 0x169ce
movq %rsi, %rdi
callq 0x8fa4
movq %r15, %rax
notq %rax
testq %rax, %rbx
jne 0x16a0d
movq %r15, %rax
shrq %rax
movabsq $0x3ffe800000000001, %rcx # imm = 0x3FFE800000000001
cmpq %rcx, %rax
jne 0x16a99
movabsq $0x7ffd000000000002, %rax # imm = 0x7FFD000000000002
incq %rax
cmpq %rax, %r15
je 0x16ae6
xorps %xmm1, %xmm1
jmp 0x16a22
movq %r15, %rdi
movsd %xmm0, (%rsp)
callq 0x8fa4
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
callq 0x21d0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8f9f
movq %rsi, %rax
shrq $0x32, %rax
cmpl $0x3fff, %eax           # imm = 0x3FFF
jb 0x16a5b
movabsq $0xffffffffffff, %rax   # imm = 0xFFFFFFFFFFFF
andq %rsi, %rax
cmpl $0x0, (%rax)
je 0x16afd
movq 0x5f0(%r14), %rax
cmpq $0x0, 0x58(%rax)
jne 0x16af3
movq %rsi, %rdi
callq 0xa89c
movq %rax, %r12
movq %r15, %rdi
callq 0xa89c
leaq 0x72fc(%rip), %rsi      # 0x1dd83
movq %r14, %rdi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x94f4
jmp 0x16abf
movq 0x5f0(%r14), %rax
cmpq $0x0, 0x58(%rax)
jne 0x16af8
leaq 0x892c(%rip), %rsi      # 0x1f3da
leaq 0x71c1(%rip), %rdx      # 0x1dc76
movq %r14, %rdi
xorl %eax, %eax
callq 0x94f4
movq 0x5f0(%r14), %rcx
movq %rax, 0x58(%rcx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movsd 0x55df(%rip), %xmm0     # 0x1c0c0
jmp 0x169ce
movsd 0x55d2(%rip), %xmm1     # 0x1c0c0
jmp 0x16a22
callq 0x677d
callq 0x67e9
callq 0x67b3
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_core.c
// Function: varBitAnd
Var varBitAnd(PKVM* vm, Var v1, Var v2) {
  int64_t i1, i2;

  if (isInteger(v1, &i1)) {
    if (validateInteger(vm, v2, &i2, RIGHT_OPERAND)) {
      return VAR_NUM((double)(i1 & i2));
    }
    return VAR_NULL;
  }

  UNSUPPORTED_OPERAND_TYPES("&");
  return VAR_NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movabsq $0x7ffc000000000000, %rbx # imm = 0x7FFC000000000000
movq %rsi, %rax
notq %rax
testq %rbx, %rax
jne 0x16b60
movq %r12, %rax
shrq %rax
movabsq $0x3ffe800000000001, %rcx # imm = 0x3FFE800000000001
cmpq %rcx, %rax
jne 0x16bdd
movabsq $0x7ffd000000000002, %rax # imm = 0x7FFD000000000002
incq %rax
cmpq %rax, %r12
je 0x16cc7
xorpd %xmm0, %xmm0
jmp 0x16b68
movq %r12, %rdi
callq 0x8fa4
movapd %xmm0, (%rsp)
callq 0x2330
movapd (%rsp), %xmm1
ucomisd %xmm1, %xmm0
jne 0x16bdd
jp 0x16bdd
movapd 0x6ce9(%rip), %xmm0     # 0x1d870
andpd %xmm1, %xmm0
movsd 0x6cc5(%rip), %xmm1     # 0x1d858
ucomisd %xmm0, %xmm1
jb 0x16ce6
movq %r15, %rax
notq %rax
testq %rax, %rbx
jne 0x16c1e
movq %r15, %rax
shrq %rax
movabsq $0x3ffe800000000001, %rcx # imm = 0x3FFE800000000001
cmpq %rcx, %rax
jne 0x16c87
movabsq $0x7ffd000000000002, %rax # imm = 0x7FFD000000000002
incq %rax
cmpq %rax, %r15
je 0x16cd4
xorpd %xmm0, %xmm0
jmp 0x16c26
movq 0x5f0(%r14), %rax
cmpq $0x0, 0x58(%rax)
jne 0x16ce1
movq %r12, %rdi
callq 0xa89c
movq %rax, %r12
movq %r15, %rdi
callq 0xa89c
leaq 0x71b7(%rip), %rsi      # 0x1ddc0
movq %r14, %rdi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x94f4
jmp 0x16cad
movq %r15, %rdi
callq 0x8fa4
movapd %xmm0, 0x10(%rsp)
callq 0x2330
movapd 0x10(%rsp), %xmm3
ucomisd %xmm3, %xmm0
movapd (%rsp), %xmm1
jne 0x16c87
jp 0x16c87
movapd 0x6c24(%rip), %xmm0     # 0x1d870
andpd %xmm3, %xmm0
movsd 0x6c00(%rip), %xmm2     # 0x1d858
ucomisd %xmm0, %xmm2
jb 0x16cf0
cvttsd2si %xmm1, %rax
cvttsd2si %xmm3, %rcx
andq %rax, %rcx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8f9f
movq 0x5f0(%r14), %rax
cmpq $0x0, 0x58(%rax)
jne 0x16ceb
leaq 0x87ab(%rip), %rsi      # 0x1f447
leaq 0x6fd3(%rip), %rdx      # 0x1dc76
movq %r14, %rdi
xorl %eax, %eax
callq 0x94f4
movq 0x5f0(%r14), %rcx
movq %rax, 0x58(%rcx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movsd 0x53f1(%rip), %xmm0     # 0x1c0c0
jmp 0x16b68
movsd 0x53e4(%rip), %xmm0     # 0x1c0c0
jmp 0x16c26
callq 0x681f
callq 0x68c1
callq 0x6855
callq 0x688b
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_core.c
// Function: varBitLshift
Var varBitLshift(PKVM* vm, Var v1, Var v2) {
  int64_t i1, i2;

  if (isInteger(v1, &i1)) {
    if (validateInteger(vm, v2, &i2, RIGHT_OPERAND)) {
      return VAR_NUM((double)(i1 << i2));
    }
    return VAR_NULL;
  }

  UNSUPPORTED_OPERAND_TYPES("<<");
  return VAR_NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movabsq $0x7ffc000000000000, %rbx # imm = 0x7FFC000000000000
movq %rsi, %rax
notq %rax
testq %rbx, %rax
jne 0x17139
movq %r12, %rax
shrq %rax
movabsq $0x3ffe800000000001, %rcx # imm = 0x3FFE800000000001
cmpq %rcx, %rax
jne 0x171b6
movabsq $0x7ffd000000000002, %rax # imm = 0x7FFD000000000002
incq %rax
cmpq %rax, %r12
je 0x172a0
xorpd %xmm0, %xmm0
jmp 0x17141
movq %r12, %rdi
callq 0x8fa4
movapd %xmm0, (%rsp)
callq 0x2330
movapd (%rsp), %xmm1
ucomisd %xmm1, %xmm0
jne 0x171b6
jp 0x171b6
movapd 0x6710(%rip), %xmm0     # 0x1d870
andpd %xmm1, %xmm0
movsd 0x66ec(%rip), %xmm1     # 0x1d858
ucomisd %xmm0, %xmm1
jb 0x172bf
movq %r15, %rax
notq %rax
testq %rax, %rbx
jne 0x171f7
movq %r15, %rax
shrq %rax
movabsq $0x3ffe800000000001, %rcx # imm = 0x3FFE800000000001
cmpq %rcx, %rax
jne 0x17260
movabsq $0x7ffd000000000002, %rax # imm = 0x7FFD000000000002
incq %rax
cmpq %rax, %r15
je 0x172ad
xorpd %xmm0, %xmm0
jmp 0x171ff
movq 0x5f0(%r14), %rax
cmpq $0x0, 0x58(%rax)
jne 0x172ba
movq %r12, %rdi
callq 0xa89c
movq %rax, %r12
movq %r15, %rdi
callq 0xa89c
leaq 0x6c97(%rip), %rsi      # 0x1de79
movq %r14, %rdi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x94f4
jmp 0x17286
movq %r15, %rdi
callq 0x8fa4
movapd %xmm0, 0x10(%rsp)
callq 0x2330
movapd 0x10(%rsp), %xmm3
ucomisd %xmm3, %xmm0
movapd (%rsp), %xmm1
jne 0x17260
jp 0x17260
movapd 0x664b(%rip), %xmm0     # 0x1d870
andpd %xmm3, %xmm0
movsd 0x6627(%rip), %xmm2     # 0x1d858
ucomisd %xmm0, %xmm2
jb 0x172c9
cvttsd2si %xmm1, %rax
cvttsd2si %xmm3, %rcx
shlq %cl, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8f9f
movq 0x5f0(%r14), %rax
cmpq $0x0, 0x58(%rax)
jne 0x172c4
leaq 0x81d2(%rip), %rsi      # 0x1f447
leaq 0x69fa(%rip), %rdx      # 0x1dc76
movq %r14, %rdi
xorl %eax, %eax
callq 0x94f4
movq 0x5f0(%r14), %rcx
movq %rax, 0x58(%rcx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movsd 0x4e18(%rip), %xmm0     # 0x1c0c0
jmp 0x17141
movsd 0x4e0b(%rip), %xmm0     # 0x1c0c0
jmp 0x171ff
callq 0x6aa7
callq 0x6b49
callq 0x6add
callq 0x6b13
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_core.c
// Function: varGreater
bool varGreater(Var v1, Var v2) {
  double d1, d2;

  if (isNumeric(v1, &d1) && isNumeric(v2, &d2)) {
    return d1 > d2;
  }

  TODO;
  return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movabsq $0x7ffc000000000000, %r14 # imm = 0x7FFC000000000000
movq %rdi, %rax
notq %rax
testq %r14, %rax
jne 0x17606
movq %rdi, %rax
shrq %rax
movabsq $0x3ffe800000000001, %rcx # imm = 0x3FFE800000000001
cmpq %rcx, %rax
jne 0x1767c
movabsq $0x7ffd000000000002, %rax # imm = 0x7FFD000000000002
incq %rax
cmpq %rax, %rdi
je 0x17611
xorpd %xmm1, %xmm1
jmp 0x17619
callq 0x8fa4
movapd %xmm0, %xmm1
jmp 0x17619
movsd 0x4aa7(%rip), %xmm1     # 0x1c0c0
movq %rbx, %rax
notq %rax
testq %rax, %r14
jne 0x17651
movq %rbx, %rax
shrq %rax
movabsq $0x3ffe800000000001, %rcx # imm = 0x3FFE800000000001
cmpq %rcx, %rax
jne 0x1767c
movabsq $0x7ffd000000000002, %rax # imm = 0x7FFD000000000002
incq %rax
cmpq %rax, %rbx
je 0x17665
xorpd %xmm0, %xmm0
jmp 0x1766d
movq %rbx, %rdi
movsd %xmm1, (%rsp)
callq 0x8fa4
movsd (%rsp), %xmm1
jmp 0x1766d
movsd 0x4a53(%rip), %xmm0     # 0x1c0c0
ucomisd %xmm0, %xmm1
seta %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x6cc3
// File: /workspace/github_c_makefile_star2_O3/atomlang[P]atomlang/src/pk_core.c
// Function: varContains
bool varContains(PKVM* vm, Var elem, Var container) {
  if (!IS_OBJ(container)) {
    VM_SET_ERROR(vm, stringFormat(vm, "'$' is not iterable.",
                 varTypeName(container)));
  }
  Object* obj = AS_OBJ(container);

  switch (obj->type) {
    case OBJ_STRING: {
      if (!IS_OBJ_TYPE(elem, OBJ_STRING)) {
        VM_SET_ERROR(vm, stringFormat(vm, "Expected a string operand."));
        return false;
      }

      String* sub = (String*)AS_OBJ(elem);
      String* str = (String*)AS_OBJ(container);
      if (sub->length > str->length) return false;

      TODO;

    } break;

    case OBJ_LIST: {
      List* list = (List*)AS_OBJ(container);
      for (uint32_t i = 0; i < list->elements.count; i++) {
        if (isValuesEqual(elem, list->elements.data[i])) return true;
      }
      return false;
    } break;

    case OBJ_MAP: {
      Map* map = (Map*)AS_OBJ(container);
      return !IS_UNDEF(mapGet(map, elem));
    } break;

    case OBJ_RANGE:
    case OBJ_SCRIPT:
    case OBJ_FUNC:
    case OBJ_FIBER:
    case OBJ_CLASS:
    case OBJ_INST:
      TODO;
  }
  UNREACHABLE();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rax
shrq $0x32, %rax
cmpl $0x3ffe, %eax           # imm = 0x3FFE
ja 0x177a0
movq 0x5f0(%r15), %rax
cmpq $0x0, 0x58(%rax)
jne 0x17879
movq %rbx, %rdi
callq 0xa89c
leaq 0x6795(%rip), %rsi      # 0x1df1d
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x94f4
movq 0x5f0(%r15), %rcx
movq %rax, 0x58(%rcx)
movabsq $0xffffffffffff, %rax   # imm = 0xFFFFFFFFFFFF
andq %rax, %rbx
movl (%rbx), %ecx
cmpq $0x8, %rcx
ja 0x1787e
leaq 0x60c0(%rip), %rdx      # 0x1d880
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movabsq $-0x4000000000001, %rcx # imm = 0xFFFBFFFFFFFFFFFF
andq %r14, %rax
cmpq %rcx, %r14
ja 0x177e0
cmpl $0x0, (%rax)
je 0x17846
movl 0x14(%rax), %eax
cmpl 0x14(%rbx), %eax
ja 0x17837
callq 0x6dd1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9e0f
movabsq $0x7ffd000000000000, %rcx # imm = 0x7FFD000000000000
cmpq %rcx, %rax
setne %bpl
jmp 0x17839
cmpl $0x0, 0x18(%rbx)
je 0x17837
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0xa912
movl %eax, %ebp
testb %al, %al
jne 0x17839
incq %r15
movl 0x18(%rbx), %eax
cmpq %rax, %r15
jb 0x17814
jmp 0x17839
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x5f0(%r15), %rax
cmpq $0x0, 0x58(%rax)
jne 0x17883
leaq 0x66d7(%rip), %rsi      # 0x1df32
xorl %ebp, %ebp
movq %r15, %rdi
xorl %eax, %eax
callq 0x94f4
movq 0x5f0(%r15), %rcx
movq %rax, 0x58(%rcx)
jmp 0x17839
callq 0x6d65
callq 0x6d2f
callq 0x6e07
callq 0x6d9b