// File: /workspace/github_c_makefile_star2_O0/wjmelements[P]evm/src/disassemble.c
// Function: disassembleNextOp
void disassembleNextOp(const char **iter) {
    disassembleWaste(iter);
    op_t op = hexString16ToUint8(*iter);
    *iter += 2;
    if (op >= PUSH1 && op <= PUSH32) {
        pc++;
        disassemblePush(op, iter);
        return;
    }
    statement_t op_statement;
    if (op == JUMPDEST) {
        pcs_append(&jumpdests, pc);
        op_statement = labelForPc(pc);
    } else {
        size_t bufLen = 15;
        char *str = calloc(bufLen, 1);
        char *end = stpncpy(str, opString[op], bufLen);
        size_t strLen = end - str;
        op_statement = (statement_t){
            strLen,
            str,
            bufLen
        };
    }
    int argc = argCount[op];
    if (argc && argc <= stack.num_statements) {
        statement_append(&op_statement, '(');
        while (argc--) {
            statement_t arg = statement_stack_pop(&stack);
            for (size_t i = 0; i < arg.num_schars; i++) {
                statement_append(&op_statement,arg.schars[i]);
            }
            free(arg.schars);
            if (argc) {
                statement_append(&op_statement,',');
            }
        }
        statement_append(&op_statement, ')');
    }
    statement_stack_append(&stack, op_statement);
    if (retCount[op] != 1) {
        for (size_t i = 0; i < stack.num_statements; i++) {
            puts(stack.statements[i].schars);
            free(stack.statements[i].schars);
        }
        stack.num_statements = 0;
    }
    pc++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x18dd0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x18e60
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x2, %rcx
movq %rcx, (%rax)
movzbl -0x9(%rbp), %eax
cmpl $0x60, %eax
jl 0x18b5a
movzbl -0x9(%rbp), %eax
cmpl $0x7f, %eax
jg 0x18b5a
movl 0x204ff03(%rip), %eax   # 0x2068a40
addl $0x1, %eax
movl %eax, 0x204fefa(%rip)   # 0x2068a40
movb -0x9(%rbp), %al
movq -0x8(%rbp), %rsi
movzbl %al, %edi
callq 0x18ea0
jmp 0x18db8
movzbl -0x9(%rbp), %eax
cmpl $0x5b, %eax
jne 0x18b9e
movl 0x204fed7(%rip), %esi   # 0x2068a40
leaq 0x204fed8(%rip), %rdi   # 0x2068a48
callq 0x18f00
movl 0x204fec5(%rip), %esi   # 0x2068a40
leaq -0x40(%rbp), %rdi
callq 0x18a70
movq -0x40(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x18c19
movq $0xf, -0x48(%rbp)
movq -0x48(%rbp), %rdi
movl $0x1, %esi
callq 0x31c0
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
movzbl -0x9(%rbp), %eax
movl %eax, %ecx
leaq 0x7617(%rip), %rax      # 0x201e0
movq (%rax,%rcx,8), %rsi
movq -0x48(%rbp), %rdx
callq 0x3220
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x18(%rbp)
movzbl -0x9(%rbp), %eax
movl %eax, %ecx
leaq 0x247a(%rip), %rax      # 0x1b0a0
movzbl (%rax,%rcx), %eax
movl %eax, -0x7c(%rbp)
cmpl $0x0, -0x7c(%rbp)
je 0x18cfa
movslq -0x7c(%rbp), %rax
cmpq 0x204fe1e(%rip), %rax   # 0x2068a60
ja 0x18cfa
leaq -0x28(%rbp), %rdi
movl $0x28, %esi
callq 0x18fb0
movl -0x7c(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x7c(%rbp)
cmpl $0x0, %eax
je 0x18cec
leaq -0x98(%rbp), %rdi
leaq 0x204fde8(%rip), %rsi   # 0x2068a60
callq 0x19060
movq $0x0, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
cmpq -0x98(%rbp), %rax
jae 0x18cc7
movq -0x90(%rbp), %rax
movq -0xa0(%rbp), %rcx
leaq -0x28(%rbp), %rdi
movsbl (%rax,%rcx), %esi
callq 0x18fb0
movq -0xa0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
jmp 0x18c88
movq -0x90(%rbp), %rdi
callq 0x3040
cmpl $0x0, -0x7c(%rbp)
je 0x18ce7
leaq -0x28(%rbp), %rdi
movl $0x2c, %esi
callq 0x18fb0
jmp 0x18c56
leaq -0x28(%rbp), %rdi
movl $0x29, %esi
callq 0x18fb0
leaq 0x204fd5f(%rip), %rdi   # 0x2068a60
leaq -0x28(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x190a0
movzbl -0x9(%rbp), %eax
movl %eax, %ecx
leaq 0x2470(%rip), %rax      # 0x1b1a0
movzbl (%rax,%rcx), %eax
cmpl $0x1, %eax
je 0x18da9
movq $0x0, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
cmpq 0x204fd0e(%rip), %rax   # 0x2068a60
jae 0x18d9e
movq 0x204fd0d(%rip), %rax   # 0x2068a68
imulq $0x18, -0xa8(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x30a0
movq 0x204fcf2(%rip), %rax   # 0x2068a68
imulq $0x18, -0xa8(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x3040
movq -0xa8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
jmp 0x18d44
movq $0x0, 0x204fcb7(%rip) # 0x2068a60
movl 0x204fc91(%rip), %eax   # 0x2068a40
addl $0x1, %eax
movl %eax, 0x204fc88(%rip)   # 0x2068a40
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)