// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/ImageBuilder/imageBuilder.c
// Function: parseBlock
int parseBlock(void)
{
  int             savedLocation,
                  saveTop,
                  argCount,
                  blockLineNo;
  char           *savestart, *lnp;

  savestart = p;
  p++;
  skipSpaces();

  /* FIXME: This is a stupid way of getting the line number */
  blockLineNo = methodLineNo;
  for(lnp = inputBuffer; lnp < p; lnp++)
  {
    if(*lnp == '\n')
    {
      blockLineNo++;
    }
  }
  genInstruction(PushLiteral, addLiteral(newInteger(blockLineNo)));
  genInstruction(PushBlock, tempTop);
  savedLocation = byteTop;
  genVal(0);

  saveTop = tempTop;
  argCount = 0;
  if(*p == ':')
  {
    while(1)
    {
      p++;
      skipSpaces();
      if(!isIdentifierChar(*p))
        return parseError("missing identifier");
      if(readIdentifier())
        return parseError("keyword illegal");
      addTemporary(tokenBuffer);
      argCount++;
      if(*p == '|')
        break;
      if(*p != ':')
        return parseError("missing colon:");
    }
    p++;
    skipSpaces();
  }
  if(*p == ']')
  {
    genInstruction(PushConstant, nilConst);
  }
  else
  {
    int             saveReturnOp = returnOp;

    returnOp = BlockReturn;
    while(1)
    {
      if(!parseStatement())
      {
        parseError("Statement syntax inside block");
      }
      if(*p == '.')
      {
        p++;
        skipSpaces();
      }
      if(*p == ']')
      {
        break;
      }
      else
      {
        genInstruction(DoSpecial, PopTop);
      }
    }
    returnOp = saveReturnOp;
  }
  p++;
  skipSpaces();                 /* skip over ] */
  genInstruction(DoSpecial, StackReturn);
  genValPos(savedLocation, byteTop);
  tempTop = saveTop;

  /*
     set blockbackup to textual start of block 
   */
  blockbackup = savestart;
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x6b2d(%rip), %r15      # 0x9150
leaq 0x1(%r15), %rax
movq %rax, 0x6b22(%rip)      # 0x9150
callq 0x15b7
movl 0x2dc33(%rip), %eax     # 0x3026c
movq 0x6b10(%rip), %rcx      # 0x9150
leaq 0x5b09(%rip), %rdx      # 0x8150
cmpq %rdx, %rcx
jbe 0x265f
xorl %esi, %esi
cmpb $0xa, (%rdx)
sete %sil
addl %esi, %eax
incq %rdx
cmpq %rcx, %rdx
jne 0x264c
cltq
leaq 0x1(,%rax,2), %rdi
callq 0x1c35
movl $0x4, %edi
movl %eax, %esi
callq 0x1bb6
movl 0x38e60(%rip), %esi     # 0x3b4e0
movl $0xc, %edi
callq 0x1bb6
movl 0x37a80(%rip), %ebx     # 0x3a110
xorl %edi, %edi
callq 0x1aea
xorl %edi, %edi
callq 0x1aea
movl 0x38e3c(%rip), %ebp     # 0x3b4e0
movq 0x6aa5(%rip), %rax      # 0x9150
movb (%rax), %cl
cmpb $0x3a, %cl
jne 0x2722
leaq 0x2dbb7(%rip), %r14     # 0x30270
incq %rax
movq %rax, 0x6a8d(%rip)      # 0x9150
callq 0x15b7
movq 0x6a81(%rip), %rax      # 0x9150
movb (%rax), %al
andb $-0x21, %al
addb $-0x5b, %al
cmpb $-0x1b, %al
jbe 0x27d1
callq 0x169e
testl %eax, %eax
jne 0x27dd
movq %r14, %rdi
callq 0x1d1f
movq 0x6a57(%rip), %rax      # 0x9150
movzbl (%rax), %ecx
cmpl $0x3a, %ecx
je 0x26b9
cmpl $0x7c, %ecx
jne 0x27e9
incq %rax
movq %rax, 0x6a3c(%rip)      # 0x9150
callq 0x15b7
movq 0x6a30(%rip), %rax      # 0x9150
movb (%rax), %cl
cmpb $0x5d, %cl
jne 0x273a
movl $0x5a, %edi
callq 0x1aea
movq 0x6a18(%rip), %rax      # 0x9150
jmp 0x278e
movl 0x38e07(%rip), %r14d    # 0x3b548
movl $0x3, 0x38dfd(%rip)     # 0x3b548
callq 0x27f5
movq 0x69f9(%rip), %rax      # 0x9150
movb (%rax), %cl
cmpb $0x2e, %cl
jne 0x2776
incq %rax
movq %rax, 0x69e8(%rip)      # 0x9150
callq 0x15b7
movq 0x69dc(%rip), %rax      # 0x9150
movb (%rax), %cl
cmpb $0x5d, %cl
je 0x2787
movl $0xf5, %edi
callq 0x1aea
jmp 0x274b
movl %r14d, 0x38dba(%rip)    # 0x3b548
incq %rax
movq %rax, 0x69b8(%rip)      # 0x9150
callq 0x15b7
movl $0xf2, %edi
callq 0x1aea
movl 0x37963(%rip), %esi     # 0x3a110
movl %ebx, %edi
callq 0x1b78
movl %ebp, 0x38d26(%rip)     # 0x3b4e0
movq %r15, 0x38d8f(%rip)     # 0x3b550
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2a29(%rip), %rdi      # 0x5201
callq 0x13c6
leaq 0x2a30(%rip), %rdi      # 0x5214
callq 0x13c6
leaq 0x2a34(%rip), %rdi      # 0x5224
callq 0x13c6