LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/arglist.cpp
// Function: ZNK7ArgListcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv
ArgList::operator String ( void ) const
{
  CharVector result;

  result.clear();
  for(unsigned int argc = 0; argc < mArgs.size(); ++argc )
  {
    if( argc != 0 )
    {
      result.push_back( ' ' );
    }

    if( mArgs[argc].size() != 0 )
    {
      for(unsigned int index = 0; index < mArgs[argc].size(); ++index )
      {
        const String &foo = mArgs[argc];
        int ch = foo[index];

        assert( ch != '\0' );
        if( isspace( ch ) || ch == '"' || ch == '\\' )
        {
          result.push_back( '\\' );
        }
        result.push_back( ch );
      }
    }
    else
    {
      result.push_back( '"' );
      result.push_back( '"' );
    }
  }
  return String( &result[0], result.size() );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
movq (%rsi), %rax
xorl %r12d, %r12d
movq %rsi, -0x38(%rbp)
cmpq %rax, 0x8(%rsi)
je 0x72ae
movq %rbx, -0x58(%rbp)
leaq -0x50(%rbp), %rbx
leaq -0x29(%rbp), %r15
xorl %r14d, %r14d
testl %r12d, %r12d
je 0x71d5
movb $0x20, -0x29(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x79f4
movq -0x38(%rbp), %rax
movq (%rax), %rax
shlq $0x5, %r14
cmpq $0x0, 0x8(%rax,%r14)
movq %r12, -0x60(%rbp)
je 0x7259
addq %r14, %rax
movl $0x1, %r12d
movq %rax, %rdx
xorl %ecx, %ecx
movq %rbx, %r13
movq (%rdx), %rax
movsbl (%rax,%rcx), %ebx
testl %ebx, %ebx
je 0x72e9
movl %ebx, %edi
callq 0x2060
testl %eax, %eax
je 0x724a
movb $0x5c, -0x29(%rbp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x79f4
movb %bl, -0x29(%rbp)
movq %r13, %rbx
movq %r13, %rdi
movq %r15, %rsi
callq 0x79f4
movl %r12d, %ecx
movq -0x38(%rbp), %rax
movq (%rax), %rax
leaq (%rax,%r14), %rdx
incl %r12d
cmpq %rcx, 0x8(%rax,%r14)
ja 0x71f3
jmp 0x727e
movzbl %bl, %eax
cmpl $0x5c, %eax
je 0x7210
cmpl $0x22, %eax
je 0x7210
jmp 0x721f
movb $0x22, -0x29(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x79f4
movb $0x22, -0x29(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x79f4
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x60(%rbp), %r12
incl %r12d
movq -0x38(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
movq %r12, %r14
cmpq %r12, %rcx
ja 0x71ba
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %r12
movq -0x58(%rbp), %rbx
jmp 0x72b0
xorl %esi, %esi
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
movq %r12, %rdx
callq 0x6d58
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x72d7
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x2230
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb83c(%rip), %rdi      # 0x12b2c
leaq 0xb840(%rip), %rsi      # 0x12b37
leaq 0xb845(%rip), %rcx      # 0x12b43
movl $0xf2, %edx
callq 0x2180
jmp 0x7312
jmp 0x7312
jmp 0x7312
jmp 0x7312
jmp 0x7312
movq %rax, %rbx
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x732a
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x23c0
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/fload.cpp
// Function: Fload::Fload(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Fload::Fload(const String& fname)
{
  mName = SGET( fname );
  mData = 0;
  mLen = 0;

  FILE *fph = fopen( mName, "rb");
  if ( fph )
  {
    fseek(fph, 0L, SEEK_END);
    mLen = ftell(fph);
    if ( mLen )
    {
      fseek(fph, 0L, SEEK_SET);
      mData = (void *) new unsigned char[mLen+1];
      assert( mData );
      if ( mData )
      {
        int r = fread(mData, mLen, 1, fph);
        assert( r );
        if ( !r )
        {
          delete (char *) mData;
          mData = 0;
        }
		((char *)mData)[mLen]=0;
      }
    }
    fclose(fph);
  }
  mReadLoc = (char *)mData;
  mReadLen = mLen;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xb06f(%rip), %rax      # 0x12bb2
movq %rax, (%rdi)
callq 0x69ac
movq (%r14), %rsi
movq %rax, %rdi
callq 0x6a3e
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movl $0x0, 0x10(%rbx)
leaq 0xa679(%rip), %rsi      # 0x121e8
movq %rax, %rdi
callq 0x22a0
testq %rax, %rax
je 0x7be5
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x2270
movq %r14, %rdi
callq 0x2030
movl %eax, 0x10(%rbx)
testl %eax, %eax
je 0x7bdd
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2270
movslq 0x10(%rbx), %r15
leaq 0x1(%r15), %rdi
callq 0x2040
movq %rax, 0x8(%rbx)
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x2330
testl %eax, %eax
je 0x7bfe
movq 0x8(%rbx), %rax
movslq 0x10(%rbx), %rcx
movb $0x0, (%rax,%rcx)
movq %r14, %rdi
callq 0x2210
movq 0x8(%rbx), %rax
movq %rax, 0x18(%rbx)
movl 0x10(%rbx), %eax
movl %eax, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb980(%rip), %rdi      # 0x13585
leaq 0xaf7f(%rip), %rsi      # 0x12b8b
leaq 0xaf82(%rip), %rcx      # 0x12b95
movl $0x2e, %edx
callq 0x2180
nop
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/fload.cpp
// Function: Fload::GetString()
char * Fload::GetString(void)
{
  if ( !mReadLoc )
  {
    return 0;
  }

  // now advance read pointer to end of string and stomp a zero
  // byte on top of it as a null string terminator.
  while ( *mReadLoc == 0 || *mReadLoc == 10 || *mReadLoc == 13 )
  {
    mReadLoc++;
    mReadLen--;
    if ( !mReadLen )
    {
      mReadLoc = 0;
      return 0;
    }
  }

  char *ret = mReadLoc; // current read location is string location

  while ( *mReadLoc && *mReadLoc != 10 && *mReadLoc != 13 )
  {
    mReadLoc++;
    mReadLen--;
    if ( !mReadLen )
    {
      mReadLoc = 0;
      break;
    }
  }

  if ( mReadLen ) *mReadLoc = 0; // replace line feeds with null terminated strings.

  if ( mReadLoc ) mReadLoc++;
  mReadLen--;

  if ( !mReadLen )
  {
    mReadLoc = 0;
  }
  return ret;
}

// Assembly:
movq 0x18(%rdi), %rcx
testq %rcx, %rcx
je 0x7c8a
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movl 0x20(%rdi), %edx
leal -0x1(%rdx), %esi
movl $0x1, %r9d
xorl %eax, %eax
movl $0x2401, %r11d          # imm = 0x2401
xorl %r8d, %r8d
movzbl -0x1(%rcx,%r9), %r10d
cmpl $0xd, %r10d
ja 0x7c8d
btl %r10d, %r11d
jae 0x7c8d
leaq (%rcx,%r9), %r10
movq %r10, 0x18(%rdi)
movl %esi, 0x20(%rdi)
decq %r8
incq %r9
addl $-0x1, %esi
jb 0x7c57
movq $0x0, 0x18(%rdi)
popq %rbx
popq %rbp
retq
xorl %eax, %eax
retq
movl %edx, %r9d
negl %r9d
movq %rcx, %rax
subq %r8, %rax
negq %r8
movl $0x2401, %r11d          # imm = 0x2401
cmpb $0xd, %r10b
ja 0x7cb2
movzbl %r10b, %r10d
btl %r10d, %r11d
jb 0x7cd3
leaq (%rcx,%r8), %r10
incq %r10
movq %r10, 0x18(%rdi)
leal (%r9,%r8), %ebx
movl %esi, 0x20(%rdi)
cmpl $-0x1, %ebx
je 0x7cec
movb (%r10), %r10b
incq %r8
decl %esi
jmp 0x7ca2
addq %r8, %rcx
cmpl %edx, %r8d
je 0x7ce7
movb $0x0, (%rcx)
movq 0x18(%rdi), %rcx
testq %rcx, %rcx
je 0x7cf2
incq %rcx
jmp 0x7cee
xorl %ecx, %ecx
movq %rcx, 0x18(%rdi)
decl 0x20(%rdi)
jne 0x7c87
jmp 0x7c7f
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/patch.cpp
// Function: PatchSurface::FillPatch(int, int, int, int, LightMapVertex*)
void PatchSurface::FillPatch(int controlx,int controly,int sizex,int sizey,LightMapVertex *p)
{
  int stepx = (sizex-1) / (controlx-1);
  for (int u = 0; u < sizex; u += stepx)
  {
  	FillCurve(controly, sizey,sizex,p+u);
  }
  for (int v = 0; v < sizey; v++)
  {
  	FillCurve(controlx, sizex, 1, p + v * sizex);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, -0x30(%rbp)
movl %ecx, %r14d
movq %rsi, -0x38(%rbp)
testl %ecx, %ecx
jle 0x80c7
movl %edx, %edi
leal -0x1(%r14), %eax
movq -0x38(%rbp), %rcx
decl %ecx
cltd
idivl %ecx
cltq
movl %r14d, %ecx
movq %rcx, -0x48(%rbp)
movq %rax, -0x50(%rbp)
leaq (,%rax,8), %rax
leaq (%rax,%rax,4), %rax
movq %rax, -0x40(%rbp)
xorl %r12d, %r12d
movq -0x30(%rbp), %rbx
movl %edi, %esi
movl %r8d, %edx
movl %r14d, %ecx
movl %r8d, %r13d
movq %rbx, %r8
movq %r14, %r15
movl %edi, %r14d
callq 0x8250
movl %r14d, %edi
movq %r15, %r14
movl %r13d, %r8d
addq -0x50(%rbp), %r12
addq -0x40(%rbp), %rbx
cmpq -0x48(%rbp), %r12
jl 0x8097
testl %r8d, %r8d
movq -0x38(%rbp), %r13
movq -0x30(%rbp), %r15
jle 0x80fd
movslq %r14d, %rax
movl %r8d, %ebx
shlq $0x3, %rax
leaq (%rax,%rax,4), %r12
movl %r13d, %esi
movl %r14d, %edx
movl $0x1, %ecx
movq %r15, %r8
callq 0x8250
addq %r12, %r15
decq %rbx
jne 0x80e2
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/patch.cpp
// Function: PatchSurface::FindLevel(Vector3d<float> const&, Vector3d<float> const&, Vector3d<float> const&) const
int PatchSurface::FindLevel(const Vector3d<float> &cv0,
                            const Vector3d<float> &cv1,
                            const Vector3d<float> &cv2) const
{
  int level;
  Vector3d<float> a,b,dist;

  Vector3d<float> v0 = cv0; // init control points.
  Vector3d<float> v1 = cv1;
  Vector3d<float> v2 = cv2;

  /* Subdivide on the left until tolerance is reached */
  for (level=0; level <MAXMESHLEVEL-1; level++)
  {
	  /* Subdivide on the left */
    a.Lerp(v0,v1,0.5f);
    b.Lerp(v1,v2,0.5f);
    v2.Lerp(a,b,0.5f);

	  /* Find distance moved */
    dist = v2-v1;

    float dist2 = dist.x*dist.x + dist.y*dist.y + dist.z*dist.z;
    if ( dist2 < MINDIST ) break;

	  /* Insert new middle vertex */
    v1 = a;
  }

  return level;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movss (%rsi), %xmm0
movss 0x4(%rsi), %xmm1
movss 0x8(%rsi), %xmm2
movss (%rdx), %xmm3
movss 0x4(%rdx), %xmm4
movss 0x8(%rdx), %xmm5
movss (%rcx), %xmm6
movss 0x4(%rcx), %xmm7
movss 0x8(%rcx), %xmm8
xorl %eax, %eax
movss 0xaa46(%rip), %xmm9     # 0x12bb8
movss 0xaa41(%rip), %xmm10    # 0x12bbc
movaps %xmm5, %xmm11
movaps %xmm4, %xmm12
movaps %xmm3, %xmm13
subss %xmm0, %xmm3
subss %xmm1, %xmm4
subss %xmm2, %xmm5
mulss %xmm9, %xmm3
mulss %xmm9, %xmm4
mulss %xmm9, %xmm5
addss %xmm0, %xmm3
addss %xmm1, %xmm4
addss %xmm2, %xmm5
subss %xmm13, %xmm6
subss %xmm12, %xmm7
subss %xmm11, %xmm8
mulss %xmm9, %xmm6
mulss %xmm9, %xmm7
mulss %xmm9, %xmm8
addss %xmm13, %xmm6
addss %xmm12, %xmm7
addss %xmm11, %xmm8
subss %xmm3, %xmm6
subss %xmm4, %xmm7
subss %xmm5, %xmm8
mulss %xmm9, %xmm6
mulss %xmm9, %xmm7
mulss %xmm9, %xmm8
addss %xmm3, %xmm6
addss %xmm4, %xmm7
addss %xmm5, %xmm8
movaps %xmm6, %xmm14
subss %xmm13, %xmm14
movaps %xmm7, %xmm13
subss %xmm12, %xmm13
movaps %xmm8, %xmm12
subss %xmm11, %xmm12
mulss %xmm13, %xmm13
mulss %xmm14, %xmm14
addss %xmm13, %xmm14
mulss %xmm12, %xmm12
addss %xmm14, %xmm12
ucomiss %xmm12, %xmm10
ja 0x824e
incl %eax
cmpl $0x4, %eax
jne 0x817b
movl $0x4, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/./vformat.h
// Function: LightMapVertex::Lerp(LightMapVertex const&, LightMapVertex const&, float)
void Lerp(const LightMapVertex &a,const LightMapVertex &b,float p)
  {
    mPos.Lerp(a.mPos,b.mPos,p);
    mTexel1.Lerp(a.mTexel1,b.mTexel1,p);
    mTexel2.Lerp(a.mTexel2,b.mTexel2,p);
    mColor.Lerp(a.mColor,b.mColor,p);
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movss (%rdx), %xmm1
movss 0x4(%rdx), %xmm2
subss (%rsi), %xmm1
subss 0x4(%rsi), %xmm2
movss 0x8(%rdx), %xmm3
subss 0x8(%rsi), %xmm3
mulss %xmm0, %xmm1
movss %xmm1, (%rdi)
mulss %xmm0, %xmm2
movss %xmm2, 0x4(%rdi)
mulss %xmm0, %xmm3
movss %xmm3, 0x8(%rdi)
addss (%rsi), %xmm1
addss 0x4(%rsi), %xmm2
addss 0x8(%rsi), %xmm3
movss %xmm1, (%rdi)
movss %xmm2, 0x4(%rdi)
movss %xmm3, 0x8(%rdi)
movss 0xc(%rdx), %xmm1
movss 0x10(%rdx), %xmm2
subss 0xc(%rsi), %xmm1
subss 0x10(%rsi), %xmm2
mulss %xmm0, %xmm1
movss %xmm1, 0xc(%rdi)
mulss %xmm0, %xmm2
movss %xmm2, 0x10(%rdi)
addss 0xc(%rsi), %xmm1
movss %xmm1, 0xc(%rdi)
addss 0x10(%rsi), %xmm2
movss %xmm2, 0x10(%rdi)
movss 0x14(%rdx), %xmm1
movss 0x18(%rdx), %xmm2
subss 0x14(%rsi), %xmm1
subss 0x18(%rsi), %xmm2
mulss %xmm0, %xmm1
movss %xmm1, 0x14(%rdi)
mulss %xmm0, %xmm2
movss %xmm2, 0x18(%rdi)
addss 0x14(%rsi), %xmm1
movss %xmm1, 0x14(%rdi)
addss 0x18(%rsi), %xmm2
movss %xmm2, 0x18(%rdi)
movss 0x1c(%rdx), %xmm1
movss 0x20(%rdx), %xmm2
subss 0x1c(%rsi), %xmm1
subss 0x20(%rsi), %xmm2
movss 0x24(%rdx), %xmm3
subss 0x24(%rsi), %xmm3
mulss %xmm0, %xmm1
movss %xmm1, 0x1c(%rdi)
mulss %xmm0, %xmm2
movss %xmm2, 0x20(%rdi)
mulss %xmm0, %xmm3
movss %xmm3, 0x24(%rdi)
addss 0x1c(%rsi), %xmm1
addss 0x20(%rsi), %xmm2
addss 0x24(%rsi), %xmm3
movss %xmm1, 0x1c(%rdi)
movss %xmm2, 0x20(%rdi)
movss %xmm3, 0x24(%rdi)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/q3bsp.cpp
// Function: QuakeHeader::SetHeader(void const*)
bool QuakeHeader::SetHeader(const void *mem)  // returns true if valid quake header.
{
  const int *ids = (const int *) mem;
  #define BSPHEADERID  (*(int*)"IBSP")
  #define BSPVERSION 46
  if ( ids[0] != BSPHEADERID ) return false;
  if ( ids[1] != BSPVERSION ) return false;
  mId      = ids[0];
  mVersion = ids[1];
  const QuakeLump *lump = (const QuakeLump *) &ids[2];
  for (int i=0; i<NUM_LUMPS; i++) mLumps[i] = *lump++;
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x50534249, (%rsi)     # imm = 0x50534249
jne 0x89a2
cmpl $0x2e, 0x4(%rsi)
jne 0x89a2
movl $0x50534249, (%rdi)     # imm = 0x50534249
movl 0x4(%rsi), %eax
movl %eax, 0x4(%rdi)
movl $0x1, %eax
movq (%rsi,%rax,8), %rcx
movq %rcx, (%rdi,%rax,8)
incq %rax
cmpq $0x12, %rax
jne 0x898d
movb $0x1, %al
jmp 0x89a4
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/q3bsp.cpp
// Function: Quake3BSP::ReadFaces(void const*)
void Quake3BSP::ReadFaces(const void *mem)
{
  assert( mOk );
  int lsize;
  int lcount;
  const int *faces = (const int *) mHeader.LumpInfo(Q3_FACES,mem,lsize,lcount);
  assert( lsize == sizeof(int)*26 );

  mFaces.clear();
  mFaces.reserve( lcount );

  for (int i=0; i<lcount; i++)
  {
    QuakeFace f(faces);

    mFaces.push_back(f);

    faces+=26;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
cmpb $0x0, (%rdi)
je 0x8a55
movq %rsi, %rdx
movq %rdi, %r15
addq $0x18, %rdi
leaq -0x28(%rbp), %r14
leaq -0x24(%rbp), %r8
movl $0xd, %esi
movq %r14, %rcx
callq 0x9622
cmpl $0x68, (%r14)
jne 0x8a74
movq %rax, %rbx
leaq 0xa8(%r15), %r14
movq 0xa8(%r15), %rax
cmpq %rax, 0xb0(%r15)
je 0x8a0b
movq %rax, 0xb0(%r15)
movslq -0x24(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xa8b0
testq %r15, %r15
jle 0x8a45
leaq -0x94(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x97e2
movq %r14, %rdi
movq %r12, %rsi
callq 0xa948
addq $0x68, %rbx
decl %r15d
jne 0x8a26
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa1b1(%rip), %rdi      # 0x12c0d
leaq 0xa1ae(%rip), %rsi      # 0x12c11
leaq 0xa3c1(%rip), %rcx      # 0x12e2b
movl $0x171, %edx            # imm = 0x171
callq 0x2180
leaq 0xa3d8(%rip), %rdi      # 0x12e53
leaq 0xa18f(%rip), %rsi      # 0x12c11
leaq 0xa3a2(%rip), %rcx      # 0x12e2b
movl $0x175, %edx            # imm = 0x175
callq 0x2180
nop
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/q3bsp.cpp
// Function: Quake3BSP::ReadElements(void const*)
void Quake3BSP::ReadElements(const void *mem)
{
  assert( mOk );
  int lsize;
  int lcount;
  // LUMP_DRAWINDEXES
  const int *elements = (const int *) mHeader.LumpInfo(Q3_ELEMS,mem,lsize,lcount);
  assert( lsize == sizeof(int) );

  mElements.clear();
  mElements.reserve( lcount );

  for (int i=0; i<lcount; i++)
  {
    unsigned short ic = (unsigned short)(*elements);
    mElements.push_back(ic);
    elements++;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpb $0x0, (%rdi)
je 0x8b5e
movq %rsi, %rdx
movq %rdi, %rbx
addq $0x18, %rdi
leaq -0x34(%rbp), %r15
leaq -0x30(%rbp), %r8
movl $0xb, %esi
movq %r15, %rcx
callq 0x9622
cmpl $0x4, (%r15)
jne 0x8b7d
movq %rax, %r14
leaq 0xf0(%rbx), %r15
movq 0xf0(%rbx), %rax
cmpq %rax, 0xf8(%rbx)
je 0x8af8
movq %rax, 0xf8(%rbx)
movslq -0x30(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0xaaa2
testq %r12, %r12
jle 0x8b4f
movl %r12d, %r13d
xorl %r12d, %r12d
movzwl (%r14,%r12,4), %eax
movw %ax, -0x2a(%rbp)
movq 0xf8(%rbx), %rsi
cmpq 0x100(%rbx), %rsi
je 0x8b3b
movw %ax, (%rsi)
addq $0x2, %rsi
movq %rsi, 0xf8(%rbx)
jmp 0x8b47
movq %r15, %rdi
leaq -0x2a(%rbp), %rdx
callq 0xb9a0
incq %r12
cmpl %r12d, %r13d
jne 0x8b12
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa0a8(%rip), %rdi      # 0x12c0d
leaq 0xa0a5(%rip), %rsi      # 0x12c11
leaq 0xa371(%rip), %rcx      # 0x12ee4
movl $0x1cf, %edx            # imm = 0x1CF
callq 0x2180
leaq 0xa38b(%rip), %rdi      # 0x12f0f
leaq 0xa086(%rip), %rsi      # 0x12c11
leaq 0xa352(%rip), %rcx      # 0x12ee4
movl $0x1d4, %edx            # imm = 0x1D4
callq 0x2180
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/q3bsp.cpp
// Function: Quake3BSP::ReadVertices(void const*)
void Quake3BSP::ReadVertices(const void *mem)
{
  assert( mOk );
  int lsize;
  int lcount;
  const int *vertices = (const int *) mHeader.LumpInfo(Q3_VERTS,mem,lsize,lcount);
  assert( lsize == sizeof(int)*11 );

  mVertices.clear();
  mVertices.reserve( lcount );

  mBound.InitMinMax();

  for (int i=0; i<lcount; i++)
  {
    QuakeVertex v(vertices);

    #define RECIP (1.0f/45.0f)

    v.mPos.x*=RECIP;
    v.mPos.y*=-RECIP;
    v.mPos.z*=RECIP;

    mBound.MinMax(v.mPos);
    mVertices.push_back(v);
    vertices+=11;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
cmpb $0x0, (%rdi)
je 0x8cfd
movq %rsi, %rdx
movq %rdi, %rbx
addq $0x18, %rdi
leaq -0x5c(%rbp), %r15
leaq -0x2c(%rbp), %r8
movl $0xa, %esi
movq %r15, %rcx
callq 0x9622
cmpl $0x2c, (%r15)
jne 0x8d1c
movq %rax, %r14
leaq 0xc0(%rbx), %r15
movq 0xc0(%rbx), %rax
cmpq %rax, 0xc8(%rbx)
je 0x8c00
movq %rax, 0xc8(%rbx)
movslq -0x2c(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0xa980
movaps 0x9fca(%rip), %xmm0     # 0x12be0
movups %xmm0, 0x108(%rbx)
movabsq $-0x319194d7319194d8, %rax # imm = 0xCE6E6B28CE6E6B28
movq %rax, 0x118(%rbx)
testq %r12, %r12
jle 0x8cee
addq $0x108, %rbx            # imm = 0x108
leaq -0x58(%rbp), %r13
movss 0x4(%r14), %xmm1
movss 0xc(%r14), %xmm3
movss (%r14), %xmm0
movss 0x9f95(%rip), %xmm4     # 0x12bf0
mulss %xmm4, %xmm0
movss 0x8(%r14), %xmm2
mulss %xmm4, %xmm2
movss %xmm3, -0x4c(%rbp)
movss 0x10(%r14), %xmm3
movss %xmm3, -0x48(%rbp)
movss 0x14(%r14), %xmm3
movss %xmm3, -0x44(%rbp)
movss 0x18(%r14), %xmm3
movss %xmm3, -0x40(%rbp)
movss 0x1c(%r14), %xmm3
movss %xmm3, -0x3c(%rbp)
movss 0x20(%r14), %xmm3
movss %xmm3, -0x38(%rbp)
movss 0x24(%r14), %xmm3
movss %xmm3, -0x34(%rbp)
movl 0x28(%r14), %eax
movl %eax, -0x30(%rbp)
movss %xmm0, -0x58(%rbp)
mulss 0x9f30(%rip), %xmm1     # 0x12bf4
movss %xmm1, -0x54(%rbp)
movss %xmm2, -0x50(%rbp)
movq %rbx, %rdi
callq 0xb75a
movq %r15, %rdi
movq %r13, %rsi
callq 0xaa18
addq $0x2c, %r14
decl %r12d
jne 0x8c42
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9f09(%rip), %rdi      # 0x12c0d
leaq 0x9f06(%rip), %rsi      # 0x12c11
leaq 0xa159(%rip), %rcx      # 0x12e6b
movl $0x186, %edx            # imm = 0x186
callq 0x2180
leaq 0xa173(%rip), %rdi      # 0x12e96
leaq 0x9ee7(%rip), %rsi      # 0x12c11
leaq 0xa13a(%rip), %rcx      # 0x12e6b
movl $0x18a, %edx            # imm = 0x18A
callq 0x2180
nop
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/q3bsp.cpp
// Function: Quake3BSP::ReadShaders(void const*)
void Quake3BSP::ReadShaders(const void *mem)
{
  assert( mOk );
  int lsize;
  int lcount;

  const unsigned char *smem = (const unsigned char *) mHeader.LumpInfo(Q3_SHADERREFS,mem,lsize,lcount);

  mShaders.clear();
  mShaders.reserve( lcount );

  for (int i=0; i<lcount; i++)
  {
    ShaderReference s(smem);
    mShaders.push_back(s);
    smem+=lsize;
  }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
cmpb $0x0, (%rdi)
je 0x908f
movq %rsi, %rdx
movq %rdi, %rbx
addq $0x18, %rdi
leaq -0x30(%rbp), %rcx
leaq -0x2c(%rbp), %r8
movl $0x1, %esi
callq 0x9622
movq %rax, %r14
leaq 0xd8(%rbx), %rax
movq %rax, -0x38(%rbp)
movq 0xd8(%rbx), %rax
cmpq %rax, 0xe0(%rbx)
je 0x8ff9
movq %rax, 0xe0(%rbx)
movslq -0x2c(%rbp), %r12
movq -0x38(%rbp), %rdi
movq %r12, %rsi
callq 0xa7e0
testq %r12, %r12
jle 0x9080
movslq -0x30(%rbp), %r15
addq $0x40, %r14
leaq -0x80(%rbp), %r13
movups -0x40(%r14), %xmm0
movups -0x30(%r14), %xmm1
movups -0x20(%r14), %xmm2
movups -0x10(%r14), %xmm3
movaps %xmm3, -0x50(%rbp)
movaps %xmm2, -0x60(%rbp)
movaps %xmm1, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movq (%r14), %rax
movq %rax, -0x40(%rbp)
movq 0xe0(%rbx), %rsi
cmpq 0xe8(%rbx), %rsi
je 0x906c
movl $0x12, %ecx
movq %rsi, %rdi
movq %r13, %rsi
rep  movsl (%rsi), %es:(%rdi)
addq $0x48, 0xe0(%rbx)
jmp 0x9078
movq -0x38(%rbp), %rdi
movq %r13, %rdx
callq 0xac64
addq %r15, %r14
decl %r12d
jne 0x901a
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9b77(%rip), %rdi      # 0x12c0d
leaq 0x9b74(%rip), %rsi      # 0x12c11
leaq 0x9b77(%rip), %rcx      # 0x12c1b
movl $0x66, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/q3bsp.cpp
// Function: Quake3BSP::BuildVertexBuffers()
void Quake3BSP::BuildVertexBuffers(void)
{
  mMesh = 0;
  mMesh = new VertexMesh;

  QuakeFaceVector::iterator i;
  for (i=mFaces.begin(); i!=mFaces.end(); ++i)
  {
    (*i).Build(mElements,mVertices,mShaders,mLmPrefix,mName,mCodeName,*mMesh);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorl %r14d, %r14d
movq %r14, 0x120(%rdi)
movl $0x58, %edi
callq 0x2220
leaq 0x9ad5(%rip), %rcx      # 0x12bb2
movq %rcx, 0x8(%rax)
leaq 0x18(%rax), %rcx
movl $0x0, 0x18(%rax)
movq %r14, 0x20(%rax)
movq %rcx, 0x28(%rax)
movq %rcx, 0x30(%rax)
movq %r14, (%rax)
movq %r14, 0x38(%rax)
movaps 0x9ada(%rip), %xmm0     # 0x12be0
movups %xmm0, 0x40(%rax)
movabsq $-0x319194d7319194d8, %rcx # imm = 0xCE6E6B28CE6E6B28
movq %rcx, 0x50(%rax)
movq %rax, 0x120(%rbx)
movq 0xa8(%rbx), %r14
cmpq 0xb0(%rbx), %r14
je 0x9186
leaq 0xf0(%rbx), %rax
movq %rax, -0x38(%rbp)
leaq 0xc0(%rbx), %rax
movq %rax, -0x30(%rbp)
leaq 0xd8(%rbx), %r13
leaq 0x1f0(%rbx), %r15
leaq 0x10(%rbx), %r12
movq %r14, %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq %r13, %rcx
movq %r15, %r8
pushq 0x120(%rbx)
pushq %r12
callq 0x9af2
addq $0x10, %rsp
addq $0x6c, %r14
cmpq 0xb0(%rbx), %r14
jne 0x9157
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/q3bsp.cpp
// Function: Quake3BSP::ReadPlanes(void const*)
void Quake3BSP::ReadPlanes(const void *mem)
{
  assert( mOk );
  int lsize;
  int lcount;
  const dplane_t *planes = (const dplane_t *) mHeader.LumpInfo(Q3_PLANES,mem,lsize,lcount);

  mPlanes.assign(planes,planes+lcount);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
cmpb $0x0, (%rdi)
je 0x91e9
movq %rsi, %rdx
movq %rdi, %rbx
addq $0x18, %rdi
leaq -0x18(%rbp), %rcx
leaq -0x14(%rbp), %r14
movl $0x2, %esi
movq %r14, %r8
callq 0x9622
addq $0x128, %rbx            # imm = 0x128
movslq (%r14), %rdx
shlq $0x4, %rdx
addq %rax, %rdx
movq %rbx, %rdi
movq %rax, %rsi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0xadc6
leaq 0x9a1d(%rip), %rdi      # 0x12c0d
leaq 0x9a1a(%rip), %rsi      # 0x12c11
leaq 0x9aa8(%rip), %rcx      # 0x12ca6
movl $0xde, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/q3bsp.cpp
// Function: Quake3BSP::ReadLeaves(void const*)
void Quake3BSP::ReadLeaves(const void *mem)
{
  assert( mOk );
  int lsize;
  int lcount;
  const dleaf_t *nodes= (const dleaf_t *) mHeader.LumpInfo(Q3_LEAFS,mem,lsize,lcount);


  mLeaves.assign(nodes,nodes+lcount);
  assert(mLeaves.size() == lcount);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
cmpb $0x0, (%rdi)
je 0x9282
movq %rsi, %rdx
movq %rdi, %rbx
addq $0x18, %rdi
leaq -0x18(%rbp), %rcx
leaq -0x14(%rbp), %r14
movl $0x4, %esi
movq %r14, %r8
callq 0x9622
leaq 0x1b8(%rbx), %rdi
movslq (%r14), %r14
leaq (%r14,%r14,2), %rdx
shlq $0x4, %rdx
addq %rax, %rdx
movq %rax, %rsi
callq 0xb048
movq 0x1c0(%rbx), %rax
subq 0x1b8(%rbx), %rax
sarq $0x4, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rcx
cmpq %r14, %rcx
jne 0x92a1
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x9984(%rip), %rdi      # 0x12c0d
leaq 0x9981(%rip), %rsi      # 0x12c11
leaq 0x9a60(%rip), %rcx      # 0x12cf7
movl $0xf6, %edx
callq 0x2180
leaq 0x9a78(%rip), %rdi      # 0x12d20
leaq 0x9962(%rip), %rsi      # 0x12c11
leaq 0x9a41(%rip), %rcx      # 0x12cf7
movl $0xfd, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/q3bsp.cpp
// Function: Quake3BSP::ReadLeafSurfaces(void const*)
void Quake3BSP::ReadLeafSurfaces(const void *mem)
{
  assert( mOk );
  int lsize;
  int lcount;
  const int *nodes= (const int *) mHeader.LumpInfo(Q3_LFACES,mem,lsize,lcount);


  mLeafSurfaces.assign(nodes,nodes+lcount);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
cmpb $0x0, (%rdi)
je 0x9310
movq %rsi, %rdx
movq %rdi, %rbx
addq $0x18, %rdi
leaq -0x18(%rbp), %rcx
leaq -0x14(%rbp), %r14
movl $0x5, %esi
movq %r14, %r8
callq 0x9622
addq $0x158, %rbx            # imm = 0x158
movslq (%r14), %rcx
leaq (%rax,%rcx,4), %rdx
movq %rbx, %rdi
movq %rax, %rsi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0xb198
leaq 0x98f6(%rip), %rdi      # 0x12c0d
leaq 0x98f3(%rip), %rsi      # 0x12c11
leaq 0x9a14(%rip), %rcx      # 0x12d39
movl $0x104, %edx            # imm = 0x104
callq 0x2180
nop
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/q3bsp.cpp
// Function: Quake3BSP::ReadNodes(void const*)
void Quake3BSP::ReadNodes(const void *mem)
{
  assert( mOk );
  int lsize;
  int lcount;
  const dnode_t *nodes= (const dnode_t *) mHeader.LumpInfo(Q3_NODES,mem,lsize,lcount);


  mNodes.assign(nodes,nodes+lcount);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
cmpb $0x0, (%rdi)
je 0x9384
movq %rsi, %rdx
movq %rdi, %rbx
addq $0x18, %rdi
leaq -0x18(%rbp), %rcx
leaq -0x14(%rbp), %r14
movl $0x3, %esi
movq %r14, %r8
callq 0x9622
addq $0x140, %rbx            # imm = 0x140
movslq (%r14), %rcx
leaq (%rcx,%rcx,8), %rcx
leaq (%rax,%rcx,4), %rdx
movq %rbx, %rdi
movq %rax, %rsi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0xaef8
leaq 0x9882(%rip), %rdi      # 0x12c0d
leaq 0x987f(%rip), %rsi      # 0x12c11
leaq 0x9936(%rip), %rcx      # 0x12ccf
movl $0xe9, %edx
callq 0x2180
nop
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/q3bsp.cpp
// Function: Quake3BSP::ReadEntities(void const*)
void Quake3BSP::ReadEntities(const void *mem)
{
  assert( mOk );
  int lsize;
  int lcount;
  
  const char *elements = (const char *) mHeader.LumpInfo(Q3_ENTITIES,mem,lsize,lcount);
  assert( lsize == sizeof(char) );

  mEntities.clear();

  const char *estart=elements;
  const char *p=estart;
  int level=0;
  for (int i=0; i<lcount; i++)
  {
	 if (*p == '{') {
		 level++;
		 if (level == 1) estart = p+1;
	 } else if (*p == '}') {
		 level--;
		 if (level == 0) {
			EntityReference *e=new EntityReference(estart,p-estart-1);

		    mEntities.push_back(*e);
			estart = p+1;
		 }
	 }
	 p++;

  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x0, (%rdi)
je 0x9462
movl 0x24(%rdi), %r12d
testl %r12d, %r12d
je 0x9481
movq %rsi, %r15
movslq 0x20(%rdi), %rbx
movq 0x1d0(%rdi), %rsi
addq $0x1d0, %rdi            # imm = 0x1D0
movq %rdi, -0x30(%rbp)
callq 0xbac2
testl %r12d, %r12d
jle 0x9453
leaq (%r15,%rbx), %r14
leaq (%r15,%rbx), %r13
incq %r13
addl %r15d, %ebx
decl %ebx
xorl %eax, %eax
movzbl -0x1(%r13), %ecx
cmpl $0x7d, %ecx
je 0x9417
cmpl $0x7b, %ecx
jne 0x9449
testl %eax, %eax
leal 0x1(%rax), %eax
cmoveq %r13, %r14
jmp 0x9449
decl %eax
jne 0x9449
movl $0x20, %edi
callq 0x2220
movq %rax, %r15
movl %ebx, %edx
subl %r14d, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0xab98
movq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0xabf0
xorl %eax, %eax
movq %r13, %r14
incq %r13
incl %ebx
decl %r12d
jne 0x93fd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x97a4(%rip), %rdi      # 0x12c0d
leaq 0x97a1(%rip), %rsi      # 0x12c11
leaq 0x9bee(%rip), %rcx      # 0x13065
movl $0x2bd, %edx            # imm = 0x2BD
callq 0x2180
leaq 0x9807(%rip), %rdi      # 0x12c8f
leaq 0x9782(%rip), %rsi      # 0x12c11
leaq 0x97af(%rip), %rcx      # 0x12c45
movl $0xab, %edx
callq 0x2180
movq %rax, %rbx
movl $0x20, %esi
movq %r15, %rdi
callq 0x2230
movq %rbx, %rdi
callq 0x23c0
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/q3bsp.cpp
// Function: ShaderReference::GetShaderFileName(char*)
void ShaderReference::GetShaderFileName(char *tname)
{
  strcpy(tname,"");
  int len = strlen(mName);
  if ( !len ) 
	  return;
  
  const char *foo = &mName[0];
  while ( *foo && *foo != '/' ) foo++;

  if ( !*foo ) return;
  foo++;
  
  char *dest = tname;
  while ( *foo && *foo != '/' )
  {
    *dest++ = *foo++;
  }
  *dest = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movb $0x0, (%rsi)
callq 0x2120
testl %eax, %eax
je 0xa034
movzbl (%r14), %eax
testl %eax, %eax
je 0xa034
cmpl $0x2f, %eax
je 0xa013
incq %r14
jmp 0xa001
movl $0x1, %eax
movzbl (%r14,%rax), %ecx
testl %ecx, %ecx
je 0xa02f
cmpl $0x2f, %ecx
je 0xa02f
movb %cl, -0x1(%rbx,%rax)
incq %rax
jmp 0xa018
movb $0x0, -0x1(%rbx,%rax)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/q3bsp.cpp
// Function: ShaderReference::GetTextureName(char*)
void ShaderReference::GetTextureName(char *tname)
{
  strcpy(tname,"null");
  int len = strlen(mName);
  if ( !len ) return;
  const char *foo = &mName[len-1];
  while ( *foo && *foo != '/' ) foo--;
  if ( !*foo ) return;
  foo++;
  char *dest = tname;
  while ( *foo )
  {
    *dest++ = *foo++;
  }
  *dest = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movb $0x0, 0x4(%rsi)
movl $0x6c6c756e, (%rsi)     # imm = 0x6C6C756E
callq 0x2120
testl %eax, %eax
je 0xa092
decl %eax
cltq
addq %r14, %rax
incq %rax
movzbl -0x1(%rax), %ecx
testl %ecx, %ecx
je 0xa092
cmpl $0x2f, %ecx
je 0xa076
decq %rax
jmp 0xa064
movb (%rax), %cl
testb %cl, %cl
je 0xa08f
xorl %edx, %edx
movb %cl, (%rbx,%rdx)
movb 0x1(%rax,%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0xa07e
addq %rdx, %rbx
movb $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/q3bsp.cpp
// Function: Quake3BSP::SaveEntitiesVRML2(_IO_FILE*, VFormatOptions&) const
void Quake3BSP::SaveEntitiesVRML2(
			FILE *fph,
            VFormatOptions &options) const 
{
  if ( mEntities.size() )
  {
    if ( fph )
    {
      fprintf(fph,"DEF Entities Group {\n");
      fprintf(fph,"children [\n");

      EntityReferenceVector::const_iterator i;

      for (i=mEntities.begin(); i!=mEntities.end(); ++i)
      {
			SaveEntity(*i,fph,options);
      }

      fprintf(fph,"]}\n");

    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0xa46e
movq %rdi, %r14
movq 0x1d0(%rdi), %rax
cmpq %rax, 0x1d8(%rdi)
je 0xa46e
movq %rsi, %rbx
leaq 0x8d2b(%rip), %rdi      # 0x1314d
movl $0x15, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2410
leaq 0x8d28(%rip), %rdi      # 0x13163
movl $0xb, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2410
movq 0x1d0(%r14), %r15
cmpq 0x1d8(%r14), %r15
je 0xa479
movq %r15, %rsi
movq %rbx, %rdx
callq 0xa098
addq $0x20, %r15
jmp 0xa454
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8cef(%rip), %rdi      # 0x1316f
movl $0x3, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2410
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/q3bsp.cpp
// Function: Quake3BSP::SaveNode(int, _IO_FILE*, VFormatOptions&)
void Quake3BSP::SaveNode(
			int nodeNum, 
			FILE *fph,
            VFormatOptions &options)

{
	if (nodeNum<0) {
		// negative numbers are -(leafs+1), not nodes
		int leafNum = - (nodeNum+1);
		SaveNodeBsp(&mLeaves[leafNum],fph,options);
	}
	else {
		SaveNodeBsp(&mNodes[nodeNum],fph,options);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %esi, %esi
js 0xa4bb
movl %esi, %eax
leaq (%rax,%rax,8), %rsi
shlq $0x2, %rsi
addq 0x140(%rdi), %rsi
popq %rbp
jmp 0xa65e
notl %esi
leaq (%rsi,%rsi,2), %rsi
shlq $0x4, %rsi
addq 0x1b8(%rdi), %rsi
popq %rbp
jmp 0xa4d2
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/q3bsp.cpp
// Function: Quake3BSP::SaveNodeBsp(dleaf_t const*, _IO_FILE*, VFormatOptions&)
void Quake3BSP::SaveNodeBsp(
			const dleaf_t *node, 

			FILE *fph,
            VFormatOptions &options) 
{

	// save the leaf surfaces & brushes 
	if (node->numLeafSurfaces == 0) {
		fprintf(fph,"NULL ");
		return;
	}
	if (node->numLeafSurfaces >1) {
		//fprintf(fph,"Group { children [\n");
	}
    VertexMesh mesh;

	// print all the surfaces 
	for (int i=0; i<node->numLeafSurfaces;i++) {
		int surface = node->firstLeafSurface + i;
		surface = mLeafSurfaces[surface];
		fprintf(fph,"## surface %d \n",surface);

		mFaces[surface].Build(mElements,mVertices,mShaders,mLmPrefix,mName,mCodeName,mesh);
	}

	mesh.SaveVRML2(fph,options);

	if (node->numLeafSurfaces >1) {
		//fprintf(fph,"]}");
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r8
movl 0x24(%rsi), %eax
testl %eax, %eax
je 0xa61b
movq %rcx, -0x30(%rbp)
leaq 0x86b3(%rip), %rcx      # 0x12bb2
leaq -0x98(%rbp), %rdx
movq %rcx, -0x10(%rdx)
movl $0x0, (%rdx)
xorl %ecx, %ecx
movq %rcx, 0x8(%rdx)
movq %rdx, 0x10(%rdx)
movq %rdx, 0x18(%rdx)
movq %rcx, -0x18(%rdx)
movq %rcx, 0x20(%rdx)
movaps 0x86b3(%rip), %xmm0     # 0x12be0
movups %xmm0, 0x28(%rdx)
movabsq $-0x319194d7319194d8, %rcx # imm = 0xCE6E6B28CE6E6B28
movq %rcx, 0x38(%rdx)
testl %eax, %eax
jle 0xa5ea
movq %rsi, %r15
movq %rdi, %r12
leaq 0xf0(%rdi), %rax
movq %rax, -0x58(%rbp)
leaq 0xc0(%rdi), %rax
movq %rax, -0x50(%rbp)
leaq 0xd8(%rdi), %rax
movq %rax, -0x48(%rbp)
leaq 0x1f0(%rdi), %rax
movq %rax, -0x40(%rbp)
leaq 0x10(%rdi), %rax
movq %rax, -0x38(%rbp)
xorl %r13d, %r13d
movslq 0x20(%r15), %rax
addq %r13, %rax
movq 0x158(%r12), %rcx
movslq (%rcx,%rax,4), %r14
movq %r8, %rbx
movq %r8, %rdi
leaq 0x8c00(%rip), %rsi      # 0x131a4
movl %r14d, %edx
xorl %eax, %eax
callq 0x2300
imulq $0x6c, %r14, %rdi
addq 0xa8(%r12), %rdi
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %r8
leaq -0xb0(%rbp), %rax
pushq %rax
pushq -0x38(%rbp)
callq 0x9af2
addq $0x10, %rsp
incq %r13
cmpl 0x24(%r15), %r13d
movq %rbx, %r8
jl 0xa584
leaq -0xb0(%rbp), %rdi
movq %r8, %rsi
movq -0x30(%rbp), %rdx
callq 0xef52
leaq -0xb0(%rbp), %rdi
callq 0xec5e
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8b7c(%rip), %rdi      # 0x1319e
movl $0x5, %esi
movl $0x1, %edx
movq %r8, %rcx
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2410
jmp 0xa647
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0xec5e
movq %rbx, %rdi
callq 0x23c0
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/q3bsp.cpp
// Function: Quake3BSP::SaveNodeBsp(dnode_t const*, _IO_FILE*, VFormatOptions&)
void Quake3BSP::SaveNodeBsp(
			const dnode_t *node, 

			FILE *fph,
            VFormatOptions &options)
{

	const dplane_t	*plane;
	
	if (node->planeNum != PLANENUM_LEAF) {
		plane = &mPlanes[node->planeNum];
		//d = DotProduct (origin, plane->normal) - plane->dist;
		// if (d >= 0) node = node->children[0];
		vec3_t normal;

		// is this correct ??
		options.MapVector(plane->normal,normal) ;
	
		fprintf(fph,"BspTree { plane %g %g %g %g \n",normal[0], normal[1],normal[2],plane->dist);

		fprintf(fph,"front "); SaveNode(node->children[0],fph,options);

		fprintf(fph,"back ");SaveNode(node->children[1],fph,options);

		fprintf(fph,"}\n");

	}	else {
#if 0
		portal_t	**pp, *t;
	
		pp = &node->portals;
		while (1)
		{
			t = *pp;
			if (!t)
				break;

/*
			if (t->nodes[0] == l)
				pp = &t->next[0];
			else if (t->nodes[1] == l)
				pp = &t->next[1];
			else
				Error ("RemovePortalFromNode: portal not bounding leaf");
*/
		}

		if (!node->brushlist)
			fprintf (fph,"NULL\n");
		else
		{
			for (bb=node->brushlist ; bb ; bb=bb->next) {
				//_printf ("%i ", bb->original->brushnum);
			}
			//_printf ("\n");
		}
		return;
#endif

	}

}

// Assembly:
movslq (%rsi), %rax
cmpq $-0x1, %rax
je 0xa74e
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
movq 0x128(%rdi), %rcx
shlq $0x4, %rax
movss 0x856b(%rip), %xmm1     # 0x12c00
movss (%rcx,%rax), %xmm0
mulss %xmm1, %xmm0
mulss 0x8(%rcx,%rax), %xmm1
movss 0x4(%rcx,%rax), %xmm2
mulss 0x8552(%rip), %xmm2     # 0x12c04
cvtss2sd %xmm0, %xmm0
cvtss2sd %xmm1, %xmm1
cvtss2sd %xmm2, %xmm2
cvtss2sd 0xc(%rcx,%rax), %xmm3
leaq 0x8aa8(%rip), %rsi      # 0x13173
movq %rdx, %rdi
movb $0x4, %al
callq 0x2300
leaq 0x8ab5(%rip), %rdi      # 0x13191
movl $0x6, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2410
movl 0x4(%r12), %esi
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
callq 0xa49c
leaq 0x8a90(%rip), %rdi      # 0x13198
movl $0x5, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2410
movl 0x8(%r12), %esi
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
callq 0xa49c
leaq 0x96b8(%rip), %rdi      # 0x13dec
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2410
retq
nop
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/./rect.h
// Function: Rect3d<float>::MinMax(float, float, float)
void MinMax(Type x,Type y,Type z)
  {
    if ( x < r1.GetX() ) r1.SetX(x);
    if ( y < r1.GetY() ) r1.SetY(y);
    if ( z < r1.GetZ() ) r1.SetZ(z);

    if ( x > r2.GetX() ) r2.SetX(x);
    if ( y > r2.GetY() ) r2.SetY(y);
    if ( z > r2.GetZ() ) r2.SetZ(z);
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movss (%rdi), %xmm3
ucomiss %xmm0, %xmm3
jbe 0xb76b
movss %xmm0, (%rdi)
movss 0x4(%rdi), %xmm3
ucomiss %xmm1, %xmm3
jbe 0xb77a
movss %xmm1, 0x4(%rdi)
movss 0x8(%rdi), %xmm3
ucomiss %xmm2, %xmm3
jbe 0xb789
movss %xmm2, 0x8(%rdi)
ucomiss 0xc(%rdi), %xmm0
jbe 0xb794
movss %xmm0, 0xc(%rdi)
ucomiss 0x10(%rdi), %xmm1
jbe 0xb79f
movss %xmm1, 0x10(%rdi)
ucomiss 0x14(%rdi), %xmm2
jbe 0xb7aa
movss %xmm2, 0x14(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/q3shader.cpp
// Function: QuakeShaderFactory::~QuakeShaderFactory()
QuakeShaderFactory::~QuakeShaderFactory(void)
{
  QuakeShaderMap::iterator i;
  for (i=mShaders.begin(); i!=mShaders.end(); ++i)
  {
    QuakeShader *shader = (*i).second;
    delete shader;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x48(%rdi), %r14
leaq 0x38(%rdi), %r12
cmpq %r12, %r14
je 0xc8a7
movq 0x28(%r14), %r15
testq %r15, %r15
je 0xc88a
leaq 0x50(%r15), %rdi
callq 0xdcac
movq 0x38(%r15), %rdi
testq %rdi, %rdi
je 0xc872
movq 0x48(%r15), %rsi
subq %rdi, %rsi
callq 0x2230
movq 0x10(%r15), %rdi
leaq 0x20(%r15), %rax
cmpq %rax, %rdi
je 0xc88a
movq (%rax), %rsi
incq %rsi
callq 0x2230
movl $0x68, %esi
movq %r15, %rdi
callq 0x2230
movq %r14, %rdi
callq 0x2190
movq %rax, %r14
cmpq %r12, %rax
jne 0xc84b
leaq 0x30(%rbx), %r14
leaq 0x60(%rbx), %rdi
callq 0xdbf0
movq %r14, %rdi
callq 0xdc4e
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x70b2
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/q3shader.cpp
// Function: QuakeShaderFactory::ShaderString(char const*)
void QuakeShaderFactory::ShaderString(const char *str)
{
  char workspace[1024];

  char *dest = workspace;

  while ( *str )
  {
    if ( str[0] == '/' && str[1] == '/' ) 
		break;
    *dest++ = *str++;
  }
  *dest = 0;
  int len = strlen(workspace);
  if ( len == 0 ) return;

  ArgList::Set( workspace ); // crunch it into arguments.
  // now ready to process it as a series of arguments!
  if ( mArgs.size() ) Process(mArgs);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x420, %rsp            # imm = 0x420
movq %rdi, %rbx
xorl %eax, %eax
movzbl (%rsi,%rax), %ecx
cmpl $0x2f, %ecx
je 0xc9de
testl %ecx, %ecx
jne 0xc9e5
jmp 0xc9f1
cmpb $0x2f, 0x1(%rsi,%rax)
je 0xc9f1
movb %cl, -0x440(%rbp,%rax)
incq %rax
jmp 0xc9cf
movb $0x0, -0x440(%rbp,%rax)
leaq -0x440(%rbp), %rdi
callq 0x2120
testl %eax, %eax
je 0xca74
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
leaq -0x440(%rbp), %r14
movq %r14, %rdi
callq 0x2120
leaq (%rax,%rbp), %rdx
addq $-0x440, %rdx           # imm = 0xFBC0
leaq -0x40(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x6d58
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x6e70
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0xca60
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2230
movq 0x8(%rbx), %rax
cmpq (%rbx), %rax
je 0xca74
movq %rbx, %rdi
movq %rbx, %rsi
callq 0xcaa4
addq $0x420, %rsp            # imm = 0x420
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0xca9c
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x23c0
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/./q3shader.h
// Function: QuakeShader::AddTexture(StringRef const&)
void AddTexture(const StringRef& ref)
  {
    String ifoo = ref;
    //?if ( ifoo == "chrome_env" ) return;
    //?if ( ifoo == "tinfx" ) return;

    mTextures.push_back(ref);
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rsi
leaq -0x38(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x69f2
movq 0x40(%rbx), %rsi
cmpq 0x48(%rbx), %rsi
je 0xdb9b
movq (%r14), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x40(%rbx)
jmp 0xdbaa
addq $0x38, %rbx
movq %rbx, %rdi
movq %r14, %rdx
callq 0xe29e
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdbc3
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x2230
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdbe8
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x23c0
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/vformat.cpp
// Function: ExistsFile(char const*)
bool ExistsFile(const char *path) 
{
	FILE *f = fopen(path,"rb");
	if (!f) 
		return false;
	fclose(f);
	return true;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x3913(%rip), %rsi      # 0x121e8
callq 0x22a0
movq %rax, %rbx
testq %rax, %rax
je 0xe8ea
movq %rbx, %rdi
callq 0x2210
testq %rbx, %rbx
setne %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/vformat.cpp
// Function: VertexLess::operator()(int, int) const
bool VertexLess::operator()(int v1,int v2) const
{

  const LightMapVertex& a = Get(v1);
  const LightMapVertex& b = Get(v2);

  if ( a.GetX() < b.GetX() ) return true;
  if ( a.GetX() > b.GetX() ) return false;

  if ( a.GetY() < b.GetY() ) return true;
  if ( a.GetY() > b.GetY() ) return false;

  if ( a.GetZ() < b.GetZ() ) return true;
  if ( a.GetZ() > b.GetZ() ) return false;

  if ( a.mTexel1.x < b.mTexel1.x ) return true;
  if ( a.mTexel1.x > b.mTexel1.x ) return false;

  if ( a.mTexel1.y < b.mTexel1.y ) return true;
  if ( a.mTexel1.y > b.mTexel1.y ) return false;

  if ( a.mTexel2.x < b.mTexel2.x ) return true;
  if ( a.mTexel2.x > b.mTexel2.x ) return false;

  if ( a.mTexel2.y < b.mTexel2.y ) return true;
  if ( a.mTexel2.y > b.mTexel2.y ) return false;


  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xab19(%rip), %rcx      # 0x196b4
movq %rcx, %rdi
cmpl $-0x1, %esi
je 0xebb8
movq 0xab36(%rip), %rax      # 0x196e0
movslq %esi, %rsi
leaq (%rsi,%rsi,4), %rdi
shlq $0x3, %rdi
addq (%rax), %rdi
cmpl $-0x1, %edx
je 0xebd2
movq 0xab1c(%rip), %rax      # 0x196e0
movslq %edx, %rcx
leaq (%rcx,%rcx,4), %rcx
shlq $0x3, %rcx
addq (%rax), %rcx
movss (%rdi), %xmm0
movss (%rcx), %xmm1
movb $0x1, %al
ucomiss %xmm0, %xmm1
ja 0xebf9
ucomiss %xmm1, %xmm0
jbe 0xebea
xorl %eax, %eax
jmp 0xebf9
movss 0x4(%rdi), %xmm0
movss 0x4(%rcx), %xmm1
ucomiss %xmm0, %xmm1
jbe 0xebfb
popq %rbp
retq
ucomiss %xmm1, %xmm0
ja 0xebe6
movss 0x8(%rdi), %xmm0
movss 0x8(%rcx), %xmm1
ucomiss %xmm0, %xmm1
ja 0xebf9
ucomiss %xmm1, %xmm0
ja 0xebe6
movss 0xc(%rdi), %xmm0
movss 0xc(%rcx), %xmm1
ucomiss %xmm0, %xmm1
ja 0xebf9
ucomiss %xmm1, %xmm0
ja 0xebe6
movss 0x10(%rdi), %xmm0
movss 0x10(%rcx), %xmm1
ucomiss %xmm0, %xmm1
ja 0xebf9
ucomiss %xmm1, %xmm0
ja 0xebe6
movss 0x14(%rdi), %xmm0
movss 0x14(%rcx), %xmm1
ucomiss %xmm0, %xmm1
ja 0xebf9
ucomiss %xmm1, %xmm0
ja 0xebe6
movss 0x18(%rcx), %xmm0
ucomiss 0x18(%rdi), %xmm0
jbe 0xebe6
jmp 0xebf9
nop
// File: /workspace/github_c_makefile_star2_O3/vlenhart[P]q3bsp/vformat.cpp
// Function: VertexMesh::~VertexMesh()
VertexMesh::~VertexMesh(void)
{
  VertexSectionMap::iterator i;
  for (i=mSections.begin(); i!=mSections.end(); ++i)
  {
    VertexSection *section = (*i).second;
    delete section;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %r14
leaq 0x18(%rdi), %r12
cmpq %r12, %r14
je 0xecd2
movq 0x28(%r14), %r15
testq %r15, %r15
je 0xecb5
movq 0x68(%r15), %rdi
testq %rdi, %rdi
je 0xec97
movq 0x78(%r15), %rsi
subq %rdi, %rsi
callq 0x2230
leaq 0x38(%r15), %rdi
callq 0x10a36
movq 0x20(%r15), %rdi
testq %rdi, %rdi
je 0xecb5
movq 0x30(%r15), %rsi
subq %rdi, %rsi
callq 0x2230
movl $0x88, %esi
movq %r15, %rdi
callq 0x2230
movq %r14, %rdi
callq 0x2190
movq %rax, %r14
cmpq %r12, %rax
jne 0xec79
addq $0x10, %rbx
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x10a94