// File: /workspace/github_c_makefile_star2_O1/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 0x6078(%rip), %rsi      # 0x13e72
leaq 0x40(%rsp), %rdi
xorl %eax, %eax
callq 0x91b0
movl (%rbx), %eax
cmpq $0x7, %rax
ja 0xdf5b
leaq 0x5e23(%rip), %rcx      # 0x13c3c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x60a3(%rip), %rdi      # 0x13ecc
leaq 0x60d7(%rip), %rdx      # 0x13f07
leaq 0x62d5(%rip), %rcx      # 0x1410c
movq %rsp, %rsi
jmp 0xdf56
movb 0x4(%rbx), %al
cmpb $0x7, %al
leaq 0x52c7(%rip), %rcx      # 0x13112
leaq 0x6056(%rip), %rsi      # 0x13ea8
cmoveq %rcx, %rsi
cmpb $0x6, %al
leaq 0x52ac(%rip), %rdx      # 0x1310b
cmovneq %rsi, %rdx
leaq 0x6048(%rip), %rsi      # 0x13eb2
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x91b0
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x91a0
leaq 0x603e(%rip), %rdi      # 0x13ecc
leaq 0x6277(%rip), %rcx      # 0x1410c
movq %r14, %rsi
jmp 0xdf53
testb $0x8, 0x4(%rbx)
leaq 0x602f(%rip), %rax      # 0x13ed7
leaq 0x601f(%rip), %rdx      # 0x13ece
cmoveq %rax, %rdx
leaq 0x6023(%rip), %rsi      # 0x13edd
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 0xdf08
movl 0x8(%rbx), %edx
testl %edx, %edx
js 0xdf1f
leaq 0x6015(%rip), %rsi      # 0x13efd
jmp 0xdf28
leaq 0x5fa5(%rip), %rdi      # 0x13e96
jmp 0xdefa
leaq 0x5f7d(%rip), %rdi      # 0x13e77
leaq 0x620b(%rip), %rcx      # 0x1410c
leaq 0x40(%rsp), %rsi
jmp 0xdf53
movabsq $0x6e776f6e6b6e755b, %rax # imm = 0x6E776F6E6B6E755B
movq %rax, (%rsp)
movw $0x5d, 0x8(%rsp)
jmp 0xdf32
negl %edx
leaq 0x5fcb(%rip), %rsi      # 0x13ef3
movq %rsp, %rdi
xorl %eax, %eax
callq 0x91b0
leaq 0x40(%rsp), %rbx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x91a0
leaq 0x5f83(%rip), %rdi      # 0x13ecc
leaq 0x61bc(%rip), %rcx      # 0x1410c
movq %rbx, %rsi
movq %rcx, %rdx
callq 0xcad8
addq $0x98, %rsp
popq %rbx
popq %r14
retq