LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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 0xf07b
movq %rdi, %rbx
testl %eax, %eax
je 0xef8c
jle 0xf061
movq 0x30(%rsi), %rdi
subq 0x38(%rsi), %rdi
shrq $0x3, %rdi
cmpl %eax, %edi
jle 0xf061
testq %rdx, %rdx
je 0xf095
movq 0x38(%rsi), %rdi
movl %eax, %r8d
movq (%rdi,%r8,8), %rdi
movq %rdi, %r8
shrq $0x32, %r8
cmpl $0x3fff, %r8d           # imm = 0x3FFF
jb 0xefc6
movabsq $0xffffffffffff, %r8    # imm = 0xFFFFFFFFFFFF
andq %r8, %rdi
cmpl $0x0, (%rdi)
je 0xf04b
testl %eax, %eax
je 0xf012
leaq 0xca50(%rip), %rsi      # 0x1ba21
leaq 0xc(%rsp), %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x2360
movq 0x5f0(%rbx), %rax
cmpq $0x0, 0x58(%rax)
jne 0xf0ca
leaq 0xaa4d(%rip), %rsi      # 0x19a45
leaq 0xab8d(%rip), %rdx      # 0x19b8c
xorl %ebp, %ebp
leaq 0xc(%rsp), %rcx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3a8d
jmp 0xf037
cmpq $0x0, 0x58(%rsi)
jne 0xf0ca
leaq 0xaa46(%rip), %rsi      # 0x19a6a
leaq 0xab61(%rip), %rdx      # 0x19b8c
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3a8d
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 0xf042
movl 0x14(%rdi), %eax
movl %eax, (%rcx)
jmp 0xf042
movq 0x13f90(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x907e(%rip), %rsi      # 0x180f0
leaq 0xa97d(%rip), %rdx      # 0x199f6
jmp 0xf0ad
movq 0x13f76(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x9064(%rip), %rsi      # 0x180f0
leaq 0x95cd(%rip), %rdx      # 0x18660
jmp 0xf0ad
movq 0x13f5c(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x904a(%rip), %rsi      # 0x180f0
leaq 0xa96e(%rip), %rdx      # 0x19a1b
leaq 0xa9c6(%rip), %rcx      # 0x19a7a
leaq 0xa86b(%rip), %r8       # 0x19926
movl $0xcc, %r9d
xorl %eax, %eax
callq 0x2250
ud2
movq 0x13f27(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x9015(%rip), %rsi      # 0x180f0
leaq 0x9122(%rip), %rdx      # 0x18204
leaq 0xa991(%rip), %rcx      # 0x19a7a
leaq 0xa836(%rip), %r8       # 0x19926
movl $0xd5, %r9d
jmp 0xf0c1
// File: /workspace/github_c_makefile_star2_O2/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 0xf23d
movl %esi, %ebp
movq %rdi, %rbx
testl %esi, %esi
je 0xf133
jle 0xf223
movq 0x30(%rax), %rsi
subq 0x38(%rax), %rsi
shrq $0x3, %rsi
cmpl %ebp, %esi
jle 0xf223
testq %rcx, %rcx
je 0xf257
movq 0x38(%rax), %rax
movl %ebp, %esi
movq (%rax,%rsi,8), %rax
movq %rax, %rsi
shrq $0x32, %rsi
cmpl $0x3fff, %esi           # imm = 0x3FFF
jb 0xf181
movabsq $0xffffffffffff, %rsi   # imm = 0xFFFFFFFFFFFF
andq %rsi, %rax
cmpl $0x8, (%rax)
jne 0xf181
cmpb $0x1, 0x18(%rax)
jne 0xf181
cmpl %edx, 0x1c(%rax)
jne 0xf181
movq 0x20(%rax), %rax
movq %rax, (%rcx)
movb $0x1, %bpl
jmp 0xf218
movq 0xf0(%rbx), %rax
testq %rax, %rax
je 0xf196
movl %edx, %edi
callq *%rax
movq %rax, %r14
jmp 0xf19d
leaq 0x90b8(%rip), %r14      # 0x18255
testl %ebp, %ebp
je 0xf1e5
leaq 0xc879(%rip), %rsi      # 0x1ba21
leaq 0x4(%rsp), %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2360
movq 0x5f0(%rbx), %rax
cmpq $0x0, 0x58(%rax)
jne 0xf285
leaq 0xa876(%rip), %rsi      # 0x19a45
xorl %ebp, %ebp
leaq 0x4(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3a8d
jmp 0xf20d
movq 0x5f0(%rbx), %rax
cmpq $0x0, 0x58(%rax)
jne 0xf285
leaq 0xa86c(%rip), %rsi      # 0x19a6a
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3a8d
movq 0x5f0(%rbx), %rcx
movq %rax, 0x58(%rcx)
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x13dce(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x8ebc(%rip), %rsi      # 0x180f0
leaq 0xa7bb(%rip), %rdx      # 0x199f6
jmp 0xf26f
movq 0x13db4(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x8ea2(%rip), %rsi      # 0x180f0
leaq 0x940b(%rip), %rdx      # 0x18660
jmp 0xf26f
movq 0x13d9a(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x8e88(%rip), %rsi      # 0x180f0
leaq 0xa7ac(%rip), %rdx      # 0x19a1b
leaq 0xa813(%rip), %rcx      # 0x19a89
leaq 0xa6a9(%rip), %r8       # 0x19926
movl $0xde, %r9d
jmp 0xf2b1
movq 0x13d6c(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x8e5a(%rip), %rsi      # 0x180f0
leaq 0x8f67(%rip), %rdx      # 0x18204
leaq 0xa7e5(%rip), %rcx      # 0x19a89
leaq 0xa67b(%rip), %r8       # 0x19926
movl $0xf1, %r9d
xorl %eax, %eax
callq 0x2250
ud2
// File: /workspace/github_c_makefile_star2_O2/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 0xf3b1
movq %rcx, %r15
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
testl %esi, %esi
je 0xf300
jle 0xf397
movq 0x30(%rax), %rcx
subq 0x38(%rax), %rcx
shrq $0x3, %rcx
cmpl %ebp, %ecx
jle 0xf397
testq %r15, %r15
je 0xf3cb
movq 0x38(%rax), %rax
movl %ebp, %ecx
movq (%rax,%rcx,8), %rax
leaq 0x10(%rsp), %r13
movq %rax, (%r13)
movq %r13, %rdi
callq 0x24cc
movl %eax, %r12d
cmpl %ebx, %eax
jne 0xf330
movq %r13, (%r15)
jmp 0xf382
leaq 0xc6ea(%rip), %rsi      # 0x1ba21
leaq 0x4(%rsp), %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2360
movq 0x5f0(%r14), %rax
cmpq $0x0, 0x58(%rax)
jne 0xf400
movl %ebx, %edi
callq 0x4dd7
leaq 0xa73f(%rip), %rsi      # 0x19aa4
leaq 0x4(%rsp), %rcx
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x3a8d
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
movq 0x13c5a(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x8d48(%rip), %rsi      # 0x180f0
leaq 0xa647(%rip), %rdx      # 0x199f6
jmp 0xf3e3
movq 0x13c40(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x8d2e(%rip), %rsi      # 0x180f0
leaq 0x9297(%rip), %rdx      # 0x18660
jmp 0xf3e3
movq 0x13c26(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x8d14(%rip), %rsi      # 0x180f0
leaq 0xa638(%rip), %rdx      # 0x19a1b
leaq 0xa6ac(%rip), %rcx      # 0x19a96
leaq 0xa535(%rip), %r8       # 0x19926
movl $0xfa, %r9d
xorl %eax, %eax
callq 0x2250
ud2
movq 0x13bf1(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x8cdf(%rip), %rsi      # 0x180f0
leaq 0x8dec(%rip), %rdx      # 0x18204
leaq 0xa677(%rip), %rcx      # 0x19a96
leaq 0xa500(%rip), %r8       # 0x19926
movl $0x100, %r9d            # imm = 0x100
jmp 0xf3f7
// File: /workspace/github_c_makefile_star2_O2/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 0xf5fc
movq (%rdi), %rax
movq %rax, %rcx
shrq $0x32, %rcx
cmpl $0x3fff, %ecx           # imm = 0x3FFF
jb 0xf5ce
movabsq $0xffffffffffff, %rcx   # imm = 0xFFFFFFFFFFFF
andq %rcx, %rax
cmpl $0x6, (%rax)
jne 0xf5ce
movq 0x38(%rax), %rax
popq %rcx
retq
movq 0x13a23(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x8b11(%rip), %rsi      # 0x180f0
leaq 0xa520(%rip), %rdx      # 0x19b06
leaq 0xa503(%rip), %rcx      # 0x19af0
leaq 0xa332(%rip), %r8       # 0x19926
movl $0x139, %r9d            # imm = 0x139
jmp 0xf628
movq 0x139f5(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x8ae3(%rip), %rsi      # 0x180f0
leaq 0x8fff(%rip), %rdx      # 0x18613
leaq 0xa4d5(%rip), %rcx      # 0x19af0
leaq 0xa304(%rip), %r8       # 0x19926
movl $0x137, %r9d            # imm = 0x137
xorl %eax, %eax
callq 0x2250
ud2
// File: /workspace/github_c_makefile_star2_O2/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 0xf692
movq (%rdi), %rax
movq %rax, %rcx
shrq $0x32, %rcx
cmpl $0x3fff, %ecx           # imm = 0x3FFF
jb 0xf664
movabsq $0xffffffffffff, %rcx   # imm = 0xFFFFFFFFFFFF
andq %rcx, %rax
cmpl $0x6, (%rax)
jne 0xf664
cmpl $0x3, 0x10(%rax)
sete %al
popq %rcx
retq
movq 0x1398d(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x8a7b(%rip), %rsi      # 0x180f0
leaq 0xa48a(%rip), %rdx      # 0x19b06
leaq 0xa49f(%rip), %rcx      # 0x19b22
leaq 0xa29c(%rip), %r8       # 0x19926
movl $0x141, %r9d            # imm = 0x141
jmp 0xf6be
movq 0x1395f(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x8a4d(%rip), %rsi      # 0x180f0
leaq 0x8f69(%rip), %rdx      # 0x18613
leaq 0xa471(%rip), %rcx      # 0x19b22
leaq 0xa26e(%rip), %r8       # 0x19926
movl $0x13f, %r9d            # imm = 0x13F
xorl %eax, %eax
callq 0x2250
ud2
// File: /workspace/github_c_makefile_star2_O2/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 %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl 0x5e8(%rdi), %r13d
movl %edx, %r12d
addq $0x140, %r15            # imm = 0x140
xorl %ebp, %ebp
cmpq %r13, %rbp
jae 0xf713
cmpl %ebx, (%r15)
jne 0xf70a
movq -0x8(%r15), %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x2090
testl %eax, %eax
je 0xf718
incq %rbp
addq $0x18, %r15
jmp 0xf6ed
pushq $-0x1
popq %rax
jmp 0xf71a
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x42f9
movabsq $0x7ffd000000000000, %rcx # imm = 0x7FFD000000000000
cmpq %rcx, %rax
jne 0xf7f6
xorl %eax, %eax
jmp 0xf80d
cmpq %rbx, %rax
jbe 0xf80f
movabsq $0xffffffffffff, %rcx   # imm = 0xFFFFFFFFFFFF
andq %rcx, %rax
cmpl $0x4, (%rax)
jne 0xf80f
popq %rbx
retq
movq 0x137e2(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x88d0(%rip), %rsi      # 0x180f0
leaq 0x89dd(%rip), %rdx      # 0x18204
leaq 0xa32c(%rip), %rcx      # 0x19b5a
leaq 0xa0f1(%rip), %r8       # 0x19926
movl $0x1b7, %r9d            # imm = 0x1B7
xorl %eax, %eax
callq 0x2250
ud2
// File: /workspace/github_c_makefile_star2_O2/atomlang[P]atomlang/src/pk_core.c
// Function: initializeBuiltinFN
static void initializeBuiltinFN(PKVM* vm, BuiltinFn* bfn, const char* name,
                                int length, int arity, pkNativeFn ptr,
                                const char* docstring) {
  bfn->name = name;
  bfn->length = length;

  bfn->fn = newFunction(vm, name, length, NULL, true, docstring);
  bfn->fn->arity = arity;
  bfn->fn->native = ptr;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %r9, %rbx
movl %r8d, %ebp
movq %rsi, %r14
movq 0x20(%rsp), %r9
movq %rdx, (%rsi)
movl %ecx, 0x8(%rsi)
pushq $0x1
popq %r8
movq %rdx, %rsi
movl %ecx, %edx
xorl %ecx, %ecx
callq 0x37b0
movq %rax, 0x10(%r14)
movl %ebp, 0x20(%rax)
movq %rbx, 0x38(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/atomlang[P]atomlang/src/pk_core.c
// Function: varAdd
Var varAdd(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;
  }

  if (IS_OBJ(v1) && IS_OBJ(v2)) {
    Object *o1 = AS_OBJ(v1), *o2 = AS_OBJ(v2);
    switch (o1->type) {

      case OBJ_STRING:
      {
        if (o2->type == OBJ_STRING) {
          return VAR_OBJ(stringJoin(vm, (String*)o1, (String*)o2));
        }
      } break;

      case OBJ_LIST:
      {
        if (o2->type == OBJ_LIST) {
          return VAR_OBJ(listJoin(vm, (List*)o1, (List*)o2));
        }
      } break;

      case OBJ_MAP:
      case OBJ_RANGE:
      case OBJ_SCRIPT:
      case OBJ_FUNC:
      case OBJ_FIBER:
      case OBJ_CLASS:
      case OBJ_INST:
        break;
    }
  }

  UNSUPPORTED_OPERAND_TYPES("+");
  return VAR_NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0x11beb
testb %al, %al
je 0x11ae1
leaq 0x81a5(%rip), %rcx      # 0x19c56
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11c4b
testb %al, %al
je 0x11b39
movsd 0x10(%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x34ce
movq %r12, %rax
shrq $0x32, %rax
movl $0x3fff, %ecx           # imm = 0x3FFF
cmpl %ecx, %eax
setb %al
movq %r15, %rdx
shrq $0x32, %rdx
cmpl %ecx, %edx
setb %cl
orb %al, %cl
jne 0x11b5a
movabsq $-0x4000000000001, %r14 # imm = 0xFFFBFFFFFFFFFFFF
movabsq $0xffffffffffff, %rdx   # imm = 0xFFFFFFFFFFFF
movq %r12, %rsi
andq %rdx, %rsi
andq %r15, %rdx
movl (%rsi), %eax
cmpl $0x1, %eax
je 0x11b45
testl %eax, %eax
jne 0x11b5a
cmpl $0x0, (%rdx)
jne 0x11b5a
movq %rbx, %rdi
callq 0x3fc4
jmp 0x11b52
movabsq $0x7ffc000000000000, %r14 # imm = 0x7FFC000000000000
jmp 0x11ba7
cmpl $0x1, (%rdx)
jne 0x11b5a
movq %rbx, %rdi
callq 0x417d
incq %r14
orq %rax, %r14
jmp 0x11ba7
movq 0x5f0(%rbx), %rax
cmpq $0x0, 0x58(%rax)
jne 0x11bb6
movabsq $0x7ffc000000000000, %r14 # imm = 0x7FFC000000000000
movq %r12, %rdi
callq 0x4e61
movq %rax, %r12
movq %r15, %rdi
callq 0x4e61
leaq 0x80df(%rip), %rsi      # 0x19c6b
movq %rbx, %rdi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x3a8d
movq 0x5f0(%rbx), %rcx
movq %rax, 0x58(%rcx)
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x1143b(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x6529(%rip), %rsi      # 0x180f0
leaq 0x6636(%rip), %rdx      # 0x18204
leaq 0x808f(%rip), %rcx      # 0x19c64
leaq 0x7d4a(%rip), %r8       # 0x19926
movl $0x4fd, %r9d            # imm = 0x4FD
xorl %eax, %eax
callq 0x2250
ud2
// File: /workspace/github_c_makefile_star2_O2/atomlang[P]atomlang/src/pk_core.c
// Function: isNumeric
static inline bool isNumeric(Var var, double* value) {
  if (IS_NUM(var)) {
    *value = AS_NUM(var);
    return true;
  }
  if (IS_BOOL(var)) {
    *value = AS_BOOL(var);
    return true;
  }
  return false;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movq %rdi, %rax
notq %rax
movabsq $0x7ffc000000000000, %rcx # imm = 0x7FFC000000000000
testq %rcx, %rax
jne 0x11c30
movq %rdi, %rax
shrq %rax
movabsq $0x3ffe800000000001, %rcx # imm = 0x3FFE800000000001
cmpq %rcx, %rax
jne 0x11c3d
movabsq $0x7ffd000000000002, %rax # imm = 0x7FFD000000000002
incq %rax
cmpq %rax, %rdi
je 0x11c41
xorps %xmm0, %xmm0
jmp 0x11c35
callq 0x34d3
movsd %xmm0, (%rbx)
movb $0x1, %al
jmp 0x11c3f
xorl %eax, %eax
popq %rbx
retq
movsd 0x649f(%rip), %xmm0     # 0x180e8
jmp 0x11c35
// File: /workspace/github_c_makefile_star2_O2/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
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0x11beb
testb %al, %al
je 0x11d2b
leaq 0x7f5b(%rip), %rcx      # 0x19c56
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11c4b
testb %al, %al
je 0x11d7a
movsd 0x10(%rsp), %xmm0
subsd 0x8(%rsp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x34ce
movq 0x5f0(%rbx), %rax
cmpq $0x0, 0x58(%rax)
jne 0x11d93
movabsq $0x7ffc000000000000, %r15 # imm = 0x7FFC000000000000
movq %r12, %rdi
callq 0x4e61
movq %rax, %r12
movq %r14, %rdi
callq 0x4e61
leaq 0x7f4d(%rip), %rsi      # 0x19caa
movq %rbx, %rdi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x3a8d
movq 0x5f0(%rbx), %rcx
movq %rax, 0x58(%rcx)
jmp 0x11d84
movabsq $0x7ffc000000000000, %r15 # imm = 0x7FFC000000000000
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x1125e(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x634c(%rip), %rsi      # 0x180f0
leaq 0x6459(%rip), %rdx      # 0x18204
leaq 0x7eec(%rip), %rcx      # 0x19c9e
leaq 0x7b6d(%rip), %r8       # 0x19926
movl $0x50b, %r9d            # imm = 0x50B
xorl %eax, %eax
callq 0x2250
ud2
// File: /workspace/github_c_makefile_star2_O2/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
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x11beb
testb %al, %al
je 0x1201f
leaq 0x7c70(%rip), %rcx      # 0x19c56
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11c4b
testb %al, %al
je 0x12092
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
callq 0x21d0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x34ce
movq %r15, %rax
shrq $0x32, %rax
cmpl $0x3fff, %eax           # imm = 0x3FFF
jb 0x12043
movabsq $0xffffffffffff, %rax   # imm = 0xFFFFFFFFFFFF
andq %r15, %rax
cmpl $0x0, (%rax)
je 0x120d9
movq 0x5f0(%rbx), %rax
cmpq $0x0, 0x58(%rax)
jne 0x120ab
movabsq $0x7ffc000000000000, %r12 # imm = 0x7FFC000000000000
movq %r15, %rdi
callq 0x4e61
movq %rax, %r15
movq %r14, %rdi
callq 0x4e61
leaq 0x7cee(%rip), %rsi      # 0x19d63
movq %rbx, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x3a8d
movq 0x5f0(%rbx), %rcx
movq %rax, 0x58(%rcx)
jmp 0x1209c
movabsq $0x7ffc000000000000, %r12 # imm = 0x7FFC000000000000
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x10f46(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x6034(%rip), %rsi      # 0x180f0
leaq 0x6141(%rip), %rdx      # 0x18204
leaq 0x7c8f(%rip), %rcx      # 0x19d59
leaq 0x7855(%rip), %r8       # 0x19926
movl $0x53a, %r9d            # imm = 0x53A
jmp 0x12105
movq 0x10f18(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x6006(%rip), %rsi      # 0x180f0
leaq 0x625e(%rip), %rdx      # 0x1834f
leaq 0x7c61(%rip), %rcx      # 0x19d59
leaq 0x7827(%rip), %r8       # 0x19926
movl $0x537, %r9d            # imm = 0x537
xorl %eax, %eax
callq 0x2250
ud2
// File: /workspace/github_c_makefile_star2_O2/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 $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0x1220a
testb %al, %al
je 0x1216d
leaq 0x7b1c(%rip), %rcx      # 0x19c56
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x122a2
testb %al, %al
je 0x121bc
movq 0x8(%rsp), %rax
andq 0x10(%rsp), %rax
cvtsi2sd %rax, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x34ce
movq 0x5f0(%rbx), %rax
cmpq $0x0, 0x58(%rax)
jne 0x121d5
movabsq $0x7ffc000000000000, %r15 # imm = 0x7FFC000000000000
movq %r12, %rdi
callq 0x4e61
movq %rax, %r12
movq %r14, %rdi
callq 0x4e61
leaq 0x7c01(%rip), %rsi      # 0x19da0
movq %rbx, %rdi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x3a8d
movq 0x5f0(%rbx), %rcx
movq %rax, 0x58(%rcx)
jmp 0x121c6
movabsq $0x7ffc000000000000, %r15 # imm = 0x7FFC000000000000
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x10e1c(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x5f0a(%rip), %rsi      # 0x180f0
leaq 0x6017(%rip), %rdx      # 0x18204
leaq 0x7ba2(%rip), %rcx      # 0x19d96
leaq 0x772b(%rip), %r8       # 0x19926
movl $0x548, %r9d            # imm = 0x548
xorl %eax, %eax
callq 0x2250
ud2
// File: /workspace/github_c_makefile_star2_O2/atomlang[P]atomlang/src/pk_core.c
// Function: isInteger
static inline bool isInteger(Var var, int64_t* value) {
  double number;
  if (isNumeric(var, &number)) {
    // TODO: check if the number is larger for a 64 bit integer.
    if (floor(number) == number) {
      ASSERT(INT64_MIN <= number && number <= INT64_MAX,
        "TODO: Large numbers haven't handled yet. Please report!");
      *value = (int64_t)(number);
      return true;
    }
  }
  return false;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
leaq 0x8(%rsp), %rsi
callq 0x11beb
testb %al, %al
je 0x12265
movsd 0x8(%rsp), %xmm0
movapd %xmm0, 0x10(%rsp)
callq 0x2330
movapd 0x10(%rsp), %xmm2
ucomisd %xmm2, %xmm0
jne 0x12265
jp 0x12265
movapd 0x7609(%rip), %xmm0     # 0x19850
andpd %xmm2, %xmm0
movsd 0x75f5(%rip), %xmm1     # 0x19848
ucomisd %xmm0, %xmm1
jb 0x1226d
cvttsd2si %xmm2, %rax
movq %rax, (%rbx)
movb $0x1, %al
jmp 0x12267
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
retq
movq 0x10d84(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x5e72(%rip), %rsi      # 0x180f0
leaq 0x9150(%rip), %rdx      # 0x1b3d5
leaq 0x9181(%rip), %rcx      # 0x1b40d
leaq 0x7693(%rip), %r8       # 0x19926
movl $0x161, %r9d            # imm = 0x161
xorl %eax, %eax
callq 0x2250
ud2
// File: /workspace/github_c_makefile_star2_O2/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 $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0x1220a
testb %al, %al
je 0x1257f
leaq 0x770c(%rip), %rcx      # 0x19c56
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x122a2
testb %al, %al
je 0x125ce
movq 0x10(%rsp), %rax
movb 0x8(%rsp), %cl
shlq %cl, %rax
cvtsi2sd %rax, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x34ce
movq 0x5f0(%rbx), %rax
cmpq $0x0, 0x58(%rax)
jne 0x125e7
movabsq $0x7ffc000000000000, %r15 # imm = 0x7FFC000000000000
movq %r12, %rdi
callq 0x4e61
movq %rax, %r12
movq %r14, %rdi
callq 0x4e61
leaq 0x78a8(%rip), %rsi      # 0x19e59
movq %rbx, %rdi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x3a8d
movq 0x5f0(%rbx), %rcx
movq %rax, 0x58(%rcx)
jmp 0x125d8
movabsq $0x7ffc000000000000, %r15 # imm = 0x7FFC000000000000
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x10a0a(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x5af8(%rip), %rsi      # 0x180f0
leaq 0x5c05(%rip), %rdx      # 0x18204
leaq 0x7846(%rip), %rcx      # 0x19e4c
leaq 0x7319(%rip), %r8       # 0x19926
movl $0x572, %r9d            # imm = 0x572
xorl %eax, %eax
callq 0x2250
ud2
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
subq $0x10, %rsp
movq %rsi, %rbx
leaq 0x8(%rsp), %rsi
callq 0x11beb
testb %al, %al
je 0x12785
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x11beb
testb %al, %al
je 0x12785
movsd 0x8(%rsp), %xmm0
ucomisd (%rsp), %xmm0
seta %al
addq $0x10, %rsp
popq %rbx
retq
movq 0x1086c(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
leaq 0x595a(%rip), %rsi      # 0x180f0
leaq 0x5bb2(%rip), %rdx      # 0x1834f
leaq 0x7738(%rip), %rcx      # 0x19edc
leaq 0x717b(%rip), %r8       # 0x19926
movl $0x591, %r9d            # imm = 0x591
xorl %eax, %eax
callq 0x2250
ud2
// File: /workspace/github_c_makefile_star2_O2/atomlang[P]atomlang/src/pk_core.c
// Function: validateIndex
static inline bool validateIndex(PKVM* vm, int64_t index, uint32_t size,
                                 const char* container) {
  if (index < 0 || size <= index) {
    VM_SET_ERROR(vm, stringFormat(vm, "$ index out of bound.", container));
    return false;
  }
  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edx, %r15d
cmpq %rsi, %r15
ja 0x13e1e
movq %rdi, %r14
movq 0x5f0(%rdi), %rax
cmpq $0x0, 0x58(%rax)
jne 0x13e2a
leaq 0x7649(%rip), %rsi      # 0x1b44f
movq %r14, %rdi
movq %rcx, %rdx
xorl %eax, %eax
callq 0x3a8d
movq 0x5f0(%r14), %rcx
movq %rax, 0x58(%rcx)
cmpq %rbx, %r15
seta %al
popq %rbx
popq %r14
popq %r15
retq
movq 0xf1c7(%rip), %rax      # 0x22ff8
movq (%rax), %rdi
leaq 0x42b5(%rip), %rsi      # 0x180f0
leaq 0x43c2(%rip), %rdx      # 0x18204
leaq 0x75f8(%rip), %rcx      # 0x1b441
leaq 0x5ad6(%rip), %r8       # 0x19926
movl $0x17e, %r9d            # imm = 0x17E
xorl %eax, %eax
callq 0x2250
ud2
// File: /workspace/github_c_makefile_star2_O2/atomlang[P]atomlang/src/pk_core.c
// Function: assertModuleNameDef
static inline void assertModuleNameDef(PKVM* vm, Script* script,
                                       const char* name) {
  // Check if function with the same name already exists.
  if (scriptGetFunc(script, name, (uint32_t)strlen(name)) != -1) {
    __ASSERT(false, stringFormat(vm, "A function named '$' already esists "
      "on module '@'", name, script->module)->data);
  }

  // Check if a global variable with the same name already exists.
  if (scriptGetGlobals(script, name, (uint32_t)strlen(name)) != -1) {
    __ASSERT(false, stringFormat(vm, "A global variable named '$' already "
      "esists on module '@'", name, script->module)->data);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rdx, %rdi
callq 0x2140
movq %r15, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x48ce
cmpl $-0x1, %eax
jne 0x140f7
movq %rbx, %rdi
callq 0x2140
movq %r15, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x4936
cmpl $-0x1, %eax
jne 0x1413d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0xeefa(%rip), %rax      # 0x22ff8
movq (%rax), %r12
movq 0x10(%r15), %rcx
leaq 0x5f6d(%rip), %rsi      # 0x1a079
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3a8d
leaq 0x1c(%rax), %rdx
leaq 0x3fcc(%rip), %rsi      # 0x180f0
leaq 0x5f80(%rip), %rcx      # 0x1a0ab
leaq 0x57f4(%rip), %r8       # 0x19926
movq %r12, %rdi
movl $0x30a, %r9d            # imm = 0x30A
jmp 0x14181
movq 0xeeb4(%rip), %rax      # 0x22ff8
movq (%rax), %r12
movq 0x10(%r15), %rcx
leaq 0x5f6d(%rip), %rsi      # 0x1a0bf
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3a8d
leaq 0x1c(%rax), %rdx
leaq 0x3f86(%rip), %rsi      # 0x180f0
leaq 0x5f3a(%rip), %rcx      # 0x1a0ab
leaq 0x57ae(%rip), %r8       # 0x19926
movq %r12, %rdi
movl $0x310, %r9d            # imm = 0x310
xorl %eax, %eax
callq 0x2250
ud2
// File: /workspace/github_c_makefile_star2_O2/atomlang[P]atomlang/cli/main.c
// Function: errorFunction
void errorFunction(PKVM* vm, PkErrorType type, const char* file, int line,
                   const char* message) {

  VmUserData* ud = (VmUserData*)pkGetUserData(vm);
  bool repl = (ud) ? ud->repl_mode : false;

  if (type == PK_ERROR_COMPILE) {

    if (repl) fprintf(stderr, "Error: %s\n", message);
    else fprintf(stderr, "Error: %s\n       at \"%s\":%i\n",
                 message, file, line);

  } else if (type == PK_ERROR_RUNTIME) {
    fprintf(stderr, "Error: %s\n", message);

  } else if (type == PK_ERROR_STACKTRACE) {
    if (repl) fprintf(stderr, "  %s() [line:%i]\n", message, line);
    else fprintf(stderr, "  %s() [\"%s\":%i]\n", message, file, line);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r14
movl %esi, %r15d
callq 0x5a8b
testq %rax, %rax
je 0x1447e
cmpb $0x0, (%rax)
sete %al
jmp 0x14480
movb $0x1, %al
cmpl $0x2, %r15d
je 0x144a8
cmpl $0x1, %r15d
je 0x1449c
testl %r15d, %r15d
je 0x144bf
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0xeb55(%rip), %rax      # 0x22ff8
movq (%rax), %rdi
jmp 0x144ee
movq 0xeb49(%rip), %rcx      # 0x22ff8
movq (%rcx), %rdi
testb %al, %al
je 0x14509
leaq 0x6fe2(%rip), %rsi      # 0x1b49f
jmp 0x144d4
movq 0xeb32(%rip), %rcx      # 0x22ff8
movq (%rcx), %rdi
testb %al, %al
je 0x144ee
leaq 0x6f9c(%rip), %rsi      # 0x1b470
movq %rbx, %rdx
movq %r14, %rcx
movl %ebp, %r8d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2250
leaq 0x6f70(%rip), %rsi      # 0x1b465
movq %rbx, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2250
leaq 0x6f7d(%rip), %rsi      # 0x1b48d
movq %rbx, %rdx
movl %ebp, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2250
// File: /workspace/github_c_makefile_star2_O2/atomlang[P]atomlang/cli/main.c
// Function: readFunction
PkStringPtr readFunction(PKVM* vm) {
  PkStringPtr result;
  result.string = read_line(NULL);
  result.on_done = onResultDone;
  result.user_data = (void*)true;
  return result;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %edi, %edi
callq 0x15598
movq %rax, (%rbx)
leaq -0x109(%rip), %rax      # 0x14444
movq %rax, 0x8(%rbx)
movq $0x1, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/atomlang[P]atomlang/cli/main.c
// Function: resolvePath
PkStringPtr resolvePath(PKVM* vm, const char* from, const char* path) {
  PkStringPtr result;
  result.on_done = onResultDone;

  size_t from_dir_len;
  pathGetDirName(from, &from_dir_len);

  // FIXME: Should handle paths with size of more than FILENAME_MAX.

  if (from_dir_len == 0 || pathIsAbsolute(path)) {
    size_t length = strlen(path);

    char* resolved = (char*)malloc(length + 1);
    pathNormalize(path, resolved, length + 1);

    result.string = resolved;
    result.user_data = (void*)true;

  } else {
    char from_dir[FILENAME_MAX];
    strncpy(from_dir, from, from_dir_len);
    from_dir[from_dir_len] = '\0';

    char fullpath[FILENAME_MAX];
    size_t length = pathJoin(from_dir, path, fullpath, sizeof(fullpath));

    char* resolved = (char*)malloc(length + 1);
    pathNormalize(fullpath, resolved, length + 1);

    result.string = resolved;
    result.user_data = (void*)true;
  }

  return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2010, %rsp           # imm = 0x2010
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
leaq -0x13a(%rip), %rax      # 0x14444
movq %rax, 0x8(%rdi)
leaq 0x8(%rsp), %r12
movq %rdx, %rdi
movq %r12, %rsi
callq 0x14c22
cmpq $0x0, (%r12)
je 0x145a5
movq %r14, %rdi
callq 0x14c1d
testb %al, %al
je 0x145c7
movq %r14, %rdi
callq 0x2140
leaq 0x1(%rax), %r15
movq %r15, %rdi
callq 0x22b0
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
jmp 0x14618
movq 0x8(%rsp), %r12
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2080
movb $0x0, 0x10(%rsp,%r12)
leaq 0x1010(%rsp), %r15
movl $0x1000, %ecx           # imm = 0x1000
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x14c2c
leaq 0x1(%rax), %r14
movq %r14, %rdi
callq 0x22b0
movq %rax, %r12
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x14c27
movq %r12, (%rbx)
movq $0x1, 0x10(%rbx)
movq %rbx, %rax
addq $0x2010, %rsp           # imm = 0x2010
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/atomlang[P]atomlang/cli/main.c
// Function: loadScript
PkStringPtr loadScript(PKVM* vm, const char* path) {

  PkStringPtr result;
  result.on_done = onResultDone;

  // Open the file.
  FILE* file = fopen(path, "r");
  if (file == NULL) {
    // Setting .string to NULL to indicate the failure of loading the script.
    result.string = NULL;
    return result;
  }

  // Get the source length.
  fseek(file, 0, SEEK_END);
  long file_size = ftell(file);
  fseek(file, 0, SEEK_SET);

  // Read source to buffer.
  char* buff = (char*)malloc((size_t)(file_size) + 1);
  // Using read instead of file_size is because "\r\n" is read as '\n' in
  // windows.
  size_t read = fread(buff, sizeof(char), file_size, file);
  buff[read] = '\0';
  fclose(file);

  result.string = buff;
  result.user_data = (void*)true;

  return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x20a(%rip), %rax      # 0x14444
movq %rax, 0x8(%rdi)
leaq 0x5781(%rip), %rsi      # 0x19dda
movq %rdx, %rdi
callq 0x2310
testq %rax, %rax
je 0x146c2
movq %rax, %r14
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x22e0
movq %r14, %rdi
callq 0x2260
movq %rax, %r12
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22e0
leaq 0x1(%r12), %rdi
callq 0x22b0
movq %rax, %r15
pushq $0x1
popq %rsi
movq %rax, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0x20c0
movb $0x0, (%r15,%rax)
movq %r14, %rdi
callq 0x2120
movq $0x1, 0x10(%rbx)
jmp 0x146c5
xorl %r15d, %r15d
movq %r15, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/atomlang[P]atomlang/cli/modules.c
// Function: objGetAttrib
void objGetAttrib(PKVM* vm, void* instance, uint32_t id, PkStringPtr attrib) {
  Obj* obj = (Obj*)instance;
  ASSERT(obj->type == (ObjType)id, OOPS);

  if (obj->type == OBJ_FILE) {
    File* file = (File*)obj;
    if (strcmp(attrib.string, "closed") == 0) {
      pkReturnBool(vm, file->closed);
      return;
    }
  }

  return; // Attribute not found.
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl %edx, (%rsi)
jne 0x14b46
cmpl $0x1, %edx
jne 0x14b2a
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x20(%rsp), %rax
movq (%rax), %rdi
leaq 0x6b93(%rip), %rsi      # 0x1b6b4
callq 0x2230
testl %eax, %eax
je 0x14b32
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movzbl 0x14(%r14), %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xf447
movq 0xe4ab(%rip), %rax      # 0x22ff8
movq (%rax), %rdi
leaq 0x3599(%rip), %rsi      # 0x180f0
leaq 0x36a6(%rip), %rdx      # 0x18204
leaq 0x6b34(%rip), %rcx      # 0x1b699
leaq 0x6b3a(%rip), %r8       # 0x1b6a6
pushq $0x18
popq %r9
xorl %eax, %eax
callq 0x2250
ud2
// File: /workspace/github_c_makefile_star2_O2/atomlang[P]atomlang/cli/modules.c
// Function: freeObj
void freeObj(PKVM* vm, void* instance, uint32_t id) {
  Obj* obj = (Obj*)instance;
  ASSERT(obj->type == (ObjType)id, OOPS);

  // If the file isn't closed, close it to flush it's buffer.
  if (obj->type == OBJ_FILE) {
    File* file = (File*)obj;
    if (!file->closed) {
      if (fclose(file->fp) != 0) { /* TODO: error! */ }
      file->closed = true;
    }
  }

  FREE_OBJ(obj);
}

// Assembly:
pushq %rbx
cmpl %edx, (%rsi)
jne 0x14bd9
movq %rsi, %rbx
cmpl $0x1, %edx
jne 0x14bd0
cmpb $0x0, 0x14(%rbx)
jne 0x14bd0
movq 0x8(%rbx), %rdi
callq 0x2120
movq %rbx, %rdi
popq %rbx
jmp 0x2040
movq 0xe418(%rip), %rax      # 0x22ff8
movq (%rax), %rdi
leaq 0x3506(%rip), %rsi      # 0x180f0
leaq 0x3613(%rip), %rdx      # 0x18204
leaq 0x6ad0(%rip), %rcx      # 0x1b6c8
leaq 0x6aa7(%rip), %r8       # 0x1b6a6
pushq $0x33
popq %r9
xorl %eax, %eax
callq 0x2250
ud2
// File: /workspace/github_c_makefile_star2_O2/atomlang[P]atomlang/cli/modules.c
// Function: registerModulePath
void registerModulePath(PKVM* vm) {
  PkHandle* path = pkNewModule(vm, "path");

  pkModuleAddFunction(vm, path, "setunix",   _pathSetStyleUnix, 1);
  pkModuleAddFunction(vm, path, "getcwd",    _pathGetCWD,       0);
  pkModuleAddFunction(vm, path, "abspath",   _pathAbspath,      1);
  pkModuleAddFunction(vm, path, "relpath",   _pathRelpath,      2);
  pkModuleAddFunction(vm, path, "join",      _pathJoin,        -1);
  pkModuleAddFunction(vm, path, "normalize", _pathNormalize,    1);
  pkModuleAddFunction(vm, path, "basename",  _pathBaseName,     1);
  pkModuleAddFunction(vm, path, "dirname",   _pathDirName,      1);
  pkModuleAddFunction(vm, path, "isabspath", _pathIsPathAbs,    1);
  pkModuleAddFunction(vm, path, "getext",    _pathGetExtension, 1);
  pkModuleAddFunction(vm, path, "exists",    _pathExists,       1);
  pkModuleAddFunction(vm, path, "isfile",    _pathIsFile,       1);
  pkModuleAddFunction(vm, path, "isdir",     _pathIsDir,        1);

  pkReleaseHandle(vm, path);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x6aa3(%rip), %rsi      # 0x1b6e2
callq 0xe6bc
movq %rax, %r14
leaq 0x6a82(%rip), %rdx      # 0x1b6d0
leaq 0x172(%rip), %rcx       # 0x14dc7
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %rax, %rsi
movl %ebp, %r8d
callq 0xe8e8
leaq 0x6a6b(%rip), %rdx      # 0x1b6d8
leaq 0x171(%rip), %rcx       # 0x14de5
movq %rbx, %rdi
movq %r14, %rsi
xorl %r8d, %r8d
callq 0xe8e8
leaq 0x6a80(%rip), %rdx      # 0x1b709
leaq 0x188(%rip), %rcx       # 0x14e18
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %r8d
callq 0xe8e8
leaq 0x6a3a(%rip), %rdx      # 0x1b6df
leaq 0x1b7(%rip), %rcx       # 0x14e63
pushq $0x2
popq %r8
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe8e8
leaq 0x6a25(%rip), %rdx      # 0x1b6e7
leaq 0x230(%rip), %rcx       # 0x14ef9
pushq $-0x1
popq %r8
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe8e8
leaq 0x6a0d(%rip), %rdx      # 0x1b6ec
leaq 0x2ba(%rip), %rcx       # 0x14fa0
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %r8d
callq 0xe8e8
leaq 0x69fb(%rip), %rdx      # 0x1b6f6
leaq 0x2ee(%rip), %rcx       # 0x14ff0
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %r8d
callq 0xe8e8
leaq 0x69e8(%rip), %rdx      # 0x1b6ff
leaq 0x316(%rip), %rcx       # 0x15034
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %r8d
callq 0xe8e8
leaq 0x69d4(%rip), %rdx      # 0x1b707
leaq 0x341(%rip), %rcx       # 0x1507b
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %r8d
callq 0xe8e8
leaq 0x69c2(%rip), %rdx      # 0x1b711
leaq 0x35b(%rip), %rcx       # 0x150b1
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %r8d
callq 0xe8e8
leaq 0x52a5(%rip), %rdx      # 0x1a010
leaq 0x393(%rip), %rcx       # 0x15105
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %r8d
callq 0xe8e8
leaq 0x6991(%rip), %rdx      # 0x1b718
leaq 0x3be(%rip), %rcx       # 0x1514c
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %r8d
callq 0xe8e8
leaq 0x697c(%rip), %rdx      # 0x1b71f
leaq 0x3d8(%rip), %rcx       # 0x15182
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %r8d
callq 0xe8e8
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x5ae8
// File: /workspace/github_c_makefile_star2_O2/atomlang[P]atomlang/cli/modules.c
// Function: pathAbspath
static void _pathAbspath(PKVM* vm) {
  const char* path;
  if (!pkGetArgString(vm, 1, &path, NULL)) return;

  char abspath[FILENAME_MAX];
  size_t len = pathAbs(path, abspath, sizeof(abspath));
  pkReturnStringLength(vm, abspath, len);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
movq %rdi, %rbx
pushq $0x1
popq %rsi
leaq 0x8(%rsp), %rdx
xorl %ecx, %ecx
callq 0xef53
testb %al, %al
je 0x14e58
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x15511
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xf4cf
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/atomlang[P]atomlang/cli/modules.c
// Function: pathRelpath
static void _pathRelpath(PKVM* vm) {
  const char* from, * path;
  if (!pkGetArgString(vm, 1, &from, NULL)) return;
  if (!pkGetArgString(vm, 2, &path, NULL)) return;

  char abs_from[FILENAME_MAX];
  pathAbs(from, abs_from, sizeof(abs_from));

  char abs_path[FILENAME_MAX];
  pathAbs(path, abs_path, sizeof(abs_path));

  char result[FILENAME_MAX];
  size_t len = cwk_path_get_relative(abs_from, abs_path,
    result, sizeof(result));
  pkReturnStringLength(vm, result, len);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x3018, %rsp           # imm = 0x3018
movq %rdi, %rbx
pushq $0x1
popq %rsi
leaq 0x8(%rsp), %rdx
xorl %ecx, %ecx
callq 0xef53
testb %al, %al
je 0x14eea
pushq $0x2
popq %rsi
movq %rsp, %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xef53
testb %al, %al
je 0x14eea
movq 0x8(%rsp), %rdi
leaq 0x2010(%rsp), %r14
movq %r14, %rsi
callq 0x15511
movq (%rsp), %rdi
leaq 0x1010(%rsp), %r15
movq %r15, %rsi
callq 0x15511
leaq 0x10(%rsp), %r12
movl $0x1000, %ecx           # imm = 0x1000
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x15b6f
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xf4cf
addq $0x3018, %rsp           # imm = 0x3018
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/atomlang[P]atomlang/cli/modules.c
// Function: pathJoin
static void _pathJoin(PKVM* vm) {
  const char* paths[MAX_JOIN_PATHS + 1]; // +1 for NULL.
  int argc = pkGetArgc(vm);

  if (argc > MAX_JOIN_PATHS) {
    pkSetRuntimeError(vm, "Cannot join more than " STRINGIFY(MAX_JOIN_PATHS)
                           "paths.");
    return;
  }

  for (int i = 0; i < argc; i++) {
    pkGetArgString(vm, i + 1, &paths[i], NULL);
  }
  paths[argc] = NULL;

  char result[FILENAME_MAX];
  size_t len = cwk_path_join_multiple(paths, result, sizeof(result));
  pkReturnStringLength(vm, result, len);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1050, %rsp           # imm = 0x1050
movq %rdi, %rbx
callq 0xeacb
cmpl $0x8, %eax
jle 0x14f33
leaq 0x6819(%rip), %rsi      # 0x1b735
movq %rbx, %rdi
addq $0x1050, %rsp           # imm = 0x1050
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x9a03
movl %eax, %ebp
xorl %r14d, %r14d
testl %eax, %eax
movl $0x0, %r12d
cmovgl %eax, %r12d
movq %rsp, %r15
cmpq %r14, %r12
je 0x14f65
incq %r14
movq %rbx, %rdi
movl %r14d, %esi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0xef53
addq $0x8, %r15
jmp 0x14f47
movslq %ebp, %rax
andq $0x0, (%rsp,%rax,8)
movq %rsp, %rdi
leaq 0x50(%rsp), %r14
movl $0x1000, %edx           # imm = 0x1000
movq %r14, %rsi
callq 0x15ffd
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xf4cf
addq $0x1050, %rsp           # imm = 0x1050
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/atomlang[P]atomlang/cli/modules.c
// Function: pathNormalize
static void _pathNormalize(PKVM* vm) {
  const char* path;
  if (!pkGetArgString(vm, 1, &path, NULL)) return;

  char result[FILENAME_MAX];
  size_t len = cwk_path_normalize(path, result, sizeof(result));
  pkReturnStringLength(vm, result, len);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
movq %rdi, %rbx
pushq $0x1
popq %rsi
leaq 0x8(%rsp), %rdx
xorl %ecx, %ecx
callq 0xef53
testb %al, %al
je 0x14fe5
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %r14
movl $0x1000, %edx           # imm = 0x1000
movq %r14, %rsi
callq 0x166cd
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xf4cf
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/atomlang[P]atomlang/cli/modules.c
// Function: pathBaseName
static void _pathBaseName(PKVM* vm) {
  const char* path;
  if (!pkGetArgString(vm, 1, &path, NULL)) return;

  const char* base_name;
  size_t length;
  cwk_path_get_basename(path, &base_name, &length);
  pkReturnString(vm, base_name);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
movq %rsp, %rdx
xorl %ecx, %ecx
callq 0xef53
testb %al, %al
je 0x1502c
movq (%rsp), %rdi
leaq 0x10(%rsp), %r14
leaq 0x8(%rsp), %rdx
movq %r14, %rsi
callq 0x16174
movq (%r14), %rsi
movq %rbx, %rdi
callq 0xf483
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/atomlang[P]atomlang/cli/modules.c
// Function: pathDirName
static void _pathDirName(PKVM* vm) {
  const char* path;
  if (!pkGetArgString(vm, 1, &path, NULL)) return;

  size_t length;
  cwk_path_get_dirname(path, &length);
  pkReturnStringLength(vm, path, length);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
leaq 0x8(%rsp), %rdx
xorl %ecx, %ecx
callq 0xef53
testb %al, %al
je 0x15073
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x16431
movq 0x8(%rsp), %rsi
movq (%r14), %rdx
movq %rbx, %rdi
callq 0xf4cf
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/atomlang[P]atomlang/cli/modules.c
// Function: pathGetExtension
static void _pathGetExtension(PKVM* vm) {
  const char* path;
  if (!pkGetArgString(vm, 1, &path, NULL)) return;

  const char* ext;
  size_t length;
  if (cwk_path_get_extension(path, &ext, &length)) {
    pkReturnStringLength(vm, ext, length);
  } else {
    pkReturnStringLength(vm, NULL, 0);
  }
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
leaq 0x18(%rsp), %rdx
xorl %ecx, %ecx
callq 0xef53
testb %al, %al
je 0x150ff
movq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x16469
testb %al, %al
je 0x150f3
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
jmp 0x150fa
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf4cf
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/atomlang[P]atomlang/cli/modules.c
// Function: registerModuleFile
void registerModuleFile(PKVM* vm) {
  PkHandle* file = pkNewModule(vm, "File");

  pkModuleAddFunction(vm, file, "open",  _fileOpen, -1);
  pkModuleAddFunction(vm, file, "read",  _fileRead,  1);
  pkModuleAddFunction(vm, file, "write", _fileWrite, 2);
  pkModuleAddFunction(vm, file, "close", _fileClose, 1);

  pkReleaseHandle(vm, file);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x4568(%rip), %rsi      # 0x1972e
callq 0xe6bc
movq %rax, %r14
leaq 0x6550(%rip), %rdx      # 0x1b725
leaq 0x76(%rip), %rcx        # 0x15252
pushq $-0x1
popq %r8
movq %rbx, %rdi
movq %rax, %rsi
callq 0xe8e8
leaq 0x6538(%rip), %rdx      # 0x1b72a
leaq 0x196(%rip), %rcx       # 0x1538f
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %r8d
callq 0xe8e8
leaq 0x49d3(%rip), %rdx      # 0x19be4
leaq 0x1fe(%rip), %rcx       # 0x15416
pushq $0x2
popq %r8
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe8e8
leaq 0x6501(%rip), %rdx      # 0x1b72f
leaq 0x268(%rip), %rcx       # 0x1549d
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %r8d
callq 0xe8e8
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x5ae8