// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/oprocess.c
// Function: out_var
static void out_var(LOCAL_VAR *pVar)
{
  char *p;
  char temp[50];
  char text[80];

  sprintf(text, "\"%s\"",pVar->vname);
  switch (pVar->class) {
  case 7:
       out_line("; (instance of typed variable)",text,"","");
       return;
  case 6:                           /* local typedef ? */
       out_line("; (local typedef)", text, "","");
       return;
  case 4:                          /* register variable */
       switch (pVar->bInfo1) {
       case 0x06: p = "si"; break;
       case 0x07: p = "di"; break;
       default  : p = "[unknown]"; break;
       }
       sprintf(temp,": variable in register %s",p);
       strcat(text, temp);
       out_line(";",text,"","");
       break;
  case 2:                        /* variable */
       if ((pVar->bInfo1&8)==8)
         p = "argument";
       else
         p = "local";
       sprintf(temp,": (var) %s stored in ",p);
       strcat(text,temp);
       switch (pVar->bInfo2) {
       case 1 :                          /* stored on stack */
            if ((int)pVar->wInfo1<0)
              sprintf(temp,"[bp-%04X]",-pVar->wInfo1);
            else
              sprintf(temp,"[bp+%04X]",pVar->wInfo1);
            break;
       default :
            strcpy(temp,"[unknown]");
            break;
       }
       strcat(text,temp);
       out_line(";",text,"","");
       return;
  case 0:                  /* static function */
       out_line(";",temp," (static function) ","");
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
leaq 0xc(%rdi), %rdx
leaq 0x56f3(%rip), %rsi      # 0x12e72
leaq 0x40(%rsp), %rdi
xorl %eax, %eax
callq 0x91b0
movl (%rbx), %eax
cmpq $0x7, %rax
ja 0xd8e0
leaq 0x549e(%rip), %rcx      # 0x12c3c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x571e(%rip), %rdi      # 0x12ecc
leaq 0x5752(%rip), %rdx      # 0x12f07
leaq 0x5950(%rip), %rcx      # 0x1310c
movq %rsp, %rsi
jmp 0xd8db
movb 0x4(%rbx), %al
cmpb $0x7, %al
leaq 0x4942(%rip), %rcx      # 0x12112
leaq 0x56d1(%rip), %rsi      # 0x12ea8
cmoveq %rcx, %rsi
cmpb $0x6, %al
leaq 0x4927(%rip), %rdx      # 0x1210b
cmovneq %rsi, %rdx
leaq 0x56c3(%rip), %rsi      # 0x12eb2
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x91b0
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x91a0
leaq 0x56b9(%rip), %rdi      # 0x12ecc
leaq 0x58f2(%rip), %rcx      # 0x1310c
movq %r14, %rsi
jmp 0xd8d8
testb $0x8, 0x4(%rbx)
leaq 0x56aa(%rip), %rax      # 0x12ed7
leaq 0x569a(%rip), %rdx      # 0x12ece
cmoveq %rax, %rdx
leaq 0x569e(%rip), %rsi      # 0x12edd
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x91b0
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x91a0
cmpb $0x1, 0x5(%rbx)
jne 0xd88d
movl 0x8(%rbx), %edx
testl %edx, %edx
js 0xd8a4
leaq 0x5690(%rip), %rsi      # 0x12efd
jmp 0xd8ad
leaq 0x5620(%rip), %rdi      # 0x12e96
jmp 0xd87f
leaq 0x55f8(%rip), %rdi      # 0x12e77
leaq 0x5886(%rip), %rcx      # 0x1310c
leaq 0x40(%rsp), %rsi
jmp 0xd8d8
movabsq $0x6e776f6e6b6e755b, %rax # imm = 0x6E776F6E6B6E755B
movq %rax, (%rsp)
movw $0x5d, 0x8(%rsp)
jmp 0xd8b7
negl %edx
leaq 0x5646(%rip), %rsi      # 0x12ef3
movq %rsp, %rdi
xorl %eax, %eax
callq 0x91b0
leaq 0x40(%rsp), %rbx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x91a0
leaq 0x55fe(%rip), %rdi      # 0x12ecc
leaq 0x5837(%rip), %rcx      # 0x1310c
movq %rbx, %rsi
movq %rcx, %rdx
callq 0xc585
addq $0x98, %rsp
popq %rbx
popq %r14
retq