// File: /workspace/github_c_makefile_star2_O2/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
pushq $0xa
popq %rdi
callq 0x43b8a
movq %rax, %r15
xorl %edi, %edi
callq 0x43b8a
movq %rax, %rbx
leaq 0x1c34e(%rip), %rdi     # 0x68678
callq 0x411ea
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %rax, %r13
movsd 0x1c313(%rip), %xmm0    # 0x68658
callq 0x4b471
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x43e19
leaq 0x1c31f(%rip), %rdi     # 0x6867e
callq 0x411ea
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %rax, %r13
movsd 0x1c2e6(%rip), %xmm0    # 0x68660
callq 0x4b471
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x43e19
leaq 0x1b880(%rip), %rdi     # 0x67c14
callq 0x411ea
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %rax, %r13
movq %r12, %rdi
callq 0x4b313
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x43e19
leaq 0x1c2bf(%rip), %rdi     # 0x68683
callq 0x411ea
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %rax, %r13
leaq 0x1c2ac(%rip), %rdi     # 0x6868a
callq 0x411ea
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x43e19
cmpl $0x4, 0x10(%r15)
jne 0x4c832
cmpl $0x3, 0x14(%r15)
jle 0x4c84e
leaq 0x1c25f(%rip), %rdi     # 0x68678
callq 0x411ea
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %r15, %rdi
movq %rax, %rsi
callq 0x43c35
movq %rax, %r13
movsd 0x1c219(%rip), %xmm0    # 0x68658
callq 0x4b471
movq %r13, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c86a
leaq 0x1c220(%rip), %rdi     # 0x6867e
callq 0x411ea
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %r15, %rdi
movq %rax, %rsi
callq 0x43c35
movq %rax, %r13
movsd 0x1c1dc(%rip), %xmm0    # 0x68660
callq 0x4b471
movq %r13, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c886
leaq 0x1b771(%rip), %rdi     # 0x67c14
callq 0x411ea
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %r15, %rdi
movq %rax, %rsi
callq 0x43c35
movq %rax, %r13
movq %r12, %rdi
callq 0x4b313
movq %r13, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c8a2
leaq 0x1c1a0(%rip), %rdi     # 0x68683
callq 0x411ea
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %r15, %rdi
movq %rax, %rsi
callq 0x43c35
movq %rax, %r12
leaq 0x1c182(%rip), %rdi     # 0x6868a
callq 0x411ea
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %r12, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c8be
movabsq $-0x77fffffffffff, %r12 # imm = 0xFFF8800000000001
leaq 0x1c13c(%rip), %rdi     # 0x68678
callq 0x411ea
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %r15, %rdi
movq %rax, %rsi
callq 0x43d98
leaq 0x1b6b6(%rip), %rdi     # 0x67c14
callq 0x411ea
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %rax, %r13
movq %r12, %rdi
callq 0x4b313
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x43e19
cmpl $0x2, 0x10(%r15)
jne 0x4c8da
leaq 0x1c0df(%rip), %rdi     # 0x68678
callq 0x411ea
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %r15, %rdi
movq %rax, %rsi
callq 0x43c35
movq %rax, %r13
movq %r12, %rdi
callq 0x4b313
movq %r13, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c8f6
leaq 0x1b63b(%rip), %rdi     # 0x67c14
callq 0x411ea
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %r15, %rdi
movq %rax, %rsi
callq 0x43c35
movq %rax, %r14
movq %r12, %rdi
callq 0x4b313
movq %r14, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c912
movabsq $-0x5800000000000, %r14 # imm = 0xFFFA800000000000
leaq 0x1c2ae(%rip), %r15     # 0x688d1
movq %r15, %rdi
callq 0x439c6
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %rax, %r12
movsd 0x1c027(%rip), %xmm0    # 0x68668
callq 0x4b471
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x43e19
leaq 0x1c27d(%rip), %rdi     # 0x688d8
callq 0x439c6
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %rax, %r12
movsd 0x1bffa(%rip), %xmm0    # 0x68670
callq 0x4b471
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x43e19
leaq 0x1c24f(%rip), %rdi     # 0x688df
callq 0x439c6
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %rax, %r12
movsd 0x1bc1d(%rip), %xmm0    # 0x682c8
callq 0x4b471
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x43e19
leaq 0x1c224(%rip), %rdi     # 0x688e9
callq 0x439c6
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %rax, %r12
movsd 0x1bf88(%rip), %xmm0    # 0x68668
callq 0x4b471
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x43e19
movq %r15, %rdi
callq 0x439c6
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %rbx, %rdi
movq %rax, %rsi
callq 0x43c35
movq %rax, %r15
movsd 0x1bf4c(%rip), %xmm0    # 0x68668
callq 0x4b471
movq %r15, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c92e
leaq 0x1c19d(%rip), %rdi     # 0x688d8
callq 0x439c6
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %rbx, %rdi
movq %rax, %rsi
callq 0x43c35
movq %rax, %r15
movsd 0x1bf0f(%rip), %xmm0    # 0x68670
callq 0x4b471
movq %r15, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c94a
cmpl $0x4, 0x10(%rbx)
jne 0x4c963
leaq 0x1c147(%rip), %rdi     # 0x688d1
callq 0x439c6
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %rbx, %rdi
movq %rax, %rsi
callq 0x43d98
movq %rax, %r15
movsd 0x1beb8(%rip), %xmm0    # 0x68668
callq 0x4b471
movq %r15, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c97c
cmpl $0x3, 0x10(%rbx)
jne 0x4c995
leaq 0x1c0ff(%rip), %rdi     # 0x688d8
callq 0x439c6
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %rbx, %rdi
movq %rax, %rsi
callq 0x43d98
movq %rax, %r14
movsd 0x1be71(%rip), %xmm0    # 0x68670
callq 0x4b471
movq %r14, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c9ae
cmpl $0x2, 0x10(%rbx)
jne 0x4c9c7
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1be58(%rip), %rdi     # 0x68691
leaq 0x1be60(%rip), %rsi     # 0x686a0
leaq 0x1be6f(%rip), %rcx     # 0x686b6
pushq $0x28
jmp 0x4c9de
leaq 0x1be72(%rip), %rdi     # 0x686c7
leaq 0x1be44(%rip), %rsi     # 0x686a0
leaq 0x1be53(%rip), %rcx     # 0x686b6
pushq $0x29
jmp 0x4c9de
leaq 0x1be70(%rip), %rdi     # 0x686e1
leaq 0x1be28(%rip), %rsi     # 0x686a0
leaq 0x1be37(%rip), %rcx     # 0x686b6
pushq $0x2b
jmp 0x4c9de
leaq 0x1bea6(%rip), %rdi     # 0x68733
leaq 0x1be0c(%rip), %rsi     # 0x686a0
leaq 0x1be1b(%rip), %rcx     # 0x686b6
pushq $0x2c
jmp 0x4c9de
leaq 0x1bedb(%rip), %rdi     # 0x68784
leaq 0x1bdf0(%rip), %rsi     # 0x686a0
leaq 0x1bdff(%rip), %rcx     # 0x686b6
pushq $0x2d
jmp 0x4c9de
leaq 0x1bf0f(%rip), %rdi     # 0x687d4
leaq 0x1bdd4(%rip), %rsi     # 0x686a0
leaq 0x1bde3(%rip), %rcx     # 0x686b6
pushq $0x2e
jmp 0x4c9de
leaq 0x1bf49(%rip), %rdi     # 0x6882a
leaq 0x1bdb8(%rip), %rsi     # 0x686a0
leaq 0x1bdc7(%rip), %rcx     # 0x686b6
pushq $0x33
jmp 0x4c9de
leaq 0x1bf3c(%rip), %rdi     # 0x68839
leaq 0x1bd9c(%rip), %rsi     # 0x686a0
leaq 0x1bdab(%rip), %rcx     # 0x686b6
pushq $0x35
jmp 0x4c9de
leaq 0x1bf6d(%rip), %rdi     # 0x68886
leaq 0x1bd80(%rip), %rsi     # 0x686a0
leaq 0x1bd8f(%rip), %rcx     # 0x686b6
pushq $0x36
jmp 0x4c9de
leaq 0x1bfbc(%rip), %rdi     # 0x688f1
leaq 0x1bd64(%rip), %rsi     # 0x686a0
leaq 0x1bd73(%rip), %rcx     # 0x686b6
pushq $0x3d
jmp 0x4c9de
leaq 0x1bff4(%rip), %rdi     # 0x68945
leaq 0x1bd48(%rip), %rsi     # 0x686a0
leaq 0x1bd57(%rip), %rcx     # 0x686b6
pushq $0x3e
jmp 0x4c9de
leaq 0x1c030(%rip), %rdi     # 0x6899a
leaq 0x1bd2f(%rip), %rsi     # 0x686a0
leaq 0x1bd3e(%rip), %rcx     # 0x686b6
pushq $0x40
jmp 0x4c9de
leaq 0x1c026(%rip), %rdi     # 0x689a9
leaq 0x1bd16(%rip), %rsi     # 0x686a0
leaq 0x1bd25(%rip), %rcx     # 0x686b6
pushq $0x41
jmp 0x4c9de
leaq 0x1c064(%rip), %rdi     # 0x68a00
leaq 0x1bcfd(%rip), %rsi     # 0x686a0
leaq 0x1bd0c(%rip), %rcx     # 0x686b6
pushq $0x42
jmp 0x4c9de
leaq 0x1c05a(%rip), %rdi     # 0x68a0f
leaq 0x1bce4(%rip), %rsi     # 0x686a0
leaq 0x1bcf3(%rip), %rcx     # 0x686b6
pushq $0x43
jmp 0x4c9de
leaq 0x1c099(%rip), %rdi     # 0x68a67
leaq 0x1bccb(%rip), %rsi     # 0x686a0
leaq 0x1bcda(%rip), %rcx     # 0x686b6
pushq $0x44
popq %rdx
callq 0x123f0