// File: /workspace/github_c_makefile_star2_O2/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 0x1582
leaq 0x2c188(%rip), %r14     # 0x2f270
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x1390
movq %rax, %rbx
leaq 0x129a(%rip), %rdi      # 0x4397
movq %r14, %rsi
xorl %eax, %eax
callq 0x10a0
testq %rbx, %rbx
jne 0x3135
leaq 0x2c15d(%rip), %r14     # 0x2f270
movq %r14, %rdi
callq 0x174e
movq %rax, %rbx
movq %r14, %rdi
callq 0x1696
movq %rax, 0x10(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1347
callq 0x1582
leaq 0x2c12f(%rip), %rdi     # 0x2f270
pushq $0x1
popq %rsi
callq 0x1390
testq %rax, %rax
je 0x31fe
movq %rax, 0x8(%rbx)
callq 0x1582
leaq 0x2c10e(%rip), %rdi     # 0x2f270
pushq $0x1
popq %rsi
callq 0x1390
testq %rax, %rax
je 0x3207
movq %rax, %r14
movq %rax, 0x18(%rbx)
andl $0x0, 0x35f93(%rip)     # 0x39114
leaq 0x2c0e8(%rip), %r15     # 0x2f270
movq 0x4fc1(%rip), %rsi      # 0x8150
movb (%rsi), %al
testb %al, %al
je 0x31b4
andb $-0x21, %al
addb $-0x5b, %al
cmpb $-0x1b, %al
jbe 0x31f2
callq 0x1582
movq %r15, %rdi
callq 0x1696
movq %rax, %rdi
callq 0x1984
jmp 0x3188
movl 0x35f5a(%rip), %eax     # 0x39114
cmpq 0x3f7f(%rip), %r14      # 0x7140
je 0x31cc
movq 0x28(%r14), %rcx
shrq %rcx
addl %ecx, %eax
cltq
leaq 0x1(,%rax,2), %rax
movq %rax, 0x28(%rbx)
callq 0x19b8
movq %rax, 0x30(%rbx)
callq 0x17e7
movq %rax, 0x20(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x11d9(%rip), %rdi      # 0x43d2
callq 0x126c
leaq 0x119c(%rip), %rdi      # 0x43a1
jmp 0x320e
leaq 0x11ad(%rip), %rdi      # 0x43bb
leaq 0x2c05b(%rip), %rsi     # 0x2f270
callq 0x126c