// File: /workspace/github_c_makefile_star2_O3/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 %rax
xorl %eax, %eax
callq 0x3690
leaq 0x2c42(%rip), %rax      # 0x6040
movq %rsp, %rdi
movq %rax, (%rdi)
callq 0x3a9b
cmpb $0x5a, %al
jne 0x34fc
movq %rsp, %rdi
callq 0x3a9b
cmpb $0x38, %al
jne 0x351b
movq %rsp, %rdi
callq 0x3a9b
cmpb $0x1, %al
jne 0x353a
xorl %eax, %eax
callq 0x3690
leaq 0x2c7c(%rip), %rax      # 0x60bb
movq %rsp, %rdi
movq %rax, (%rdi)
callq 0x3a9b
cmpb $0x5a, %al
jne 0x3559
movq %rsp, %rdi
callq 0x3a9b
cmpb $0x38, %al
jne 0x3578
movq %rsp, %rdi
callq 0x3a9b
cmpb $0x1, %al
jne 0x3597
xorl %eax, %eax
callq 0x3690
leaq 0x2c4d(%rip), %rax      # 0x60cd
movq %rsp, %rdi
movq %rax, (%rdi)
callq 0x3a9b
cmpb $0x33, %al
jne 0x35b6
movq %rsp, %rdi
callq 0x3a9b
cmpb $0x5a, %al
jne 0x35d5
movq %rsp, %rdi
callq 0x3a9b
cmpb $0x3, %al
jne 0x35f4
movq %rsp, %rdi
callq 0x3a9b
cmpb $0x42, %al
jne 0x3613
movq %rsp, %rdi
callq 0x3a9b
cmpb $0x38, %al
jne 0x3632
movq %rsp, %rdi
callq 0x3a9b
cmpb $0x2, %al
jne 0x3651
movq %rsp, %rdi
callq 0x3a9b
cmpb $0x1, %al
jne 0x3670
callq 0x338c
xorl %eax, %eax
popq %rcx
retq
leaq 0x2b4e(%rip), %rdi      # 0x6051
leaq 0x2b06(%rip), %rsi      # 0x6010
leaq 0x2b5e(%rip), %rcx      # 0x606f
movl $0x17, %edx
callq 0x3050
leaq 0x2b58(%rip), %rdi      # 0x607a
leaq 0x2ae7(%rip), %rsi      # 0x6010
leaq 0x2b3f(%rip), %rcx      # 0x606f
movl $0x18, %edx
callq 0x3050
leaq 0x2b5c(%rip), %rdi      # 0x609d
leaq 0x2ac8(%rip), %rsi      # 0x6010
leaq 0x2b20(%rip), %rcx      # 0x606f
movl $0x19, %edx
callq 0x3050
leaq 0x2af1(%rip), %rdi      # 0x6051
leaq 0x2aa9(%rip), %rsi      # 0x6010
leaq 0x2b01(%rip), %rcx      # 0x606f
movl $0x1e, %edx
callq 0x3050
leaq 0x2afb(%rip), %rdi      # 0x607a
leaq 0x2a8a(%rip), %rsi      # 0x6010
leaq 0x2ae2(%rip), %rcx      # 0x606f
movl $0x1f, %edx
callq 0x3050
leaq 0x2aff(%rip), %rdi      # 0x609d
leaq 0x2a6b(%rip), %rsi      # 0x6010
leaq 0x2ac3(%rip), %rcx      # 0x606f
movl $0x20, %edx
callq 0x3050
leaq 0x2b3d(%rip), %rdi      # 0x60fa
leaq 0x2a4c(%rip), %rsi      # 0x6010
leaq 0x2aa4(%rip), %rcx      # 0x606f
movl $0x25, %edx
callq 0x3050
leaq 0x2a75(%rip), %rdi      # 0x6051
leaq 0x2a2d(%rip), %rsi      # 0x6010
leaq 0x2a85(%rip), %rcx      # 0x606f
movl $0x26, %edx
callq 0x3050
leaq 0x2b20(%rip), %rdi      # 0x611b
leaq 0x2a0e(%rip), %rsi      # 0x6010
leaq 0x2a66(%rip), %rcx      # 0x606f
movl $0x27, %edx
callq 0x3050
leaq 0x2b1f(%rip), %rdi      # 0x6139
leaq 0x29ef(%rip), %rsi      # 0x6010
leaq 0x2a47(%rip), %rcx      # 0x606f
movl $0x28, %edx
callq 0x3050
leaq 0x2a41(%rip), %rdi      # 0x607a
leaq 0x29d0(%rip), %rsi      # 0x6010
leaq 0x2a28(%rip), %rcx      # 0x606f
movl $0x29, %edx
callq 0x3050
leaq 0x2b05(%rip), %rdi      # 0x615d
leaq 0x29b1(%rip), %rsi      # 0x6010
leaq 0x2a09(%rip), %rcx      # 0x606f
movl $0x2a, %edx
callq 0x3050
leaq 0x2a26(%rip), %rdi      # 0x609d
leaq 0x2992(%rip), %rsi      # 0x6010
leaq 0x29ea(%rip), %rcx      # 0x606f
movl $0x2b, %edx
callq 0x3050
nop