// File: /workspace/github_c_makefile_star2_O3/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 0x169e
leaq 0x2cbc6(%rip), %r14     # 0x30270
movq %r14, %rdi
movl $0x1, %esi
callq 0x1496
movq %rax, %rbx
leaq 0x1d12(%rip), %rdi      # 0x53d3
movq %r14, %rsi
xorl %eax, %eax
callq 0x10a0
testq %rbx, %rbx
jne 0x3703
movl $0x6, %edi
callq 0x12bb
movq %rax, %rbx
leaq 0x2cb8c(%rip), %r14     # 0x30270
movq %r14, %rdi
callq 0x180c
movq %r14, %rdi
callq 0x180c
movq %rax, 0x10(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x143a
callq 0x169e
leaq 0x2cb61(%rip), %rdi     # 0x30270
movl $0x1, %esi
callq 0x1496
testq %rax, %rax
je 0x37fd
movq %rax, 0x8(%rbx)
callq 0x169e
leaq 0x2cb3e(%rip), %rdi     # 0x30270
movl $0x1, %esi
callq 0x1496
testq %rax, %rax
je 0x380d
movq %rax, %r14
movq %rax, 0x18(%rbx)
movl $0x0, 0x369be(%rip)     # 0x3a114
movq 0x59f3(%rip), %rdx      # 0x9150
movb (%rdx), %al
testb %al, %al
je 0x37c3
andb $-0x21, %al
addb $-0x5b, %al
cmpb $-0x1a, %al
jb 0x379c
leaq 0x2cafe(%rip), %r15     # 0x30270
callq 0x169e
movq %r15, %rdi
callq 0x180c
movq %rax, %rdi
callq 0x1c35
movq 0x59c2(%rip), %rdx      # 0x9150
movb (%rdx), %al
testb %al, %al
je 0x37bb
andb $-0x21, %al
addb $-0x5b, %al
cmpb $-0x1b, %al
ja 0x3772
leaq 0x189d(%rip), %rdi      # 0x5040
leaq 0x1c64(%rip), %rsi      # 0x540e
xorl %eax, %eax
callq 0x10a0
movl $0x1, %edi
callq 0x1140
movl 0x36953(%rip), %eax     # 0x3a114
jmp 0x37c5
xorl %eax, %eax
cmpq 0x4974(%rip), %r14      # 0x8140
je 0x37d7
movq 0x28(%r14), %rcx
shrq %rcx
addl %ecx, %eax
cltq
leaq 0x1(,%rax,2), %rax
movq %rax, 0x28(%rbx)
callq 0x1c7c
movq %rax, 0x30(%rbx)
callq 0x1991
movq %rax, 0x20(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x183c(%rip), %rdi      # 0x5040
leaq 0x1bd2(%rip), %rsi      # 0x53dd
jmp 0x381b
leaq 0x182c(%rip), %rdi      # 0x5040
leaq 0x1bdc(%rip), %rsi      # 0x53f7
leaq 0x2ca4e(%rip), %rdx     # 0x30270
jmp 0x37aa