LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x24(%rax)
jne 0x11997
movq -0x18(%rbp), %rdi
leaq 0x18869(%rip), %rsi     # 0x2a1f4
movb $0x0, %al
callq 0x3430
jmp 0x11ac1
movq -0x10(%rbp), %rax
cmpl $0x1, 0x24(%rax)
jle 0x119a3
jmp 0x119a3
leaq -0x78(%rbp), %rdi
callq 0x12b90
movl $0x0, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x24(%rcx), %eax
jge 0x11a99
movq -0x98(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movl -0x7c(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x80(%rbp)
addq $0x158, %rdi            # imm = 0x158
movslq -0x80(%rbp), %rsi
callq 0x132c0
movl (%rax), %eax
movl %eax, -0x80(%rbp)
movq -0x18(%rbp), %rdi
movl -0x80(%rbp), %edx
leaq 0x187fe(%rip), %rsi     # 0x2a1fa
xorl %eax, %eax
callq 0x3430
movq -0x98(%rbp), %rdi
addq $0xa8, %rdi
movslq -0x80(%rbp), %rsi
callq 0x132e0
movq -0x98(%rbp), %r10
movq %rax, %rdi
movq %r10, %rsi
addq $0xf0, %rsi
movq %r10, %rdx
addq $0xc0, %rdx
movq %r10, %rcx
addq $0xd8, %rcx
movq %r10, %r8
addq $0x1f0, %r8             # imm = 0x1F0
movq %r10, %r9
addq $0x8, %r9
addq $0x10, %r10
movq %rsp, %rax
leaq -0x78(%rbp), %r11
movq %r11, 0x8(%rax)
movq %r10, (%rax)
callq 0x107b0
jmp 0x11a6c
jmp 0x11a6e
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x119b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x22380
jmp 0x11aca
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x78(%rbp), %rdi
callq 0x226b0
jmp 0x11aac
movq -0x10(%rbp), %rax
cmpl $0x1, 0x24(%rax)
jle 0x11ab8
jmp 0x11ab8
leaq -0x78(%rbp), %rdi
callq 0x22380
addq $0xb0, %rsp
popq %rbp
retq
movq -0x88(%rbp), %rdi
callq 0x34f0
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
cmpl $-0x1, (%rax)
je 0x11bdb
movq -0x40(%rbp), %rdi
addq $0x128, %rdi            # imm = 0x128
movq -0x10(%rbp), %rax
movslq (%rax), %rsi
callq 0x13220
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq 0x13240
movq -0x18(%rbp), %rdi
movss -0x34(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movss -0x30(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
movss -0x2c(%rbp), %xmm2
cvtss2sd %xmm2, %xmm2
movq -0x28(%rbp), %rax
movss 0xc(%rax), %xmm3
cvtss2sd %xmm3, %xmm3
leaq 0x1865d(%rip), %rsi     # 0x2a1c9
movb $0x4, %al
callq 0x3430
movq -0x18(%rbp), %rdi
leaq 0x18669(%rip), %rsi     # 0x2a1e7
movb $0x0, %al
callq 0x3430
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %esi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x118c0
movq -0x18(%rbp), %rdi
leaq 0x18646(%rip), %rsi     # 0x2a1ee
movb $0x0, %al
callq 0x3430
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %esi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x118c0
movq -0x18(%rbp), %rdi
leaq 0x19227(%rip), %rsi     # 0x2adf9
movb $0x0, %al
callq 0x3430
jmp 0x11bdd
jmp 0x11bdd
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/vlenhart[P]q3bsp/./vformat.h
// Function: VFormatOptions::MapVertex(float*)
void MapVertex (float v[3]) 
	{
    
		const float recip = (1.0f/45.0f);

		v[0]*=recip;
		float tmp=v[1];
		v[1]=v[2]*recip;
		v[2]=tmp * -recip;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movss 0x16b7c(%rip), %xmm0    # 0x29bb0
movss %xmm0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movss 0x16b6b(%rip), %xmm0    # 0x29bb0
mulss (%rax), %xmm0
movss %xmm0, (%rax)
movq -0x10(%rbp), %rax
movss 0x4(%rax), %xmm0
movss %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movss 0x16b49(%rip), %xmm0    # 0x29bb0
mulss 0x8(%rax), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x4(%rax)
movss 0x16b37(%rip), %xmm0    # 0x29bb4
mulss -0x18(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x8(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/vlenhart[P]q3bsp/./vformat.h
// Function: VFormatOptions::MapVector(float const*, float*)
void MapVector(const float v[3],float vout[3]) 
	{
    
		const float recip = (45.0f/1.0f);

		vout[0]=v[0]*recip;
		float tmp=v[1];
		vout[1]=v[2]*recip;
		vout[2]=tmp * -recip;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movss 0x16974(%rip), %xmm0    # 0x29bcc
movss %xmm0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movss 0x16963(%rip), %xmm0    # 0x29bcc
mulss (%rax), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, (%rax)
movq -0x10(%rbp), %rax
movss 0x4(%rax), %xmm0
movss %xmm0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movss 0x1693d(%rip), %xmm0    # 0x29bcc
mulss 0x8(%rax), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x4(%rax)
movss 0x16923(%rip), %xmm0    # 0x29bc8
mulss -0x20(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x8(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movss %xmm0, -0xc(%rbp)
movss %xmm1, -0x10(%rbp)
movss %xmm2, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movss -0xc(%rbp), %xmm0
movss %xmm0, -0x18(%rbp)
callq 0x19000
movss -0x18(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x18efa
movq -0x20(%rbp), %rdi
movss -0xc(%rbp), %xmm0
callq 0x19060
movq -0x20(%rbp), %rdi
movss -0x10(%rbp), %xmm0
movss %xmm0, -0x24(%rbp)
callq 0x19020
movss -0x24(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x18f25
movq -0x20(%rbp), %rdi
movss -0x10(%rbp), %xmm0
callq 0x19080
movq -0x20(%rbp), %rdi
movss -0x14(%rbp), %xmm0
movss %xmm0, -0x28(%rbp)
callq 0x19040
movss -0x28(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x18f50
movq -0x20(%rbp), %rdi
movss -0x14(%rbp), %xmm0
callq 0x190a0
movq -0x20(%rbp), %rdi
movss -0xc(%rbp), %xmm0
movss %xmm0, -0x2c(%rbp)
addq $0xc, %rdi
callq 0x19000
movaps %xmm0, %xmm1
movss -0x2c(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x18f86
movq -0x20(%rbp), %rdi
addq $0xc, %rdi
movss -0xc(%rbp), %xmm0
callq 0x19060
movq -0x20(%rbp), %rdi
movss -0x10(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
addq $0xc, %rdi
callq 0x19020
movaps %xmm0, %xmm1
movss -0x30(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x18fbc
movq -0x20(%rbp), %rdi
addq $0xc, %rdi
movss -0x10(%rbp), %xmm0
callq 0x19080
movq -0x20(%rbp), %rdi
movss -0x14(%rbp), %xmm0
movss %xmm0, -0x34(%rbp)
addq $0xc, %rdi
callq 0x19040
movaps %xmm0, %xmm1
movss -0x34(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x18ff2
movq -0x20(%rbp), %rdi
addq $0xc, %rdi
movss -0x14(%rbp), %xmm0
callq 0x190a0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x1cdb0
movq -0x30(%rbp), %rdi
addq $0x30, %rdi
callq 0x1cdd0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x30(%rbp), %rdi
addq $0x30, %rdi
callq 0x1ce30
movq %rax, -0x20(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1ce00
testb $0x1, %al
jne 0x1b3da
jmp 0x1b41d
leaq -0x10(%rbp), %rdi
callq 0x1ce60
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x1b410
movq -0x38(%rbp), %rdi
callq 0x1ce80
movq -0x38(%rbp), %rdi
movl $0x68, %esi
callq 0x32b0
jmp 0x1b412
leaq -0x10(%rbp), %rdi
callq 0x1cec0
jmp 0x1b3b6
movq -0x30(%rbp), %rdi
addq $0x60, %rdi
callq 0x1cd70
movq -0x30(%rbp), %rdi
addq $0x30, %rdi
callq 0x1cd90
movq -0x30(%rbp), %rdi
callq 0xae90
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/vlenhart[P]q3bsp/q3shader.cpp
// Function: QuakeShaderFactory::Locate(StringRef const&)
QuakeShader * QuakeShaderFactory::Locate(const StringRef &str)
{
  QuakeShaderMap::iterator found;
  found = mShaders.find(str);
  if ( found != mShaders.end() ) return (*found).second;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x1cdb0
movq -0x38(%rbp), %rdi
addq $0x30, %rdi
movq -0x18(%rbp), %rsi
callq 0x1cef0
movq -0x38(%rbp), %rdi
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
addq $0x30, %rdi
callq 0x1ce30
movq %rax, -0x30(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1ce00
testb $0x1, %al
jne 0x1b4f2
jmp 0x1b505
leaq -0x20(%rbp), %rdi
callq 0x1ce60
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x1b50d
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/vlenhart[P]q3bsp/q3shader.cpp
// Function: QuakeShaderFactory::ShaderFileLoaded(StringRef const&)
bool 
QuakeShaderFactory::ShaderFileLoaded(const StringRef &str)
{
  QuakeShaderFileMap::iterator found;
  found = mShaderFiles.find(str);
  if ( found != mShaderFiles.end() ) 
	  return (*found).second;
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x1cf20
movq -0x38(%rbp), %rdi
addq $0x60, %rdi
movq -0x18(%rbp), %rsi
callq 0x1cf40
movq -0x38(%rbp), %rdi
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
addq $0x60, %rdi
callq 0x1cfa0
movq %rax, -0x30(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1cf70
testb $0x1, %al
jne 0x1b582
jmp 0x1b595
leaq -0x20(%rbp), %rdi
callq 0x1cfd0
movb 0x8(%rax), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x1b599
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x470, %rsp            # imm = 0x470
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x460(%rbp)
leaq -0x410(%rbp), %rax
movq %rax, -0x418(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1b62a
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x1b600
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0x1b600
jmp 0x1b62a
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb (%rax), %cl
movq -0x418(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x418(%rbp)
movb %cl, (%rax)
jmp 0x1b5dc
movq -0x418(%rbp), %rax
movb $0x0, (%rax)
leaq -0x410(%rbp), %rdi
callq 0x3150
movl %eax, -0x41c(%rbp)
cmpl $0x0, -0x41c(%rbp)
jne 0x1b654
jmp 0x1b718
leaq -0x441(%rbp), %rdi
movq %rdi, -0x468(%rbp)
callq 0x3500
movq -0x468(%rbp), %rdx
leaq -0x440(%rbp), %rdi
leaq -0x410(%rbp), %rsi
callq 0x92b0
jmp 0x1b683
movq -0x460(%rbp), %rdi
leaq -0x440(%rbp), %rsi
movl $0x1, %edx
callq 0xaac0
jmp 0x1b69d
leaq -0x440(%rbp), %rdi
callq 0x3180
leaq -0x441(%rbp), %rdi
callq 0x32e0
movq -0x460(%rbp), %rdi
callq 0xb750
cmpq $0x0, %rax
je 0x1b718
movq -0x460(%rbp), %rsi
movq %rsi, %rdi
callq 0x1b730
jmp 0x1b718
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x450(%rbp)
movl %eax, -0x454(%rbp)
jmp 0x1b70a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x450(%rbp)
movl %eax, -0x454(%rbp)
leaq -0x440(%rbp), %rdi
callq 0x3180
leaq -0x441(%rbp), %rdi
callq 0x32e0
jmp 0x1b721
addq $0x470, %rsp            # imm = 0x470
popq %rbp
retq
movq -0x450(%rbp), %rdi
callq 0x34f0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/vlenhart[P]q3bsp/q3shader.cpp
// Function: QuakeShaderFactory::GetName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char*)
bool QuakeShaderFactory::GetName(const String &str,char *tname)
{
  int len = str.size();
  if ( !len ) return false;
  const char *foo = str.c_str();
  foo = &foo[len-1];
  while ( *foo && *foo != '/' ) foo--;
  if ( !*foo ) return false;
  foo++;
  char *dest = tname;
  while ( *foo )
  {
    *dest++ = *foo++;
  }
  *dest = 0;
  
  len = strlen(tname);
  if ( len >= 4 )
  {
    if ( tname[len-4] == '.' )
    {
      tname[len-4] = 0;
    }
  }
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x31f0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x1cc2f
movb $0x0, -0x1(%rbp)
jmp 0x1cd1e
movq -0x18(%rbp), %rdi
callq 0x3130
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x39(%rbp)
je 0x1cc6e
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
setne %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x1cc77
jmp 0x1cc85
movq -0x30(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x1cc50
movq -0x30(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x1cc97
movb $0x0, -0x1(%rbp)
jmp 0x1cd1e
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1ccd8
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movb (%rax), %cl
movq -0x38(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x38(%rbp)
movb %cl, (%rax)
jmp 0x1ccab
movq -0x38(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rdi
callq 0x3150
movl %eax, -0x24(%rbp)
cmpl $0x4, -0x24(%rbp)
jl 0x1cd1a
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
subl $0x4, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2e, %eax
jne 0x1cd18
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
subl $0x4, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
jmp 0x1cd1a
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/vlenhart[P]q3bsp/./q3shader.h
// Function: QuakeShader::QuakeShader(StringRef const&)
QuakeShader(const StringRef &ref)
  {
    mName = ref;
	mTrans = false;
	mNoLightMap = false;
	mSky = false;
	mLightMapStage=0;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
callq 0x9750
movq -0x28(%rbp), %rdi
addq $0x10, %rdi
movq %rdi, -0x30(%rbp)
callq 0x3410
movq -0x28(%rbp), %rdi
addq $0x30, %rdi
callq 0x9750
jmp 0x1d2ad
movq -0x28(%rbp), %rdi
addq $0x38, %rdi
movq %rdi, -0x40(%rbp)
callq 0x1f2c0
movq -0x28(%rbp), %rdi
addq $0x50, %rdi
movq %rdi, -0x38(%rbp)
callq 0x1f2e0
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x30, %rdi
callq 0xdca0
jmp 0x1d2e2
movq -0x28(%rbp), %rax
movb $0x0, 0x8(%rax)
movb $0x0, 0x9(%rax)
movb $0x0, 0xa(%rax)
movl $0x0, 0xc(%rax)
addq $0x40, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x1d32b
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x1dd10
movq -0x40(%rbp), %rdi
callq 0x1dd70
movq -0x30(%rbp), %rdi
callq 0x3180
movq -0x18(%rbp), %rdi
callq 0x34f0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x73e0(%rip), %rsi      # 0x29157
callq 0x3370
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x21d8d
movb $0x0, -0x1(%rbp)
jmp 0x21d9a
movq -0x18(%rbp), %rdi
callq 0x3290
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x24ae0
movq -0x30(%rbp), %rdi
addq $0x10, %rdi
callq 0x24b00
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x30(%rbp), %rdi
addq $0x10, %rdi
callq 0x24b60
movq %rax, -0x20(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x24b30
testb $0x1, %al
jne 0x223da
jmp 0x2241d
leaq -0x10(%rbp), %rdi
callq 0x24b90
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x22410
movq -0x38(%rbp), %rdi
callq 0x24bb0
movq -0x38(%rbp), %rdi
movl $0x88, %esi
callq 0x32b0
jmp 0x22412
leaq -0x10(%rbp), %rdi
callq 0x24be0
jmp 0x223b6
movq -0x30(%rbp), %rdi
addq $0x10, %rdi
callq 0x13ab0
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/vlenhart[P]q3bsp/vformat.cpp
// Function: VertexMesh::AddTri(StringRef const&, LightMapVertex const&, LightMapVertex const&, LightMapVertex const&)
void VertexMesh::AddTri(const StringRef &name,const LightMapVertex &v1,const LightMapVertex &v2,const LightMapVertex &v3)
{
  VertexSection *section;

  if ( name == mLastName )
  {
    section = mLastSection;
  }
  else
  {
    VertexSectionMap::iterator found;
    found = mSections.find( name );
    if ( found != mSections.end() )
    {
      section = mLastSection = (*found).second;
      mLastName = name;
    }
    else
    {
      mLastSection = section = new VertexSection( name );
      mSections[name] = section;
      mLastName = name;
    }
  }

  assert( section );

  section->AddTri( v1, v2, v3 );

  mBound.MinMax( v1.mPos );
  mBound.MinMax( v2.mPos );
  mBound.MinMax( v3.mPos );

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x60(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rsi
callq 0x24c10
testb $0x1, %al
jne 0x22467
jmp 0x22477
movq -0x60(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x22563
leaq -0x38(%rbp), %rdi
callq 0x24ae0
movq -0x60(%rbp), %rdi
addq $0x10, %rdi
movq -0x10(%rbp), %rsi
callq 0x24c40
movq -0x60(%rbp), %rdi
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
addq $0x10, %rdi
callq 0x24b60
movq %rax, -0x48(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x24b30
testb $0x1, %al
jne 0x224c1
jmp 0x224e8
leaq -0x38(%rbp), %rdi
callq 0x24b90
movq -0x60(%rbp), %rdi
movq 0x8(%rax), %rax
movq %rax, (%rdi)
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rsi
addq $0x8, %rdi
callq 0xdca0
jmp 0x22561
movl $0x88, %edi
callq 0x32a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rsi
callq 0x24c70
jmp 0x22507
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rdi)
movq -0x30(%rbp), %rax
movq %rax, -0x70(%rbp)
addq $0x10, %rdi
movq -0x10(%rbp), %rsi
callq 0x24d20
movq -0x70(%rbp), %rcx
movq -0x60(%rbp), %rdi
movq %rcx, (%rax)
movq -0x10(%rbp), %rsi
addq $0x8, %rdi
callq 0xdca0
jmp 0x22561
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
movl $0x88, %esi
callq 0x32b0
jmp 0x225d9
jmp 0x22563
cmpq $0x0, -0x30(%rbp)
je 0x2256c
jmp 0x2258b
leaq 0x8263(%rip), %rdi      # 0x2a7d6
leaq 0x8264(%rip), %rsi      # 0x2a7de
movl $0xb8, %edx
leaq 0x8264(%rip), %rcx      # 0x2a7ea
callq 0x31c0
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x225f0
movq -0x60(%rbp), %rdi
addq $0x40, %rdi
movq -0x18(%rbp), %rsi
callq 0x12940
movq -0x60(%rbp), %rdi
addq $0x40, %rdi
movq -0x20(%rbp), %rsi
callq 0x12940
movq -0x60(%rbp), %rdi
addq $0x40, %rdi
movq -0x28(%rbp), %rsi
callq 0x12940
addq $0x70, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x34f0
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/vlenhart[P]q3bsp/vformat.cpp
// Function: VertexSection::AddTri(LightMapVertex const&, LightMapVertex const&, LightMapVertex const&)
void VertexSection::AddTri(const LightMapVertex &v1,
            const LightMapVertex &v2,
            const LightMapVertex &v3)
{
  mBound.MinMax(v1.mPos);
  mBound.MinMax(v2.mPos);
  mBound.MinMax(v3.mPos);

  AddPoint(v1);
  AddPoint(v2);
  AddPoint(v3);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
callq 0x12940
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rsi
callq 0x12940
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movq -0x20(%rbp), %rsi
callq 0x12940
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x22670
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x22670
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x22670
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/vlenhart[P]q3bsp/vformat.cpp
// Function: VertexMesh::SaveVRML2(_IO_FILE*, VFormatOptions&) const
void VertexMesh::SaveVRML2(
			FILE *fph,
            VFormatOptions &options) const 
{
	if ( mSections.size() )
	{
		
		if ( fph )
		{
			//fprintf(fph,"#VRML V2.0 utf8 generated by QBSP \n");
			if (mSections.size() >0) {
				fprintf(fph,"Group {\n");
				fprintf(fph,"children [\n");
			}	
			VertexSectionMap::const_iterator i;
			
			for (i=mSections.begin(); i!=mSections.end(); ++i)
			{
				(*i).second->SaveVRML2(fph,options);
			}
			if (mSections.size() >0) {
				
				fprintf(fph,"\n]\n}\n");
			}
			
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
addq $0x10, %rdi
callq 0x24f10
cmpq $0x0, %rax
je 0x227b5
cmpq $0x0, -0x10(%rbp)
je 0x227b3
movq -0x38(%rbp), %rdi
addq $0x10, %rdi
callq 0x24f10
cmpq $0x0, %rax
jbe 0x22721
movq -0x10(%rbp), %rdi
leaq 0x7aa8(%rip), %rsi      # 0x2a1b0
movb $0x0, %al
callq 0x3430
movq -0x10(%rbp), %rdi
leaq 0x7a9f(%rip), %rsi      # 0x2a1b9
movb $0x0, %al
callq 0x3430
leaq -0x20(%rbp), %rdi
callq 0x24f30
movq -0x38(%rbp), %rdi
addq $0x10, %rdi
callq 0x24f50
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x38(%rbp), %rdi
addq $0x10, %rdi
callq 0x24fb0
movq %rax, -0x30(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x24f80
testb $0x1, %al
jne 0x22767
jmp 0x2278c
leaq -0x20(%rbp), %rdi
callq 0x24fe0
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x227c0
leaq -0x20(%rbp), %rdi
callq 0x25000
jmp 0x22743
movq -0x38(%rbp), %rdi
addq $0x10, %rdi
callq 0x24f10
cmpq $0x0, %rax
jbe 0x227b1
movq -0x10(%rbp), %rdi
leaq 0x80b3(%rip), %rsi      # 0x2a85d
movb $0x0, %al
callq 0x3430
jmp 0x227b3
jmp 0x227b5
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/vlenhart[P]q3bsp/vformat.cpp
// Function: VertexMesh::SaveVRML(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const
void VertexMesh::SaveVRML(const String &name,  // base file name
              bool tex1) const           // texture channel 1=(true)
{
  if ( mSections.size() )
  {
    String oname = name+".wrl";
    FILE *fph = fopen(oname.c_str(),"wb");

    if ( fph )
    {
      fprintf(fph,"#VRML V1.0 ascii\n");
      fprintf(fph,"Separator {\n");
      fprintf(fph,"  ShapeHints {\n");
      fprintf(fph,"    shapeType SOLID\n");
      fprintf(fph,"    vertexOrdering COUNTERCLOCKWISE\n");
      fprintf(fph,"    faceType CONVEX\n");
      fprintf(fph,"  }\n");

      VertexSectionMap::const_iterator i;

      for (i=mSections.begin(); i!=mSections.end(); ++i)
      {
        (*i).second->SaveVRML(fph,tex1);
      }

      fprintf(fph,"}\n");

      fclose(fph);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x70(%rbp)
addq $0x10, %rdi
callq 0x24f10
cmpq $0x0, %rax
je 0x23a0d
movq -0x10(%rbp), %rsi
leaq 0x5ffd(%rip), %rdx      # 0x2989d
leaq -0x38(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x9360
movq -0x80(%rbp), %rdi
callq 0x3130
movq %rax, %rdi
leaq 0x5973(%rip), %rsi      # 0x29233
callq 0x3370
movq %rax, -0x78(%rbp)
jmp 0x238cb
movq -0x78(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x23a04
movq -0x40(%rbp), %rdi
leaq 0x6f7a(%rip), %rsi      # 0x2a863
movb $0x0, %al
callq 0x3430
movq -0x40(%rbp), %rdi
leaq 0x6fe4(%rip), %rsi      # 0x2a8df
movb $0x0, %al
callq 0x3430
movq -0x40(%rbp), %rdi
leaq 0x6f68(%rip), %rsi      # 0x2a875
movb $0x0, %al
callq 0x3430
movq -0x40(%rbp), %rdi
leaq 0x6f66(%rip), %rsi      # 0x2a885
movb $0x0, %al
callq 0x3430
movq -0x40(%rbp), %rdi
leaq 0x6f69(%rip), %rsi      # 0x2a89a
movb $0x0, %al
callq 0x3430
movq -0x40(%rbp), %rdi
leaq 0x6f7c(%rip), %rsi      # 0x2a8bf
movb $0x0, %al
callq 0x3430
movq -0x40(%rbp), %rdi
leaq 0x7114(%rip), %rsi      # 0x2aa69
movb $0x0, %al
callq 0x3430
leaq -0x58(%rbp), %rdi
callq 0x24f30
movq -0x70(%rbp), %rdi
addq $0x10, %rdi
callq 0x24f50
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x70(%rbp), %rdi
addq $0x10, %rdi
callq 0x24fb0
movq %rax, -0x68(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x24f80
testb $0x1, %al
jne 0x239a2
jmp 0x239e5
leaq -0x58(%rbp), %rdi
callq 0x24fe0
movq 0x8(%rax), %rdi
movq -0x40(%rbp), %rsi
movzbl -0x11(%rbp), %edx
andl $0x1, %edx
callq 0x23a20
jmp 0x239c1
jmp 0x239c3
leaq -0x58(%rbp), %rdi
callq 0x25000
jmp 0x2397e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3180
jmp 0x23a16
movq -0x40(%rbp), %rdi
leaq 0x7409(%rip), %rsi      # 0x2adf9
xorl %eax, %eax
callq 0x3430
movq -0x40(%rbp), %rdi
callq 0x3290
jmp 0x23a02
jmp 0x23a04
leaq -0x38(%rbp), %rdi
callq 0x3180
addq $0x80, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x34f0
nop
// File: /workspace/github_c_makefile_star2_O0/vlenhart[P]q3bsp/./vformat.h
// Function: VertexPool::GetVertex(LightMapVertex const&)
int GetVertex(const LightMapVertex& vtx)
  {
    VertexLess::SetSearch(vtx,&mVtxs);
    VertexSet::iterator found;
    found = mVertSet.find( -1 );
    if ( found != mVertSet.end() )
    {
      return *found;
    }
    int idx = mVtxs.size();
    assert( idx >= 0 && idx < 65536 );
    mVtxs.push_back( vtx );
    mVertSet.insert( idx );
    return idx;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x58(%rbp)
movq -0x18(%rbp), %rdi
addq $0x30, %rsi
callq 0x25ac0
leaq -0x20(%rbp), %rdi
callq 0x25b00
movq -0x58(%rbp), %rdi
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
leaq -0x2c(%rbp), %rsi
callq 0x25b20
movq -0x58(%rbp), %rdi
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
callq 0x25b90
movq %rax, -0x38(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x25b60
testb $0x1, %al
jne 0x24e6e
jmp 0x24e7e
leaq -0x20(%rbp), %rdi
callq 0x25bc0
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x24efb
movq -0x58(%rbp), %rdi
addq $0x30, %rdi
callq 0x25090
movl %eax, -0x3c(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x3c(%rbp)
movb %al, -0x59(%rbp)
jl 0x24ea6
cmpl $0x10000, -0x3c(%rbp)   # imm = 0x10000
setl %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x24eaf
jmp 0x24eb1
jmp 0x24ed0
leaq 0x5f85(%rip), %rdi      # 0x2ae3d
leaq 0x5f96(%rip), %rsi      # 0x2ae55
movl $0xf7, %edx
leaq 0x5f96(%rip), %rcx      # 0x2ae61
callq 0x31c0
movq -0x58(%rbp), %rdi
addq $0x30, %rdi
movq -0x18(%rbp), %rsi
callq 0x25be0
movq -0x58(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
callq 0x25c50
movq %rax, -0x50(%rbp)
movb %dl, -0x48(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/rchiossi[P]dexterity/lib/bytestream.c
// Function: bsalloc
ByteStream* bsalloc(unsigned int size) {
  ByteStream* bs = (ByteStream*) malloc_s(sizeof(ByteStream));

  if (bs == NULL) {
    printf("ERROR: Cannot allocate bytestream structure.\n");
    exit(-1);
  }

  bs->filename = NULL;
  bs->size = size;

  bs->exhausted = 0;
  bs->offset = 0;
  
  bs->data = (uint8_t*) mmap(NULL, size, PROT_READ | PROT_WRITE, 
			     MAP_PRIVATE | MAP_ANONYMOUS, -1, 0x0);

  if (bs->data == MAP_FAILED) {
    free(bs);
    printf("ERROR: Unable to map memory.\n");
    exit(-1);
  }

  return bs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl $0x20, %edi
callq 0x4750
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4b08
leaq 0x9509(%rip), %rdi      # 0xe000
movb $0x0, %al
callq 0x4290
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x4890
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movl -0x4(%rbp), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x18(%rax)
movl -0x4(%rbp), %eax
movl %eax, %esi
xorl %eax, %eax
movl %eax, %r9d
movl $0x3, %edx
movl $0x22, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movq %r9, %rdi
callq 0x4250
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq $-0x1, %rcx
cmpq %rcx, 0x10(%rax)
jne 0x4b95
movq -0x10(%rbp), %rdi
callq 0x4080
leaq 0x94aa(%rip), %rdi      # 0xe02e
movb $0x0, %al
callq 0x4290
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x4890
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/rchiossi[P]dexterity/lib/bytestream.c
// Function: bsmap
ByteStream* bsmap(char* filename) {
  int fd;
  struct stat fdstat;
  ByteStream* bs;

  fd = open(filename,O_RDONLY);

  if (fd == -1) {
    printf("ERROR: File %s doesn't exists or cannot be read.\n",filename);
    exit(-1);
  }

  if (fstat(fd, &fdstat) == -1) {
    close(fd);
    printf("ERROR: Unable to get file size for %s.\n",filename);
    exit(-1);
  }

  bs = (ByteStream*) malloc_s(sizeof(ByteStream));

  if (bs == NULL) {
    close(fd);
    printf("ERROR: Cannot allocate bytestream structure.\n");
    exit(-1);
  }

  bs->filename = filename;
  bs->size = fdstat.st_size;

  bs->exhausted = 0;
  bs->offset = 0;
  
  bs->data = (uint8_t*) mmap(NULL, bs->size, PROT_READ | PROT_WRITE,
			     MAP_PRIVATE,fd,0x0);

  if (bs->data == MAP_FAILED) {
    free(bs);
    close(fd);
    printf("ERROR: Unable to map file.\n");
    exit(-1);
  }

  close(fd); 

  return bs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x47d0
movl %eax, -0xc(%rbp)
cmpl $-0x1, -0xc(%rbp)
jne 0x4be1
movq -0x8(%rbp), %rsi
leaq 0x947c(%rip), %rdi      # 0xe04c
movb $0x0, %al
callq 0x4290
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x4890
movl -0xc(%rbp), %edi
leaq -0xa0(%rbp), %rsi
callq 0x4970
cmpl $-0x1, %eax
jne 0x4c19
movl -0xc(%rbp), %edi
callq 0x4360
movq -0x8(%rbp), %rsi
leaq 0x9476(%rip), %rdi      # 0xe07e
movb $0x0, %al
callq 0x4290
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x4890
movl $0x20, %edi
callq 0x4750
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0xa8(%rbp)
jne 0x4c54
movl -0xc(%rbp), %edi
callq 0x4360
leaq 0x93bd(%rip), %rdi      # 0xe000
movb $0x0, %al
callq 0x4290
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x4890
movq -0x8(%rbp), %rcx
movq -0xa8(%rbp), %rax
movq %rcx, (%rax)
movq -0x70(%rbp), %rcx
movq -0xa8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0xa8(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0xa8(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rsi
movl -0xc(%rbp), %r8d
xorl %eax, %eax
movl %eax, %r9d
movl $0x3, %edx
movl $0x2, %ecx
movq %r9, %rdi
callq 0x4250
movq %rax, %rcx
movq -0xa8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0xa8(%rbp), %rax
movq $-0x1, %rcx
cmpq %rcx, 0x10(%rax)
jne 0x4d01
movq -0xa8(%rbp), %rdi
callq 0x4080
movl -0xc(%rbp), %edi
callq 0x4360
leaq 0x93b6(%rip), %rdi      # 0xe0a6
movb $0x0, %al
callq 0x4290
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x4890
movl -0xc(%rbp), %edi
callq 0x4360
movq -0xa8(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/rchiossi[P]dexterity/lib/bytestream.c
// Function: bsfree
int bsfree(ByteStream* bs) {
  int ret = 0;

  if (bs->data != NULL) {
    ret = munmap(bs->data,bs->size);
  }

  free(bs);

  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x4d56
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x4710
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4080
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/rchiossi[P]dexterity/lib/bytestream.c
// Function: bsread_offset
unsigned int bsread_offset(ByteStream* bs, uint8_t* buf, size_t size, uint32_t offset) {

  if (offset >= bs->size) {
    bs->exhausted = 1;
    return 0;
  }

  bs->offset = offset;
  bs->exhausted = 0;

  return bsread(bs,buf,size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jb 0x5018
movq -0x10(%rbp), %rax
movl $0x1, 0x1c(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x5041
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x4500
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/rchiossi[P]dexterity/lib/bytestream.c
// Function: bswrite_offset
unsigned int bswrite_offset(ByteStream* bs, uint8_t* buf, size_t size, uint32_t offset) {

  if (offset >= bs->size) {
    bs->exhausted = 1;
    return 0;
  }

  bs->offset = offset;
  bs->exhausted = 0;

  return bswrite(bs,buf,size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jb 0x5298
movq -0x10(%rbp), %rax
movl $0x1, 0x1c(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x52c3
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movl %eax, %edx
callq 0x4690
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/rchiossi[P]dexterity/lib/bytestream.c
// Function: bssave
int bssave(ByteStream* bs, char* filename) {
  FILE* f = fopen(filename,"w");

  if (bs == NULL || f == NULL) return -1;

  fwrite(bs->data, 1, bs->size, f);

  fflush(f);
  fclose(f);    
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x8dd7(%rip), %rsi      # 0xe0c2
callq 0x4800
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x5302
cmpq $0x0, -0x20(%rbp)
jne 0x530b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5342
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x20(%rbp), %rcx
movl $0x1, %esi
callq 0x48a0
movq -0x20(%rbp), %rdi
callq 0x45c0
movq -0x20(%rbp), %rdi
callq 0x41b0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_stringdata
void dxb_stringdata(ByteStream* bs, DexStringDataItem* obj) {
  uint8_t* tape;
  char end[] = "\x00";

  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  l128write(bs,&(obj->size));

  tape = (uint8_t*) obj->data;

  if (ul128toui(obj->size) != 0x0) {
    while(*tape) {
      bswrite(bs,tape,sizeof(uint8_t));

      if ((*tape & 0xe0) == 0xc0 ) {
	tape += 1;
	bswrite(bs,tape,sizeof(uint8_t));
      }

      else if ((*tape & 0xf0) == 0xe0) {
	tape += 1;
	bswrite(bs,tape,sizeof(uint8_t)*2);
	tape += 1;
      }

      tape++;
    }
  }

  bswrite(bs,(uint8_t*)end,sizeof(uint8_t));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x1a(%rbp), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x4310
cmpq $0x0, -0x8(%rbp)
je 0x55fe
cmpq $0x0, -0x10(%rbp)
jne 0x5603
jmp 0x570f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %esi
callq 0x44f0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x4570
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x30(%rbp)
movl 0x10(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x30(%rbp), %rdi
movl -0x28(%rbp), %esi
callq 0x41c0
cmpl $0x0, %eax
je 0x56fd
jmp 0x5659
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x56fb
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x1, %edx
callq 0x4690
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
andl $0xe0, %eax
cmpl $0xc0, %eax
jne 0x56ab
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x1, %edx
callq 0x4690
jmp 0x56ea
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
andl $0xf0, %eax
cmpl $0xe0, %eax
jne 0x56e8
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x2, %edx
callq 0x4690
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x56ea
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x5659
jmp 0x56fd
movq -0x8(%rbp), %rdi
leaq -0x1a(%rbp), %rsi
movl $0x1, %edx
callq 0x4690
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_encodedfield
void dxb_encodedfield(ByteStream* bs, DexEncodedFieldItem* obj) {
  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  l128write(bs,&(obj->field_idx_diff));
  l128write(bs,&(obj->access_flags));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x573e
cmpq $0x0, -0x10(%rbp)
jne 0x5740
jmp 0x5772
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %esi
callq 0x44f0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x4570
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x14, %rsi
callq 0x4570
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_encodedmethod
void dxb_encodedmethod(ByteStream* bs, DexEncodedMethodItem* obj) {
  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);
  l128write(bs,&(obj->method_idx_diff));
  l128write(bs,&(obj->access_flags));
  l128write(bs,&(obj->code_off));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x579e
cmpq $0x0, -0x10(%rbp)
jne 0x57a0
jmp 0x57e3
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %esi
callq 0x44f0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x4570
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x14, %rsi
callq 0x4570
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x20, %rsi
callq 0x4570
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_typelist
void dxb_typelist(ByteStream* bs, DexTypeList* obj) {
  unsigned int i;

  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  bswrite(bs,(uint8_t*) &(obj->size),sizeof(uint32_t));

  for (i=0; i<obj->size; i++)
    dxb_typeitem(bs,obj->list[i]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x5a3e
cmpq $0x0, -0x10(%rbp)
jne 0x5a40
jmp 0x5a9c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %esi
callq 0x44f0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
movl $0x4, %edx
callq 0x4690
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x5a9c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
callq 0x4640
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5a6d
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_encodedtypeaddrpair
void dxb_encodedtypeaddrpair(ByteStream* bs, DexEncodedTypeAddrPair* obj) {
  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  l128write(bs,&(obj->type_idx));
  l128write(bs,&(obj->addr));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x5b1e
cmpq $0x0, -0x10(%rbp)
jne 0x5b20
jmp 0x5b52
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %esi
callq 0x44f0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x4570
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x14, %rsi
callq 0x4570
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_encodedcatchhandler
void dxb_encodedcatchhandler(ByteStream* bs, DexEncodedCatchHandler* obj) {
  int i;

  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  l128write(bs,&(obj->size));

  for (i=0; i<abs(sl128toi(obj->size)); i++)
    dxb_encodedtypeaddrpair(bs,obj->handlers[i]);

  if (sl128toi(obj->size) <= 0) 
    l128write(bs,&(obj->catch_all_addr));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x5b7e
cmpq $0x0, -0x10(%rbp)
jne 0x5b83
jmp 0x5c37
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %esi
callq 0x44f0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x4570
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x28(%rbp)
movl 0x10(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x28(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0x45e0
movl %eax, %ecx
movl -0x3c(%rbp), %eax
movl %ecx, %edx
negl %edx
cmovnsl %edx, %ecx
cmpl %ecx, %eax
jge 0x5c03
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x4410
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5bab
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x38(%rbp)
movl 0x10(%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x38(%rbp), %rdi
movl -0x30(%rbp), %esi
callq 0x45e0
cmpl $0x0, %eax
jg 0x5c37
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x20, %rsi
callq 0x4570
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/rchiossi[P]dexterity/lib/dex_builder.c
// Function: dxb_encodedcatchhandlerlist
void dxb_encodedcatchhandlerlist(ByteStream* bs, DexEncodedCatchHandlerList* obj) {
  unsigned int i;

  if (bs == NULL || obj == NULL) return;

  bsseek(bs,obj->meta.offset);

  l128write(bs,&(obj->size));

  for (i=0; i<ul128toui(obj->size); i++)
    dxb_encodedcatchhandler(bs,obj->list[i]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x5c5e
cmpq $0x0, -0x10(%rbp)
jne 0x5c60
jmp 0x5cd8
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %esi
callq 0x44f0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x4570
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x28(%rbp)
movl 0x10(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x28(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0x41c0
movl %eax, %ecx
movl -0x2c(%rbp), %eax
cmpl %ecx, %eax
jae 0x5cd8
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
callq 0x44e0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5c88
addq $0x30, %rsp
popq %rbp
retq
nop