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

    int i;
    JanetArray *array1, *array2;

    array1 = janet_array(10);
    array2 = janet_array(0);

    janet_array_push(array1, janet_cstringv("one"));
    janet_array_push(array1, janet_cstringv("two"));
    janet_array_push(array1, janet_cstringv("three"));
    janet_array_push(array1, janet_cstringv("four"));
    janet_array_push(array1, janet_cstringv("five"));
    janet_array_push(array1, janet_cstringv("six"));
    janet_array_push(array1, janet_cstringv("seven"));

    assert(array1->count == 7);
    assert(array1->capacity >= 7);
    assert(janet_equals(array1->data[0], janet_cstringv("one")));

    janet_array_push(array2, janet_cstringv("one"));
    janet_array_push(array2, janet_cstringv("two"));
    janet_array_push(array2, janet_cstringv("three"));
    janet_array_push(array2, janet_cstringv("four"));
    janet_array_push(array2, janet_cstringv("five"));
    janet_array_push(array2, janet_cstringv("six"));
    janet_array_push(array2, janet_cstringv("seven"));

    for (i = 0; i < array2->count; i++) {
        assert(janet_equals(array1->data[i], array2->data[i]));
    }

    janet_array_pop(array1);
    janet_array_pop(array1);

    assert(array1->count == 5);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movl $0xa, %edi
callq 0x13180
movq %rax, -0x10(%rbp)
xorl %edi, %edi
callq 0x13180
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xd8(%rbp)
leaq 0x1c2d2(%rip), %rdi     # 0x97d98
callq 0x64a70
movq %rax, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x7b550
movq -0xd8(%rbp), %rdi
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rsi
callq 0x13510
movq -0x10(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq 0x1d7b6(%rip), %rdi     # 0x992b9
callq 0x64a70
movq %rax, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x7b550
movq -0xd0(%rbp), %rdi
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rsi
callq 0x13510
movq -0x10(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq 0x1d77d(%rip), %rdi     # 0x992bd
callq 0x64a70
movq %rax, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x7b550
movq -0xc8(%rbp), %rdi
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
callq 0x13510
movq -0x10(%rbp), %rax
movq %rax, -0xc0(%rbp)
leaq 0x1d746(%rip), %rdi     # 0x992c3
callq 0x64a70
movq %rax, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x7b550
movq -0xc0(%rbp), %rdi
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rsi
callq 0x13510
movq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq 0x1d70e(%rip), %rdi     # 0x992c8
callq 0x64a70
movq %rax, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x7b550
movq -0xb8(%rbp), %rdi
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rsi
callq 0x13510
movq -0x10(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq 0x1d6d6(%rip), %rdi     # 0x992cd
callq 0x64a70
movq %rax, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x7b550
movq -0xb0(%rbp), %rdi
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rsi
callq 0x13510
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq 0x1d69d(%rip), %rdi     # 0x992d1
callq 0x64a70
movq %rax, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x7b550
movq -0xa8(%rbp), %rdi
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rsi
callq 0x13510
movq -0x10(%rbp), %rax
cmpl $0x7, 0x10(%rax)
jne 0x7bc6b
jmp 0x7bc8a
leaq 0x1d665(%rip), %rdi     # 0x992d7
leaq 0x1d671(%rip), %rsi     # 0x992ea
movl $0x2c, %edx
leaq 0x1d67b(%rip), %rcx     # 0x99300
callq 0x123f0
movq -0x10(%rbp), %rax
cmpl $0x7, 0x14(%rax)
jl 0x7bc96
jmp 0x7bcb5
leaq 0x1d674(%rip), %rdi     # 0x99311
leaq 0x1d646(%rip), %rsi     # 0x992ea
movl $0x2d, %edx
leaq 0x1d650(%rip), %rcx     # 0x99300
callq 0x123f0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0xe0(%rbp)
leaq 0x1c0cd(%rip), %rdi     # 0x97d98
callq 0x64a70
movq %rax, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x7b550
movq %rax, %rcx
movq -0xe0(%rbp), %rax
movq %rcx, -0x58(%rbp)
movq (%rax), %rdi
movq -0x58(%rbp), %rsi
callq 0x6e560
cmpl $0x0, %eax
je 0x7bd03
jmp 0x7bd22
leaq 0x1d61d(%rip), %rdi     # 0x99327
leaq 0x1d5d9(%rip), %rsi     # 0x992ea
movl $0x2e, %edx
leaq 0x1d5e3(%rip), %rcx     # 0x99300
callq 0x123f0
movq -0x18(%rbp), %rax
movq %rax, -0x118(%rbp)
leaq 0x1c064(%rip), %rdi     # 0x97d98
callq 0x64a70
movq %rax, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x7b550
movq -0x118(%rbp), %rdi
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rsi
callq 0x13510
movq -0x18(%rbp), %rax
movq %rax, -0x110(%rbp)
leaq 0x1d548(%rip), %rdi     # 0x992b9
callq 0x64a70
movq %rax, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x7b550
movq -0x110(%rbp), %rdi
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rsi
callq 0x13510
movq -0x18(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq 0x1d50f(%rip), %rdi     # 0x992bd
callq 0x64a70
movq %rax, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x7b550
movq -0x108(%rbp), %rdi
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rsi
callq 0x13510
movq -0x18(%rbp), %rax
movq %rax, -0x100(%rbp)
leaq 0x1d4d8(%rip), %rdi     # 0x992c3
callq 0x64a70
movq %rax, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x7b550
movq -0x100(%rbp), %rdi
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rsi
callq 0x13510
movq -0x18(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq 0x1d4a0(%rip), %rdi     # 0x992c8
callq 0x64a70
movq %rax, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x7b550
movq -0xf8(%rbp), %rdi
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rsi
callq 0x13510
movq -0x18(%rbp), %rax
movq %rax, -0xf0(%rbp)
leaq 0x1d468(%rip), %rdi     # 0x992cd
callq 0x64a70
movq %rax, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x7b550
movq -0xf0(%rbp), %rdi
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rsi
callq 0x13510
movq -0x18(%rbp), %rax
movq %rax, -0xe8(%rbp)
leaq 0x1d429(%rip), %rdi     # 0x992d1
callq 0x64a70
movq %rax, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x7b550
movq -0xe8(%rbp), %rdi
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rsi
callq 0x13510
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x7bf44
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
movslq -0x4(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x4(%rbp), %rcx
movq (%rdx,%rsi,8), %rdi
movq (%rax,%rcx,8), %rsi
callq 0x6e560
cmpl $0x0, %eax
je 0x7bf18
jmp 0x7bf37
leaq 0x1d43d(%rip), %rdi     # 0x9935c
leaq 0x1d3c4(%rip), %rsi     # 0x992ea
movl $0x39, %edx
leaq 0x1d3ce(%rip), %rcx     # 0x99300
callq 0x123f0
jmp 0x7bf39
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x7bee0
movq -0x10(%rbp), %rdi
callq 0x13580
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rdi
callq 0x13580
movq %rax, -0xa0(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x5, 0x10(%rax)
jne 0x7bf70
jmp 0x7bf8f
leaq 0x1d414(%rip), %rdi     # 0x9938b
leaq 0x1d36c(%rip), %rsi     # 0x992ea
movl $0x3f, %edx
leaq 0x1d376(%rip), %rcx     # 0x99300
callq 0x123f0
xorl %eax, %eax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopw (%rax,%rax)