// File: /workspace/github_c_makefile_star2_O0/wjmelements[P]evm/tst/scan.c
// Function: main
int main() {
    scanInit();

    const char *remaining;
    op_t op;
    const char *test0 = "GAS CODESIZE\nADD";
    remaining = test0;
    assert(scanNextOp(&remaining) == GAS);
    assert(scanNextOp(&remaining) == CODESIZE);
    assert(scanNextOp(&remaining) == ADD);

    scanInit();
    const char *test1 = "ADD(CODESIZE,GAS)";
    remaining = test1;
    assert(scanNextOp(&remaining) == GAS);
    assert(scanNextOp(&remaining) == CODESIZE);
    assert(scanNextOp(&remaining) == ADD);

    scanInit();
    const char *test2 = "ADD(MUL(CODESIZE,TIMESTAMP),SUB(GAS,CALLER))";
    remaining = test2;
    assert(scanNextOp(&remaining) == CALLER);
    assert(scanNextOp(&remaining) == GAS);
    assert(scanNextOp(&remaining) == SUB);
    assert(scanNextOp(&remaining) == TIMESTAMP);
    assert(scanNextOp(&remaining) == CODESIZE);
    assert(scanNextOp(&remaining) == MUL);
    assert(scanNextOp(&remaining) == ADD);

    test_parseConstant();
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movb $0x0, %al
callq 0x3580
leaq 0x3da3(%rip), %rax      # 0x7040
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x3ca0
movzbl %al, %eax
cmpl $0x5a, %eax
jne 0x32bc
jmp 0x32db
leaq 0x3d8e(%rip), %rdi      # 0x7051
leaq 0x3d46(%rip), %rsi      # 0x7010
movl $0x17, %edx
leaq 0x3d99(%rip), %rcx      # 0x706f
callq 0x3050
leaq -0x10(%rbp), %rdi
callq 0x3ca0
movzbl %al, %eax
cmpl $0x38, %eax
jne 0x32ee
jmp 0x330d
leaq 0x3d85(%rip), %rdi      # 0x707a
leaq 0x3d14(%rip), %rsi      # 0x7010
movl $0x18, %edx
leaq 0x3d67(%rip), %rcx      # 0x706f
callq 0x3050
leaq -0x10(%rbp), %rdi
callq 0x3ca0
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x3320
jmp 0x333f
leaq 0x3d76(%rip), %rdi      # 0x709d
leaq 0x3ce2(%rip), %rsi      # 0x7010
movl $0x19, %edx
leaq 0x3d35(%rip), %rcx      # 0x706f
callq 0x3050
movb $0x0, %al
callq 0x3580
leaq 0x3d6e(%rip), %rax      # 0x70bb
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x3ca0
movzbl %al, %eax
cmpl $0x5a, %eax
jne 0x336c
jmp 0x338b
leaq 0x3cde(%rip), %rdi      # 0x7051
leaq 0x3c96(%rip), %rsi      # 0x7010
movl $0x1e, %edx
leaq 0x3ce9(%rip), %rcx      # 0x706f
callq 0x3050
leaq -0x10(%rbp), %rdi
callq 0x3ca0
movzbl %al, %eax
cmpl $0x38, %eax
jne 0x339e
jmp 0x33bd
leaq 0x3cd5(%rip), %rdi      # 0x707a
leaq 0x3c64(%rip), %rsi      # 0x7010
movl $0x1f, %edx
leaq 0x3cb7(%rip), %rcx      # 0x706f
callq 0x3050
leaq -0x10(%rbp), %rdi
callq 0x3ca0
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x33d0
jmp 0x33ef
leaq 0x3cc6(%rip), %rdi      # 0x709d
leaq 0x3c32(%rip), %rsi      # 0x7010
movl $0x20, %edx
leaq 0x3c85(%rip), %rcx      # 0x706f
callq 0x3050
movb $0x0, %al
callq 0x3580
leaq 0x3cd0(%rip), %rax      # 0x70cd
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x3ca0
movzbl %al, %eax
cmpl $0x33, %eax
jne 0x341c
jmp 0x343b
leaq 0x3cd7(%rip), %rdi      # 0x70fa
leaq 0x3be6(%rip), %rsi      # 0x7010
movl $0x25, %edx
leaq 0x3c39(%rip), %rcx      # 0x706f
callq 0x3050
leaq -0x10(%rbp), %rdi
callq 0x3ca0
movzbl %al, %eax
cmpl $0x5a, %eax
jne 0x344e
jmp 0x346d
leaq 0x3bfc(%rip), %rdi      # 0x7051
leaq 0x3bb4(%rip), %rsi      # 0x7010
movl $0x26, %edx
leaq 0x3c07(%rip), %rcx      # 0x706f
callq 0x3050
leaq -0x10(%rbp), %rdi
callq 0x3ca0
movzbl %al, %eax
cmpl $0x3, %eax
jne 0x3480
jmp 0x349f
leaq 0x3c94(%rip), %rdi      # 0x711b
leaq 0x3b82(%rip), %rsi      # 0x7010
movl $0x27, %edx
leaq 0x3bd5(%rip), %rcx      # 0x706f
callq 0x3050
leaq -0x10(%rbp), %rdi
callq 0x3ca0
movzbl %al, %eax
cmpl $0x42, %eax
jne 0x34b2
jmp 0x34d1
leaq 0x3c80(%rip), %rdi      # 0x7139
leaq 0x3b50(%rip), %rsi      # 0x7010
movl $0x28, %edx
leaq 0x3ba3(%rip), %rcx      # 0x706f
callq 0x3050
leaq -0x10(%rbp), %rdi
callq 0x3ca0
movzbl %al, %eax
cmpl $0x38, %eax
jne 0x34e4
jmp 0x3503
leaq 0x3b8f(%rip), %rdi      # 0x707a
leaq 0x3b1e(%rip), %rsi      # 0x7010
movl $0x29, %edx
leaq 0x3b71(%rip), %rcx      # 0x706f
callq 0x3050
leaq -0x10(%rbp), %rdi
callq 0x3ca0
movzbl %al, %eax
cmpl $0x2, %eax
jne 0x3516
jmp 0x3535
leaq 0x3c40(%rip), %rdi      # 0x715d
leaq 0x3aec(%rip), %rsi      # 0x7010
movl $0x2a, %edx
leaq 0x3b3f(%rip), %rcx      # 0x706f
callq 0x3050
leaq -0x10(%rbp), %rdi
callq 0x3ca0
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x3548
jmp 0x3567
leaq 0x3b4e(%rip), %rdi      # 0x709d
leaq 0x3aba(%rip), %rsi      # 0x7010
movl $0x2b, %edx
leaq 0x3b0d(%rip), %rcx      # 0x706f
callq 0x3050
callq 0x31f0
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop