// File: /workspace/github_c_makefile_star2_O1/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 0x36f0
leaq 0x2be2(%rip), %rax      # 0x6040
movq %rsp, %rdi
movq %rax, (%rdi)
callq 0x3aee
cmpb $0x5a, %al
jne 0x355c
movq %rsp, %rdi
callq 0x3aee
cmpb $0x38, %al
jne 0x357b
movq %rsp, %rdi
callq 0x3aee
cmpb $0x1, %al
jne 0x359a
xorl %eax, %eax
callq 0x36f0
leaq 0x2c1c(%rip), %rax      # 0x60bb
movq %rsp, %rdi
movq %rax, (%rdi)
callq 0x3aee
cmpb $0x5a, %al
jne 0x35b9
movq %rsp, %rdi
callq 0x3aee
cmpb $0x38, %al
jne 0x35d8
movq %rsp, %rdi
callq 0x3aee
cmpb $0x1, %al
jne 0x35f7
xorl %eax, %eax
callq 0x36f0
leaq 0x2bed(%rip), %rax      # 0x60cd
movq %rsp, %rdi
movq %rax, (%rdi)
callq 0x3aee
cmpb $0x33, %al
jne 0x3616
movq %rsp, %rdi
callq 0x3aee
cmpb $0x5a, %al
jne 0x3635
movq %rsp, %rdi
callq 0x3aee
cmpb $0x3, %al
jne 0x3654
movq %rsp, %rdi
callq 0x3aee
cmpb $0x42, %al
jne 0x3673
movq %rsp, %rdi
callq 0x3aee
cmpb $0x38, %al
jne 0x3692
movq %rsp, %rdi
callq 0x3aee
cmpb $0x2, %al
jne 0x36b1
movq %rsp, %rdi
callq 0x3aee
cmpb $0x1, %al
jne 0x36d0
callq 0x33ec
xorl %eax, %eax
popq %rcx
retq
leaq 0x2aee(%rip), %rdi      # 0x6051
leaq 0x2aa6(%rip), %rsi      # 0x6010
leaq 0x2afe(%rip), %rcx      # 0x606f
movl $0x17, %edx
callq 0x3050
leaq 0x2af8(%rip), %rdi      # 0x607a
leaq 0x2a87(%rip), %rsi      # 0x6010
leaq 0x2adf(%rip), %rcx      # 0x606f
movl $0x18, %edx
callq 0x3050
leaq 0x2afc(%rip), %rdi      # 0x609d
leaq 0x2a68(%rip), %rsi      # 0x6010
leaq 0x2ac0(%rip), %rcx      # 0x606f
movl $0x19, %edx
callq 0x3050
leaq 0x2a91(%rip), %rdi      # 0x6051
leaq 0x2a49(%rip), %rsi      # 0x6010
leaq 0x2aa1(%rip), %rcx      # 0x606f
movl $0x1e, %edx
callq 0x3050
leaq 0x2a9b(%rip), %rdi      # 0x607a
leaq 0x2a2a(%rip), %rsi      # 0x6010
leaq 0x2a82(%rip), %rcx      # 0x606f
movl $0x1f, %edx
callq 0x3050
leaq 0x2a9f(%rip), %rdi      # 0x609d
leaq 0x2a0b(%rip), %rsi      # 0x6010
leaq 0x2a63(%rip), %rcx      # 0x606f
movl $0x20, %edx
callq 0x3050
leaq 0x2add(%rip), %rdi      # 0x60fa
leaq 0x29ec(%rip), %rsi      # 0x6010
leaq 0x2a44(%rip), %rcx      # 0x606f
movl $0x25, %edx
callq 0x3050
leaq 0x2a15(%rip), %rdi      # 0x6051
leaq 0x29cd(%rip), %rsi      # 0x6010
leaq 0x2a25(%rip), %rcx      # 0x606f
movl $0x26, %edx
callq 0x3050
leaq 0x2ac0(%rip), %rdi      # 0x611b
leaq 0x29ae(%rip), %rsi      # 0x6010
leaq 0x2a06(%rip), %rcx      # 0x606f
movl $0x27, %edx
callq 0x3050
leaq 0x2abf(%rip), %rdi      # 0x6139
leaq 0x298f(%rip), %rsi      # 0x6010
leaq 0x29e7(%rip), %rcx      # 0x606f
movl $0x28, %edx
callq 0x3050
leaq 0x29e1(%rip), %rdi      # 0x607a
leaq 0x2970(%rip), %rsi      # 0x6010
leaq 0x29c8(%rip), %rcx      # 0x606f
movl $0x29, %edx
callq 0x3050
leaq 0x2aa5(%rip), %rdi      # 0x615d
leaq 0x2951(%rip), %rsi      # 0x6010
leaq 0x29a9(%rip), %rcx      # 0x606f
movl $0x2a, %edx
callq 0x3050
leaq 0x29c6(%rip), %rdi      # 0x609d
leaq 0x2932(%rip), %rsi      # 0x6010
leaq 0x298a(%rip), %rcx      # 0x606f
movl $0x2b, %edx
callq 0x3050
nop