// File: /workspace/github_c_makefile_star2_O0/generot[P]VM-0/src/lang/vc.cc
// Function: value(lexer&)
void value(lexer& lx) {
    string val = lx.accept();

    if(val == "(") {
        expr(lx);

        lx.expect(")");
        lx.accept();

        return;
    }

    if(is_numeric(val)) {
        double numval = atof(val.c_str());

        instr in = { INST_VAL, OPC_PUSH, SC_INVALID };
        in.val = numval;

        bytecode.push_back(in);
    } else {
        symbol var = symbol_table[val];
        bytecode.push_back({ INST_ADDR, OPC_PUSH, SC_INVALID, (size_s)var.addr });
        bytecode.push_back({ INST_NOARGS, OPC_DEREF, SC_INVALID });
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x28(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x5c20
movq -0x140(%rbp), %rdi
leaq 0x5160(%rip), %rsi      # 0x3a1b1
callq 0x6ad0
movb %al, -0x131(%rbp)
jmp 0x3505e
movb -0x131(%rbp), %al
testb $0x1, %al
jne 0x3506d
jmp 0x3513e
movq -0x8(%rbp), %rdi
callq 0x34200
jmp 0x35078
movq -0x8(%rbp), %rax
movq %rax, -0x150(%rbp)
leaq -0x59(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0x56e0
movq -0x148(%rbp), %rdx
leaq 0x4a42(%rip), %rsi      # 0x39ae3
leaq -0x58(%rbp), %rdi
callq 0x6b50
jmp 0x350ac
movq -0x150(%rbp), %rdi
leaq -0x58(%rbp), %rsi
movl $0x1, %edx
callq 0x5a00
jmp 0x350c3
leaq -0x58(%rbp), %rdi
callq 0x5260
leaq -0x59(%rbp), %rdi
callq 0x5460
movq -0x8(%rbp), %rsi
leaq -0x80(%rbp), %rdi
callq 0x5c20
jmp 0x350e4
leaq -0x80(%rbp), %rdi
callq 0x5260
movl $0x1, -0x84(%rbp)
jmp 0x352d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x352e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x35130
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x5260
leaq -0x59(%rbp), %rdi
callq 0x5460
jmp 0x352e6
leaq -0xa8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x5190
jmp 0x35150
leaq -0xa8(%rbp), %rdi
callq 0x6270
movb %al, -0x151(%rbp)
jmp 0x35164
leaq -0xa8(%rbp), %rdi
callq 0x5260
movb -0x151(%rbp), %al
testb $0x1, %al
jne 0x3517c
jmp 0x351f5
leaq -0x28(%rbp), %rdi
callq 0x5170
movq %rax, %rdi
callq 0x5520
movsd %xmm0, -0xb0(%rbp)
movups 0x5074(%rip), %xmm0     # 0x3a210
movaps %xmm0, -0xd0(%rbp)
movq $0x0, -0xc0(%rbp)
movsd -0xb0(%rbp), %xmm0
movsd %xmm0, -0xc0(%rbp)
leaq 0x1f693(%rip), %rdi     # 0x54858
leaq -0xd0(%rbp), %rsi
callq 0x35b00
jmp 0x351d3
jmp 0x352ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x5260
jmp 0x352e6
leaq 0x1f62c(%rip), %rdi     # 0x54828
leaq -0x28(%rbp), %rsi
callq 0x35910
movq %rax, -0x160(%rbp)
jmp 0x3520e
movq -0x160(%rbp), %rsi
leaq -0x100(%rbp), %rdi
callq 0x35a90
jmp 0x35223
movl $0x1, -0x118(%rbp)
movl $0x10, -0x114(%rbp)
movl $0x3, -0x110(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq 0x1f602(%rip), %rdi     # 0x54858
leaq -0x118(%rbp), %rsi
callq 0x35a60
jmp 0x35264
movl $0x2, -0x130(%rbp)
movl $0x12, -0x12c(%rbp)
movl $0x3, -0x128(%rbp)
movq $0x0, -0x120(%rbp)
leaq 0x1f5c4(%rip), %rdi     # 0x54858
leaq -0x130(%rbp), %rsi
callq 0x35a60
jmp 0x352a2
leaq -0x100(%rbp), %rdi
callq 0x35a40
jmp 0x352ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x35a40
jmp 0x352e6
movl $0x0, -0x84(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5260
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0x5260
movq -0x30(%rbp), %rdi
callq 0x56d0
nopl (%rax,%rax)