// File: /workspace/github_cpp_makefile_star2_O3/rfotino[P]consolite-compiler/src/syntax.cpp
// Function: ExprToken::_flagNonRegs()
void ExprToken::_flagNonRegs() {
  std::stack<std::shared_ptr<Token>> operands;
  for (auto token : _postfix) {
    auto op = std::dynamic_pointer_cast<OperatorToken>(token);
    if (nullptr != op) {
      std::shared_ptr<Token> rhs = operands.top();
      operands.pop();
      if (op->isBinary()) {
        operands.pop();
      }
      // Check if it is an address-of operation
      if (op->isUnary() && "&" == op->str()) {
        auto var = std::dynamic_pointer_cast<Variable>(rhs);
        if (nullptr != var) {
          var->flagNonReg();
        }
      }
      // Push something back onto the stack.
      operands.push(nullptr);
    } else {
      operands.push(token);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %rdi
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0x2f76a
movq 0x10(%rbx), %r13
movq 0x18(%rbx), %rbx
cmpq %rbx, %r13
je 0x1534d
leaq 0x50(%rsp), %r12
leaq 0x18(%rsp), %rbp
leaq 0x30bfc(%rip), %r14     # 0x45d18
movq (%r13), %rdi
movq %rdi, 0x18(%rsp)
movq 0x8(%r13), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x1514d
movq 0x31e5e(%rip), %rcx     # 0x46f98
cmpb $0x0, (%rcx)
je 0x15144
incl 0x8(%rax)
jmp 0x1514d
lock
incl 0x8(%rax)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x15186
movq %r14, %rsi
leaq 0x3128c(%rip), %rdx     # 0x463e8
xorl %ecx, %ecx
callq 0x7330
testq %rax, %rax
je 0x15186
movq %rax, %r15
movq 0x20(%rsp), %rdx
testq %rdx, %rdx
je 0x1519a
movq 0x31e1c(%rip), %rax     # 0x46f98
cmpb $0x0, (%rax)
je 0x15196
incl 0x8(%rdx)
jmp 0x1519a
movq %r12, %rdi
movq %rbp, %rsi
callq 0x3045a
jmp 0x15253
lock
incl 0x8(%rdx)
movq 0x80(%rsp), %rax
cmpq 0x88(%rsp), %rax
jne 0x151c0
movq 0x98(%rsp), %rax
movq -0x8(%rax), %rax
movl $0x200, %ecx            # imm = 0x200
addq %rcx, %rax
movq -0x10(%rax), %rcx
movq %rcx, 0x28(%rsp)
movq -0x8(%rax), %rcx
testq %rcx, %rcx
je 0x151e7
movq 0x31dbf(%rip), %rax     # 0x46f98
cmpb $0x0, (%rax)
je 0x151e3
incl 0x8(%rcx)
jmp 0x151e7
lock
incl 0x8(%rcx)
movq %rcx, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq %r12, %rdi
callq 0x300fc
movb 0x30(%r15), %al
cmpb $0x1, %al
jne 0x1520d
movq %r12, %rdi
callq 0x300fc
movb 0x30(%r15), %al
testb $0x1, %al
je 0x15274
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq %r12, %rdi
leaq 0x30(%rsp), %rsi
callq 0x2fd5e
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x15235
callq 0x8036
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15244
callq 0x8036
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x15253
callq 0x8036
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x15262
callq 0x8036
addq $0x10, %r13
cmpq %rbx, %r13
jne 0x1511c
jmp 0x1534d
movq %rbp, %r14
movq %r12, %rbp
movq %rbx, %r12
leaq 0x40(%rsp), %rbx
movq %rbx, 0x30(%rsp)
movq 0x10(%r15), %rsi
movq 0x18(%r15), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0xbd58
movq %r15, %rdi
leaq 0x2033d(%rip), %rsi     # 0x355e6
callq 0x70c0
movl %eax, %r15d
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0x152c8
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x72c0
testl %r15d, %r15d
movq %r12, %rbx
movq %rbp, %r12
movq %r14, %rbp
leaq 0x30a3d(%rip), %r14     # 0x45d18
jne 0x15211
cmpq $0x0, 0x28(%rsp)
je 0x15211
movq 0x28(%rsp), %rdi
movq %r14, %rsi
leaq 0x30ab4(%rip), %rdx     # 0x45db0
movq $-0x2, %rcx
callq 0x7330
testq %rax, %rax
je 0x15211
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1532c
movq 0x31c76(%rip), %rcx     # 0x46f98
cmpb $0x0, (%rcx)
je 0x15338
incl 0x8(%rdi)
jmp 0x1533c
movb $0x0, 0x80(%rax)
jmp 0x15211
lock
incl 0x8(%rdi)
movb $0x0, 0x80(%rax)
callq 0x8036
jmp 0x15211
leaq 0x50(%rsp), %rdi
callq 0x21e32
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x15380
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x15380
callq 0x8036
cmpq $0x0, 0x8(%rsp)
je 0x15392
movq 0x8(%rsp), %rdi
callq 0x8036
cmpq $0x0, 0x10(%rsp)
je 0x153a9
movq 0x10(%rsp), %rdi
callq 0x8036
jmp 0x153a9
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x153b8
callq 0x8036
leaq 0x50(%rsp), %rdi
callq 0x21e32
movq %rbx, %rdi
callq 0x74f0