LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/Nealsbo[P]C-Software-Renderer/src/libmath.c
// Function: mat4_roty
void mat4_roty( mat4 dest, float r ){
    mat4 m = {
        cos(r), 0.0f, -sin(r), 0.0f,
          0.0f, 1.0f,    0.0f, 0.0f,
        sin(r), 0.0f,  cos(r), 0.0f,
          0.0f, 0.0f,    0.0f, 1.0f };
    mat4_copy(m, dest);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
cvtss2sd %xmm0, %xmm0
movsd %xmm0, (%rsp)
callq 0x1260
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
movsd (%rsp), %xmm0
callq 0x1080
cvtsd2ss %xmm0, %xmm0
xorps 0x346d(%rip), %xmm0     # 0x7150
movaps %xmm0, 0x10(%rsp)
movsd (%rsp), %xmm0
callq 0x1080
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0x1260
movss 0xc(%rsp), %xmm1
movss %xmm1, (%rbx)
andl $0x0, 0x4(%rbx)
cvtsd2ss %xmm0, %xmm0
movaps 0x10(%rsp), %xmm1
movss %xmm1, 0x8(%rbx)
movaps 0x3657(%rip), %xmm1     # 0x7380
movups %xmm1, 0xc(%rbx)
andl $0x0, 0x1c(%rbx)
movss 0x8(%rsp), %xmm1
movss %xmm1, 0x20(%rbx)
andl $0x0, 0x24(%rbx)
movss %xmm0, 0x28(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x2c(%rbx)
movl $0x3f800000, 0x3c(%rbx) # imm = 0x3F800000
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Nealsbo[P]C-Software-Renderer/src/libmath.c
// Function: mat4_rotz
void mat4_rotz( mat4 dest, float r ){
    mat4 m = {
         cos(r), sin(r), 0.0f, 0.0f,
        -sin(r), cos(r), 0.0f, 0.0f,
           0.0f,   0.0f, 1.0f, 0.0f,
           0.0f,   0.0f, 0.0f, 1.0f };

    mat4_copy(m, dest);
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x1260
movaps %xmm0, 0x30(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x1080
movaps %xmm0, 0x20(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x1080
cvtsd2ss %xmm0, %xmm0
xorps 0x33b5(%rip), %xmm0     # 0x7150
movaps %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x1260
cvtsd2ss %xmm0, %xmm0
movapd 0x30(%rsp), %xmm1
unpcklpd 0x20(%rsp), %xmm1       # xmm1 = xmm1[0],mem[0]
cvtpd2ps %xmm1, %xmm1
movupd %xmm1, (%rbx)
movaps 0x10(%rsp), %xmm1
movss %xmm1, 0x10(%rbx)
movss %xmm0, 0x14(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
movl $0x3f800000, %eax       # imm = 0x3F800000
movl %eax, 0x28(%rbx)
movups %xmm0, 0x2c(%rbx)
movl %eax, 0x3c(%rbx)
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Nealsbo[P]C-Software-Renderer/src/libmath.c
// Function: mat4_projection
void mat4_projection( mat4 dest, float n, float f, float fov, float aspect ){
    float s = 1.0f/tanf(fov * 0.5f * M_PI / 180.0f);
    float zr = n - f;
    
    mat4 m = {
            s/aspect, 0.0f,      0.0f,        0.0f,
                0.0f,    s,      0.0f,        0.0f,
                0.0f, 0.0f, (-n-f)/zr, 2.0f*n*f/zr,
                0.0f, 0.0f,     -1.0f,        0.0f };
    mat4_copy(m, dest);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movss %xmm3, 0xc(%rsp)
movss %xmm1, 0x8(%rsp)
movaps %xmm0, 0x10(%rsp)
mulss 0x3220(%rip), %xmm2     # 0x702c
movq %rdi, %rbx
cvtss2sd %xmm2, %xmm0
mulsd 0x3595(%rip), %xmm0     # 0x73b0
divsd 0x3595(%rip), %xmm0     # 0x73b8
cvtsd2ss %xmm0, %xmm0
callq 0x11e0
movss 0x31e0(%rip), %xmm1     # 0x7014
divss %xmm0, %xmm1
movaps 0x10(%rsp), %xmm4
movaps %xmm4, %xmm0
movss 0x8(%rsp), %xmm5
subss %xmm5, %xmm0
movaps %xmm1, %xmm2
divss 0xc(%rsp), %xmm2
movaps 0x32f6(%rip), %xmm3     # 0x7150
xorps %xmm4, %xmm3
subss %xmm5, %xmm3
addss %xmm4, %xmm4
mulss %xmm5, %xmm4
unpcklps %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1]
movss %xmm2, (%rbx)
xorps %xmm2, %xmm2
movups %xmm2, 0x4(%rbx)
movss %xmm1, 0x14(%rbx)
movups %xmm2, 0x18(%rbx)
unpcklps %xmm0, %xmm0            # xmm0 = xmm0[0,0,1,1]
divps %xmm0, %xmm3
movlps %xmm3, 0x28(%rbx)
movaps 0x34ff(%rip), %xmm0     # 0x7390
movups %xmm0, 0x30(%rbx)
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Nealsbo[P]C-Software-Renderer/src/libmath.c
// Function: mat4_lookAt
void mat4_lookAt( mat4 dest, vec3 eye, vec3 center, vec3 up ){    
    vec3 f = vec3_nrm(vec3_sub(center, eye));
    vec3 r = vec3_crs(up, f);
    vec3 u = vec3_crs(f, r);

    mat4 m = {
             r.x,  u.x,  f.x, eye.x,
             r.y,  u.y,  f.y, eye.y,
             r.z,  u.z,  f.z, eye.z,
            0.0f, 0.0f, 0.0f,  1.0f };
    
    mat4_copy(m, dest);
}

// Assembly:
pushq %rbx
subq $0x60, %rsp
movss %xmm5, 0x4(%rsp)
movaps %xmm4, 0x10(%rsp)
movss %xmm1, 0xc(%rsp)
movaps %xmm0, 0x40(%rsp)
movq %rdi, %rbx
movaps %xmm0, %xmm4
shufps $0x55, %xmm0, %xmm4     # xmm4 = xmm4[1,1],xmm0[1,1]
movaps %xmm4, 0x50(%rsp)
subps %xmm0, %xmm2
subss %xmm1, %xmm3
movaps %xmm2, %xmm0
movaps %xmm3, %xmm1
callq 0x29aa
movaps %xmm0, %xmm2
movaps %xmm0, 0x20(%rsp)
movaps %xmm1, %xmm3
movss %xmm1, 0x8(%rsp)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movaps %xmm0, 0x30(%rsp)
movaps 0x10(%rsp), %xmm0
movss 0x4(%rsp), %xmm1
callq 0x2958
movaps %xmm0, %xmm2
movaps %xmm0, 0x10(%rsp)
movaps %xmm1, %xmm3
movss %xmm1, 0x4(%rsp)
movaps 0x20(%rsp), %xmm0
movss 0x8(%rsp), %xmm1
callq 0x2958
movaps 0x10(%rsp), %xmm3
movaps %xmm3, %xmm2
movlhps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
movaps 0x20(%rsp), %xmm4
unpcklpd 0x40(%rsp), %xmm4       # xmm4 = xmm4[0],mem[0]
shufps $0x88, %xmm4, %xmm2     # xmm2 = xmm2[0,2],xmm4[0,2]
movups %xmm2, (%rbx)
shufps $0x11, %xmm3, %xmm0     # xmm0 = xmm0[1,0],xmm3[1,0]
shufps $0xe2, %xmm3, %xmm0     # xmm0 = xmm0[2,0],xmm3[2,3]
movlps %xmm0, 0x10(%rbx)
movaps 0x30(%rsp), %xmm0
movss %xmm0, 0x18(%rbx)
movaps 0x50(%rsp), %xmm0
movss %xmm0, 0x1c(%rbx)
movss 0x4(%rsp), %xmm0
movss %xmm0, 0x20(%rbx)
movss %xmm1, 0x24(%rbx)
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x28(%rbx)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x2c(%rbx)
movaps 0x33dc(%rip), %xmm0     # 0x73a0
movups %xmm0, 0x30(%rbx)
addq $0x60, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Nealsbo[P]C-Software-Renderer/src/libmath.c
// Function: power_f_i
float power_f_i( float x, int y ) {
    int i;
    float s = 1;
    for( i = y; i != 0; --i )
		s *= x;
    return s;
}

// Assembly:
movaps %xmm0, %xmm1
movss 0x2f4e(%rip), %xmm0     # 0x7014
subl $0x1, %edi
jb 0x40d1
mulss %xmm1, %xmm0
jmp 0x40c6
retq
// File: /workspace/github_c_makefile_star2_O2/Nealsbo[P]C-Software-Renderer/src/main.c
// Function: main
int main(int argc, char* args[]) {
    if( Application_Init() != NULL )
		Application_Run();
	
	Application_Close();

    return 0;
}

// Assembly:
pushq %rax
xorl %eax, %eax
callq 0x138c
testl %eax, %eax
je 0x4147
xorl %eax, %eax
callq 0x1420
xorl %eax, %eax
callq 0x185d
xorl %eax, %eax
popq %rcx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/Nealsbo[P]C-Software-Renderer/src/objloader.c
// Function: Vertex_Lerp
vertex_t Vertex_Lerp( vertex_t v, float value ){
    vertex_t vert;
    vert.position = vec4_lerp( vert.position, v.position, value );
    vert.normal   = vec4_lerp( vert.normal, v.normal, value );
    vert.uv       = vec2_lerp( vert.uv, v.uv, value );
    return vert;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movaps %xmm0, %xmm4
movss %xmm0, 0xc(%rsp)
movq %rdi, %rbx
movsd (%rdi), %xmm0
movsd 0x8(%rdi), %xmm1
movsd 0x20(%rsp), %xmm2
movsd 0x28(%rsp), %xmm3
callq 0x2cbf
movlhps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movups %xmm0, (%rbx)
movsd 0x10(%rbx), %xmm0
movsd 0x18(%rbx), %xmm1
movsd 0x30(%rsp), %xmm2
movsd 0x38(%rsp), %xmm3
movss 0xc(%rsp), %xmm4
callq 0x2cbf
movlhps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movups %xmm0, 0x10(%rbx)
movsd 0x20(%rbx), %xmm0
movsd 0x40(%rsp), %xmm1
movss 0xc(%rsp), %xmm2
callq 0x27bb
movlps %xmm0, 0x20(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Nealsbo[P]C-Software-Renderer/src/objloader.c
// Function: Vertex_GetPositionElement
float Vertex_GetPositionElement( vertex_t v, int index ){
    switch( index ){
    case 0:
        return v.position.x;
    case 1:
        return v.position.y;
    case 2:
        return v.position.z;
    case 3:
        return v.position.w;
    default:
        return 0;
    }
}

// Assembly:
cmpl $0x3, %edi
ja 0x4229
leaq 0x8(%rsp), %rax
movl %edi, %ecx
leaq 0x3347(%rip), %rdx      # 0x7550
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movss (%rax), %xmm0
retq
movss 0x8(%rax), %xmm0
retq
movss 0xc(%rax), %xmm0
retq
movss 0x4(%rax), %xmm0
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/Nealsbo[P]C-Software-Renderer/src/objloader.c
// Function: Face_Print
void Face_Print(obj_face_t f){
    int i;
    printf("Face:");
    for(i = 0; i <f.vcount; i++)
        printf(" %d/%d/%d", f.indexes[i].x, f.indexes[i].y, f.indexes[i].z );
    printf("\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
leaq 0x3820(%rip), %rdi      # 0x7a70
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x1040
testl %r14d, %r14d
cmovlel %r15d, %r14d
imulq $0xc, %r14, %r15
leaq 0x380a(%rip), %r14      # 0x7a76
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x4292
movl (%rbx,%r12), %esi
movl 0x4(%rbx,%r12), %edx
movl 0x8(%rbx,%r12), %ecx
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
addq $0xc, %r12
jmp 0x426f
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x11c0
// File: /workspace/github_c_makefile_star2_O2/Nealsbo[P]C-Software-Renderer/src/objloader.c
// Function: Face_Printp
void Face_Printp(void *_f){
    obj_face_t *f = (obj_face_t *)_f;
    int i;
    printf("Face:");
    for(i = 0; i <f->vcount; i++)
        printf(" %d/%d/%d", f->indexes[i].x, f->indexes[i].y, f->indexes[i].z );
    printf("\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x37b9(%rip), %rdi      # 0x7a70
xorl %eax, %eax
callq 0x1040
pushq $0x8
popq %r15
leaq 0x37ad(%rip), %r14      # 0x7a76
xorl %r12d, %r12d
movslq (%rbx), %rax
cmpq %rax, %r12
jge 0x42f9
movq 0x8(%rbx), %rax
movl -0x8(%rax,%r15), %esi
movl -0x4(%rax,%r15), %edx
movl (%rax,%r15), %ecx
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
incq %r12
addq $0xc, %r15
jmp 0x42cc
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x11c0
// File: /workspace/github_c_makefile_star2_O2/Nealsbo[P]C-Software-Renderer/src/objloader.c
// Function: Model_Create
obj_model_t *Model_Create( const char *model_name){
    obj_model_t *model = (obj_model_t *)malloc(sizeof(obj_model_t));
    if(model == NULL){
        printf("Error: Cannot create model object '%s'\n", model_name);
        return NULL;
    }

    memcpy(model->name, model_name, MAX_NAME_LENGTH);

    model->vertCount   = 0;                                             //Allocation prepared data for model, box in that case
    model->trisCount   = 0;
    model->position    = vec3_create(0.1, 2.3, 4.5);
    model->rotation    = vec3_create(6.7, 8.9, 0.1);
    model->scale       = vec3_create(1.3, 1.6, 1.9);
    model->baseColor   = Color_Init(63, 127, 191, 255);
    model->diffmap     = NULL;
    model->normalmap   = NULL;
    model->vertices    = NULL;
    model->faces       = NULL;
    model->normals     = NULL;
    model->textcoords  = NULL;

    return model;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x170, %edi            # imm = 0x170
callq 0x11b0
movq %rax, %rbx
testq %rax, %rax
je 0x4400
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1100
andl $0x0, 0x120(%rbx)
andl $0x0, 0x12c(%rbx)
movss 0x36d1(%rip), %xmm0     # 0x7a20
movss 0x36cd(%rip), %xmm1     # 0x7a24
movss 0x36c9(%rip), %xmm2     # 0x7a28
callq 0x2911
movlps %xmm0, 0x130(%rbx)
movss %xmm1, 0x138(%rbx)
movss 0x36b1(%rip), %xmm0     # 0x7a2c
movss 0x36ad(%rip), %xmm1     # 0x7a30
movss 0x3695(%rip), %xmm2     # 0x7a20
callq 0x2911
movlps %xmm0, 0x13c(%rbx)
movss %xmm1, 0x144(%rbx)
movss 0x368d(%rip), %xmm0     # 0x7a34
movss 0x3689(%rip), %xmm1     # 0x7a38
movss 0x3685(%rip), %xmm2     # 0x7a3c
callq 0x2911
movlps %xmm0, 0x148(%rbx)
movss %xmm1, 0x150(%rbx)
pushq $0x3f
popq %rdi
pushq $0x7f
popq %rsi
movl $0xbf, %edx
movl $0xff, %ecx
callq 0x1e04
movl %eax, 0x154(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x100(%rbx)
movups %xmm0, 0x110(%rbx)
movups %xmm0, 0x158(%rbx)
jmp 0x4411
leaq 0x3679(%rip), %rdi      # 0x7a80
movq %r14, %rsi
xorl %eax, %eax
callq 0x1040
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Nealsbo[P]C-Software-Renderer/src/objloader.c
// Function: Model_Free
void Model_Free(void *_model){
    obj_model_t *model = (obj_model_t *)_model;
    if(model == NULL){
        printf("Warning: Free request for NULL model pointer!");
        return;
    }

    if( !model->vertices )
        free(model->vertices);
    if( !model->normals )
        free(model->normals);
    if( !model->textcoords )
        free(model->textcoords);
    if( !model->faces ){
        int i;
        for(i = 0; i < model->trisCount; i++)
            free(model->faces[i].indexes);
        free(model->faces);
    }

    if( !model->diffmap ){
        Bitmap_Free(model->diffmap->bitmap);
        free(model->diffmap);
    }
    
    if( !model->normalmap ){
        Bitmap_Free(model->normalmap->bitmap);
        free(model->normalmap);
    }

    model->vertices   = NULL;
    model->normals    = NULL;
    model->textcoords = NULL;
    model->faces      = NULL;
    model->diffmap    = NULL;
    model->normalmap  = NULL;

    free(model);
    model = NULL;
}

// Assembly:
testq %rdi, %rdi
je 0x46f8
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x108(%rdi)
jne 0x470b
pushq $0x8
popq %r14
xorl %r15d, %r15d
movslq 0x12c(%rbx), %rax
movq 0x108(%rbx), %rdi
cmpq %rax, %r15
jge 0x4706
movq (%rdi,%r14), %rdi
callq 0x1298
incq %r15
addq $0x10, %r14
jmp 0x46d3
leaq 0x34e7(%rip), %rdi      # 0x7be6
xorl %eax, %eax
jmp 0x1040
callq 0x1298
cmpq $0x0, 0x158(%rbx)
jne 0x4726
callq 0x2665
movq 0x158(%rbx), %rdi
callq 0x1298
cmpq $0x0, 0x160(%rbx)
jne 0x4741
callq 0x2665
movq 0x160(%rbx), %rdi
callq 0x1298
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1298
// File: /workspace/github_c_makefile_star2_O2/Nealsbo[P]C-Software-Renderer/src/raster.c
// Function: Raster_DrawLine
void Raster_DrawLine(vec4 v0, vec4 v1, SDL_Surface *image, color_t color) {
    mat4 sst;
	mat4_screen ( sst, WINDOW_WIDTH / 2, WINDOW_HEIGHT / 2 );
    
    vec2i p0 = vec4_toVec2i( vec4_pdiv( vec4_byMat4( v0, sst ) ) );
    vec2i p1 = vec4_toVec2i( vec4_pdiv( vec4_byMat4( v1, sst ) ) );

    int x0 = p0.x;
    int y0 = p0.y;
    int x1 = p1.x;
    int y1 = p1.y;

    int deltax = abs( x1 - x0 );
    int deltay = abs( y1 - y0 );
    int signx = x0 < x1 ? 1 : -1;
    int signy = y0 < y1 ? 1 : -1;
    int error2, error = ( deltax > deltay ? deltax : -deltay ) / 2;

    while(1) {
        if( x0 >= 0 && y0 >= 0 && x0 < image->w && y0 < image->h )
            renderer_->PutPixel( image, x0, y0, Color_ToUInt32( color ) );
        if( x0 == x1 && y0 == y1 )
            break;

        error2 = error;
        if ( error2 >- deltax ){
            error -= deltay;
            x0    += signx;
        }
        if ( error2 <  deltay ){
            error += deltax;
            y0    += signy;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %esi, 0xc(%rsp)
movq %rdi, %rbx
movaps %xmm3, 0x40(%rsp)
movaps %xmm2, 0x30(%rsp)
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
leaq 0x50(%rsp), %r13
movss 0x2857(%rip), %xmm0     # 0x7ca0
movss 0x2853(%rip), %xmm1     # 0x7ca4
movq %r13, %rdi
callq 0x3e9b
movaps 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movq %r13, %rdi
callq 0x2d1d
callq 0x2b22
callq 0x2d08
movq %rax, %r15
movq %rax, %r12
shrq $0x20, %r12
movaps 0x30(%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
movq %r13, %rdi
callq 0x2d1d
callq 0x2b22
callq 0x2d08
movq %rbx, %r13
movq %rax, %rdi
movq %rax, %r8
shrq $0x20, %r8
xorl %eax, %eax
movl %r8d, %ecx
subl %r12d, %ecx
setg %al
xorl %edx, %edx
movl %edi, %esi
subl %r15d, %esi
setg %dl
movl %esi, %r9d
negl %r9d
cmovsl %esi, %r9d
movl %ecx, %ebx
negl %ebx
cmovsl %ecx, %ebx
leal -0x1(,%rdx,2), %esi
leal -0x1(,%rax,2), %r10d
movl %ebx, %eax
negl %eax
cmpl %ebx, %r9d
cmoval %r9d, %eax
pushq $0x2
popq %rcx
cltd
idivl %ecx
movl %eax, %ebp
movl %r9d, %r14d
negl %r14d
movq %rdi, 0x30(%rsp)
movq %r8, 0x20(%rsp)
movl %r9d, 0x10(%rsp)
movl %esi, 0x8(%rsp)
movl %r10d, 0x4(%rsp)
testl %r15d, %r15d
js 0x5567
testl %r12d, %r12d
js 0x5567
cmpl 0x10(%r13), %r15d
jge 0x5567
cmpl 0x14(%r13), %r12d
jge 0x5567
leaq 0x6c85(%rip), %rax      # 0xc1b0
movq (%rax), %rax
movq 0x28(%rax), %rax
movq %rax, 0x40(%rsp)
movl 0xc(%rsp), %edi
callq 0x20d8
movq %r13, %rdi
movl %r15d, %esi
movl %r12d, %edx
movl %eax, %ecx
callq *0x40(%rsp)
movl 0x4(%rsp), %r10d
movl 0x8(%rsp), %esi
movl 0x10(%rsp), %r9d
movq 0x20(%rsp), %r8
movq 0x30(%rsp), %rdi
cmpl %edi, %r15d
jne 0x5571
cmpl %r8d, %r12d
je 0x55a9
cmpl %r14d, %ebp
movl $0x0, %eax
cmovgl %esi, %eax
movl $0x0, %ecx
cmovgl %ebx, %ecx
addl %eax, %r15d
movl %ebp, %eax
subl %ecx, %eax
cmpl %ebx, %ebp
movl $0x0, %ecx
cmovll %r10d, %ecx
movl $0x0, %ebp
cmovll %r9d, %ebp
addl %ecx, %r12d
addl %eax, %ebp
jmp 0x550e
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Nealsbo[P]C-Software-Renderer/src/render.c
// Function: Renderer_Init
renderer_t *Renderer_Init( scene_t *scene, uint32_t rs_flag, uint32_t rt_flag ) {
    renderer_t *renderer = malloc( sizeof(renderer_t) );
    renderer->scene      = scene;
    renderer->flagState  = rs_flag;
    renderer->renderType = rt_flag;
    renderer->fog        = 0;
    renderer->fogIntence = 0.0;
    renderer->z_Buffer   = (float *)malloc(sizeof(float) * WINDOW_WIDTH * WINDOW_HEIGHT);
    renderer->frameCount = 0;
    renderer->frameTime  = 0.0;
    renderer->PutPixel   = Renderer_Putpixel;
    return renderer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
pushq $0x30
popq %rdi
callq 0x11b0
movq %rax, %r15
movq %r14, (%rax)
movl %ebp, 0x8(%rax)
movl %ebx, 0xc(%rax)
andq $0x0, 0x10(%rax)
movl $0x384000, %edi         # imm = 0x384000
callq 0x11b0
movq %rax, 0x18(%r15)
andq $0x0, 0x20(%r15)
leaq 0x12(%rip), %rax        # 0x5ab7
movq %rax, 0x28(%r15)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Nealsbo[P]C-Software-Renderer/src/render.c
// Function: Renderer_Putpixel
void Renderer_Putpixel( SDL_Surface *surface, int x, int y, uint32_t pixel ) {
    if ( x > surface->w || x < 0 || y > surface->h || y < 0 )
        return;
    int bpp = surface->format->BytesPerPixel;
    uint8_t *p = (uint8_t *)surface->pixels + y * surface->pitch + x * bpp;
    switch(bpp) {
    case 1:
        *p = pixel;
        break;
    case 2:
        *(uint16_t *)p = pixel;
        break;
    case 3:
        if(SDL_BYTEORDER == SDL_BIG_ENDIAN) {
            p[0] = (pixel >> 16) & 0xff;
            p[1] = (pixel >> 8) & 0xff;
            p[2] = pixel & 0xff;
        } else {
            p[0] = pixel & 0xff;
            p[1] = (pixel >> 8) & 0xff;
            p[2] = (pixel >> 16) & 0xff;
        }
        break;
    case 4:
        *(uint32_t *)p = pixel;
        break;
    }
}

// Assembly:
testl %esi, %esi
js 0x5b04
cmpl %esi, 0x10(%rdi)
jl 0x5b04
testl %edx, %edx
js 0x5b04
cmpl %edx, 0x14(%rdi)
jl 0x5b04
movq 0x8(%rdi), %rax
movzbl 0x11(%rax), %r9d
leal -0x1(%r9), %r8d
cmpl $0x3, %r8d
ja 0x5b04
movslq 0x18(%rdi), %r10
movslq %edx, %rax
imulq %r10, %rax
addq 0x20(%rdi), %rax
movl %esi, %edx
imulq %r9, %rdx
leaq 0x21d8(%rip), %rsi      # 0x7cd0
movslq (%rsi,%r8,4), %rdi
addq %rsi, %rdi
jmpq *%rdi
movb %cl, (%rax,%rdx)
retq
movb %cl, (%rax,%rdx)
movb %ch, 0x1(%rax,%rdx)
shrl $0x10, %ecx
movb %cl, 0x2(%rax,%rdx)
retq
movl %ecx, (%rax,%rdx)
retq
movw %cx, (%rax,%rdx)
retq
// File: /workspace/github_c_makefile_star2_O2/Nealsbo[P]C-Software-Renderer/src/render.c
// Function: Renderer_DrawWorld
void Renderer_DrawWorld( renderer_t *renderer, SDL_Surface *Surface ) {
	scene_t *scene = renderer->scene;
    SDL_FillRect( Surface, NULL, SDL_MapRGB( Surface->format, 0x00, 0x00, 0x00 ) );
    Renderer_ClearZBuffer( renderer );
    node_t *objList_node = List_Head( Scene_GetObjectList( scene ) );

    while( objList_node != NULL ) {
        Renderer_DrawObject( scene, renderer, List_Data(objList_node), Surface );
        objList_node = objList_node->next;
    }
    renderer->frameCount++;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %r15
movq 0x8(%rsi), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x10a0
movq %r14, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x1060
movq %rbx, %rdi
callq 0x5b34
movq %r15, %rdi
callq 0x61a8
movq %rax, %r12
addq $0x18, %r12
movq (%r12), %r12
testq %r12, %r12
je 0x60a1
movq (%r12), %rdx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x5b53
addq $0x8, %r12
jmp 0x6080
incl 0x24(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Nealsbo[P]C-Software-Renderer/src/render.c
// Function: Renderer_Destroy
void Renderer_Destroy( renderer_t *renderer ) {
    if( renderer != NULL ) {
        free( renderer->z_Buffer );
        renderer->z_Buffer = NULL;
        printf( "\nRendered frames: %d\n", renderer->frameCount );
        free( renderer );
    }
}

// Assembly:
testq %rdi, %rdi
je 0x60e1
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x1298
andq $0x0, 0x18(%rbx)
movl 0x24(%rbx), %esi
leaq 0x1c1f(%rip), %rdi      # 0x7cf0
xorl %eax, %eax
callq 0x1040
movq %rbx, %rdi
popq %rbx
jmp 0x1298
retq
nop
// File: /workspace/github_c_makefile_star2_O2/Nealsbo[P]C-Software-Renderer/src/scene.c
// Function: Scene_Init
scene_t *Scene_Init( camera_t *camera ) {
    scene_t *scene = (scene_t *)malloc(sizeof(scene_t));
    if(scene == NULL) {
        printf( "Error: Cannot create scene!\n" );
        return NULL;
    }

    scene->objectList = (List *)malloc(sizeof(List));
    List_Init( scene->objectList, &Model_Test, &Model_Free );

    scene->mainCamera   = camera;
    scene->directLight = vec3_create( 0.0f, 5.0f, 5.0f );
	scene->directLightColor = vec3_create( 1.0f, 1.0f, 1.0f );
	scene->ambientLightColor = vec3_create( 1.0f, 1.0f, 1.0f );
    scene->currentState = SCENE_STATE_UPDATABLE;
    return scene;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x40
popq %rdi
callq 0x11b0
movq %rax, %rbx
testq %rax, %rax
je 0x6181
pushq $0x28
popq %rdi
callq 0x11b0
movq %rax, 0x30(%rbx)
leaq -0xf14(%rip), %rsi      # 0x51fe
leaq -0x1a64(%rip), %rdx     # 0x46b5
movq %rax, %rdi
callq 0x1cc0
movq %r14, (%rbx)
movss 0xefc(%rip), %xmm1      # 0x7028
xorps %xmm0, %xmm0
movaps %xmm1, %xmm2
callq 0x2911
movlps %xmm0, 0x8(%rbx)
movss %xmm1, 0x10(%rbx)
movss 0xecc(%rip), %xmm0      # 0x7014
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
callq 0x2911
movlps %xmm0, 0x14(%rbx)
movss %xmm1, 0x1c(%rbx)
movss 0xeb0(%rip), %xmm0      # 0x7014
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
callq 0x2911
movlps %xmm0, 0x20(%rbx)
movss %xmm1, 0x28(%rbx)
movl $0x1, 0x38(%rbx)
jmp 0x618d
leaq 0x1bb3(%rip), %rdi      # 0x7d3b
callq 0x1200
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Nealsbo[P]C-Software-Renderer/src/scene.c
// Function: Scene_FindObjectByName
obj_model_t *Scene_FindObjectByName( scene_t *scene, char *name ) {
	List        *objList = Scene_GetObjectList( scene );
	node_t      *curr    = List_Head( objList );
	obj_model_t *obj     = NULL;
	
	int isFound = FALSE;
	
	while( curr != NULL ) {
		if( strstr( Model_GetName(List_Data(curr)), name ) ) {
			isFound = TRUE;
			break;
		}
        curr = curr->next;
    }
    if(isFound){
		obj = List_Data(curr);
	} else {
		printf( "SceneWarn: Object \"%s\" not found!\n", name );
	}
	return obj;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x30(%rdi), %r14
addq $0x18, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x6208
movq (%r14), %rdi
callq 0x51fa
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1090
testq %rax, %rax
jne 0x621e
addq $0x8, %r14
jmp 0x61e2
leaq 0x1b09(%rip), %rdi      # 0x7d18
xorl %r14d, %r14d
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1040
jmp 0x6221
movq (%r14), %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Nealsbo[P]C-Software-Renderer/src/shader.c
// Function: Shader_Vertex
vec4 Shader_Vertex( shader_t *shader, vertex_t *vert, int index ) {
	//mat4_setColVec2( &shader->var_uv, vert->uv, index );
	//mat4_setColVec4( &shader->var_nrm, vec4_byMat4( vert->normal, shader->m_it ), index );
	//mat4_setColVec4( &shader->var_pos, vec4_byMat4( vert->position, shader->m ), index );
	shader->pos[index]     = vec4_byMat4( vert->position, shader->m );
	shader->normals[index] = vec4_byMat4( vert->normal, shader->m_it );
	shader->uvs[index]     = vert->uv;
	return vec4_byMat4( vert->position, shader->mvp );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movslq %edx, %r15
movq %r15, %r12
shlq $0x4, %r12
movsd (%rsi), %xmm0
movsd 0x8(%rsi), %xmm1
callq 0x2d1d
movlhps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movups %xmm0, 0x100(%rbx,%r12)
leaq 0x80(%rbx), %rdi
movsd 0x10(%r14), %xmm0
movsd 0x18(%r14), %xmm1
callq 0x2d1d
movlhps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movups %xmm0, 0x130(%rbx,%r12)
movq 0x20(%r14), %rax
movq %rax, 0x1cc(%rbx,%r15,8)
addq $0xc0, %rbx
movsd (%r14), %xmm0
movsd 0x8(%r14), %xmm1
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2d1d
// File: /workspace/github_c_makefile_star2_O2/Nealsbo[P]C-Software-Renderer/src/shader.c
// Function: Shader_SetMatrices
void Shader_SetMatrices( shader_t *shader, mat4 model, mat4 view, mat4 mvp ) {
	mat4 tmp;
	mat4_copy( model, shader->m );
	mat4_copy( view, shader->v );
	
	mat4_inv( shader->m, tmp );
	mat4_tsp( tmp, shader->m_it );
	
	mat4_copy( mvp, shader->mvp );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq %rsi, %rdi
movq %r15, %rsi
callq 0x39b9
leaq 0x40(%r15), %rsi
movq %r14, %rdi
callq 0x39b9
movq %rsp, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x2ed8
leaq 0x80(%r15), %rsi
movq %r14, %rdi
callq 0x2eaa
addq $0xc0, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x39b9
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/utils/phrases/scanner.c
// Function: readInt
int
readInt(FILE *fp)
    {
    int x,result;
    result = fscanf(fp,"%d",&x);
    if (result == EOF)
        {
        return 0;
        }
    if (result == 0)
        {
        fprintf(stderr,"SCAN ERROR: attempt to read an integer failed\n");
        fprintf(stderr,"offending character was <%c>\n",fgetc(fp));
        exit(1);
        }
    return x;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x19ef(%rip), %rsi      # 0x369c
xorl %r14d, %r14d
leaq -0x14(%rbp), %rdx
xorl %eax, %eax
callq 0x1040
cmpl $-0x1, %eax
je 0x1cc8
testl %eax, %eax
je 0x1cd4
movl -0x14(%rbp), %r14d
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x431d(%rip), %r14      # 0x5ff8
movq (%r14), %rcx
leaq 0x19ba(%rip), %rdi      # 0x369f
pushq $0x2e
popq %rsi
pushq $0x1
popq %rdx
callq 0x11a0
movq (%r14), %r14
movq %rbx, %rdi
callq 0x10b0
leaq 0x19cc(%rip), %rsi      # 0x36ce
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x10e0
pushq $0x1
popq %rdi
callq 0x1190
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/utils/phrases/scanner.c
// Function: readReal
double
readReal(FILE *fp)
    {
    int result;
    double x;
    result = fscanf(fp," %lf",&x);
    if (result == EOF)
        {
        return 0.0;
        }
    if (result == 0)
        {
        fprintf(stderr,"SCAN ERROR: attempt to read a real number failed\n");
        fprintf(stderr,"offending character was <%c>\n",fgetc(fp));
        exit(2);
        }
    return x;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x19c1(%rip), %rsi      # 0x36ec
leaq -0x18(%rbp), %rdx
xorl %eax, %eax
callq 0x1040
xorps %xmm0, %xmm0
cmpl $-0x1, %eax
je 0x1d47
testl %eax, %eax
je 0x1d50
movsd -0x18(%rbp), %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x42a1(%rip), %r14      # 0x5ff8
movq (%r14), %rcx
leaq 0x1990(%rip), %rdi      # 0x36f1
pushq $0x31
popq %rsi
pushq $0x1
popq %rdx
callq 0x11a0
movq (%r14), %r14
movq %rbx, %rdi
callq 0x10b0
leaq 0x1950(%rip), %rsi      # 0x36ce
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x10e0
pushq $0x2
popq %rdi
callq 0x1190
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/utils/phrases/scanner.c
// Function: readChar
char
readChar(FILE *fp)
    {
    int result;
    char x;
    result = fscanf(fp," %c",&x);
    if (result == EOF)
        {
        return -1;
        }
    if (result == 0)
        {
        fprintf(stderr,"SCAN ERROR: attempt to read a non-whitespace character failed\n");
        fprintf(stderr,"offending character was <%c>\n",fgetc(fp));
        exit(2);
        }
    return x;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x197c(%rip), %rsi      # 0x3723
leaq -0x11(%rbp), %rdx
xorl %eax, %eax
callq 0x1040
movl %eax, %ecx
movb $-0x1, %al
cmpl $-0x1, %ecx
je 0x1dc2
testl %ecx, %ecx
je 0x1dcb
movb -0x11(%rbp), %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x4226(%rip), %r14      # 0x5ff8
movq (%r14), %rcx
leaq 0x194b(%rip), %rdi      # 0x3727
pushq $0x3e
popq %rsi
pushq $0x1
popq %rdx
callq 0x11a0
movq (%r14), %r14
movq %rbx, %rdi
callq 0x10b0
leaq 0x18d5(%rip), %rsi      # 0x36ce
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x10e0
pushq $0x2
popq %rdi
callq 0x1190
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/utils/phrases/scanner.c
// Function: readRawChar
char
readRawChar(FILE *fp)
    {
    int result;
    char x;
    result = fscanf(fp,"%c",&x);
    if (result == EOF)
        {
        return -1;
        }
    if (result == 0)
        {
        fprintf(stderr,"SCAN ERROR: attempt to read a raw character failed\n");
        fprintf(stderr,"offending character was <%c>\n",fgetc(fp));
        exit(2);
        }
    return x;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x1902(%rip), %rsi      # 0x3724
leaq -0x11(%rbp), %rdx
xorl %eax, %eax
callq 0x1040
movl %eax, %ecx
movb $-0x1, %al
cmpl $-0x1, %ecx
je 0x1e3d
testl %ecx, %ecx
je 0x1e46
movb -0x11(%rbp), %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x41ab(%rip), %r14      # 0x5ff8
movq (%r14), %rcx
leaq 0x190f(%rip), %rdi      # 0x3766
pushq $0x33
popq %rsi
pushq $0x1
popq %rdx
callq 0x11a0
movq (%r14), %r14
movq %rbx, %rdi
callq 0x10b0
leaq 0x185a(%rip), %rsi      # 0x36ce
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x10e0
pushq $0x2
popq %rdi
callq 0x1190
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/utils/phrases/scanner.c
// Function: allocateMsg
void *
allocateMsg(size_t size,char *where)
    {
    char *s;
    s = malloc(size);
    if (s == 0)
        {
        fprintf(stderr,"%s: could not allocate string, out of memory\n",
            where);
        exit(3);
        }

    return s;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
callq 0x1120
testq %rax, %rax
je 0x2073
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x3f7e(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
leaq 0x17af(%rip), %rsi      # 0x3833
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10e0
pushq $0x3
popq %rdi
callq 0x1190
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/utils/phrases/scanner.c
// Function: reallocateMsg
static void *
reallocateMsg(void *s,size_t size,char *where)
    {
    char *t;
    t = realloc(s,size);
    if (t == 0)
        {
        fprintf(stderr,"%s: could not reallocate string, out of memory\n",
            where);
        exit(3);
        }

    return t;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
callq 0x1140
testq %rax, %rax
je 0x20b0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x3f41(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
leaq 0x17a0(%rip), %rsi      # 0x3861
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10e0
pushq $0x3
popq %rdi
callq 0x1190
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/utils/phrases/scanner.c
// Function: readToken
char *
readToken(FILE *fp)
    {
    int ch,index;
    char *buffer;
    int size = 80;

    skipWhiteSpace(fp);

    ch = fgetc(fp);
    if (ch == EOF) return 0;

    buffer = allocateMsg(size,"readToken");

    index = 0;
    while (!isspace(ch))
        {
        if (ch == EOF) break;
        if (index > size - 2)
            {
            ++size;
            buffer = reallocateMsg(buffer,size,"readToken");
            }
        buffer[index] = ch;
        ++index;
        ch = fgetc(fp);
        }

    /* push back the character that got us out of this loop */

    ungetc(ch,fp);

    if (index > 0)              //there is something in the buffer
        clearerr(fp);           //so force the read to be good

    buffer[index] = '\0';

    return buffer;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x201e
movq %rbx, %rdi
callq 0x10b0
cmpl $-0x1, %eax
je 0x2195
movl %eax, %r15d
movq %rbx, -0x30(%rbp)
leaq 0x1718(%rip), %rsi      # 0x3820
pushq $0x50
popq %rdi
callq 0x2059
movq %rax, %r14
pushq $0x50
popq %rbx
xorl %r12d, %r12d
callq 0x11b0
movq %rax, %r13
cmpl $-0x1, %r15d
je 0x216f
movq (%r13), %rax
movslq %r15d, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
jne 0x216f
leal -0x2(%rbx), %eax
cltq
cmpq %rax, %r12
jle 0x215a
incl %ebx
movslq %ebx, %rsi
movq %r14, %rdi
leaq 0x16ce(%rip), %rdx      # 0x3820
callq 0x2096
movq %rax, %r14
movb %r15b, (%r14,%r12)
incq %r12
movq -0x30(%rbp), %rdi
callq 0x10b0
movl %eax, %r15d
jmp 0x2121
movl %r15d, %edi
movq -0x30(%rbp), %rbx
movq %rbx, %rsi
callq 0x1130
testq %r12, %r12
je 0x218b
movq %rbx, %rdi
callq 0x1100
movl %r12d, %eax
movb $0x0, (%r14,%rax)
jmp 0x2198
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/utils/phrases/scanner.c
// Function: readLine
char *
readLine(FILE *fp)
    {
    int ch,index;
    char *buffer;
    int size = 512;
    
    ch = fgetc(fp);
    if (ch == EOF) return 0;

    buffer = allocateMsg(size,"readLine");

    index = 0;
    while (ch != '\n')
        {
        if (ch == EOF) break;
        if (index > size - 2)
            {
            ++size;
            buffer = reallocateMsg(buffer,size,"readLine");
            }
        buffer[index] = ch;
        ++index;
        ch = fgetc(fp);
        }


    if (index > 0)              //there is something in the buffer
        clearerr(fp);           //so force the read to be good

    buffer[index] = '\0';

    return buffer;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x10b0
cmpl $-0x1, %eax
je 0x223f
movl %eax, %r12d
leaq 0x165b(%rip), %rsi      # 0x382a
movl $0x200, %edi            # imm = 0x200
callq 0x2059
movq %rax, %r14
movl $0x200, %r15d           # imm = 0x200
xorl %r13d, %r13d
cmpl $-0x1, %r12d
je 0x2228
cmpl $0xa, %r12d
je 0x2228
leal -0x2(%r15), %eax
cltq
cmpq %rax, %r13
jle 0x2214
incl %r15d
movslq %r15d, %rsi
movq %r14, %rdi
leaq 0x161e(%rip), %rdx      # 0x382a
callq 0x2096
movq %rax, %r14
movb %r12b, (%r14,%r13)
incq %r13
movq %rbx, %rdi
callq 0x10b0
movl %eax, %r12d
jmp 0x21e5
testq %r13, %r13
je 0x2235
movq %rbx, %rdi
callq 0x1100
movl %r13d, %eax
movb $0x0, (%r14,%rax)
jmp 0x2242
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/utils/phrases/scanner.c
// Function: allocate
void *
allocate(size_t size)
    {
    char *s;
    s = malloc(size);
    if (s == 0)
        {
        fprintf(stderr,"could not allocate string, out of memory\n");
        exit(3);
        }

    return s;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x1120
testq %rax, %rax
je 0x2264
popq %rbp
retq
movq 0x3d8d(%rip), %rax      # 0x5ff8
movq (%rax), %rcx
leaq 0x15c2(%rip), %rdi      # 0x3837
pushq $0x29
popq %rsi
pushq $0x1
popq %rdx
callq 0x11a0
pushq $0x3
popq %rdi
callq 0x1190
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/utils/phrases/scanner.c
// Function: reallocate
void *
reallocate(void *s,size_t size)
    {
    char *t;
    t = realloc(s,size);
    if (t == 0)
        {
        fprintf(stderr,"could not reallocate string, out of memory\n");
        exit(3);
        }

    return t;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x1140
testq %rax, %rax
je 0x2298
popq %rbp
retq
movq 0x3d59(%rip), %rax      # 0x5ff8
movq (%rax), %rcx
leaq 0x15bc(%rip), %rdi      # 0x3865
pushq $0x2b
popq %rsi
pushq $0x1
popq %rdx
callq 0x11a0
pushq $0x3
popq %rdi
callq 0x1190
// File: /workspace/github_c_makefile_star2_O2/jflatow[P]jfdb/src/db.h
// Function: JFDB_region_map_alloc
static inline JFDB_RegionMap *JFDB_region_map_alloc(uint32_t lower, uint32_t upper, int invert) {
  // NB: lower <= S < upper
  size_t numBytes = RUP(upper - lower, 8);
  size_t numWords = RUP(numBytes, sizeof(uint64_t));
  JFDB_RegionMap *map = malloc(sizeof(JFDB_RegionMap) + numWords * sizeof(uint64_t));
  if (map) {
    map->begin = (lower / 64) * 64;
    map->size = numWords;
    memset(map->data, invert ? 0xFF : 0, numWords * sizeof(uint64_t));
    if (lower % 64)
      map->data[0] |= -1LLU >> (64 - (lower % 64));
    if (upper % 64)
      map->data[numWords - 1] |= -1LLU << (upper % 64);
  }
  return map;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, 0x4(%rsp)
movl %esi, %ebx
movl %edi, %ebp
movl %esi, %r13d
subl %edi, %r13d
addl $0x7, %r13d
shrl $0x3, %r13d
addl $0x7, %r13d
movl %r13d, %r12d
andl $-0x8, %r12d
leaq 0x8(%r12), %rdi
callq 0x1150
movq %rax, %r14
testq %rax, %rax
je 0x2ba8
movq %rax, %r15
shrl $0x3, %r13d
movl %ebp, %eax
andl $-0x40, %eax
movl %eax, (%r14)
movl %r13d, 0x4(%r14)
addq $0x8, %r15
xorl %esi, %esi
negl 0x4(%rsp)
sbbl %esi, %esi
movq %r15, %rdi
movq %r12, %rdx
callq 0x10f0
pushq $-0x1
popq %rax
andl $0x3f, %ebp
je 0x2b99
negb %bpl
movq %rax, %rdx
movl %ebp, %ecx
shrq %cl, %rdx
orq %rdx, (%r15)
andl $0x3f, %ebx
je 0x2ba8
movl %ebx, %ecx
shlq %cl, %rax
orq %rax, -0x8(%r15,%r13,8)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jflatow[P]jfdb/test/../src/db.h
// Function: JFDB_region_map_store
static inline void JFDB_region_map_store(JFDB_RegionMap *map, JFDB_Region region) {
  // set numSlots bits from start
  //  * region.block must be in map range
  // otherwise behavior is undefined
  if (region.size) {
    size_t numSlots = RUP(region.size, JFDB_BLOCK_SIZE);
    size_t start = region.block - map->begin, stop = start + numSlots - 1;
    size_t startWord = start / 64, stopWord = stop / 64;
    if (startWord == stopWord) {
      map->data[startWord] |=
        (-1LLU << (start % 64)) &
        (-1LLU >> (63 - (stop % 64)));
    } else {
      map->data[startWord] |= -1LLU << (start % 64);
      while (++startWord < stopWord)
        map->data[startWord] = -1LLU;
      map->data[stopWord] |= -1LLU >> (63 - (stop % 64));
    }
  }
}

// Assembly:
movq %rsi, %rcx
movq %rsi, %rax
shrq $0x20, %rax
addl $0xff, %eax
shrl $0x8, %eax
subl (%rdi), %ecx
addq %rcx, %rax
decq %rax
movl %ecx, %edx
shrl $0x6, %edx
movq %rax, %rsi
shrq $0x6, %rsi
pushq $-0x1
popq %r8
movq %r8, %r9
shlq %cl, %r9
cmpq %rsi, %rdx
jne 0x1677
notb %al
movl %eax, %ecx
shlq %cl, %r9
shrq %cl, %r9
leaq (%rdi,%rdx,8), %rax
addq $0x8, %rax
jmp 0x169e
leaq 0x8(%rdi), %r10
orq %r9, 0x8(%rdi,%rdx,8)
incq %rdx
cmpq %rsi, %rdx
jae 0x1690
orq $-0x1, 0x8(%rdi,%rdx,8)
jmp 0x1680
notb %al
movl %eax, %ecx
shrq %cl, %r8
leaq (%r10,%rsi,8), %rax
movq %r8, %r9
orq %r9, (%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/jflatow[P]jfdb/test/../src/db.h
// Function: JFDB_region_map_clear
static inline void JFDB_region_map_clear(JFDB_RegionMap *map, JFDB_Region region) {
  // clear numSlots bits from start
  // same caveats as with store
  if (region.size) {
    size_t numSlots = RUP(region.size, JFDB_BLOCK_SIZE);
    size_t start = region.block - map->begin, stop = start + numSlots - 1;
    size_t startWord = start / 64, stopWord = stop / 64;
    if (startWord == stopWord) {
      map->data[startWord] &=
        (-1LLU >> (64 - (start % 64))) |
        (-1LLU << ((stop % 64) + 1));
    } else {
      map->data[startWord] &= -1LLU >> (64 - (start % 64));
      while (++startWord < stopWord)
        map->data[startWord] = 0;
      map->data[stopWord] &= -1LLU << ((stop % 64) + 1);
    }
  }
}

// Assembly:
movq %rsi, %rcx
movq %rsi, %rax
shrq $0x20, %rax
addl $0xff, %eax
shrl $0x8, %eax
subl (%rdi), %ecx
addq %rcx, %rax
decq %rax
movl %ecx, %edx
shrl $0x6, %edx
movq %rax, %rsi
shrq $0x6, %rsi
andb $0x3f, %cl
negb %cl
pushq $-0x1
popq %r8
shrq %cl, %r8
cmpq %rsi, %rdx
jne 0x16ee
pushq $-0x2
popq %rsi
movl %eax, %ecx
shlq %cl, %rsi
orq %rsi, %r8
leaq (%rdi,%rdx,8), %rax
addq $0x8, %rax
jmp 0x1714
leaq 0x8(%rdi), %r9
andq %r8, 0x8(%rdi,%rdx,8)
incq %rdx
cmpq %rsi, %rdx
jae 0x1707
andq $0x0, 0x8(%rdi,%rdx,8)
jmp 0x16f7
pushq $-0x2
popq %r8
movl %eax, %ecx
shlq %cl, %r8
leaq (%r9,%rsi,8), %rax
andq %r8, (%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/jflatow[P]jfdb/src/db.c
// Function: JFDB_wipe
int JFDB_wipe(const char *path) {
  // remove keys & vals, flag if either one fails
  int failed = 0;
  char fp[JFDB_MAX_PATH + 6];
  snprintf(fp, sizeof(fp), "%s.keys", path);
  remove(fp);
  switch (errno) {
    case 0:
    case ENOENT:
      break;
    default:
      failed |= JFDB_KEYS;
      break;
  }
  snprintf(fp, sizeof(fp), "%s.vals", path);
  remove(fp);
  switch (errno) {
    case 0:
    case ENOENT:
      break;
    default:
      failed |= JFDB_VALS;
      break;
  }
  return failed;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rdi, %rbx
leaq 0x382e(%rip), %rdx      # 0x50bd
movq %rsp, %r14
movl $0x406, %esi            # imm = 0x406
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x10d0
movq %r14, %rdi
callq 0x1060
callq 0x1040
movq %rax, %r15
xorl %ebp, %ebp
testl $0xfffffffd, (%rax)     # imm = 0xFFFFFFFD
setne %bpl
leaq 0x37fe(%rip), %rdx      # 0x50c5
movl $0x406, %esi            # imm = 0x406
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x10d0
movq %r14, %rdi
callq 0x1060
testl $0xfffffffd, (%r15)     # imm = 0xFFFFFFFD
je 0x18ed
orl $0x2, %ebp
movl %ebp, %eax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jflatow[P]jfdb/src/db.c
// Function: JFDB_file_open
static int JFDB_file_open(JFDB *db, const char *path) {
  // get the fd for keys & vals, and sanity check that they look like valid files
  // vals has a different header, but the magic / version are the same
  int fd;
  if ((fd = open(path, O_RDWR, 0644)) < 0) {
    if (errno == ENOENT) {
      if ((fd = open(path, O_RDWR | O_CREAT | O_EXCL, 0644)) < 0) {
        JFDB_set_error(db, JFDB_EFILE, "could not create ('%.32s')", path);
      } else {
        // new file: write the header
        db->tip.magic = JFDB_MAGIC;
        db->tip.version = JFDB_VERSION;
        if (write(fd, &db->tip, sizeof(db->tip)) < sizeof(db->tip))
          JFDB_set_error(db, JFDB_EFILE, "failed to write ('%.32s')", path);
      }
    } else {
      JFDB_set_error(db, JFDB_EFILE, "cannot open file ('%.32s')", path);
    }
  } else {
    // existing file: read the header
    if (read(fd, &db->tip, sizeof(db->tip)) < sizeof(db->tip))
      JFDB_set_error(db, JFDB_EFILE, "failed to read ('%.32s')", path);
    else if (db->tip.magic != JFDB_MAGIC && db->tip.version != JFDB_VERSION)
      JFDB_set_error(db, JFDB_EFILE, "invalid file ('%.32s')", path);
  }
  return fd;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
pushq $0x2
popq %rsi
movq %r14, %rdi
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x1190
movl %eax, %ebx
testl %eax, %eax
js 0x1bd6
leaq 0xc0(%r15), %r12
pushq $0x70
popq %rdx
movl %ebx, %edi
movq %r12, %rsi
callq 0x1110
cmpq $0x6f, %rax
ja 0x1c25
leaq 0x373f(%rip), %rdx      # 0x5313
jmp 0x1c52
callq 0x1040
cmpl $0x2, (%rax)
jne 0x1c42
movq %r14, %rdi
movl $0xc2, %esi
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x1190
movl %eax, %ebx
testl %eax, %eax
js 0x1c4b
leaq 0xc0(%r15), %rsi
movq $0x7fdb, 0xc0(%r15) # imm = 0x7FDB
pushq $0x70
popq %rdx
movl %ebx, %edi
callq 0x1080
cmpq $0x6f, %rax
ja 0x1c62
leaq 0x36bb(%rip), %rdx      # 0x52de
jmp 0x1c52
cmpl $0x7fdb, (%r12)         # imm = 0x7FDB
je 0x1c62
cmpl $0x0, 0xc4(%r15)
je 0x1c62
leaq 0x36ec(%rip), %rdx      # 0x532c
jmp 0x1c52
leaq 0x36af(%rip), %rdx      # 0x52f8
jmp 0x1c52
leaq 0x3671(%rip), %rdx      # 0x52c3
pushq $0x4
popq %rsi
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x1af6
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jflatow[P]jfdb/src/db.c
// Function: JFDB_mmap_file
static int JFDB_mmap_file(JFDB *db, int kv, size_t cover, int factor) {
  // if the mmap already includes cover, do nothing
  // otherwise increase the mapping by a size of factor
  JFDB_MMap *m = kv == JFDB_KEYS ? &db->kmap : &db->vmap;
  if (m->size >= cover)
    return 0;

  // we need to remap the memory, there are some open questions and TODOs:
  //  - if we munmap before mmapping again:
  //     we temporarily release the references to the underlying memory
  //     potentially allowing us to re-use the address range
  //     potentially avoiding TLB misses if the OS hasn't released the memory
  //     there's a lot of potential but it could just as easily work against us
  //  - if we mmap again before munmapping:
  //     we ensure that we always retain a reference to the memory
  //     however we are guaranteed to get a different address range
  //  - XXX: we should be taking advantage of mremap when it's available
  //  - alternatively, we could impose an upper bound on the file size and map it once
  //    but its not polite (at best) for a library to hog the address space like that
  //  - we map nearest multiple of PAGESIZE, for which we will anyway incur the cost
  int prot = kv == JFDB_KEYS ? PROT_READ | PROT_WRITE : PROT_READ;
  if (m->size)
    munmap(m->map, m->size);
  m->size = RTM(cover * factor, sysconf(_SC_PAGESIZE));
  m->map = mmap(NULL, m->size, prot, MAP_SHARED, m->fd, 0);
  if (m->map == MAP_FAILED)
    JFDB_set_error(db, JFDB_EMMAP, "cannot mmap %s", kv == JFDB_KEYS ? "keys" : "vals");
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
cmpl $0x1, %esi
movl $0x90, %eax
movl $0xa8, %r13d
cmoveq %rax, %r13
movq 0x10(%rdi,%r13), %rsi
cmpq %rdx, %rsi
jae 0x1d27
movl %ecx, %r12d
movq %rdx, %r15
movq %rdi, %rbx
xorl %eax, %eax
cmpl $0x1, %ebp
sete %al
leal 0x1(,%rax,2), %r14d
testq %rsi, %rsi
je 0x1cc5
movq 0x8(%rbx,%r13), %rdi
callq 0x1170
movl %r12d, %r12d
imulq %r15, %r12
pushq $0x1e
popq %r15
movl %r15d, %edi
callq 0x11a0
addq %rax, %r12
decq %r12
movl %r15d, %edi
callq 0x11a0
movq %rax, %rcx
movq %r12, %rax
xorl %edx, %edx
divq %rcx
movq %rax, %r12
movl %r15d, %edi
callq 0x11a0
imulq %rax, %r12
movq %r12, 0x10(%rbx,%r13)
movl (%rbx,%r13), %r8d
pushq $0x1
popq %rcx
xorl %edi, %edi
movq %r12, %rsi
movl %r14d, %edx
xorl %r9d, %r9d
callq 0x10b0
movq %rax, 0x8(%rbx,%r13)
cmpq $-0x1, %rax
je 0x1d36
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x1, %ebp
leaq 0x3493(%rip), %rax      # 0x51d3
leaq 0x3477(%rip), %rcx      # 0x51be
cmoveq %rax, %rcx
leaq 0x35f1(%rip), %rdx      # 0x5343
pushq $0x5
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1af6