// File: /workspace/github_c_makefile_star2_O3/adamjedlicka[P]blu/src/vm/lib/core/core.c
// Function: bluInitCore
void bluInitCore(bluVM* vm) {
	bluInterpret(vm, coreSource, "__CORE__");

	bluObj* objectClass = bluGetGlobal(vm, "Object");
	bluDefineMethod(vm, objectClass, "getClass", Object_getClass, 0);
	bluDefineMethod(vm, objectClass, "isFalsey", Object_isFalsey, 0);
	bluDefineMethod(vm, objectClass, "isTruthy", Object_isTruthy, 0);

	bluObj* nilClass = bluGetGlobal(vm, "Nil");
	vm->nilClass = (bluObjClass*)nilClass;

	bluObj* boolClass = bluGetGlobal(vm, "Bool");
	vm->boolClass = (bluObjClass*)boolClass;

	bluObj* numberClass = bluGetGlobal(vm, "Number");
	bluDefineMethod(vm, numberClass, "floor", Number_floor, 0);
	bluDefineMethod(vm, numberClass, "ceil", Number_ceil, 0);
	vm->numberClass = (bluObjClass*)numberClass;

	bluObj* arrayClass = bluGetGlobal(vm, "Array");
	bluDefineMethod(vm, arrayClass, "push", Array_push, 1);
	bluDefineMethod(vm, arrayClass, "len", Array_len, 0);
	bluDefineMethod(vm, arrayClass, "at", Array_at, 1);
	vm->arrayClass = (bluObjClass*)arrayClass;

	bluObj* classClass = bluGetGlobal(vm, "Class");
	vm->classClass = (bluObjClass*)classClass;

	bluObj* functionClass = bluGetGlobal(vm, "Function");
	vm->functionClass = (bluObjClass*)functionClass;

	bluObj* stringClass = bluGetGlobal(vm, "String");
	bluDefineMethod(vm, stringClass, "len", String_len, 0);
	bluDefineMethod(vm, stringClass, "reverse", String_reverse, 0);
	bluDefineMethod(vm, stringClass, "toNumber", String_toNumber, 0);
	bluDefineMethod(vm, stringClass, "split", String_split, 1);
	bluDefineMethod(vm, stringClass, "at", String_at, 1);
	bluDefineMethod(vm, stringClass, "substring", String_substring, 2);
	vm->stringClass = (bluObjClass*)stringClass;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x45c1(%rip), %rsi      # 0x9ae3
leaq 0x453f(%rip), %rdx      # 0x9a68
callq 0x76df
leaq 0x3ff6(%rip), %rsi      # 0x952b
movq %rbx, %rdi
callq 0x8c9a
movq %rax, %r14
leaq 0x452a(%rip), %rdx      # 0x9a71
leaq -0x40e(%rip), %rcx      # 0x5140
movq %rbx, %rdi
movq %rax, %rsi
xorl %r8d, %r8d
callq 0x8cfc
leaq 0x4517(%rip), %rdx      # 0x9a7a
leaq -0x40d(%rip), %rcx      # 0x515d
movq %rbx, %rdi
movq %r14, %rsi
xorl %r8d, %r8d
callq 0x8cfc
leaq 0x4504(%rip), %rdx      # 0x9a83
leaq -0x40d(%rip), %rcx      # 0x5179
movq %rbx, %rdi
movq %r14, %rsi
xorl %r8d, %r8d
callq 0x8cfc
leaq 0x44f1(%rip), %rsi      # 0x9a8c
movq %rbx, %rdi
callq 0x8c9a
movq %rax, 0x101838(%rbx)
leaq 0x44df(%rip), %rsi      # 0x9a90
movq %rbx, %rdi
callq 0x8c9a
movq %rax, 0x101840(%rbx)
leaq 0x4505(%rip), %rsi      # 0x9acc
movq %rbx, %rdi
callq 0x8c9a
movq %rax, %r14
leaq 0x44bc(%rip), %rdx      # 0x9a95
leaq -0x449(%rip), %rcx      # 0x5197
movq %rbx, %rdi
movq %rax, %rsi
xorl %r8d, %r8d
callq 0x8cfc
leaq 0x44a6(%rip), %rdx      # 0x9a9b
leaq -0x44b(%rip), %rcx      # 0x51b1
movq %rbx, %rdi
movq %r14, %rsi
xorl %r8d, %r8d
callq 0x8cfc
movq %r14, 0x101848(%rbx)
leaq 0x4488(%rip), %rsi      # 0x9aa0
movq %rbx, %rdi
callq 0x8c9a
movq %rax, %r15
leaq 0x447c(%rip), %rdx      # 0x9aa6
leaq -0x45d(%rip), %rcx      # 0x51d4
movq %rbx, %rdi
movq %rax, %rsi
movl $0x1, %r8d
callq 0x8cfc
leaq 0x4462(%rip), %r12      # 0x9aab
leaq -0x3f3(%rip), %rcx      # 0x525d
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %r8d, %r8d
callq 0x8cfc
leaq 0x4447(%rip), %r14      # 0x9aaf
leaq -0x3fb(%rip), %rcx      # 0x5274
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl $0x1, %r8d
callq 0x8cfc
movq %r15, 0x101850(%rbx)
leaq 0x43e3(%rip), %rsi      # 0x9a74
movq %rbx, %rdi
callq 0x8c9a
movq %rax, 0x101858(%rbx)
leaq 0x440b(%rip), %rsi      # 0x9ab2
movq %rbx, %rdi
callq 0x8c9a
movq %rax, 0x101860(%rbx)
leaq 0x43fe(%rip), %rsi      # 0x9abb
movq %rbx, %rdi
callq 0x8c9a
movq %rax, %r15
leaq -0x43e(%rip), %rcx      # 0x5291
movq %rbx, %rdi
movq %rax, %rsi
movq %r12, %rdx
xorl %r8d, %r8d
callq 0x8cfc
leaq 0x43db(%rip), %rdx      # 0x9ac2
leaq -0x446(%rip), %rcx      # 0x52a8
movq %rbx, %rdi
movq %r15, %rsi
xorl %r8d, %r8d
callq 0x8cfc
leaq 0x43c7(%rip), %rdx      # 0x9aca
leaq -0x3f9(%rip), %rcx      # 0x5311
movq %rbx, %rdi
movq %r15, %rsi
xorl %r8d, %r8d
callq 0x8cfc
leaq 0x43b4(%rip), %rdx      # 0x9ad3
leaq -0x3f5(%rip), %rcx      # 0x5331
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %r8d
callq 0x8cfc
leaq -0x2ef(%rip), %rcx      # 0x544f
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl $0x1, %r8d
callq 0x8cfc
leaq 0x4380(%rip), %rdx      # 0x9ad9
leaq -0x2c0(%rip), %rcx      # 0x54a0
movq %rbx, %rdi
movq %r15, %rsi
movl $0x2, %r8d
callq 0x8cfc
movq %r15, 0x101868(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq