// File: /workspace/github_c_makefile_star2_O0/tstword[P]MIPSAssemblerC/src/assembler.c
// Function: operand_list_cfg
struct operand_node *operand_list_cfg() {
    struct operand_node *root = NULL;
    struct operand_node *current_operand = NULL;

    while(1) {
        switch(cfg_assembler->lookahead) {
            case TOK_REGISTER:
            case TOK_IDENTIFIER:
            case TOK_INTEGER:
            case TOK_STRING:
            case TOK_LPAREN:
                if(current_operand == NULL) {
                    current_operand = operand_cfg();
                    if(root == NULL) root = current_operand;
                }
                else {
                    current_operand->next = operand_cfg();
                    current_operand = current_operand->next;
                }
                if(cfg_assembler->lookahead == TOK_COMMA) {
                    match_cfg(TOK_COMMA);
                    continue;
                }
                else if (cfg_assembler->lookahead == TOK_REGISTER || cfg_assembler->lookahead == TOK_IDENTIFIER 
                            || cfg_assembler->lookahead == TOK_STRING || cfg_assembler->lookahead == TOK_LPAREN
                            || cfg_assembler->lookahead == TOK_INTEGER) continue;
                return root;
            case TOK_EOL:
            case TOK_NULL:
                report_cfg("Expected operand after line %ld, col %ld", cfg_assembler->lineno, cfg_assembler->colno);
                return root;
            default:
                report_cfg("Invalid operand '%s' on line %ld, col %ld", cfg_assembler->tokenizer->lexbuf, cfg_assembler->lineno, cfg_assembler->colno);
                return root;
        }
    }

    return root;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq 0xb5d9(%rip), %rax      # 0xf5a8
movl 0x40(%rax), %eax
movl %eax, -0x1c(%rbp)
testl %eax, %eax
je 0x40b6
jmp 0x3fdf
movl -0x1c(%rbp), %eax
addl $-0x3, %eax
subl $0x3, %eax
jb 0x400b
jmp 0x3fec
movl -0x1c(%rbp), %eax
subl $0x7, %eax
je 0x40b6
jmp 0x3ffa
movl -0x1c(%rbp), %eax
addl $-0x9, %eax
subl $0x1, %eax
ja 0x40ea
jmp 0x400b
cmpq $0x0, -0x18(%rbp)
jne 0x402c
callq 0x3c50
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x402a
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x4048
callq 0x3c50
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq 0xb559(%rip), %rax      # 0xf5a8
cmpl $0x2, 0x40(%rax)
jne 0x4064
movl $0x2, %edi
callq 0x3900
jmp 0x3fc8
movq 0xb53d(%rip), %rax      # 0xf5a8
cmpl $0x9, 0x40(%rax)
je 0x40a5
movq 0xb530(%rip), %rax      # 0xf5a8
cmpl $0x3, 0x40(%rax)
je 0x40a5
movq 0xb523(%rip), %rax      # 0xf5a8
cmpl $0xa, 0x40(%rax)
je 0x40a5
movq 0xb516(%rip), %rax      # 0xf5a8
cmpl $0x5, 0x40(%rax)
je 0x40a5
movq 0xb509(%rip), %rax      # 0xf5a8
cmpl $0x4, 0x40(%rax)
jne 0x40aa
jmp 0x3fc8
jmp 0x40ac
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x412a
movq 0xb4eb(%rip), %rax      # 0xf5a8
movq 0x98(%rax), %rsi
movq 0xb4dd(%rip), %rax      # 0xf5a8
movq 0xa0(%rax), %rdx
leaq 0x6573(%rip), %rdi      # 0xa64c
movb $0x0, %al
callq 0x3280
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x412a
movq 0xb4b7(%rip), %rax      # 0xf5a8
movq (%rax), %rax
movq 0x10(%rax), %rsi
movq 0xb4a9(%rip), %rax      # 0xf5a8
movq 0x98(%rax), %rdx
movq 0xb49b(%rip), %rax      # 0xf5a8
movq 0xa0(%rax), %rcx
leaq 0x655a(%rip), %rdi      # 0xa675
movb $0x0, %al
callq 0x3280
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)