// File: /workspace/github_c_makefile_star2_O3/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 0x47425
movq %rax, %r15
xorl %edi, %edi
callq 0x47425
movq %rax, %rbx
leaq 0x1c96c(%rip), %rdi     # 0x6c658
callq 0x4482c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %rax, %r13
movsd 0x1c931(%rip), %xmm0    # 0x6c638
callq 0x4ee44
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x476f0
leaq 0x1c93d(%rip), %rdi     # 0x6c65e
callq 0x4482c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %rax, %r13
movsd 0x1c904(%rip), %xmm0    # 0x6c640
callq 0x4ee44
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x476f0
leaq 0x1be9e(%rip), %rdi     # 0x6bbf4
callq 0x4482c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %rax, %r13
movq %r12, %rdi
callq 0x4ece6
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x476f0
leaq 0x1c8dd(%rip), %rdi     # 0x6c663
callq 0x4482c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %rax, %r13
leaq 0x1c8ca(%rip), %rdi     # 0x6c66a
callq 0x4482c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x476f0
cmpl $0x4, 0x10(%r15)
jne 0x501f4
cmpl $0x3, 0x14(%r15)
jle 0x50213
leaq 0x1c87d(%rip), %rdi     # 0x6c658
callq 0x4482c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %r15, %rdi
movq %rax, %rsi
callq 0x474e0
movq %rax, %r13
movsd 0x1c837(%rip), %xmm0    # 0x6c638
callq 0x4ee44
movq %r13, %rdi
movq %rax, %rsi
callq 0x4a1bd
testl %eax, %eax
je 0x50232
leaq 0x1c83e(%rip), %rdi     # 0x6c65e
callq 0x4482c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %r15, %rdi
movq %rax, %rsi
callq 0x474e0
movq %rax, %r13
movsd 0x1c7fa(%rip), %xmm0    # 0x6c640
callq 0x4ee44
movq %r13, %rdi
movq %rax, %rsi
callq 0x4a1bd
testl %eax, %eax
je 0x50251
leaq 0x1bd8f(%rip), %rdi     # 0x6bbf4
callq 0x4482c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %r15, %rdi
movq %rax, %rsi
callq 0x474e0
movq %rax, %r13
movq %r12, %rdi
callq 0x4ece6
movq %r13, %rdi
movq %rax, %rsi
callq 0x4a1bd
testl %eax, %eax
je 0x50270
leaq 0x1c7be(%rip), %rdi     # 0x6c663
callq 0x4482c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %r15, %rdi
movq %rax, %rsi
callq 0x474e0
movq %rax, %r12
leaq 0x1c7a0(%rip), %rdi     # 0x6c66a
callq 0x4482c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %r12, %rdi
movq %rax, %rsi
callq 0x4a1bd
testl %eax, %eax
je 0x5028f
movabsq $-0x77fffffffffff, %r12 # imm = 0xFFF8800000000001
leaq 0x1c75a(%rip), %rdi     # 0x6c658
callq 0x4482c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %r15, %rdi
movq %rax, %rsi
callq 0x47664
leaq 0x1bcd4(%rip), %rdi     # 0x6bbf4
callq 0x4482c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %rax, %r13
movq %r12, %rdi
callq 0x4ece6
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x476f0
cmpl $0x2, 0x10(%r15)
jne 0x502ae
leaq 0x1c6fd(%rip), %rdi     # 0x6c658
callq 0x4482c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %r15, %rdi
movq %rax, %rsi
callq 0x474e0
movq %rax, %r13
movq %r12, %rdi
callq 0x4ece6
movq %r13, %rdi
movq %rax, %rsi
callq 0x4a1bd
testl %eax, %eax
je 0x502cd
leaq 0x1bc59(%rip), %rdi     # 0x6bbf4
callq 0x4482c
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %r15, %rdi
movq %rax, %rsi
callq 0x474e0
movq %rax, %r14
movq %r12, %rdi
callq 0x4ece6
movq %r14, %rdi
movq %rax, %rsi
callq 0x4a1bd
testl %eax, %eax
je 0x502ec
movabsq $-0x5800000000000, %r14 # imm = 0xFFFA800000000000
leaq 0x1c8cc(%rip), %r15     # 0x6c8b1
movq %r15, %rdi
callq 0x47261
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %rax, %r12
movsd 0x1c645(%rip), %xmm0    # 0x6c648
callq 0x4ee44
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x476f0
leaq 0x1c89b(%rip), %rdi     # 0x6c8b8
callq 0x47261
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %rax, %r12
movsd 0x1c618(%rip), %xmm0    # 0x6c650
callq 0x4ee44
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x476f0
leaq 0x1c86d(%rip), %rdi     # 0x6c8bf
callq 0x47261
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %rax, %r12
movsd 0x1c23b(%rip), %xmm0    # 0x6c2a8
callq 0x4ee44
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x476f0
leaq 0x1c842(%rip), %rdi     # 0x6c8c9
callq 0x47261
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %rax, %r12
movsd 0x1c5a6(%rip), %xmm0    # 0x6c648
callq 0x4ee44
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x476f0
movq %r15, %rdi
callq 0x47261
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %rbx, %rdi
movq %rax, %rsi
callq 0x474e0
movq %rax, %r15
movsd 0x1c56a(%rip), %xmm0    # 0x6c648
callq 0x4ee44
movq %r15, %rdi
movq %rax, %rsi
callq 0x4a1bd
testl %eax, %eax
je 0x5030b
leaq 0x1c7bb(%rip), %rdi     # 0x6c8b8
callq 0x47261
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %rbx, %rdi
movq %rax, %rsi
callq 0x474e0
movq %rax, %r15
movsd 0x1c52d(%rip), %xmm0    # 0x6c650
callq 0x4ee44
movq %r15, %rdi
movq %rax, %rsi
callq 0x4a1bd
testl %eax, %eax
je 0x5032a
cmpl $0x4, 0x10(%rbx)
jne 0x50349
leaq 0x1c765(%rip), %rdi     # 0x6c8b1
callq 0x47261
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %rbx, %rdi
movq %rax, %rsi
callq 0x47664
movq %rax, %r15
movsd 0x1c4d6(%rip), %xmm0    # 0x6c648
callq 0x4ee44
movq %r15, %rdi
movq %rax, %rsi
callq 0x4a1bd
testl %eax, %eax
je 0x50368
cmpl $0x3, 0x10(%rbx)
jne 0x50387
leaq 0x1c71d(%rip), %rdi     # 0x6c8b8
callq 0x47261
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ed39
movq %rbx, %rdi
movq %rax, %rsi
callq 0x47664
movq %rax, %r14
movsd 0x1c48f(%rip), %xmm0    # 0x6c650
callq 0x4ee44
movq %r14, %rdi
movq %rax, %rsi
callq 0x4a1bd
testl %eax, %eax
je 0x503a6
cmpl $0x2, 0x10(%rbx)
jne 0x503c5
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c476(%rip), %rdi     # 0x6c671
leaq 0x1c47e(%rip), %rsi     # 0x6c680
leaq 0x1c48d(%rip), %rcx     # 0x6c696
movl $0x28, %edx
callq 0x123f0
leaq 0x1c48d(%rip), %rdi     # 0x6c6a7
leaq 0x1c45f(%rip), %rsi     # 0x6c680
leaq 0x1c46e(%rip), %rcx     # 0x6c696
movl $0x29, %edx
callq 0x123f0
leaq 0x1c488(%rip), %rdi     # 0x6c6c1
leaq 0x1c440(%rip), %rsi     # 0x6c680
leaq 0x1c44f(%rip), %rcx     # 0x6c696
movl $0x2b, %edx
callq 0x123f0
leaq 0x1c4bb(%rip), %rdi     # 0x6c713
leaq 0x1c421(%rip), %rsi     # 0x6c680
leaq 0x1c430(%rip), %rcx     # 0x6c696
movl $0x2c, %edx
callq 0x123f0
leaq 0x1c4ed(%rip), %rdi     # 0x6c764
leaq 0x1c402(%rip), %rsi     # 0x6c680
leaq 0x1c411(%rip), %rcx     # 0x6c696
movl $0x2d, %edx
callq 0x123f0
leaq 0x1c51e(%rip), %rdi     # 0x6c7b4
leaq 0x1c3e3(%rip), %rsi     # 0x6c680
leaq 0x1c3f2(%rip), %rcx     # 0x6c696
movl $0x2e, %edx
callq 0x123f0
leaq 0x1c555(%rip), %rdi     # 0x6c80a
leaq 0x1c3c4(%rip), %rsi     # 0x6c680
leaq 0x1c3d3(%rip), %rcx     # 0x6c696
movl $0x33, %edx
callq 0x123f0
leaq 0x1c545(%rip), %rdi     # 0x6c819
leaq 0x1c3a5(%rip), %rsi     # 0x6c680
leaq 0x1c3b4(%rip), %rcx     # 0x6c696
movl $0x35, %edx
callq 0x123f0
leaq 0x1c573(%rip), %rdi     # 0x6c866
leaq 0x1c386(%rip), %rsi     # 0x6c680
leaq 0x1c395(%rip), %rcx     # 0x6c696
movl $0x36, %edx
callq 0x123f0
leaq 0x1c5bf(%rip), %rdi     # 0x6c8d1
leaq 0x1c367(%rip), %rsi     # 0x6c680
leaq 0x1c376(%rip), %rcx     # 0x6c696
movl $0x3d, %edx
callq 0x123f0
leaq 0x1c5f4(%rip), %rdi     # 0x6c925
leaq 0x1c348(%rip), %rsi     # 0x6c680
leaq 0x1c357(%rip), %rcx     # 0x6c696
movl $0x3e, %edx
callq 0x123f0
leaq 0x1c62a(%rip), %rdi     # 0x6c97a
leaq 0x1c329(%rip), %rsi     # 0x6c680
leaq 0x1c338(%rip), %rcx     # 0x6c696
movl $0x40, %edx
callq 0x123f0
leaq 0x1c61a(%rip), %rdi     # 0x6c989
leaq 0x1c30a(%rip), %rsi     # 0x6c680
leaq 0x1c319(%rip), %rcx     # 0x6c696
movl $0x41, %edx
callq 0x123f0
leaq 0x1c652(%rip), %rdi     # 0x6c9e0
leaq 0x1c2eb(%rip), %rsi     # 0x6c680
leaq 0x1c2fa(%rip), %rcx     # 0x6c696
movl $0x42, %edx
callq 0x123f0
leaq 0x1c642(%rip), %rdi     # 0x6c9ef
leaq 0x1c2cc(%rip), %rsi     # 0x6c680
leaq 0x1c2db(%rip), %rcx     # 0x6c696
movl $0x43, %edx
callq 0x123f0
leaq 0x1c67b(%rip), %rdi     # 0x6ca47
leaq 0x1c2ad(%rip), %rsi     # 0x6c680
leaq 0x1c2bc(%rip), %rcx     # 0x6c696
movl $0x44, %edx
callq 0x123f0