// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4c32
leaq 0x28da(%rip), %rsi      # 0x18131
movq %r14, %rdi
callq 0x40a0
testl %eax, %eax
je 0x15906
leaq 0x88(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0x78(%rsp), %rdi
callq 0x5834
leaq 0x78(%rsp), %rdi
callq 0x4fb5
movl %eax, %ebx
movq 0x78(%rsp), %rdi
cmpq %r14, %rdi
je 0x158b0
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x42d0
testb %bl, %bl
je 0x15999
movq 0x20(%rsp), %rdi
callq 0x43b0
movups 0x28c7(%rip), %xmm1     # 0x18190
movaps %xmm1, 0x40(%rsp)
movsd %xmm0, 0x50(%rsp)
movq 0xbe85(%rip), %rsi      # 0x21760
cmpq 0xbe86(%rip), %rsi      # 0x21768
je 0x15a2a
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsi)
movaps 0x40(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x18, 0xbe5f(%rip)     # 0x21760
jmp 0x15ac4
movq %rbx, %rdi
callq 0x14eb0
leaq 0xa8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x2146(%rip), %rsi      # 0x17a67
leaq 0x2140(%rip), %rdx      # 0x17a68
leaq 0x98(%rsp), %rdi
callq 0x59aa
leaq 0x98(%rsp), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x4ab4
movq 0x98(%rsp), %rdi
cmpq %r14, %rdi
je 0x15967
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x42d0
leaq 0xb8(%rsp), %rdi
movq %rbx, %rsi
callq 0x4c32
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15ac4
movq 0xc8(%rsp), %rsi
jmp 0x15abc
leaq 0xbd88(%rip), %rdi      # 0x21728
leaq 0x20(%rsp), %rsi
callq 0x15f9a
movq %rax, %rbx
movl (%rax), %eax
leaq 0x48(%rsp), %rdi
movl %eax, -0x8(%rdi)
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
addq %rsi, %rdx
callq 0x5834
movq 0x28(%rbx), %rax
movq %rax, 0x68(%rsp)
movabsq $0x1000000001, %rcx     # imm = 0x1000000001
movq %rcx, 0x8(%rsp)
movl $0x3, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq 0xbd64(%rip), %rsi      # 0x21760
cmpq 0xbd65(%rip), %rsi      # 0x21768
je 0x15a40
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsi)
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rsi)
movq 0xbd43(%rip), %rsi      # 0x21760
addq $0x18, %rsi
movq %rsi, 0xbd38(%rip)      # 0x21760
jmp 0x15a58
leaq 0xbd27(%rip), %rdi      # 0x21758
leaq 0x40(%rsp), %rdx
callq 0x166b0
jmp 0x15ac4
leaq 0xbd11(%rip), %rdi      # 0x21758
leaq 0x8(%rsp), %rdx
callq 0x16538
movq 0xbd08(%rip), %rsi      # 0x21760
movabsq $0x1200000002, %rax     # imm = 0x1200000002
movq %rax, 0x8(%rsp)
movl $0x3, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
cmpq 0xbce9(%rip), %rsi      # 0x21768
je 0x15a9c
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsi)
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x18, 0xbcc6(%rip)     # 0x21760
jmp 0x15aad
leaq 0xbcb5(%rip), %rdi      # 0x21758
leaq 0x8(%rsp), %rdx
callq 0x16538
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x15ac4
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42d0
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15adf
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42d0
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
jmp 0x15aec
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x15b42
movq 0x58(%rsp), %rsi
jmp 0x15b35
jmp 0x15b3f
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r14, %rdi
je 0x15b42
movq 0xa8(%rsp), %rsi
jmp 0x15b35
jmp 0x15b3f
jmp 0x15b3f
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r14, %rdi
je 0x15b42
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x42d0
jmp 0x15b42
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15b5d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42d0
movq %rbx, %rdi
callq 0x44e0