// File: /workspace/github_c_makefile_star2_O1/janet-lang[P]janet/src/boot/table_test.c
// Function: table_test
int table_test() {

    JanetTable *t1, *t2;

    t1 = janet_table(10);
    t2 = janet_table(0);

    janet_table_put(t1, janet_cstringv("hello"), janet_wrap_integer(2));
    janet_table_put(t1, janet_cstringv("akey"), janet_wrap_integer(5));
    janet_table_put(t1, janet_cstringv("box"), janet_wrap_boolean(0));
    janet_table_put(t1, janet_cstringv("square"), janet_cstringv("avalue"));

    assert(t1->count == 4);
    assert(t1->capacity >= t1->count);

    assert(janet_equals(janet_table_get(t1, janet_cstringv("hello")), janet_wrap_integer(2)));
    assert(janet_equals(janet_table_get(t1, janet_cstringv("akey")), janet_wrap_integer(5)));
    assert(janet_equals(janet_table_get(t1, janet_cstringv("box")), janet_wrap_boolean(0)));
    assert(janet_equals(janet_table_get(t1, janet_cstringv("square")), janet_cstringv("avalue")));

    janet_table_remove(t1, janet_cstringv("hello"));
    janet_table_put(t1, janet_cstringv("box"), janet_wrap_nil());

    assert(t1->count == 2);

    assert(janet_equals(janet_table_get(t1, janet_cstringv("hello")), janet_wrap_nil()));
    assert(janet_equals(janet_table_get(t1, janet_cstringv("box")), janet_wrap_nil()));

    janet_table_put(t2, janet_csymbolv("t2key1"), janet_wrap_integer(10));
    janet_table_put(t2, janet_csymbolv("t2key2"), janet_wrap_integer(100));
    janet_table_put(t2, janet_csymbolv("some key "), janet_wrap_integer(-2));
    janet_table_put(t2, janet_csymbolv("a thing"), janet_wrap_integer(10));

    assert(janet_equals(janet_table_get(t2, janet_csymbolv("t2key1")), janet_wrap_integer(10)));
    assert(janet_equals(janet_table_get(t2, janet_csymbolv("t2key2")), janet_wrap_integer(100)));

    assert(t2->count == 4);
    assert(janet_equals(janet_table_remove(t2, janet_csymbolv("t2key1")), janet_wrap_integer(10)));
    assert(t2->count == 3);
    assert(janet_equals(janet_table_remove(t2, janet_csymbolv("t2key2")), janet_wrap_integer(100)));
    assert(t2->count == 2);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movabsq $-0x6000000000000, %r14 # imm = 0xFFFA000000000000
movabsq $-0x7000000000000, %r12 # imm = 0xFFF9000000000000
movl $0xa, %edi
callq 0x47e96
movq %rax, %r15
xorl %edi, %edi
callq 0x47e96
movq %rax, %rbx
leaq 0x1cd18(%rip), %rdi     # 0x6d678
callq 0x4516c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %rax, %r13
movsd 0x1ccdd(%rip), %xmm0    # 0x6d658
callq 0x4fab8
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x481b3
leaq 0x1cce9(%rip), %rdi     # 0x6d67e
callq 0x4516c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %rax, %r13
movsd 0x1ccb0(%rip), %xmm0    # 0x6d660
callq 0x4fab8
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x481b3
leaq 0x1c24a(%rip), %rdi     # 0x6cc14
callq 0x4516c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %rax, %r13
movq %r12, %rdi
callq 0x4f95a
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x481b3
leaq 0x1cc89(%rip), %rdi     # 0x6d683
callq 0x4516c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %rax, %r13
leaq 0x1cc76(%rip), %rdi     # 0x6d68a
callq 0x4516c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x481b3
cmpl $0x4, 0x10(%r15)
jne 0x50e68
cmpl $0x3, 0x14(%r15)
jle 0x50e87
leaq 0x1cc29(%rip), %rdi     # 0x6d678
callq 0x4516c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %r15, %rdi
movq %rax, %rsi
callq 0x47f51
movq %rax, %r13
movsd 0x1cbe3(%rip), %xmm0    # 0x6d658
callq 0x4fab8
movq %r13, %rdi
movq %rax, %rsi
callq 0x4acce
testl %eax, %eax
je 0x50ea6
leaq 0x1cbea(%rip), %rdi     # 0x6d67e
callq 0x4516c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %r15, %rdi
movq %rax, %rsi
callq 0x47f51
movq %rax, %r13
movsd 0x1cba6(%rip), %xmm0    # 0x6d660
callq 0x4fab8
movq %r13, %rdi
movq %rax, %rsi
callq 0x4acce
testl %eax, %eax
je 0x50ec5
leaq 0x1c13b(%rip), %rdi     # 0x6cc14
callq 0x4516c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %r15, %rdi
movq %rax, %rsi
callq 0x47f51
movq %rax, %r13
movq %r12, %rdi
callq 0x4f95a
movq %r13, %rdi
movq %rax, %rsi
callq 0x4acce
testl %eax, %eax
je 0x50ee4
leaq 0x1cb6a(%rip), %rdi     # 0x6d683
callq 0x4516c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %r15, %rdi
movq %rax, %rsi
callq 0x47f51
movq %rax, %r12
leaq 0x1cb4c(%rip), %rdi     # 0x6d68a
callq 0x4516c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %r12, %rdi
movq %rax, %rsi
callq 0x4acce
testl %eax, %eax
je 0x50f03
movabsq $-0x77fffffffffff, %r12 # imm = 0xFFF8800000000001
leaq 0x1cb06(%rip), %rdi     # 0x6d678
callq 0x4516c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %r15, %rdi
movq %rax, %rsi
callq 0x48127
leaq 0x1c080(%rip), %rdi     # 0x6cc14
callq 0x4516c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %rax, %r13
movq %r12, %rdi
callq 0x4f95a
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x481b3
cmpl $0x2, 0x10(%r15)
jne 0x50f22
leaq 0x1caa9(%rip), %rdi     # 0x6d678
callq 0x4516c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %r15, %rdi
movq %rax, %rsi
callq 0x47f51
movq %rax, %r13
movq %r12, %rdi
callq 0x4f95a
movq %r13, %rdi
movq %rax, %rsi
callq 0x4acce
testl %eax, %eax
je 0x50f41
leaq 0x1c005(%rip), %rdi     # 0x6cc14
callq 0x4516c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %r15, %rdi
movq %rax, %rsi
callq 0x47f51
movq %rax, %r14
movq %r12, %rdi
callq 0x4f95a
movq %r14, %rdi
movq %rax, %rsi
callq 0x4acce
testl %eax, %eax
je 0x50f60
movabsq $-0x5800000000000, %r14 # imm = 0xFFFA800000000000
leaq 0x1cc78(%rip), %r15     # 0x6d8d1
movq %r15, %rdi
callq 0x47cd3
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %rax, %r12
movsd 0x1c9f1(%rip), %xmm0    # 0x6d668
callq 0x4fab8
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x481b3
leaq 0x1cc47(%rip), %rdi     # 0x6d8d8
callq 0x47cd3
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %rax, %r12
movsd 0x1c9c4(%rip), %xmm0    # 0x6d670
callq 0x4fab8
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x481b3
leaq 0x1cc19(%rip), %rdi     # 0x6d8df
callq 0x47cd3
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %rax, %r12
movsd 0x1c5e7(%rip), %xmm0    # 0x6d2c8
callq 0x4fab8
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x481b3
leaq 0x1cbee(%rip), %rdi     # 0x6d8e9
callq 0x47cd3
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %rax, %r12
movsd 0x1c952(%rip), %xmm0    # 0x6d668
callq 0x4fab8
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x481b3
movq %r15, %rdi
callq 0x47cd3
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %rbx, %rdi
movq %rax, %rsi
callq 0x47f51
movq %rax, %r15
movsd 0x1c916(%rip), %xmm0    # 0x6d668
callq 0x4fab8
movq %r15, %rdi
movq %rax, %rsi
callq 0x4acce
testl %eax, %eax
je 0x50f7f
leaq 0x1cb67(%rip), %rdi     # 0x6d8d8
callq 0x47cd3
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %rbx, %rdi
movq %rax, %rsi
callq 0x47f51
movq %rax, %r15
movsd 0x1c8d9(%rip), %xmm0    # 0x6d670
callq 0x4fab8
movq %r15, %rdi
movq %rax, %rsi
callq 0x4acce
testl %eax, %eax
je 0x50f9e
cmpl $0x4, 0x10(%rbx)
jne 0x50fbd
leaq 0x1cb11(%rip), %rdi     # 0x6d8d1
callq 0x47cd3
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %rbx, %rdi
movq %rax, %rsi
callq 0x48127
movq %rax, %r15
movsd 0x1c882(%rip), %xmm0    # 0x6d668
callq 0x4fab8
movq %r15, %rdi
movq %rax, %rsi
callq 0x4acce
testl %eax, %eax
je 0x50fdc
cmpl $0x3, 0x10(%rbx)
jne 0x50ffb
leaq 0x1cac9(%rip), %rdi     # 0x6d8d8
callq 0x47cd3
movq %rax, %rdi
movq %r14, %rsi
callq 0x4f9ad
movq %rbx, %rdi
movq %rax, %rsi
callq 0x48127
movq %rax, %r14
movsd 0x1c83b(%rip), %xmm0    # 0x6d670
callq 0x4fab8
movq %r14, %rdi
movq %rax, %rsi
callq 0x4acce
testl %eax, %eax
je 0x5101a
cmpl $0x2, 0x10(%rbx)
jne 0x51039
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c822(%rip), %rdi     # 0x6d691
leaq 0x1c82a(%rip), %rsi     # 0x6d6a0
leaq 0x1c839(%rip), %rcx     # 0x6d6b6
movl $0x28, %edx
callq 0x123f0
leaq 0x1c839(%rip), %rdi     # 0x6d6c7
leaq 0x1c80b(%rip), %rsi     # 0x6d6a0
leaq 0x1c81a(%rip), %rcx     # 0x6d6b6
movl $0x29, %edx
callq 0x123f0
leaq 0x1c834(%rip), %rdi     # 0x6d6e1
leaq 0x1c7ec(%rip), %rsi     # 0x6d6a0
leaq 0x1c7fb(%rip), %rcx     # 0x6d6b6
movl $0x2b, %edx
callq 0x123f0
leaq 0x1c867(%rip), %rdi     # 0x6d733
leaq 0x1c7cd(%rip), %rsi     # 0x6d6a0
leaq 0x1c7dc(%rip), %rcx     # 0x6d6b6
movl $0x2c, %edx
callq 0x123f0
leaq 0x1c899(%rip), %rdi     # 0x6d784
leaq 0x1c7ae(%rip), %rsi     # 0x6d6a0
leaq 0x1c7bd(%rip), %rcx     # 0x6d6b6
movl $0x2d, %edx
callq 0x123f0
leaq 0x1c8ca(%rip), %rdi     # 0x6d7d4
leaq 0x1c78f(%rip), %rsi     # 0x6d6a0
leaq 0x1c79e(%rip), %rcx     # 0x6d6b6
movl $0x2e, %edx
callq 0x123f0
leaq 0x1c901(%rip), %rdi     # 0x6d82a
leaq 0x1c770(%rip), %rsi     # 0x6d6a0
leaq 0x1c77f(%rip), %rcx     # 0x6d6b6
movl $0x33, %edx
callq 0x123f0
leaq 0x1c8f1(%rip), %rdi     # 0x6d839
leaq 0x1c751(%rip), %rsi     # 0x6d6a0
leaq 0x1c760(%rip), %rcx     # 0x6d6b6
movl $0x35, %edx
callq 0x123f0
leaq 0x1c91f(%rip), %rdi     # 0x6d886
leaq 0x1c732(%rip), %rsi     # 0x6d6a0
leaq 0x1c741(%rip), %rcx     # 0x6d6b6
movl $0x36, %edx
callq 0x123f0
leaq 0x1c96b(%rip), %rdi     # 0x6d8f1
leaq 0x1c713(%rip), %rsi     # 0x6d6a0
leaq 0x1c722(%rip), %rcx     # 0x6d6b6
movl $0x3d, %edx
callq 0x123f0
leaq 0x1c9a0(%rip), %rdi     # 0x6d945
leaq 0x1c6f4(%rip), %rsi     # 0x6d6a0
leaq 0x1c703(%rip), %rcx     # 0x6d6b6
movl $0x3e, %edx
callq 0x123f0
leaq 0x1c9d6(%rip), %rdi     # 0x6d99a
leaq 0x1c6d5(%rip), %rsi     # 0x6d6a0
leaq 0x1c6e4(%rip), %rcx     # 0x6d6b6
movl $0x40, %edx
callq 0x123f0
leaq 0x1c9c6(%rip), %rdi     # 0x6d9a9
leaq 0x1c6b6(%rip), %rsi     # 0x6d6a0
leaq 0x1c6c5(%rip), %rcx     # 0x6d6b6
movl $0x41, %edx
callq 0x123f0
leaq 0x1c9fe(%rip), %rdi     # 0x6da00
leaq 0x1c697(%rip), %rsi     # 0x6d6a0
leaq 0x1c6a6(%rip), %rcx     # 0x6d6b6
movl $0x42, %edx
callq 0x123f0
leaq 0x1c9ee(%rip), %rdi     # 0x6da0f
leaq 0x1c678(%rip), %rsi     # 0x6d6a0
leaq 0x1c687(%rip), %rcx     # 0x6d6b6
movl $0x43, %edx
callq 0x123f0
leaq 0x1ca27(%rip), %rdi     # 0x6da67
leaq 0x1c659(%rip), %rsi     # 0x6d6a0
leaq 0x1c668(%rip), %rcx     # 0x6d6b6
movl $0x44, %edx
callq 0x123f0