// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/vm.c
// Function: janet_init
int janet_init(void) {

    /* Garbage collection */
    janet_vm.blocks = NULL;
    janet_vm.weak_blocks = NULL;
    janet_vm.next_collection = 0;
    janet_vm.gc_interval = 0x400000;
    janet_vm.block_count = 0;
    janet_vm.gc_mark_phase = 0;

    janet_symcache_init();

    /* Initialize gc roots */
    janet_vm.roots = NULL;
    janet_vm.root_count = 0;
    janet_vm.root_capacity = 0;

    /* Scratch memory */
    janet_vm.user = NULL;
    janet_vm.scratch_mem = NULL;
    janet_vm.scratch_len = 0;
    janet_vm.scratch_cap = 0;

    /* Sandbox flags */
    janet_vm.sandbox_flags = 0;

    /* Initialize registry */
    janet_vm.registry = NULL;
    janet_vm.registry_cap = 0;
    janet_vm.registry_count = 0;
    janet_vm.registry_dirty = 0;

    /* Initialize abstract registry */
    janet_vm.abstract_registry = janet_table(0);
    janet_gcroot(janet_wrap_table(janet_vm.abstract_registry));

    /* Traversal */
    janet_vm.traversal = NULL;
    janet_vm.traversal_base = NULL;
    janet_vm.traversal_top = NULL;

    /* Core env */
    janet_vm.core_env = NULL;

    /* Auto suspension */
    janet_vm.auto_suspend = 0;

    /* Dynamic bindings */
    janet_vm.top_dyns = NULL;

    /* Seed RNG */
    janet_rng_seed(janet_default_rng(), 0);

    /* Fibers */
    janet_vm.fiber = NULL;
    janet_vm.root_fiber = NULL;
    janet_vm.stackn = 0;

#ifdef JANET_EV
    janet_ev_init();
#endif
#ifdef JANET_NET
    janet_net_init();
#endif
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x0, 0x90(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x0, 0x98(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x0, 0xa8(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x400000, 0xa0(%rax) # imm = 0x400000
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x0, 0xb0(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movl $0x0, 0xbc(%rax)
callq 0x68790
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x0, 0xc0(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x0, 0xc8(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x0, 0xd0(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x0, (%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x0, 0xd8(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x0, 0xe8(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x0, 0xe0(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movl $0x0, 0xf0(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x0, 0x48(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x0, 0x50(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x0, 0x58(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movl $0x0, 0x60(%rax)
xorl %edi, %edi
callq 0x692f0
movq %rax, -0x10(%rbp)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x68(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq 0x68(%rax), %rdi
movabsq $-0x3800000000000, %rsi # imm = 0xFFFC800000000000
callq 0x7b610
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x39200
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x0, 0x108(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x0, 0x118(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x0, 0x110(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x0, 0x10(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movl $0x0, 0x1c(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x0, 0x8(%rax)
callq 0x45fc0
movq %rax, %rdi
xorl %esi, %esi
callq 0x45fe0
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x0, 0x20(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq $0x0, 0x28(%rax)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movl $0x0, 0x18(%rax)
callq 0x2ee50
callq 0x49df0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)