// File: /workspace/github_c_makefile_star2_O3/wjmelements[P]evm/tst/label.c
// Function: main
int main() {
    assert(labelCount == 0);
    assert(firstLabelAfter(0) == 0);

    const char *label = "hello";
    jump_t jump1;
    jump1.label.start = label;
    jump1.label.length = 5;
    jump1.programCounter = 0;
    registerLabel(jump1);
    assert(labelCount == 1);
    assert(labels[0].length == jump1.label.length);
    assert(labelLocations[0] == 0);
    assert(firstLabelAfter(0) == 1);


    labelLocations[0] = 1;
    assert(labelLocations[0] == 1);
    assert(firstLabelAfter(0) == 0);
    assert(firstLabelAfter(1) == 1);
    assert(firstLabelAfter(2) == 1);

    incrementLabelLocations(0, 1);
    assert(labelLocations[0] == 2);
    assert(firstLabelAfter(0) == 0);
    assert(firstLabelAfter(1) == 0);
    assert(firstLabelAfter(2) == 1);
    assert(firstLabelAfter(3) == 1);

    const char *label2 = "world";
    jump_t jump2;
    jump2.label.start = label2;
    jump2.label.length = 5;
    jump2.programCounter = 254;
    registerLabel(jump2);
    assert(labelCount == 2);
    assert(labels[0].length == jump2.label.length);
    assert(labelLocations[0] == 2);
    assert(labelLocations[1] == 254);
    incrementLabelLocations(10, 3);
    assert(labelLocations[0] == 2);
    assert(labelLocations[1] == 257);
    assert(firstLabelAfter(0) == 0);
    assert(firstLabelAfter(1) == 0);
    assert(firstLabelAfter(2) == 1);
    assert(firstLabelAfter(256) == 1);
    assert(firstLabelAfter(257) == 2);
    assert(firstLabelAfter(258) == 2);
}

// Assembly:
pushq %rbx
subq $0x60, %rsp
cmpl $0x0, 0x5658(%rip)      # 0x7860
jne 0x2594
leaq 0x1e2e(%rip), %rax      # 0x4043
movq %rax, 0x50(%rsp)
movq $0x5, 0x58(%rsp)
movl $0x0, 0x40(%rsp)
movups 0x40(%rsp), %xmm0
movups 0x50(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x285d
cmpl $0x1, 0x5616(%rip)      # 0x7860
jne 0x25b3
cmpq $0x5, 0x5620(%rip)      # 0x7878
jne 0x25d2
cmpl $0x0, 0x960b(%rip)      # 0xb870
jne 0x25f1
movl $0x1, %eax
xorl %ecx, %ecx
leaq 0x95f7(%rip), %rbx      # 0xb870
leal (%rax,%rcx), %edx
shrl %edx
cmpl $0x0, (%rbx,%rdx,4)
je 0x2288
movl %edx, %eax
jmp 0x228c
incl %edx
movl %edx, %ecx
cmpl %eax, %ecx
jb 0x2279
cmpl $0x1, %ecx
jne 0x2610
movl $0x1, 0x95cd(%rip)      # 0xb870
movl $0x1, %eax
xorl %ecx, %ecx
leal (%rax,%rcx), %edx
shrl %edx
cmpl $0x0, (%rbx,%rdx,4)
je 0x22b9
movl %edx, %eax
jmp 0x22bd
incl %edx
movl %edx, %ecx
cmpl %eax, %ecx
jb 0x22aa
testl %ecx, %ecx
jne 0x262f
movl $0x1, %eax
xorl %ecx, %ecx
leal (%rax,%rcx), %edx
shrl %edx
cmpl $0x2, (%rbx,%rdx,4)
jae 0x22e1
incl %edx
movl %edx, %ecx
jmp 0x22e3
movl %edx, %eax
cmpl %eax, %ecx
jb 0x22d0
cmpl $0x1, %ecx
jne 0x264e
movl $0x1, %eax
xorl %ecx, %ecx
leal (%rax,%rcx), %edx
shrl %edx
cmpl $0x3, (%rbx,%rdx,4)
jae 0x2308
incl %edx
movl %edx, %ecx
jmp 0x230a
movl %edx, %eax
cmpl %eax, %ecx
jb 0x22f7
cmpl $0x1, %ecx
jne 0x266d
xorl %edi, %edi
movl $0x1, %esi
callq 0x2901
cmpl $0x2, 0x9546(%rip)      # 0xb870
jne 0x268c
movl 0x552a(%rip), %eax      # 0x7860
testl %eax, %eax
je 0x2556
xorl %ecx, %ecx
movl %eax, %edx
leal (%rdx,%rcx), %esi
shrl %esi
cmpl $0x0, (%rbx,%rsi,4)
je 0x2351
movl %esi, %edx
jmp 0x2355
incl %esi
movl %esi, %ecx
cmpl %edx, %ecx
jb 0x2342
testl %ecx, %ecx
jne 0x26ab
xorl %ecx, %ecx
movl %eax, %edx
leal (%rdx,%rcx), %esi
shrl %esi
cmpl $0x2, (%rbx,%rsi,4)
jae 0x2376
incl %esi
movl %esi, %ecx
jmp 0x2378
movl %esi, %edx
cmpl %edx, %ecx
jb 0x2365
testl %ecx, %ecx
jne 0x26ca
xorl %ecx, %ecx
movl %eax, %edx
leal (%rdx,%rcx), %esi
shrl %esi
cmpl $0x3, (%rbx,%rsi,4)
jae 0x2399
incl %esi
movl %esi, %ecx
jmp 0x239b
movl %esi, %edx
cmpl %edx, %ecx
jb 0x2388
cmpl $0x1, %ecx
jne 0x2556
xorl %ecx, %ecx
leal (%rax,%rcx), %edx
shrl %edx
cmpl $0x4, (%rbx,%rdx,4)
jae 0x23bb
incl %edx
movl %edx, %ecx
jmp 0x23bd
movl %edx, %eax
cmpl %eax, %ecx
jb 0x23aa
cmpl $0x1, %ecx
jne 0x26e9
leaq 0x1d55(%rip), %rax      # 0x4126
movq %rax, 0x30(%rsp)
movq $0x5, 0x38(%rsp)
movl $0xfe, 0x20(%rsp)
movups 0x20(%rsp), %xmm0
movups 0x30(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x285d
cmpl $0x2, 0x545a(%rip)      # 0x7860
jne 0x2708
cmpq $0x5, 0x5464(%rip)      # 0x7878
jne 0x2727
cmpl $0x2, 0x944f(%rip)      # 0xb870
jne 0x2746
cmpl $0xfe, 0x9443(%rip)     # 0xb874
jne 0x2765
movl $0xa, %edi
movl $0x3, %esi
callq 0x2901
cmpl $0x2, 0x9423(%rip)      # 0xb870
jne 0x2784
cmpl $0x101, 0x9417(%rip)    # imm = 0x101
jne 0x27a3
movl 0x53f7(%rip), %eax      # 0x7860
testl %eax, %eax
je 0x2575
xorl %ecx, %ecx
movl %eax, %edx
leal (%rdx,%rcx), %esi
shrl %esi
cmpl $0x0, (%rbx,%rsi,4)
je 0x2484
movl %esi, %edx
jmp 0x2488
incl %esi
movl %esi, %ecx
cmpl %edx, %ecx
jb 0x2475
testl %ecx, %ecx
jne 0x27c2
xorl %ecx, %ecx
movl %eax, %edx
leal (%rdx,%rcx), %esi
shrl %esi
cmpl $0x2, (%rbx,%rsi,4)
jae 0x24a9
incl %esi
movl %esi, %ecx
jmp 0x24ab
movl %esi, %edx
cmpl %edx, %ecx
jb 0x2498
testl %ecx, %ecx
jne 0x27e1
xorl %ecx, %ecx
movl %eax, %edx
leal (%rdx,%rcx), %esi
shrl %esi
cmpl $0x3, (%rbx,%rsi,4)
jae 0x24cc
incl %esi
movl %esi, %ecx
jmp 0x24ce
movl %esi, %edx
cmpl %edx, %ecx
jb 0x24bb
cmpl $0x1, %ecx
jne 0x2575
xorl %ecx, %ecx
movl %eax, %edx
leal (%rdx,%rcx), %esi
shrl %esi
cmpl $0x101, (%rbx,%rsi,4)   # imm = 0x101
jae 0x24f3
incl %esi
movl %esi, %ecx
jmp 0x24f5
movl %esi, %edx
cmpl %edx, %ecx
jb 0x24df
cmpl $0x1, %ecx
jne 0x2800
xorl %ecx, %ecx
movl %eax, %edx
leal (%rdx,%rcx), %esi
shrl %esi
cmpl $0x102, (%rbx,%rsi,4)   # imm = 0x102
jae 0x251a
incl %esi
movl %esi, %ecx
jmp 0x251c
movl %esi, %edx
cmpl %edx, %ecx
jb 0x2506
cmpl $0x2, %ecx
jne 0x281f
xorl %ecx, %ecx
leal (%rax,%rcx), %edx
shrl %edx
cmpl $0x103, (%rbx,%rdx,4)   # imm = 0x103
jae 0x253f
incl %edx
movl %edx, %ecx
jmp 0x2541
movl %edx, %eax
cmpl %eax, %ecx
jb 0x252b
cmpl $0x2, %ecx
jne 0x283e
xorl %eax, %eax
addq $0x60, %rsp
popq %rbx
retq
leaq 0x1b6a(%rip), %rdi      # 0x40c7
leaq 0x1ab0(%rip), %rsi      # 0x4014
leaq 0x1ab5(%rip), %rcx      # 0x4020
movl $0x21, %edx
callq 0x2030
leaq 0x1b4b(%rip), %rdi      # 0x40c7
leaq 0x1a91(%rip), %rsi      # 0x4014
leaq 0x1a96(%rip), %rcx      # 0x4020
movl $0x33, %edx
callq 0x2030
leaq 0x1a69(%rip), %rdi      # 0x4004
leaq 0x1a72(%rip), %rsi      # 0x4014
leaq 0x1a77(%rip), %rcx      # 0x4020
movl $0x8, %edx
callq 0x2030
leaq 0x1a8f(%rip), %rdi      # 0x4049
leaq 0x1a53(%rip), %rsi      # 0x4014
leaq 0x1a58(%rip), %rcx      # 0x4020
movl $0x11, %edx
callq 0x2030
leaq 0x1a80(%rip), %rdi      # 0x4059
leaq 0x1a34(%rip), %rsi      # 0x4014
leaq 0x1a39(%rip), %rcx      # 0x4020
movl $0x12, %edx
callq 0x2030
leaq 0x1a88(%rip), %rdi      # 0x4080
leaq 0x1a15(%rip), %rsi      # 0x4014
leaq 0x1a1a(%rip), %rcx      # 0x4020
movl $0x13, %edx
callq 0x2030
leaq 0x1a80(%rip), %rdi      # 0x4097
leaq 0x19f6(%rip), %rsi      # 0x4014
leaq 0x19fb(%rip), %rcx      # 0x4020
movl $0x14, %edx
callq 0x2030
leaq 0x19f5(%rip), %rdi      # 0x402b
leaq 0x19d7(%rip), %rsi      # 0x4014
leaq 0x19dc(%rip), %rcx      # 0x4020
movl $0x19, %edx
callq 0x2030
leaq 0x1a5a(%rip), %rdi      # 0x40af
leaq 0x19b8(%rip), %rsi      # 0x4014
leaq 0x19bd(%rip), %rcx      # 0x4020
movl $0x1a, %edx
callq 0x2030
leaq 0x1a53(%rip), %rdi      # 0x40c7
leaq 0x1999(%rip), %rsi      # 0x4014
leaq 0x199e(%rip), %rcx      # 0x4020
movl $0x1b, %edx
callq 0x2030
leaq 0x1a4c(%rip), %rdi      # 0x40df
leaq 0x197a(%rip), %rsi      # 0x4014
leaq 0x197f(%rip), %rcx      # 0x4020
movl $0x1e, %edx
callq 0x2030
leaq 0x1979(%rip), %rdi      # 0x402b
leaq 0x195b(%rip), %rsi      # 0x4014
leaq 0x1960(%rip), %rcx      # 0x4020
movl $0x1f, %edx
callq 0x2030
leaq 0x1a25(%rip), %rdi      # 0x40f6
leaq 0x193c(%rip), %rsi      # 0x4014
leaq 0x1941(%rip), %rcx      # 0x4020
movl $0x20, %edx
callq 0x2030
leaq 0x1a1e(%rip), %rdi      # 0x410e
leaq 0x191d(%rip), %rsi      # 0x4014
leaq 0x1922(%rip), %rcx      # 0x4020
movl $0x22, %edx
callq 0x2030
leaq 0x1a1d(%rip), %rdi      # 0x412c
leaq 0x18fe(%rip), %rsi      # 0x4014
leaq 0x1903(%rip), %rcx      # 0x4020
movl $0x2a, %edx
callq 0x2030
leaq 0x1a0e(%rip), %rdi      # 0x413c
leaq 0x18df(%rip), %rsi      # 0x4014
leaq 0x18e4(%rip), %rcx      # 0x4020
movl $0x2b, %edx
callq 0x2030
leaq 0x1992(%rip), %rdi      # 0x40df
leaq 0x18c0(%rip), %rsi      # 0x4014
leaq 0x18c5(%rip), %rcx      # 0x4020
movl $0x2c, %edx
callq 0x2030
leaq 0x19f7(%rip), %rdi      # 0x4163
leaq 0x18a1(%rip), %rsi      # 0x4014
leaq 0x18a6(%rip), %rcx      # 0x4020
movl $0x2d, %edx
callq 0x2030
leaq 0x1954(%rip), %rdi      # 0x40df
leaq 0x1882(%rip), %rsi      # 0x4014
leaq 0x1887(%rip), %rcx      # 0x4020
movl $0x2f, %edx
callq 0x2030
leaq 0x19d2(%rip), %rdi      # 0x417c
leaq 0x1863(%rip), %rsi      # 0x4014
leaq 0x1868(%rip), %rcx      # 0x4020
movl $0x30, %edx
callq 0x2030
leaq 0x1862(%rip), %rdi      # 0x402b
leaq 0x1844(%rip), %rsi      # 0x4014
leaq 0x1849(%rip), %rcx      # 0x4020
movl $0x31, %edx
callq 0x2030
leaq 0x190e(%rip), %rdi      # 0x40f6
leaq 0x1825(%rip), %rsi      # 0x4014
leaq 0x182a(%rip), %rcx      # 0x4020
movl $0x32, %edx
callq 0x2030
leaq 0x198e(%rip), %rdi      # 0x4195
leaq 0x1806(%rip), %rsi      # 0x4014
leaq 0x180b(%rip), %rcx      # 0x4020
movl $0x34, %edx
callq 0x2030
leaq 0x1989(%rip), %rdi      # 0x41af
leaq 0x17e7(%rip), %rsi      # 0x4014
leaq 0x17ec(%rip), %rcx      # 0x4020
movl $0x35, %edx
callq 0x2030
leaq 0x1984(%rip), %rdi      # 0x41c9
leaq 0x17c8(%rip), %rsi      # 0x4014
leaq 0x17cd(%rip), %rcx      # 0x4020
movl $0x36, %edx
callq 0x2030