// File: /workspace/github_c_makefile_star2_O2/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 0x34a4
leaq 0x1dfa(%rip), %rax      # 0x5040
movq %rsp, %rdi
movq %rax, (%rdi)
callq 0x37ca
cmpb $0x5a, %al
jne 0x3344
movq %rsp, %rdi
callq 0x37ca
cmpb $0x38, %al
jne 0x3360
movq %rsp, %rdi
callq 0x37ca
cmpb $0x1, %al
jne 0x337c
xorl %eax, %eax
callq 0x34a4
leaq 0x1e34(%rip), %rax      # 0x50bb
movq %rsp, %rdi
movq %rax, (%rdi)
callq 0x37ca
cmpb $0x5a, %al
jne 0x3398
movq %rsp, %rdi
callq 0x37ca
cmpb $0x38, %al
jne 0x33b4
movq %rsp, %rdi
callq 0x37ca
cmpb $0x1, %al
jne 0x33d0
xorl %eax, %eax
callq 0x34a4
leaq 0x1e05(%rip), %rax      # 0x50cd
movq %rsp, %rdi
movq %rax, (%rdi)
callq 0x37ca
cmpb $0x33, %al
jne 0x33ec
movq %rsp, %rdi
callq 0x37ca
cmpb $0x5a, %al
jne 0x3408
movq %rsp, %rdi
callq 0x37ca
cmpb $0x3, %al
jne 0x3421
movq %rsp, %rdi
callq 0x37ca
cmpb $0x42, %al
jne 0x343a
movq %rsp, %rdi
callq 0x37ca
cmpb $0x38, %al
jne 0x3453
movq %rsp, %rdi
callq 0x37ca
cmpb $0x2, %al
jne 0x346c
movq %rsp, %rdi
callq 0x37ca
cmpb $0x1, %al
jne 0x3485
callq 0x31dc
xorl %eax, %eax
popq %rcx
retq
leaq 0x1d06(%rip), %rdi      # 0x5051
leaq 0x1cbe(%rip), %rsi      # 0x5010
leaq 0x1d16(%rip), %rcx      # 0x506f
pushq $0x17
jmp 0x349c
leaq 0x1d13(%rip), %rdi      # 0x507a
leaq 0x1ca2(%rip), %rsi      # 0x5010
leaq 0x1cfa(%rip), %rcx      # 0x506f
pushq $0x18
jmp 0x349c
leaq 0x1d1a(%rip), %rdi      # 0x509d
leaq 0x1c86(%rip), %rsi      # 0x5010
leaq 0x1cde(%rip), %rcx      # 0x506f
pushq $0x19
jmp 0x349c
leaq 0x1cb2(%rip), %rdi      # 0x5051
leaq 0x1c6a(%rip), %rsi      # 0x5010
leaq 0x1cc2(%rip), %rcx      # 0x506f
pushq $0x1e
jmp 0x349c
leaq 0x1cbf(%rip), %rdi      # 0x507a
leaq 0x1c4e(%rip), %rsi      # 0x5010
leaq 0x1ca6(%rip), %rcx      # 0x506f
pushq $0x1f
jmp 0x349c
leaq 0x1cc6(%rip), %rdi      # 0x509d
leaq 0x1c32(%rip), %rsi      # 0x5010
leaq 0x1c8a(%rip), %rcx      # 0x506f
pushq $0x20
jmp 0x349c
leaq 0x1d07(%rip), %rdi      # 0x50fa
leaq 0x1c16(%rip), %rsi      # 0x5010
leaq 0x1c6e(%rip), %rcx      # 0x506f
pushq $0x25
jmp 0x349c
leaq 0x1c42(%rip), %rdi      # 0x5051
leaq 0x1bfa(%rip), %rsi      # 0x5010
leaq 0x1c52(%rip), %rcx      # 0x506f
pushq $0x26
jmp 0x349c
leaq 0x1cf3(%rip), %rdi      # 0x511b
leaq 0x1be1(%rip), %rsi      # 0x5010
leaq 0x1c39(%rip), %rcx      # 0x506f
pushq $0x27
jmp 0x349c
leaq 0x1cf8(%rip), %rdi      # 0x5139
leaq 0x1bc8(%rip), %rsi      # 0x5010
leaq 0x1c20(%rip), %rcx      # 0x506f
pushq $0x28
jmp 0x349c
leaq 0x1c20(%rip), %rdi      # 0x507a
leaq 0x1baf(%rip), %rsi      # 0x5010
leaq 0x1c07(%rip), %rcx      # 0x506f
pushq $0x29
jmp 0x349c
leaq 0x1cea(%rip), %rdi      # 0x515d
leaq 0x1b96(%rip), %rsi      # 0x5010
leaq 0x1bee(%rip), %rcx      # 0x506f
pushq $0x2a
jmp 0x349c
leaq 0x1c11(%rip), %rdi      # 0x509d
leaq 0x1b7d(%rip), %rsi      # 0x5010
leaq 0x1bd5(%rip), %rcx      # 0x506f
pushq $0x2b
popq %rdx
callq 0x3050
nop