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

#ifdef JANET_32
    assert(sizeof(void *) == 4);
#else
    assert(sizeof(void *) == 8);
#endif

    /* Check the version defines are self consistent */
    char version_combined[256];
    sprintf(version_combined, "%d.%d.%d%s", JANET_VERSION_MAJOR, JANET_VERSION_MINOR, JANET_VERSION_PATCH, JANET_VERSION_EXTRA);
    assert(!strcmp(JANET_VERSION, version_combined));

    /* Reflexive testing and nanbox testing */
    assert(janet_equals(janet_wrap_nil(), janet_wrap_nil()));
    assert(janet_equals(janet_wrap_false(), janet_wrap_false()));
    assert(janet_equals(janet_wrap_true(), janet_wrap_true()));
    assert(janet_equals(janet_wrap_integer(1), janet_wrap_integer(1)));
    assert(janet_equals(janet_wrap_integer(INT32_MAX), janet_wrap_integer(INT32_MAX)));
    assert(janet_equals(janet_wrap_integer(-2), janet_wrap_integer(-2)));
    assert(janet_equals(janet_wrap_integer(INT32_MIN), janet_wrap_integer(INT32_MIN)));
    assert(janet_equals(janet_wrap_number(1.4), janet_wrap_number(1.4)));
    assert(janet_equals(janet_wrap_number(3.14159265), janet_wrap_number(3.14159265)));
#ifdef NAN
    assert(janet_checktype(janet_wrap_number(NAN), JANET_NUMBER));
#else
    assert(janet_checktype(janet_wrap_number(0.0 / 0.0), JANET_NUMBER));
#endif

    assert(NULL != &janet_wrap_nil);

    assert(janet_equals(janet_cstringv("a string."), janet_cstringv("a string.")));
    assert(janet_equals(janet_csymbolv("sym"), janet_csymbolv("sym")));

    Janet *t1 = janet_tuple_begin(3);
    t1[0] = janet_wrap_nil();
    t1[1] = janet_wrap_integer(4);
    t1[2] = janet_cstringv("hi");
    Janet tuple1 = janet_wrap_tuple(janet_tuple_end(t1));

    Janet *t2 = janet_tuple_begin(3);
    t2[0] = janet_wrap_nil();
    t2[1] = janet_wrap_integer(4);
    t2[2] = janet_cstringv("hi");
    Janet tuple2 = janet_wrap_tuple(janet_tuple_end(t2));

    assert(janet_equals(tuple1, tuple2));

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
leaq 0x1c521(%rip), %rsi     # 0x682e8
leaq 0x1c32f(%rip), %r9      # 0x680fd
leaq -0x130(%rbp), %rbx
pushq $0x1
popq %rdx
pushq $0x26
popq %rcx
movq %rbx, %rdi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x12a50
leaq 0x63e4(%rip), %rdi      # 0x521d3
pushq $0x7
popq %rdx
movq %rbx, %rsi
callq 0x127c0
testl %eax, %eax
jne 0x4c149
movabsq $-0x77fffffffffff, %r13 # imm = 0xFFF8800000000001
movq %r13, %rdi
callq 0x4b313
movq %rax, %rbx
movq %r13, %rdi
callq 0x4b313
movq %rbx, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c165
movabsq $-0x7000000000000, %rbx # imm = 0xFFF9000000000000
movq %rbx, %rdi
callq 0x4b313
movq %rax, %r14
movq %rbx, %rdi
callq 0x4b313
movq %r14, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c181
incq %rbx
movq %rbx, %rdi
callq 0x4b313
movq %rax, %r14
movq %rbx, %rdi
callq 0x4b313
movq %r14, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c19d
movsd 0x4485(%rip), %xmm0     # 0x50318
callq 0x4b471
movq %rax, %rbx
movsd 0x4475(%rip), %xmm0     # 0x50318
callq 0x4b471
movq %rbx, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c1b9
movsd 0x25bd(%rip), %xmm0     # 0x4e480
callq 0x4b471
movq %rax, %rbx
movsd 0x25ad(%rip), %xmm0     # 0x4e480
callq 0x4b471
movq %rbx, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c1d5
movsd 0x1c3d5(%rip), %xmm0    # 0x682c8
callq 0x4b471
movq %rax, %rbx
movsd 0x1c3c5(%rip), %xmm0    # 0x682c8
callq 0x4b471
movq %rbx, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c1f1
movsd 0x2555(%rip), %xmm0     # 0x4e478
callq 0x4b471
movq %rax, %rbx
movsd 0x2545(%rip), %xmm0     # 0x4e478
callq 0x4b471
movq %rbx, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c20d
movsd 0x1c37d(%rip), %xmm0    # 0x682d0
callq 0x4b471
movq %rax, %rbx
movsd 0x1c36d(%rip), %xmm0    # 0x682d0
callq 0x4b471
movq %rbx, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c229
movsd 0x1c355(%rip), %xmm0    # 0x682d8
callq 0x4b471
movq %rax, %rbx
movsd 0x1c345(%rip), %xmm0    # 0x682d8
callq 0x4b471
movq %rbx, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c245
movsd 0x1009d(%rip), %xmm0    # 0x5c050
callq 0x4b471
movq %rax, %xmm0
ucomisd %xmm0, %xmm0
jp 0x4c261
movabsq $-0x6000000000000, %r14 # imm = 0xFFFA000000000000
leaq 0x1c5d2(%rip), %rbx     # 0x685aa
movq %rbx, %rdi
callq 0x411ea
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %rax, %r15
movq %rbx, %rdi
callq 0x411ea
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %r15, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c29a
leaq 0x64f9(%rip), %rbx      # 0x52514
movq %rbx, %rdi
callq 0x439c6
movabsq $-0x5800000000000, %r15 # imm = 0xFFFA800000000000
movq %rax, %rdi
movq %r15, %rsi
callq 0x4b366
movq %rax, %r12
movq %rbx, %rdi
callq 0x439c6
movq %rax, %rdi
movq %r15, %rsi
callq 0x4b366
movq %r12, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c2b3
pushq $0x3
popq %r15
movl %r15d, %edi
callq 0x44648
movq %rax, %rbx
movq %r13, %rdi
callq 0x4b313
movq %rax, (%rbx)
movsd 0x1c25d(%rip), %xmm0    # 0x682e0
callq 0x4b471
movq %rax, 0x8(%rbx)
leaq 0x1c5a3(%rip), %r12     # 0x68636
movq %r12, %rdi
callq 0x411ea
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x44674
movabsq $-0x4000000000000, %r14 # imm = 0xFFFC000000000000
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %rax, %rbx
movl %r15d, %edi
callq 0x44648
movq %rax, %r15
movq %r13, %rdi
callq 0x4b313
movq %rax, (%r15)
movsd 0x1c1f8(%rip), %xmm0    # 0x682e0
callq 0x4b471
movq %rax, 0x8(%r15)
movq %r12, %rdi
callq 0x411ea
movq %rax, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x4b366
movq %rax, 0x10(%r15)
movq %r15, %rdi
callq 0x44674
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %rbx, %rdi
movq %rax, %rsi
callq 0x466c8
testl %eax, %eax
je 0x4c2cc
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c1a3(%rip), %rdi     # 0x682f3
leaq 0x1c1c5(%rip), %rsi     # 0x6831c
leaq 0x1c1d5(%rip), %rcx     # 0x68333
pushq $0x29
jmp 0x4c2e3
leaq 0x1c1d9(%rip), %rdi     # 0x68345
leaq 0x1c1a9(%rip), %rsi     # 0x6831c
leaq 0x1c1b9(%rip), %rcx     # 0x68333
pushq $0x2c
jmp 0x4c2e3
leaq 0x1c1ee(%rip), %rdi     # 0x68376
leaq 0x1c18d(%rip), %rsi     # 0x6831c
leaq 0x1c19d(%rip), %rcx     # 0x68333
pushq $0x2d
jmp 0x4c2e3
leaq 0x1c207(%rip), %rdi     # 0x683ab
leaq 0x1c171(%rip), %rsi     # 0x6831c
leaq 0x1c181(%rip), %rcx     # 0x68333
pushq $0x2e
jmp 0x4c2e3
leaq 0x1c21e(%rip), %rdi     # 0x683de
leaq 0x1c155(%rip), %rsi     # 0x6831c
leaq 0x1c165(%rip), %rcx     # 0x68333
pushq $0x2f
jmp 0x4c2e3
leaq 0x1c23d(%rip), %rdi     # 0x68419
leaq 0x1c139(%rip), %rsi     # 0x6831c
leaq 0x1c149(%rip), %rcx     # 0x68333
pushq $0x30
jmp 0x4c2e3
leaq 0x1c26c(%rip), %rdi     # 0x68464
leaq 0x1c11d(%rip), %rsi     # 0x6831c
leaq 0x1c12d(%rip), %rcx     # 0x68333
pushq $0x31
jmp 0x4c2e3
leaq 0x1c28d(%rip), %rdi     # 0x684a1
leaq 0x1c101(%rip), %rsi     # 0x6831c
leaq 0x1c111(%rip), %rcx     # 0x68333
pushq $0x32
jmp 0x4c2e3
leaq 0x1c2bc(%rip), %rdi     # 0x684ec
leaq 0x1c0e5(%rip), %rsi     # 0x6831c
leaq 0x1c0f5(%rip), %rcx     # 0x68333
pushq $0x33
jmp 0x4c2e3
leaq 0x1c2dd(%rip), %rdi     # 0x68529
leaq 0x1c0c9(%rip), %rsi     # 0x6831c
leaq 0x1c0d9(%rip), %rcx     # 0x68333
pushq $0x34
jmp 0x4c2e3
movsd 0xfde7(%rip), %xmm0     # 0x5c050
callq 0x4b471
movabsq $0x7800000000000, %rcx  # imm = 0x7800000000000
testq %rcx, %rax
je 0x4bfc7
leaq 0x1c2ec(%rip), %rdi     # 0x68574
leaq 0x1c08d(%rip), %rsi     # 0x6831c
leaq 0x1c09d(%rip), %rcx     # 0x68333
pushq $0x36
jmp 0x4c2e3
leaq 0x1c313(%rip), %rdi     # 0x685b4
leaq 0x1c074(%rip), %rsi     # 0x6831c
leaq 0x1c084(%rip), %rcx     # 0x68333
pushq $0x3d
jmp 0x4c2e3
leaq 0x1c341(%rip), %rdi     # 0x685fb
leaq 0x1c05b(%rip), %rsi     # 0x6831c
leaq 0x1c06b(%rip), %rcx     # 0x68333
pushq $0x3e
jmp 0x4c2e3
leaq 0x1c366(%rip), %rdi     # 0x68639
leaq 0x1c042(%rip), %rsi     # 0x6831c
leaq 0x1c052(%rip), %rcx     # 0x68333
pushq $0x4c
popq %rdx
callq 0x123f0
nopl (%rax)