// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x70, %rsp
cmpl $0x0, 0x56d1(%rip)      # 0x7860
jne 0x2193
jmp 0x21b2
leaq 0x1e6a(%rip), %rdi      # 0x4004
leaq 0x1e73(%rip), %rsi      # 0x4014
movl $0x8, %edx
leaq 0x1e73(%rip), %rcx      # 0x4020
callq 0x2030
xorl %edi, %edi
callq 0x2720
cmpl $0x0, %eax
jne 0x21c0
jmp 0x21df
leaq 0x1e64(%rip), %rdi      # 0x402b
leaq 0x1e46(%rip), %rsi      # 0x4014
movl $0x9, %edx
leaq 0x1e46(%rip), %rcx      # 0x4020
callq 0x2030
leaq 0x1e5d(%rip), %rax      # 0x4043
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq $0x5, -0x10(%rbp)
movl $0x0, -0x28(%rbp)
leaq -0x28(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x2780
cmpl $0x1, 0x562d(%rip)      # 0x7860
jne 0x2237
jmp 0x2256
leaq 0x1e0b(%rip), %rdi      # 0x4049
leaq 0x1dcf(%rip), %rsi      # 0x4014
movl $0x11, %edx
leaq 0x1dcf(%rip), %rcx      # 0x4020
callq 0x2030
movq 0x561b(%rip), %rax      # 0x7878
cmpq -0x10(%rbp), %rax
jne 0x2265
jmp 0x2284
leaq 0x1ded(%rip), %rdi      # 0x4059
leaq 0x1da1(%rip), %rsi      # 0x4014
movl $0x12, %edx
leaq 0x1da1(%rip), %rcx      # 0x4020
callq 0x2030
cmpl $0x0, 0x95e5(%rip)      # 0xb870
jne 0x228f
jmp 0x22ae
leaq 0x1dea(%rip), %rdi      # 0x4080
leaq 0x1d77(%rip), %rsi      # 0x4014
movl $0x13, %edx
leaq 0x1d77(%rip), %rcx      # 0x4020
callq 0x2030
xorl %edi, %edi
callq 0x2720
cmpl $0x1, %eax
jne 0x22bc
jmp 0x22db
leaq 0x1dd4(%rip), %rdi      # 0x4097
leaq 0x1d4a(%rip), %rsi      # 0x4014
movl $0x14, %edx
leaq 0x1d4a(%rip), %rcx      # 0x4020
callq 0x2030
movl $0x1, 0x958b(%rip)      # 0xb870
cmpl $0x1, 0x9584(%rip)      # 0xb870
jne 0x22f0
jmp 0x230f
leaq 0x1db8(%rip), %rdi      # 0x40af
leaq 0x1d16(%rip), %rsi      # 0x4014
movl $0x18, %edx
leaq 0x1d16(%rip), %rcx      # 0x4020
callq 0x2030
xorl %edi, %edi
callq 0x2720
cmpl $0x0, %eax
jne 0x231d
jmp 0x233c
leaq 0x1d07(%rip), %rdi      # 0x402b
leaq 0x1ce9(%rip), %rsi      # 0x4014
movl $0x19, %edx
leaq 0x1ce9(%rip), %rcx      # 0x4020
callq 0x2030
movl $0x1, %edi
callq 0x2720
cmpl $0x1, %eax
jne 0x234d
jmp 0x236c
leaq 0x1d72(%rip), %rdi      # 0x40c6
leaq 0x1cb9(%rip), %rsi      # 0x4014
movl $0x1a, %edx
leaq 0x1cb9(%rip), %rcx      # 0x4020
callq 0x2030
movl $0x2, %edi
callq 0x2720
cmpl $0x1, %eax
jne 0x237d
jmp 0x239c
leaq 0x1d5a(%rip), %rdi      # 0x40de
leaq 0x1c89(%rip), %rsi      # 0x4014
movl $0x1b, %edx
leaq 0x1c89(%rip), %rcx      # 0x4020
callq 0x2030
xorl %edi, %edi
movl $0x1, %esi
callq 0x28b0
cmpl $0x2, 0x94c1(%rip)      # 0xb870
jne 0x23b3
jmp 0x23d2
leaq 0x1d3c(%rip), %rdi      # 0x40f6
leaq 0x1c53(%rip), %rsi      # 0x4014
movl $0x1e, %edx
leaq 0x1c53(%rip), %rcx      # 0x4020
callq 0x2030
xorl %edi, %edi
callq 0x2720
cmpl $0x0, %eax
jne 0x23e0
jmp 0x23ff
leaq 0x1c44(%rip), %rdi      # 0x402b
leaq 0x1c26(%rip), %rsi      # 0x4014
movl $0x1f, %edx
leaq 0x1c26(%rip), %rcx      # 0x4020
callq 0x2030
movl $0x1, %edi
callq 0x2720
cmpl $0x0, %eax
jne 0x2410
jmp 0x242f
leaq 0x1cf6(%rip), %rdi      # 0x410d
leaq 0x1bf6(%rip), %rsi      # 0x4014
movl $0x20, %edx
leaq 0x1bf6(%rip), %rcx      # 0x4020
callq 0x2030
movl $0x2, %edi
callq 0x2720
cmpl $0x1, %eax
jne 0x2440
jmp 0x245f
leaq 0x1c97(%rip), %rdi      # 0x40de
leaq 0x1bc6(%rip), %rsi      # 0x4014
movl $0x21, %edx
leaq 0x1bc6(%rip), %rcx      # 0x4020
callq 0x2030
movl $0x3, %edi
callq 0x2720
cmpl $0x1, %eax
jne 0x2470
jmp 0x248f
leaq 0x1cae(%rip), %rdi      # 0x4125
leaq 0x1b96(%rip), %rsi      # 0x4014
movl $0x22, %edx
leaq 0x1b96(%rip), %rcx      # 0x4020
callq 0x2030
leaq 0x1ca7(%rip), %rax      # 0x413d
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x5, -0x38(%rbp)
movl $0xfe, -0x50(%rbp)
leaq -0x50(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x2780
cmpl $0x2, 0x537d(%rip)      # 0x7860
jne 0x24e7
jmp 0x2506
leaq 0x1c55(%rip), %rdi      # 0x4143
leaq 0x1b1f(%rip), %rsi      # 0x4014
movl $0x2a, %edx
leaq 0x1b1f(%rip), %rcx      # 0x4020
callq 0x2030
movq 0x536b(%rip), %rax      # 0x7878
cmpq -0x38(%rbp), %rax
jne 0x2515
jmp 0x2534
leaq 0x1c37(%rip), %rdi      # 0x4153
leaq 0x1af1(%rip), %rsi      # 0x4014
movl $0x2b, %edx
leaq 0x1af1(%rip), %rcx      # 0x4020
callq 0x2030
cmpl $0x2, 0x9335(%rip)      # 0xb870
jne 0x253f
jmp 0x255e
leaq 0x1bb0(%rip), %rdi      # 0x40f6
leaq 0x1ac7(%rip), %rsi      # 0x4014
movl $0x2c, %edx
leaq 0x1ac7(%rip), %rcx      # 0x4020
callq 0x2030
cmpl $0xfe, 0x930c(%rip)     # 0xb874
jne 0x256c
jmp 0x258b
leaq 0x1c07(%rip), %rdi      # 0x417a
leaq 0x1a9a(%rip), %rsi      # 0x4014
movl $0x2d, %edx
leaq 0x1a9a(%rip), %rcx      # 0x4020
callq 0x2030
movl $0xa, %edi
movl $0x3, %esi
callq 0x28b0
cmpl $0x2, 0x92cf(%rip)      # 0xb870
jne 0x25a5
jmp 0x25c4
leaq 0x1b4a(%rip), %rdi      # 0x40f6
leaq 0x1a61(%rip), %rsi      # 0x4014
movl $0x2f, %edx
leaq 0x1a61(%rip), %rcx      # 0x4020
callq 0x2030
cmpl $0x101, 0x92a6(%rip)    # imm = 0x101
jne 0x25d2
jmp 0x25f1
leaq 0x1bba(%rip), %rdi      # 0x4193
leaq 0x1a34(%rip), %rsi      # 0x4014
movl $0x30, %edx
leaq 0x1a34(%rip), %rcx      # 0x4020
callq 0x2030
xorl %edi, %edi
callq 0x2720
cmpl $0x0, %eax
jne 0x25ff
jmp 0x261e
leaq 0x1a25(%rip), %rdi      # 0x402b
leaq 0x1a07(%rip), %rsi      # 0x4014
movl $0x31, %edx
leaq 0x1a07(%rip), %rcx      # 0x4020
callq 0x2030
movl $0x1, %edi
callq 0x2720
cmpl $0x0, %eax
jne 0x262f
jmp 0x264e
leaq 0x1ad7(%rip), %rdi      # 0x410d
leaq 0x19d7(%rip), %rsi      # 0x4014
movl $0x32, %edx
leaq 0x19d7(%rip), %rcx      # 0x4020
callq 0x2030
movl $0x2, %edi
callq 0x2720
cmpl $0x1, %eax
jne 0x265f
jmp 0x267e
leaq 0x1a78(%rip), %rdi      # 0x40de
leaq 0x19a7(%rip), %rsi      # 0x4014
movl $0x33, %edx
leaq 0x19a7(%rip), %rcx      # 0x4020
callq 0x2030
movl $0x100, %edi            # imm = 0x100
callq 0x2720
cmpl $0x1, %eax
jne 0x268f
jmp 0x26ae
leaq 0x1b16(%rip), %rdi      # 0x41ac
leaq 0x1977(%rip), %rsi      # 0x4014
movl $0x34, %edx
leaq 0x1977(%rip), %rcx      # 0x4020
callq 0x2030
movl $0x101, %edi            # imm = 0x101
callq 0x2720
cmpl $0x2, %eax
jne 0x26bf
jmp 0x26de
leaq 0x1b00(%rip), %rdi      # 0x41c6
leaq 0x1947(%rip), %rsi      # 0x4014
movl $0x35, %edx
leaq 0x1947(%rip), %rcx      # 0x4020
callq 0x2030
movl $0x102, %edi            # imm = 0x102
callq 0x2720
cmpl $0x2, %eax
jne 0x26ef
jmp 0x270e
leaq 0x1aea(%rip), %rdi      # 0x41e0
leaq 0x1917(%rip), %rsi      # 0x4014
movl $0x36, %edx
leaq 0x1917(%rip), %rcx      # 0x4020
callq 0x2030
xorl %eax, %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)