// File: /workspace/github_c_makefile_star2_O1/GregorR[P]lstg/ImageBuilder/imageBuilder.c
// Function: RawClassCommand
void RawClassCommand(void)
{
  struct object  *nClass,
                 *supClass,
                 *instClass;
  int             instsize;

  /*
     read the class 
   */
  readIdentifier();
  nClass = lookupGlobal(tokenBuffer, 1);
  printf("Class %s\n", tokenBuffer);

  if(!nClass)
  {
    nClass = newClass(tokenBuffer);
    nClass->data[nameInClass] = newSymbol(tokenBuffer);
    addGlobalName(tokenBuffer, nClass);
  }

  /*
     now read the instance class 
   */
  readIdentifier();
  instClass = lookupGlobal(tokenBuffer, 1);
  if(!instClass)
  {
    sysError("can't find instance class", tokenBuffer);
  }
  nClass->class = instClass;

  /*
     now read the super class 
   */
  readIdentifier();
  supClass = lookupGlobal(tokenBuffer, 1);
  if(!supClass)
  {
    sysError("can't find super class", tokenBuffer);
  }
  nClass->data[parentClassInClass] = supClass;

  /*
     rest are instance variables 
   */
  litTop = 0;

  /*
     Now parse the new instance variables 
   */
  while(*p)
  {
    if(!isIdentifierChar(*p))
    {
      sysError("looking for var", p);
    }
    readIdentifier();
    addLiteral(newSymbol(tokenBuffer));
  }

  /*
     That's the total of our instance variables 
   */
  instsize = litTop;

  /*
     Add on size of superclass space 
   */
  if(supClass != nilObject)
  {
    instsize += integerValue(supClass->data[instanceSizeInClass]);
  }

  nClass->data[instanceSizeInClass] = newInteger(instsize);
  nClass->data[variablesInClass] = buildLiteralArray();
  /*
     make a tree for new methods 
   */
  nClass->data[methodsInClass] = newDictionary();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
callq 0x16b9
leaq 0x2cbdb(%rip), %r14     # 0x30270
movq %r14, %rdi
movl $0x1, %esi
callq 0x1496
movq %rax, %rbx
leaq 0x1d27(%rip), %rdi      # 0x53d3
movq %r14, %rsi
xorl %eax, %eax
callq 0x10a0
testq %rbx, %rbx
jne 0x36f2
movl $0x6, %edi
callq 0x12bb
movq %rax, %rbx
leaq 0x2cba1(%rip), %r14     # 0x30270
movq %r14, %rdi
callq 0x182f
movq %rax, 0x10(%rbx)
movq %r14, %rdi
callq 0x182f
movq %rax, 0x10(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x143a
callq 0x16b9
leaq 0x2cb72(%rip), %rdi     # 0x30270
movl $0x1, %esi
callq 0x1496
testq %rax, %rax
je 0x37e8
movq %rax, 0x8(%rbx)
callq 0x16b9
leaq 0x2cb4f(%rip), %rdi     # 0x30270
movl $0x1, %esi
callq 0x1496
testq %rax, %rax
je 0x37f8
movq %rax, %r14
movq %rax, 0x18(%rbx)
movl $0x0, 0x369cf(%rip)     # 0x3a114
movq 0x5a04(%rip), %rdx      # 0x9150
movb (%rdx), %al
testb %al, %al
je 0x37aa
andb $-0x21, %al
addb $-0x5b, %al
cmpb $-0x1a, %al
jb 0x378b
leaq 0x2cb0f(%rip), %r15     # 0x30270
callq 0x16b9
movq %r15, %rdi
callq 0x182f
movq %rax, %rdi
callq 0x1c58
movq 0x59d3(%rip), %rdx      # 0x9150
movb (%rdx), %al
testb %al, %al
je 0x37aa
andb $-0x21, %al
addb $-0x5b, %al
cmpb $-0x1b, %al
ja 0x3761
leaq 0x18ae(%rip), %rdi      # 0x5040
leaq 0x1c75(%rip), %rsi      # 0x540e
xorl %eax, %eax
callq 0x10a0
movl $0x1, %edi
callq 0x1140
movl 0x36964(%rip), %eax     # 0x3a114
cmpq 0x4989(%rip), %r14      # 0x8140
je 0x37c2
movq 0x28(%r14), %rcx
shrq %rcx
addl %ecx, %eax
cltq
leaq 0x1(,%rax,2), %rax
movq %rax, 0x28(%rbx)
callq 0x1c9f
movq %rax, 0x30(%rbx)
callq 0x19b4
movq %rax, 0x20(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1851(%rip), %rdi      # 0x5040
leaq 0x1be7(%rip), %rsi      # 0x53dd
jmp 0x3806
leaq 0x1841(%rip), %rdi      # 0x5040
leaq 0x1bf1(%rip), %rsi      # 0x53f7
leaq 0x2ca63(%rip), %rdx     # 0x30270
jmp 0x3799