LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: newStringLength
String* newStringLength(PKVM* vm, const char* text, uint32_t length) {

  ASSERT(length == 0 || text != NULL, "Unexpected NULL string.");

  String* string = _allocateString(vm, length);

  if (length != 0 && text != NULL) memcpy(string->data, text, length);
  string->hash = utilHashString(string->data);

  return string;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %edx, %edx
sete %al
testq %rsi, %rsi
setne %cl
orb %al, %cl
je 0x8071
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r13
testq %rsi, %rsi
sete %bpl
movl %edx, %r15d
leaq 0x21(%r15), %rcx
xorl %esi, %esi
xorl %edx, %edx
callq 0xb668
movq %rax, %r12
movl $0x0, (%rax)
xorl %ecx, %ecx
movb %cl, 0x4(%rax)
movq (%r13), %rax
movq %rax, 0x8(%r12)
movq %r12, (%r13)
movl %r14d, 0x14(%r12)
leaq 0x1c(%r12), %r13
movb %cl, 0x1c(%r12,%r15)
leal 0x1(%r14), %eax
movl %eax, 0x18(%r12)
testl %r14d, %r14d
sete %al
orb %bpl, %al
jne 0x8052
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2280
movq %r13, %rdi
callq 0xf426
movl %eax, 0x10(%r12)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2475
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: pkNewStringLength
PkHandle* pkNewStringLength(PKVM* vm, const char* value, size_t len) {
  String* str = newStringLength(vm, value, (uint32_t)len);
  vmPushTempRef(vm, &str->_super); // str
  PkHandle* handle = vmNewHandle(vm, VAR_OBJ(str));
  vmPopTempRef(vm); // str
  return handle;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x7fc8
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0xb8d6
movabsq $-0x4000000000000, %rsi # imm = 0xFFFC000000000000
orq %r14, %rsi
movq %rbx, %rdi
callq 0xb6ca
movq %rax, %r14
movq %rbx, %rdi
callq 0xb949
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: pkNewList
PkHandle* pkNewList(PKVM* vm) {
  List* list = newList(vm, MIN_CAPACITY);
  vmPushTempRef(vm, &list->_super); // list
  PkHandle* handle = vmNewHandle(vm, VAR_OBJ(list));
  vmPopTempRef(vm); // list
  return handle;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x8, %esi
callq 0x8105
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0xb8d6
movabsq $-0x4000000000000, %rsi # imm = 0xFFFC000000000000
orq %r14, %rsi
movq %rbx, %rdi
callq 0xb6ca
movq %rax, %r14
movq %rbx, %rdi
callq 0xb949
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: newList
List* newList(PKVM* vm, uint32_t size) {
  List* list = ALLOCATE(vm, List);
  vmPushTempRef(vm, &list->_super);
  varInitObject(&list->_super, vm, OBJ_LIST);
  pkVarBufferInit(&list->elements);
  if (size > 0) {
    pkVarBufferFill(&list->elements, vm, VAR_NULL, size);
    list->elements.count = 0;
  }
  vmPopTempRef(vm);
  return list;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movl $0x20, %ecx
xorl %esi, %esi
xorl %edx, %edx
callq 0xb668
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0xb8d6
movl $0x1, (%r14)
movb $0x0, 0x4(%r14)
movq (%rbx), %rax
movq %rax, 0x8(%r14)
movq %r14, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
testl %ebp, %ebp
je 0x816f
movq %r14, %rdi
addq $0x10, %rdi
movabsq $0x7ffc000000000000, %rdx # imm = 0x7FFC000000000000
movq %rbx, %rsi
movl %ebp, %ecx
callq 0x86fe
movl $0x0, 0x18(%r14)
movq %rbx, %rdi
callq 0xb949
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: pkNewMap
PkHandle* pkNewMap(PKVM* vm) {
  Map* map = newMap(vm);
  vmPushTempRef(vm, &map->_super); // map
  PkHandle* handle = vmNewHandle(vm, VAR_OBJ(map));
  vmPopTempRef(vm); // map
  return handle;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x20, %ecx
xorl %esi, %esi
xorl %edx, %edx
callq 0xb668
movq %rax, %r14
movl $0x2, (%rax)
movb $0x0, 0x4(%rax)
movq (%rbx), %rax
movq %rax, 0x8(%r14)
movq %r14, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb8d6
movabsq $-0x4000000000000, %rsi # imm = 0xFFFC000000000000
orq %r14, %rsi
movq %rbx, %rdi
callq 0xb6ca
movq %rax, %r14
movq %rbx, %rdi
callq 0xb949
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: newMap
Map* newMap(PKVM* vm) {
  Map* map = ALLOCATE(vm, Map);
  varInitObject(&map->_super, vm, OBJ_MAP);
  map->capacity = 0;
  map->count = 0;
  map->entries = NULL;
  return map;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x20, %ecx
xorl %esi, %esi
xorl %edx, %edx
callq 0xb668
movl $0x2, (%rax)
movb $0x0, 0x4(%rax)
movq (%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: pkNewFiber
PkHandle* pkNewFiber(PKVM* vm, PkHandle* fn) {
  __ASSERT(IS_OBJ_TYPE(fn->value, OBJ_FUNC), "Fn should be of type function.");

  Fiber* fiber = newFiber(vm, (Function*)AS_OBJ(fn->value));
  vmPushTempRef(vm, &fiber->_super); // fiber
  PkHandle* handle = vmNewHandle(vm, VAR_OBJ(fiber));
  vmPopTempRef(vm); // fiber
  return handle;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rsi), %rsi
movq %rsi, %rax
shrq $0x32, %rax
cmpl $0x3fff, %eax           # imm = 0x3FFF
jb 0x8285
movabsq $0xffffffffffff, %rax   # imm = 0xFFFFFFFFFFFF
andq %rax, %rsi
cmpl $0x5, (%rsi)
jne 0x8285
movq %rdi, %rbx
movabsq $-0x4000000000001, %r14 # imm = 0xFFFBFFFFFFFFFFFF
callq 0x828a
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0xb8d6
incq %r14
orq %r15, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb6ca
movq %rax, %r14
movq %rbx, %rdi
callq 0xb949
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
callq 0x24ab
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: newFiber
Fiber* newFiber(PKVM* vm, Function* fn) {
  Fiber* fiber = ALLOCATE(vm, Fiber);
  memset(fiber, 0, sizeof(Fiber));
  varInitObject(&fiber->_super, vm, OBJ_FIBER);

  fiber->state = FIBER_NEW;
  fiber->func = fn;

  if (fn->is_native) {
    // For native functions, we're only using stack for parameters,
    // there won't be any locals or temps (which are belongs to the
    // native "C" stack).
    int stack_size = utilPowerOf2Ceil(fn->arity + 1);
    fiber->stack = ALLOCATE_ARRAY(vm, Var, stack_size);
    fiber->stack_size = stack_size;
    fiber->ret = fiber->stack;
    fiber->sp = fiber->stack + 1;

  } else {
    // Allocate stack.
    int stack_size = utilPowerOf2Ceil(fn->fn->stack_size + 1);
    if (stack_size < MIN_STACK_SIZE) stack_size = MIN_STACK_SIZE;
    fiber->stack = ALLOCATE_ARRAY(vm, Var, stack_size);
    fiber->stack_size = stack_size;
    fiber->ret = fiber->stack;
    fiber->sp = fiber->stack + 1;

    // Allocate call frames.
    fiber->frame_capacity = INITIAL_CALL_FRAMES;
    fiber->frames = ALLOCATE_ARRAY(vm, CallFrame, fiber->frame_capacity);
    fiber->frame_count = 1;

    // Initialize the first frame.
    fiber->frames[0].fn = fn;
    fiber->frames[0].ip = fn->fn->opcodes.data;
    fiber->frames[0].rbp = fiber->ret;
  }

  // Initialize the return value to null (doesn't really have to do that here
  // but if we're trying to debut it may crash when dumping the return value).
  *fiber->ret = VAR_NULL;

  return fiber;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
movl $0x60, %ecx
xorl %esi, %esi
xorl %edx, %edx
callq 0xb668
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x50(%rax)
movl $0x6, (%rax)
movb $0x0, 0x4(%rax)
movq (%r14), %rax
movq %rax, 0x8(%rbx)
movq %rbx, (%r14)
movl $0x0, 0x10(%rbx)
movq %r15, 0x18(%rbx)
cmpb $0x1, 0x30(%r15)
jne 0x8321
movl 0x20(%r15), %edi
incl %edi
callq 0xf348
movslq %eax, %r15
leaq (,%r15,8), %rcx
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xb668
movq %rax, 0x20(%rbx)
movl %r15d, 0x28(%rbx)
movq %rax, 0x38(%rbx)
addq $0x8, %rax
movq %rax, 0x30(%rbx)
jmp 0x839f
movq 0x38(%r15), %rax
movl 0x20(%rax), %edi
incl %edi
callq 0xf348
cmpl $0x81, %eax
movl $0x80, %r12d
cmovgel %eax, %r12d
leaq (,%r12,8), %rcx
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xb668
movq %rax, 0x20(%rbx)
movl %r12d, 0x28(%rbx)
movq %rax, 0x38(%rbx)
addq $0x8, %rax
movq %rax, 0x30(%rbx)
movl $0x4, 0x48(%rbx)
movl $0x60, %ecx
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xb668
movq %rax, 0x40(%rbx)
movl $0x1, 0x4c(%rbx)
movq %r15, 0x8(%rax)
movq 0x38(%r15), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movq 0x38(%rbx), %rcx
movq %rcx, 0x10(%rax)
movq 0x38(%rbx), %rax
movabsq $0x7ffc000000000000, %rcx # imm = 0x7FFC000000000000
movq %rcx, (%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: pkNewInstNative
PkHandle* pkNewInstNative(PKVM* vm, void* data, uint32_t id) {
  Instance* inst = newInstanceNative(vm, data, id);
  vmPushTempRef(vm, &inst->_super); // inst
  PkHandle* handle = vmNewHandle(vm, VAR_OBJ(inst));
  vmPopTempRef(vm); // inst
  return handle;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x8404
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0xb8d6
movabsq $-0x4000000000000, %rsi # imm = 0xFFFC000000000000
orq %r14, %rsi
movq %rbx, %rdi
callq 0xb6ca
movq %rax, %r14
movq %rbx, %rdi
callq 0xb949
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: newInstanceNative
Instance* newInstanceNative(PKVM* vm, void* data, uint32_t id) {
  Instance* inst = ALLOCATE(vm, Instance);
  varInitObject(&inst->_super, vm, OBJ_INST);
  inst->is_native = true;
  inst->native_id = id;

  if (vm->config.inst_name_fn != NULL) {
    inst->name = vm->config.inst_name_fn(id);
  } else {
    inst->name = "$(?)";
  }

  inst->native = data;
  return inst;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r15
movl $0x28, %ecx
xorl %esi, %esi
xorl %edx, %edx
callq 0xb668
movq %rax, %r14
movl $0x8, (%rax)
movb $0x0, 0x4(%rax)
movq (%r15), %rax
movq %rax, 0x8(%r14)
movq %r14, (%r15)
movb $0x1, 0x18(%r14)
movl %ebp, 0x1c(%r14)
movq 0xf0(%r15), %rax
testq %rax, %rax
je 0x8453
movl %ebp, %edi
callq *%rax
jmp 0x845a
leaq 0x14deb(%rip), %rax     # 0x1d245
movq %rax, 0x10(%r14)
movq %rbx, 0x20(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: newRange
Range* newRange(PKVM* vm, double from, double to) {
  Range* range = ALLOCATE(vm, Range);
  varInitObject(&range->_super, vm, OBJ_RANGE);
  range->from = from;
  range->to = to;
  return range;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
movq %rdi, %rbx
movl $0x20, %ecx
xorl %esi, %esi
xorl %edx, %edx
callq 0xb668
movl $0x3, (%rax)
movb $0x0, 0x4(%rax)
movq (%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rbx)
movsd (%rsp), %xmm0
movsd %xmm0, 0x10(%rax)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x18(%rax)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: newScript
Script* newScript(PKVM* vm, String* name, bool is_core) {
  Script* script = ALLOCATE(vm, Script);
  varInitObject(&script->_super, vm, OBJ_SCRIPT);

  ASSERT(name != NULL && name->length > 0, OOPS);

  script->path = name;
  script->module = NULL;
  script->initialized = is_core;
  script->body = NULL;

  // Core modules has its name as the module name.
  if (is_core) script->module = name;

  pkVarBufferInit(&script->globals);
  pkUintBufferInit(&script->global_names);
  pkVarBufferInit(&script->literals);
  pkFunctionBufferInit(&script->functions);
  pkClassBufferInit(&script->classes);
  pkStringBufferInit(&script->names);

  // Add a implicit main function and the '__file__' global to the module, only
  // if it's not a core module.
  if (!is_core) {
    vmPushTempRef(vm, &script->_super);
    scriptAddMain(vm, script);

    // Add '__file__' variable with it's path as value. If the path starts with
    // '$' It's a special file ($(REPL) or $(TRY)) and don't define __file__.
    if (script->path->data[0] != '$') {
      scriptAddGlobal(vm, script, "__file__", 8, VAR_OBJ(script->path));
    }

    // TODO: Add ARGV as a global.

    vmPopTempRef(vm); // script.
  }

  return script;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movl $0x90, %ecx
xorl %esi, %esi
xorl %edx, %edx
callq 0xb668
movq %rax, %rbx
movl $0x4, (%rax)
movb $0x0, 0x4(%rax)
movq (%r14), %rax
movq %rax, 0x8(%rbx)
movq %rbx, (%r14)
testq %r15, %r15
je 0x91b1
cmpl $0x0, 0x14(%r15)
je 0x91b1
movq %r15, 0x18(%rbx)
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movb %bpl, 0x88(%rbx)
movq %rax, 0x80(%rbx)
testb %bpl, %bpl
je 0x913b
movq %r15, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x60(%rbx)
movups %xmm0, 0x70(%rbx)
jmp 0x91a3
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%rbx)
movups %xmm0, 0x60(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb8d6
movq %r14, %rdi
movq %rbx, %rsi
callq 0x91b6
movq 0x18(%rbx), %r8
cmpb $0x24, 0x1c(%r8)
je 0x919b
movabsq $-0x4000000000000, %rax # imm = 0xFFFC000000000000
orq %rax, %r8
leaq 0x1408f(%rip), %rdx     # 0x1d21a
movq %r14, %rdi
movq %rbx, %rsi
movl $0x8, %ecx
callq 0x91fa
movq %r14, %rdi
callq 0xb949
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x24df
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: scriptAddMain
void scriptAddMain(PKVM* vm, Script* script) {
  ASSERT(script->body == NULL, OOPS);

  const char* fn_name = PK_IMPLICIT_MAIN_NAME;
  script->body = newFunction(vm, fn_name, (int)strlen(fn_name),
                             script, false, NULL/*TODO*/);
  script->body->arity = 0;
  script->initialized = false;
}

// Assembly:
pushq %rbx
cmpq $0x0, 0x80(%rsi)
jne 0x91f5
movq %rsi, %rbx
leaq 0x140ac(%rip), %rsi     # 0x1d277
movl $0xd, %edx
movq %rbx, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x929e
movq %rax, 0x80(%rbx)
movl $0x0, 0x20(%rax)
movb $0x0, 0x88(%rbx)
popq %rbx
retq
callq 0x2515
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: scriptAddGlobal
uint32_t scriptAddGlobal(PKVM* vm, Script* script,
                    const char* name, uint32_t length,
                    Var value) {

  // If already exists update the value.
  int var_ind = scriptGetGlobals(script, name, length);
  if (var_ind != -1) {
    ASSERT(var_ind < (int)script->globals.count, OOPS);
    script->globals.data[var_ind] = value;
    return var_ind;
  }

  // If we're reached here that means we don't already have a variable with
  // that name, create new one and set the value.
  uint32_t name_ind = scriptAddName(script, vm, name, length);
  pkUintBufferWrite(&script->global_names, vm, name_ind);
  pkVarBufferWrite(&script->globals, vm, value);
  return script->globals.count - 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
movq %rdx, %rsi
movl %ecx, %edx
callq 0xa5d9
cmpl $-0x1, %eax
je 0x9235
cmpl 0x28(%r14), %eax
jge 0x9299
movq 0x20(%r14), %rcx
movslq %eax, %rdx
movq %rbx, (%rcx,%rdx,8)
jmp 0x9290
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl %ebp, %ecx
callq 0x93bb
movl %eax, %ebp
leaq 0x30(%r14), %rdi
movl 0x38(%r14), %edx
incl %edx
movq %r15, %rsi
callq 0x849a
movq 0x30(%r14), %rax
movl 0x38(%r14), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x38(%r14)
movl %ebp, (%rax,%rcx,4)
leaq 0x20(%r14), %rdi
movl 0x28(%r14), %edx
incl %edx
movq %r15, %rsi
callq 0x86b0
movl 0x28(%r14), %eax
movq 0x20(%r14), %rcx
movq %rbx, (%rcx,%rax,8)
leal 0x1(%rax), %ecx
movl %ecx, 0x28(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x254b
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: newFunction
Function* newFunction(PKVM* vm, const char* name, int length, Script* owner,
                      bool is_native, const char* docstring) {

  Function* func = ALLOCATE(vm, Function);
  varInitObject(&func->_super, vm, OBJ_FUNC);

  vmPushTempRef(vm, &func->_super); // func

  if (owner == NULL) {
    ASSERT(is_native, OOPS);
    func->name = name;
    func->owner = NULL;
    func->is_native = is_native;

  } else {
    pkFunctionBufferWrite(&owner->functions, vm, func);
    uint32_t name_index = scriptAddName(owner, vm, name, length);

    func->name = owner->names.data[name_index]->data;
    func->owner = owner;
    func->arity = -2; // -1 means variadic args.
    func->is_native = is_native;
  }

  if (is_native) {
    func->native = NULL;

  } else {
    Fn* fn = ALLOCATE(vm, Fn);
    pkByteBufferInit(&fn->opcodes);
    pkUintBufferInit(&fn->oplines);
    fn->stack_size = 0;
    func->fn = fn;
  }

  // Both native and script (TODO:) functions support docstring.
  func->docstring = docstring;

  vmPopTempRef(vm); // func
  return func;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, (%rsp)
movl %r8d, %ebp
movq %rcx, %r12
movl %edx, %ebx
movq %rsi, %r13
movq %rdi, %r14
movl $0x40, %ecx
xorl %esi, %esi
xorl %edx, %edx
callq 0xb668
movq %rax, %r15
movl $0x5, (%rax)
movb $0x0, 0x4(%rax)
movq (%r14), %rax
movq %rax, 0x8(%r15)
movq %r15, (%r14)
movq %r14, %rdi
movq %r15, %rsi
callq 0xb8d6
testq %r12, %r12
je 0x934a
leaq 0x40(%r12), %rdi
movl 0x48(%r12), %edx
incl %edx
movq %r14, %rsi
callq 0x88e6
movl 0x48(%r12), %eax
movq 0x40(%r12), %rcx
movq %r15, (%rcx,%rax,8)
incl %eax
movl %eax, 0x48(%r12)
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
movl %ebx, %ecx
callq 0x93bb
movq 0x60(%r12), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rax
addq $0x1c, %rax
movq %rax, 0x10(%r15)
movq %r12, 0x18(%r15)
movl $0xfffffffe, 0x20(%r15) # imm = 0xFFFFFFFE
jmp 0x935b
testb %bpl, %bpl
je 0x93b6
movq %r13, 0x10(%r15)
movq $0x0, 0x18(%r15)
movb %bpl, 0x30(%r15)
testb %bpl, %bpl
je 0x936e
movq $0x0, 0x38(%r15)
jmp 0x9394
movl $0x28, %ecx
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xb668
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movl $0x0, 0x20(%rax)
movq %rax, 0x38(%r15)
movq (%rsp), %rax
movq %rax, 0x28(%r15)
movq %r14, %rdi
callq 0xb949
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2581
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: scriptAddName
uint32_t scriptAddName(Script* self, PKVM* vm, const char* name,
  uint32_t length) {

  for (uint32_t i = 0; i < self->names.count; i++) {
    String* _name = self->names.data[i];
    if (_name->length == length && strncmp(_name->data, name, length) == 0) {
      // Name already exists in the buffer.
      return i;
    }
  }

  // If we reach here the name doesn't exists in the buffer, so add it and
  // return the index.
  String* new_name = newStringLength(vm, name, length);
  vmPushTempRef(vm, &new_name->_super);
  pkStringBufferWrite(&self->names, vm, new_name);
  vmPopTempRef(vm);
  return self->names.count - 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %ebp
movq %rdx, 0x10(%rsp)
movq %rsi, 0x20(%rsp)
leaq 0x60(%rdi), %rax
movq %rdi, 0x28(%rsp)
movl 0x68(%rdi), %ebx
testq %rbx, %rbx
setne %r14b
movq %rax, 0x18(%rsp)
je 0x943b
movq (%rax), %r13
movl %ebp, %eax
movq %rax, 0x30(%rsp)
xorl %r12d, %r12d
movq (%r13,%r12,8), %rdi
movb $0x1, %r15b
cmpl %ebp, 0x14(%rdi)
jne 0x9428
addq $0x1c, %rdi
movq 0x10(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x2090
testl %eax, %eax
jne 0x9428
xorl %r15d, %r15d
movl %r12d, 0xc(%rsp)
testb %r15b, %r15b
je 0x943b
incq %r12
cmpq %rbx, %r12
setb %r14b
jne 0x93fc
jmp 0x943b
testb $0x1, %r14b
movl 0xc(%rsp), %eax
jne 0x949b
movq 0x20(%rsp), %r14
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movl %ebp, %edx
callq 0x7fc8
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0xb8d6
movq 0x28(%rsp), %rbx
movl 0x68(%rbx), %edx
incl %edx
movq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x87cb
movl 0x68(%rbx), %eax
movq 0x60(%rbx), %rcx
movq %r15, (%rcx,%rax,8)
incl %eax
movl %eax, 0x68(%rbx)
movq %r14, %rdi
callq 0xb949
movl 0x68(%rbx), %eax
decl %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: newClass
Class* newClass(PKVM* vm, Script* scr, const char* name, uint32_t length) {
  Class* type = ALLOCATE(vm, Class);
  varInitObject(&type->_super, vm, OBJ_CLASS);

  vmPushTempRef(vm, &type->_super); // type.

  pkClassBufferWrite(&scr->classes, vm, type);
  type->owner = scr;
  type->name = scriptAddName(scr, vm, name, length);
  pkUintBufferInit(&type->field_names);

  // Can't use '$' in string format. (TODO)
  String* ty_name = scr->names.data[type->name];
  String* dollar = newStringLength(vm, "$", 1);
  vmPushTempRef(vm, &dollar->_super); // dollar
  String* ctor_name = stringFormat(vm, "@(Ctor:@)", dollar, ty_name);
  vmPopTempRef(vm); // dollar

  // Constructor.
  vmPushTempRef(vm, &ctor_name->_super); // ctor_name
  type->ctor = newFunction(vm, ctor_name->data, ctor_name->length,
                           scr, false, NULL);
  vmPopTempRef(vm); // ctor_name

  vmPopTempRef(vm); // type.
  return type;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movl $0x38, %ecx
xorl %esi, %esi
xorl %edx, %edx
callq 0xb668
movq %rax, %r14
movl $0x7, (%rax)
movb $0x0, 0x4(%rax)
movq (%rbx), %rax
movq %rax, 0x8(%r14)
movq %r14, (%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb8d6
leaq 0x50(%r15), %rdi
movl 0x58(%r15), %edx
incl %edx
movq %rbx, %rsi
callq 0x8a01
movl 0x58(%r15), %eax
movq 0x50(%r15), %rcx
movq %r14, (%rcx,%rax,8)
incl %eax
movl %eax, 0x58(%r15)
movq %r15, 0x10(%r14)
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl %ebp, %ecx
callq 0x93bb
movl %eax, 0x18(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movq 0x60(%r15), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %r12
leaq 0x1582f(%rip), %rsi     # 0x1ed74
movq %rbx, %rdi
movl $0x1, %edx
callq 0x7fc8
movq %rax, %r13
movq %rbx, %rdi
movq %rax, %rsi
callq 0xb8d6
leaq 0x13cc8(%rip), %rsi     # 0x1d22f
movq %rbx, %rdi
movq %r13, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x95d0
movq %rax, %r12
movq %rbx, %rdi
callq 0xb949
movq %rbx, %rdi
movq %r12, %rsi
callq 0xb8d6
movl 0x14(%r12), %edx
addq $0x1c, %r12
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x929e
movq %rax, 0x20(%r14)
movq %rbx, %rdi
callq 0xb949
movq %rbx, %rdi
callq 0xb949
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/atomlang[P]atomlang/src/pk_var.c
// Function: newInstance
Instance* newInstance(PKVM* vm, Class* ty, bool initialize) {

  Instance* inst = ALLOCATE(vm, Instance);
  varInitObject(&inst->_super, vm, OBJ_INST);

  vmPushTempRef(vm, &inst->_super); // inst.

  ASSERT(ty->name < ty->owner->names.count, OOPS);
  inst->name = ty->owner->names.data[ty->name]->data;
  inst->is_native = false;

  Inst* ins = ALLOCATE(vm, Inst);
  inst->ins = ins;
  ins->type = ty;
  pkVarBufferInit(&ins->fields);

  if (initialize && ty->field_names.count != 0) {
    pkVarBufferFill(&ins->fields, vm, VAR_NULL, ty->field_names.count);
  }

  vmPopTempRef(vm); // inst.

  return inst;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movl $0x28, %ecx
xorl %esi, %esi
xorl %edx, %edx
callq 0xb668
movq %rax, %r14
movl $0x8, (%rax)
movb $0x0, 0x4(%rax)
movq (%rbx), %rax
movq %rax, 0x8(%r14)
movq %r14, (%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb8d6
movl 0x18(%r15), %eax
movq 0x10(%r15), %rcx
cmpl 0x68(%rcx), %eax
jae 0x98d9
movq 0x60(%rcx), %rcx
movq (%rcx,%rax,8), %rax
addq $0x1c, %rax
movq %rax, 0x10(%r14)
movb $0x0, 0x18(%r14)
movl $0x18, %ecx
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xb668
movq %rax, 0x20(%r14)
movq %r15, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
testb %bpl, %bpl
je 0x98c3
movl 0x30(%r15), %ecx
testl %ecx, %ecx
je 0x98c3
addq $0x8, %rax
movabsq $0x7ffc000000000000, %rdx # imm = 0x7FFC000000000000
movq %rax, %rdi
movq %rbx, %rsi
callq 0x86fe
movq %rbx, %rdi
callq 0xb949
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x25b7
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: rangeAsList
List* rangeAsList(PKVM* vm, Range* self) {
  List* list;
  if (self->from < self->to) {
    list = newList(vm, (uint32_t)(self->to - self->from));
    for (double i = self->from; i < self->to; i++) {
      pkVarBufferWrite(&list->elements, vm, VAR_NUM(i));
    }
    return list;

  } else {
    list = newList(vm, 0);
  }

  return list;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movsd 0x10(%rsi), %xmm0
movsd 0x18(%rsi), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x998e
movq %rsi, %r14
subsd %xmm0, %xmm1
cvttsd2si %xmm1, %rsi
movq %rbx, %rdi
callq 0x8105
movq %rax, %r15
movsd 0x10(%r14), %xmm0
movsd 0x18(%r14), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x997d
movq %r15, %r12
addq $0x10, %r12
movsd %xmm0, 0x8(%rsp)
callq 0xf391
movq %rax, %r13
movl 0x18(%r15), %edx
incl %edx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x86b0
movsd 0x8(%rsp), %xmm0
movl 0x18(%r15), %eax
movq 0x10(%r15), %rcx
movq %r13, (%rcx,%rax,8)
incl %eax
movl %eax, 0x18(%r15)
addsd 0x1374f(%rip), %xmm0    # 0x1d0c0
movsd 0x18(%r14), %xmm1
ucomisd %xmm0, %xmm1
ja 0x9932
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rbx, %rdi
xorl %esi, %esi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x8105
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: stringLower
String* stringLower(PKVM* vm, String* self) {
  // If the string itself is already lower, don't allocate new string.
  uint32_t index = 0;
  for (const char* c = self->data; *c != '\0'; c++, index++) {
    if (isupper(*c)) {

      // It contain upper case letters, allocate new lower case string .
      String* lower = newStringLength(vm, self->data, self->length);

      // Start where the first upper case letter found.
      char* _c = lower->data + (c - self->data);
      for (; *_c != '\0'; _c++) *_c = (char)tolower(*_c);

      // Since the string is modified re-hash it.
      lower->hash = utilHashString(lower->data);
      return lower;
    }
  }
  // If we reached here the string itself is lower, return it.
  return self;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movb 0x1c(%rsi), %bpl
testb %bpl, %bpl
je 0x9a34
movq %rdi, %r14
leaq 0x1c(%rbx), %r15
callq 0x23c0
movq (%rax), %rax
movl $0x1d, %r12d
movsbq %bpl, %rcx
testb $0x1, 0x1(%rax,%rcx,2)
jne 0x99e7
movb (%rbx,%r12), %bpl
incq %r12
testb %bpl, %bpl
jne 0x99ce
jmp 0x9a34
movl 0x14(%rbx), %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x7fc8
movq %rax, %rbx
leaq 0x1c(%rax), %r14
movb -0x1(%rax,%r12), %bpl
testb %bpl, %bpl
je 0x9a29
callq 0x23b0
movq %rbx, %rcx
addq %r12, %rcx
movq (%rax), %rdx
movsbq %bpl, %rsi
movb (%rdx,%rsi,4), %dl
movb %dl, -0x1(%rcx)
movb (%rcx), %bpl
incq %rcx
testb %bpl, %bpl
jne 0x9a11
movq %r14, %rdi
callq 0xf426
movl %eax, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: stringUpper
String* stringUpper(PKVM* vm, String* self) {
  // If the string itself is already upper don't allocate new string.
  uint32_t index = 0;
  for (const char* c = self->data; *c != '\0'; c++, index++) {
    if (islower(*c)) {
      // It contain lower case letters, allocate new upper case string .
      String* upper = newStringLength(vm, self->data, self->length);

      // Start where the first lower case letter found.
      char* _c = upper->data + (c - self->data);
      for (; *_c != '\0'; _c++) *_c = (char)toupper(*_c);

      // Since the string is modified re-hash it.
      upper->hash = utilHashString(upper->data);
      return upper;
    }
  }
  // If we reached here the string itself is lower, return it.
  return self;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movb 0x1c(%rsi), %bpl
testb %bpl, %bpl
je 0x9acf
movq %rdi, %r14
leaq 0x1c(%rbx), %r15
callq 0x23c0
movq (%rax), %rax
movl $0x1d, %r12d
movsbq %bpl, %rcx
testb $0x2, 0x1(%rax,%rcx,2)
jne 0x9a82
movb (%rbx,%r12), %bpl
incq %r12
testb %bpl, %bpl
jne 0x9a69
jmp 0x9acf
movl 0x14(%rbx), %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x7fc8
movq %rax, %rbx
leaq 0x1c(%rax), %r14
movb -0x1(%rax,%r12), %bpl
testb %bpl, %bpl
je 0x9ac4
callq 0x2030
movq %rbx, %rcx
addq %r12, %rcx
movq (%rax), %rdx
movsbq %bpl, %rsi
movb (%rdx,%rsi,4), %dl
movb %dl, -0x1(%rcx)
movb (%rcx), %bpl
incq %rcx
testb %bpl, %bpl
jne 0x9aac
movq %r14, %rdi
callq 0xf426
movl %eax, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: stringStrip
String* stringStrip(PKVM* vm, String* self) {

  // Implementation:
  //
  // "     a string with leading and trailing white space    "
  //  ^start >>                                       << end^
  //
  // These 'start' and 'end' pointers will move respectively right and left
  // while it's a white space and return an allocated string from 'start' with
  // length of (end - start + 1). For already trimmed string it'll not allocate
  // a new string, instead returns the same string provided.

  const char* start = self->data;
  while (*start && isspace(*start)) start++;

  // If we reached the end of the string, it's all white space, return
  // an empty string.
  if (*start == '\0') {
    return newStringLength(vm, NULL, 0);
  }

  const char* end = self->data + self->length - 1;
  while (isspace(*end)) end--;

  // If the string is already trimmed, return the same string.
  if (start == self->data && end == self->data + self->length - 1) {
    return self;
  }

  return newStringLength(vm, start, (uint32_t)(end - start + 1));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movsbq 0x1c(%rsi), %r15
testq %r15, %r15
sete %bpl
je 0x9b2e
movq %rsi, %r14
callq 0x23c0
movq (%rax), %rax
movl $0x1c, %r12d
testb $0x20, 0x1(%rax,%r15,2)
je 0x9b29
movsbq 0x1(%r14,%r12), %rcx
testq %rcx, %rcx
sete %bpl
je 0x9b2e
incq %r12
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x9b10
testb %bpl, %bpl
je 0x9b48
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7fc8
leaq (%r14,%r12), %r15
movl 0x14(%r14), %r13d
callq 0x23c0
movq (%rax), %rcx
leaq (%r14,%r13), %rdx
addq $0x1b, %rdx
xorl %eax, %eax
movsbq (%rdx,%rax), %rsi
decq %rax
testb $0x20, 0x1(%rcx,%rsi,2)
jne 0x9b62
movq %r12, %rcx
xorq $0x1c, %rcx
movq %rax, %rdx
notq %rdx
orq %rcx, %rdx
jne 0x9b95
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subl %r12d, %r13d
leal (%rax,%r13), %edx
addl $0x1d, %edx
movq %rbx, %rdi
movq %r15, %rsi
jmp 0x9b35
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: stringJoin
String* stringJoin(PKVM* vm, String* str1, String* str2) {

  // Optimize end case.
  if (str1->length == 0) return str2;
  if (str2->length == 0) return str1;

  size_t length = (size_t)str1->length + (size_t)str2->length;
  String* string = _allocateString(vm, length);

  memcpy(string->data, str1->data, str1->length);
  memcpy(string->data + str1->length, str2->data, str2->length);
  // Null byte already existed. From _allocateString.

  string->hash = utilHashString(string->data);
  return string;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl 0x14(%rsi), %eax
testq %rax, %rax
je 0x9c56
movq %rsi, %r14
movl 0x14(%rbx), %ecx
testq %rcx, %rcx
je 0x9c53
movq %rdi, %r12
leaq (%rcx,%rax), %r13
addq %rax, %rcx
addq $0x21, %rcx
xorl %ebp, %ebp
xorl %esi, %esi
xorl %edx, %edx
callq 0xb668
movq %rax, %r15
movl $0x0, (%rax)
movb %bpl, 0x4(%rax)
movq (%r12), %rax
movq %rax, 0x8(%r15)
movq %r15, (%r12)
movl %r13d, 0x14(%r15)
leaq 0x1c(%r15), %r12
movb %bpl, 0x1c(%r15,%r13)
leal 0x1(%r13), %eax
movl %eax, 0x18(%r15)
leaq 0x1c(%r14), %rsi
movl 0x14(%r14), %edx
movq %r12, %rdi
callq 0x2280
movl 0x14(%r14), %eax
leaq (%r15,%rax), %rdi
addq $0x1c, %rdi
movl 0x14(%rbx), %edx
addq $0x1c, %rbx
movq %rbx, %rsi
callq 0x2280
movq %r12, %rdi
callq 0xf426
movl %eax, 0x10(%r15)
movq %r15, %rbx
jmp 0x9c56
movq %r14, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: listInsert
void listInsert(PKVM* vm, List* self, uint32_t index, Var value) {

  // Add an empty slot at the end of the buffer.
  if (IS_OBJ(value)) vmPushTempRef(vm, AS_OBJ(value));
  pkVarBufferWrite(&self->elements, vm, VAR_NULL);
  if (IS_OBJ(value)) vmPopTempRef(vm);

  // Shift the existing elements down.
  for (uint32_t i = self->elements.count - 1; i > index; i--) {
    self->elements.data[i] = self->elements.data[i - 1];
  }

  // Insert the new element.
  self->elements.data[index] = value;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r12
movq %rcx, %r13
shrq $0x32, %r13
cmpl $0x3fff, %r13d          # imm = 0x3FFF
jb 0x9ca3
movabsq $0xffffffffffff, %rsi   # imm = 0xFFFFFFFFFFFF
andq %rbx, %rsi
movq %r12, %rdi
callq 0xb8d6
leaq 0x10(%r15), %r14
movl 0x18(%r15), %edx
incl %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x86b0
movl 0x18(%r15), %eax
leal 0x1(%rax), %ecx
movq 0x10(%r15), %rdx
movabsq $0x7ffc000000000000, %rsi # imm = 0x7FFC000000000000
movq %rsi, (%rdx,%rax,8)
movl %ecx, 0x18(%r15)
cmpl $0x3fff, %r13d          # imm = 0x3FFF
jb 0x9ce6
movq %r12, %rdi
callq 0xb949
movl 0x18(%r15), %eax
leal -0x1(%rax), %ecx
cmpl %ebp, %ecx
jbe 0x9d0b
movq (%r14), %rdx
movl %ecx, %esi
addl $-0x2, %eax
movq (%rdx,%rax,8), %rdi
movq %rdi, (%rdx,%rsi,8)
addq $-0x8, %rdx
decl %ecx
cmpl %ebp, %ecx
ja 0x9cf9
movq (%r14), %rax
movl %ebp, %ecx
movq %rbx, (%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: listRemoveAt
Var listRemoveAt(PKVM* vm, List* self, uint32_t index) {
  Var removed = self->elements.data[index];
  if (IS_OBJ(removed)) vmPushTempRef(vm, AS_OBJ(removed));

  // Shift the rest of the elements up.
  for (uint32_t i = index; i < self->elements.count - 1; i++) {
    self->elements.data[i] = self->elements.data[i + 1];
  }

  // Shrink the size if it's too much excess.
  if (self->elements.capacity / GROW_FACTOR >= self->elements.count) {
    self->elements.data = (Var*)vmRealloc(vm, self->elements.data,
      sizeof(Var) * self->elements.capacity,
      sizeof(Var) * self->elements.capacity / GROW_FACTOR);
    self->elements.capacity /= GROW_FACTOR;
  }

  if (IS_OBJ(removed)) vmPopTempRef(vm);

  self->elements.count--;
  return removed;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r15
movq 0x10(%rsi), %rax
movl %edx, %r13d
movq (%rax,%r13,8), %r14
movq %r14, %r12
shrq $0x32, %r12
cmpl $0x3fff, %r12d          # imm = 0x3FFF
jb 0x9d66
movabsq $0xffffffffffff, %rsi   # imm = 0xFFFFFFFFFFFF
andq %r14, %rsi
movq %r15, %rdi
callq 0xb8d6
movl 0x18(%rbx), %eax
leal -0x1(%rax), %edx
cmpl %ebp, %edx
jbe 0x9d8b
movq 0x10(%rbx), %rcx
movl %edx, %edx
movq 0x8(%rcx,%r13,8), %rsi
movq %rsi, (%rcx,%r13,8)
leaq 0x1(%r13), %rsi
movq %rsi, %r13
cmpq %rsi, %rdx
jne 0x9d76
movl 0x1c(%rbx), %ecx
movl %ecx, %edx
shrl %edx
cmpl %eax, %edx
jb 0x9db5
movq 0x10(%rbx), %rsi
leaq (,%rcx,8), %rdx
shlq $0x2, %rcx
movq %r15, %rdi
callq 0xb668
movq %rax, 0x10(%rbx)
shrl 0x1c(%rbx)
cmpl $0x3fff, %r12d          # imm = 0x3FFF
jb 0x9dc6
movq %r15, %rdi
callq 0xb949
decl 0x18(%rbx)
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/atomlang[P]atomlang/src/pk_var.c
// Function: listJoin
List* listJoin(PKVM* vm, List* l1, List* l2) {

  // Optimize end case.
  if (l1->elements.count == 0) return l2;
  if (l2->elements.count == 0) return l1;

  uint32_t size = l1->elements.count + l2->elements.count;
  List* list = newList(vm, size);

  vmPushTempRef(vm, &list->_super);
  pkVarBufferConcat(&list->elements, vm, &l1->elements);
  pkVarBufferConcat(&list->elements, vm, &l2->elements);
  vmPopTempRef(vm);

  return list;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movl 0x18(%rsi), %eax
testl %eax, %eax
je 0x9e9d
movq %rsi, %r12
movl 0x18(%rbx), %esi
testl %esi, %esi
je 0x9e9a
movq %rdi, %r14
addl %eax, %esi
callq 0x8105
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0xb8d6
leaq 0x10(%r15), %r13
movl 0x18(%r12), %edx
addl 0x18(%r15), %edx
movq %r13, %rdi
movq %r14, %rsi
callq 0x86b0
movl 0x18(%r15), %edi
shlq $0x3, %rdi
addq 0x10(%r15), %rdi
movq 0x10(%r12), %rsi
movl 0x18(%r12), %edx
shlq $0x3, %rdx
callq 0x2280
movl 0x18(%r15), %edx
addl 0x18(%r12), %edx
movl %edx, 0x18(%r15)
addl 0x18(%rbx), %edx
movq %r13, %rdi
movq %r14, %rsi
callq 0x86b0
movl 0x18(%r15), %edi
shlq $0x3, %rdi
addq 0x10(%r15), %rdi
movq 0x10(%rbx), %rsi
movl 0x18(%rbx), %edx
shlq $0x3, %rdx
callq 0x2280
movl 0x18(%rbx), %eax
addl %eax, 0x18(%r15)
movq %r14, %rdi
callq 0xb949
movq %r15, %rbx
jmp 0x9e9d
movq %r12, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: varHashValue
uint32_t varHashValue(Var v) {
  if (IS_OBJ(v)) return _hashObject(AS_OBJ(v));

#if VAR_NAN_TAGGING
  return utilHashBits(v);
#else
  #error TODO:
#endif
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rdi, %rax
shrq $0x32, %rax
cmpl $0x3fff, %eax           # imm = 0x3FFF
jb 0x9ef8
movabsq $0xffffffffffff, %rax   # imm = 0xFFFFFFFFFFFF
andq %rax, %rbx
movl (%rbx), %eax
leal -0x3(%rax), %ecx
cmpl $-0x2, %ecx
jae 0x9f1d
testl %eax, %eax
je 0x9f06
cmpl $0x3, %eax
jne 0x9f10
movsd 0x10(%rbx), %xmm0
callq 0xf3df
movl %eax, %ebp
movsd 0x18(%rbx), %xmm0
callq 0xf3df
xorl %ebp, %eax
jmp 0x9f09
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xf39d
movl 0x10(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
addl $-0x4, %eax
cmpl $0x5, %eax
jae 0x9f22
callq 0x2623
callq 0x25ed
callq 0x2659
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: mapSet
void mapSet(PKVM* vm, Map* self, Var key, Var value) {

  // If map is about to fill, resize it first.
  if (self->count + 1 > self->capacity * MAP_LOAD_PERCENT / 100) {
    uint32_t capacity = self->capacity * GROW_FACTOR;
    if (capacity < MIN_CAPACITY) capacity = MIN_CAPACITY;
    _mapResize(vm, self, capacity);
  }

  if (_mapInsertEntry(self, key, value)) {
    self->count++; //< A new key added.
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rbx
movl 0x10(%rsi), %eax
movl 0x14(%rsi), %ecx
incl %ecx
imull $0x4b, %eax, %edx
imulq $0x51eb851f, %rdx, %rdx # imm = 0x51EB851F
shrq $0x25, %rdx
cmpl %edx, %ecx
jbe 0xa09d
addl %eax, %eax
cmpl $0x9, %eax
movl $0x8, %edx
cmovael %eax, %edx
movq %rbx, %rsi
callq 0xa0b8
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xa161
testb %al, %al
je 0xa0b2
incl 0x14(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: mapResize
static void _mapResize(PKVM* vm, Map* self, uint32_t capacity) {

  MapEntry* old_entries = self->entries;
  uint32_t old_capacity = self->capacity;

  self->entries = ALLOCATE_ARRAY(vm, MapEntry, capacity);
  self->capacity = capacity;
  for (uint32_t i = 0; i < capacity; i++) {
    self->entries[i].key = VAR_UNDEFINED;
    self->entries[i].value = VAR_FALSE;
  }

  // Insert the old entries to the new entries.
  for (uint32_t i = 0; i < old_capacity; i++) {
    // Skip the empty entries or tombstones.
    if (IS_UNDEF(old_entries[i].key)) continue;

    _mapInsertEntry(self, old_entries[i].key, old_entries[i].value);
  }

  DEALLOCATE(vm, old_entries);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movabsq $0x7ffd000000000000, %r12 # imm = 0x7FFD000000000000
movq 0x18(%rsi), %r14
movl 0x10(%rsi), %r13d
movl %edx, %ebx
movq %rbx, %rcx
shlq $0x4, %rcx
movq %rdi, (%rsp)
xorl %esi, %esi
xorl %edx, %edx
callq 0xb668
movq %rax, 0x18(%r15)
movl %ebp, 0x10(%r15)
testl %ebp, %ebp
je 0xa119
shlq $0x4, %rbx
xorl %ecx, %ecx
leaq 0x2(%r12), %rdx
movq %r12, (%rax,%rcx)
movq %rdx, 0x8(%rax,%rcx)
addq $0x10, %rcx
cmpq %rcx, %rbx
jne 0xa107
testq %r13, %r13
je 0xa143
shlq $0x4, %r13
xorl %ebx, %ebx
movq (%r14,%rbx), %rsi
cmpq %r12, %rsi
je 0xa13a
movq 0x8(%r14,%rbx), %rdx
movq %r15, %rdi
callq 0xa161
addq $0x10, %rbx
cmpq %rbx, %r13
jne 0xa124
movq (%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb668
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: mapInsertEntry
static bool _mapInsertEntry(Map* self, Var key, Var value) {

  ASSERT(self->capacity != 0, "Should ensure the capacity before inserting.");

  MapEntry* result;
  if (_mapFindEntry(self, key, &result)) {
    // Key already found, just replace the value.
    result->value = value;
    return false;
  } else {
    result->key = key;
    result->value = value;
    return true;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
cmpl $0x0, 0x10(%rdi)
je 0xa19d
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0x9f4a
movq (%r15), %rcx
testb %al, %al
jne 0xa18d
movq %r14, (%rcx)
movq %rbx, 0x8(%rcx)
xorb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x26f4
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: mapRemoveKey
Var mapRemoveKey(PKVM* vm, Map* self, Var key) {
  MapEntry* entry;
  if (!_mapFindEntry(self, key, &entry)) return VAR_NULL;

  // Set the key as VAR_UNDEFINED to mark is as an available slow and set it's
  // value to VAR_TRUE for tombstone.
  Var value = entry->value;
  entry->key = VAR_UNDEFINED;
  entry->value = VAR_TRUE;

  self->count--;

  if (IS_OBJ(value)) vmPushTempRef(vm, AS_OBJ(value));

  if (self->count == 0) {
    // Clear the map if it's empty.
    mapClear(vm, self);

 } else if ((self->capacity > MIN_CAPACITY) &&
             (self->capacity / (GROW_FACTOR * GROW_FACTOR)) >
             ((self->count * 100) / MAP_LOAD_PERCENT)) {

    // We grow the map when it's filled 75% (MAP_LOAD_PERCENT) by 2
    // (GROW_FACTOR) but we're not shrink the map when it's half filled (ie.
    // half of the capacity is 75%). Instead we wait till it'll become 1/4 is
    // filled (1/4 = 1/(GROW_FACTOR*GROW_FACTOR)) to minimize the
    // reallocations and which is more faster.

    uint32_t capacity = self->capacity / (GROW_FACTOR * GROW_FACTOR);
    if (capacity < MIN_CAPACITY) capacity = MIN_CAPACITY;

    _mapResize(vm, self, capacity);
  }

  if (IS_OBJ(value)) vmPopTempRef(vm);

  return value;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %rax
movq %rsi, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x9f4a
testb %al, %al
je 0xa267
movq (%rsp), %rax
movq 0x8(%rax), %r14
movabsq $0x7ffd000000000000, %rcx # imm = 0x7FFD000000000000
movq %rcx, (%rax)
orq $0x3, %rcx
movq %rcx, 0x8(%rax)
decl 0x14(%r15)
movq %r14, %r12
shrq $0x32, %r12
cmpl $0x3fff, %r12d          # imm = 0x3FFF
jb 0xa229
movabsq $0xffffffffffff, %rsi   # imm = 0xFFFFFFFFFFFF
andq %r14, %rsi
movq %rbx, %rdi
callq 0xb8d6
movl 0x14(%r15), %ecx
testl %ecx, %ecx
je 0xa273
movl 0x10(%r15), %eax
cmpl $0x9, %eax
jb 0xa28b
shrl $0x2, %eax
imull $0x64, %ecx, %ecx
imulq $0x1b4e81b5, %rcx, %rcx # imm = 0x1B4E81B5
shrq $0x23, %rcx
cmpl %ecx, %eax
jbe 0xa28b
cmpl $0x9, %eax
movl $0x8, %edx
cmovael %eax, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa0b8
jmp 0xa28b
movabsq $0x7ffc000000000000, %r14 # imm = 0x7FFC000000000000
jmp 0xa29c
movq 0x18(%r15), %rsi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xb668
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
cmpl $0x3fff, %r12d          # imm = 0x3FFF
jb 0xa29c
movq %rbx, %rdi
callq 0xb949
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: scriptGetClass
int scriptGetClass(Script* script, const char* name, uint32_t length) {
  for (uint32_t i = 0; i < script->classes.count; i++) {
    uint32_t name_ind = script->classes.data[i]->name;
    ASSERT(name_ind < script->names.count, OOPS);
    String* ty_name = script->names.data[name_ind];
    if (ty_name->length == length &&
        strncmp(ty_name->data, name, length) == 0) {
      return (int)i;
    }
  }
  return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, 0x20(%rsp)
movl 0x58(%rdi), %r15d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %r15, %r15
je 0xa538
movl %edx, %ebx
movq %rdi, %r14
movq 0x50(%rdi), %rsi
movl 0x68(%rdi), %r13d
movl %edx, %eax
movq %rax, 0x10(%rsp)
xorl %r12d, %r12d
movq %rsi, 0x18(%rsp)
movq (%rsi,%r12,8), %rax
movl 0x18(%rax), %eax
cmpl %r13d, %eax
jae 0xa547
movq 0x60(%r14), %rcx
movq (%rcx,%rax,8), %rdi
movb $0x1, %bpl
cmpl %ebx, 0x14(%rdi)
jne 0xa520
addq $0x1c, %rdi
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x2090
movq 0x18(%rsp), %rsi
testl %eax, %eax
jne 0xa520
xorl %ebp, %ebp
movl %r12d, 0xc(%rsp)
testb %bpl, %bpl
je 0xa534
incq %r12
cmpl %r12d, %r15d
jne 0xa4e1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xa538
movl 0xc(%rsp), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x272a
// File: /workspace/github_c_makefile_star2_O1/atomlang[P]atomlang/src/pk_var.c
// Function: scriptGetFunc
int scriptGetFunc(Script* script, const char* name, uint32_t length) {
  for (uint32_t i = 0; i < script->functions.count; i++) {
    const char* fn_name = script->functions.data[i]->name;
    uint32_t fn_length = (uint32_t)strlen(fn_name);
    if (fn_length == length && strncmp(fn_name, name, length) == 0) {
      return (int)i;
    }
  }
  return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
movl 0x48(%rdi), %r13d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %r13, %r13
je 0xa5ca
movl %edx, %ebp
movq 0x40(%rdi), %rbx
movl %edx, %eax
movq %rax, 0x8(%rsp)
xorl %r14d, %r14d
movq (%rbx,%r14,8), %rax
movq 0x10(%rax), %r12
movq %r12, %rdi
callq 0x2140
movb $0x1, %r15b
cmpl %ebp, %eax
jne 0xa5b2
movq %r12, %rdi
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0x2090
testl %eax, %eax
jne 0xa5b2
xorl %r15d, %r15d
movl %r14d, 0x4(%rsp)
testb %r15b, %r15b
je 0xa5c6
incq %r14
cmpq %r14, %r13
jne 0xa57d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xa5ca
movl 0x4(%rsp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq