LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/math.c
// Function: planeFromPointNormal
void planeFromPointNormal(const float *pt,
                          const float *nor,
                          bool norm,
                          float *plane) {

  //ax+by+cz+d=0

  plane[0]=nor[0]; //a
  plane[1]=nor[1]; //b
  plane[2]=nor[2]; //c

  if(norm) {
    vec3_normal(plane,plane);
  }

  plane[3]=-vec3_dot(pt,plane);//d
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdi, %r14
movss (%rsi), %xmm0
movss %xmm0, (%rcx)
movss 0x4(%rsi), %xmm0
movss %xmm0, 0x4(%rcx)
movss 0x8(%rsi), %xmm0
movss %xmm0, 0x8(%rcx)
testl %edx, %edx
je 0x4080bb
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x406f42
movq %r14, %rdi
movq %rbx, %rsi
callq 0x406f00
xorps 0xcbb83(%rip), %xmm0    # 0x4d3c50
movss %xmm0, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/math.c
// Function: planeFromTriangle
void planeFromTriangle(const float *pt0,const float *pt1,
                       const float *pt2,bool cw,
                       float *plane) {

  float E0[3],E1[3],N[3];
  vec3_sub(E0,pt1,pt0);
  vec3_sub(E1,pt2,pt0);
  vec3_cross(N,E0,E1);
  vec3_normal(N,N);

  if(!cw) {
    vec3_mulScalar(N,N,-1.0f);
  }

  planeFromPointNormal(pt0,N,false,plane);


}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movl %ecx, %ebp
movq %rdi, %r14
movss (%rsi), %xmm0
movss (%rdi), %xmm2
subss %xmm2, %xmm0
movss 0x4(%rdx), %xmm3
movsd 0x4(%rsi), %xmm1
movsd 0x4(%rdi), %xmm4
subps %xmm4, %xmm1
subss %xmm4, %xmm3
movss (%rdx), %xmm5
movss 0x8(%rdx), %xmm6
unpcklps %xmm5, %xmm6            # xmm6 = xmm6[0],xmm5[0],xmm6[1],xmm5[1]
shufps $0xd4, %xmm4, %xmm2     # xmm2 = xmm2[0,1],xmm4[1,3]
shufps $0x52, %xmm4, %xmm2     # xmm2 = xmm2[2,0],xmm4[1,1]
subps %xmm2, %xmm6
movaps %xmm0, %xmm2
shufps $0xd4, %xmm1, %xmm2     # xmm2 = xmm2[0,1],xmm1[1,3]
shufps $0x52, %xmm1, %xmm2     # xmm2 = xmm2[2,0],xmm1[1,1]
mulss %xmm3, %xmm0
unpcklps %xmm6, %xmm3            # xmm3 = xmm3[0],xmm6[0],xmm3[1],xmm6[1]
mulps %xmm2, %xmm3
movaps %xmm1, %xmm2
mulps %xmm6, %xmm2
subps %xmm3, %xmm2
shufps $0x55, %xmm6, %xmm6     # xmm6 = xmm6[1,1,1,1]
mulss %xmm1, %xmm6
subss %xmm6, %xmm0
movq %rsp, %rdi
movlps %xmm2, (%rdi)
movss %xmm0, 0x8(%rdi)
movq %rdi, %rsi
callq 0x406f42
testl %ebp, %ebp
jne 0x408186
movsd (%rsp), %xmm0
movaps 0xcbae0(%rip), %xmm1    # 0x4d3c50
xorps %xmm1, %xmm0
movlps %xmm0, (%rsp)
movss 0x8(%rsp), %xmm0
xorps %xmm1, %xmm0
movss %xmm0, 0x8(%rsp)
movq %rsp, %rsi
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x408086
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/math.c
// Function: triangleBoundingBox
void triangleBoundingBox(const float *pt0,
                         const float *pt1,
                         const float *pt2,
                         float *start,float *end) {
  int i;

  start[0]=end[0]=pt0[0];
  start[1]=end[1]=pt0[1];
  start[2]=end[2]=pt0[2];

  for(i=0;i<3;i++) {
    if(pt1[i] < start[i]) {
      start[i]=pt1[i];
    }

    if(pt1[i] > end[i]) {
      end[i]=pt1[i];
    }

    if(pt2[i] < start[i]) {
      start[i]=pt2[i];
    }

    if(pt2[i] > end[i]) {
      end[i]=pt2[i];
    }
  }
}

// Assembly:
movss (%rdi), %xmm0
movss %xmm0, (%r8)
movss %xmm0, (%rcx)
movss 0x4(%rdi), %xmm0
movss %xmm0, 0x4(%r8)
movss %xmm0, 0x4(%rcx)
movss 0x8(%rdi), %xmm0
movss %xmm0, 0x8(%r8)
movss %xmm0, 0x8(%rcx)
xorl %eax, %eax
cmpq $0x3, %rax
je 0x408233
movss (%rsi,%rax,4), %xmm1
movss (%rcx,%rax,4), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x4081f0
movss %xmm1, (%rcx,%rax,4)
movaps %xmm1, %xmm0
movss (%rsi,%rax,4), %xmm1
movss (%r8,%rax,4), %xmm2
ucomiss %xmm2, %xmm1
jbe 0x408209
movss %xmm1, (%r8,%rax,4)
movss (%rcx,%rax,4), %xmm0
movaps %xmm1, %xmm2
movss (%rdx,%rax,4), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x408223
movss %xmm1, (%rcx,%rax,4)
movss (%rdx,%rax,4), %xmm1
movss (%r8,%rax,4), %xmm2
ucomiss %xmm2, %xmm1
jbe 0x40822e
movss %xmm1, (%r8,%rax,4)
incq %rax
jmp 0x4081ce
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/math.c
// Function: sphereBoundingBox
void sphereBoundingBox(const float *pos,float radius,
                       float *start,float *end) {
  int i;

  for(i=0;i<3;i++) {
    start[i]=pos[i]-radius;
    end[i]=pos[i]+radius;
  }
}

// Assembly:
xorl %eax, %eax
cmpq $0x3, %rax
je 0x40825d
movss (%rdi,%rax,4), %xmm1
subss %xmm0, %xmm1
movss %xmm1, (%rsi,%rax,4)
movss (%rdi,%rax,4), %xmm1
addss %xmm0, %xmm1
movss %xmm1, (%rdx,%rax,4)
incq %rax
jmp 0x408236
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/math.c
// Function: mat4_frustum
void mat4_frustum(float *out,
                  float left,float right,
                  float bottom,float top,
                  float zNear,float zFar) {

  memset(out,0,sizeof(float)*16);

  float A=(right+left)/(right-left);
  float B=(top+bottom)/(top-bottom);
  float C=-(zFar+zNear)/(zFar-zNear);
  float D=-(2.0f*zFar*zNear)/(zFar-zNear);

  float x=(2.0f*zNear)/(right-left);
  float y=(2.0f*zNear)/(top-bottom);

  out[0]=x;
  out[2]=A;
  out[5]=y;
  out[6]=B;
  out[10]=C;
  out[11]=D;
  out[14]=-1.0f;
}

// Assembly:
xorps %xmm6, %xmm6
movups %xmm6, 0x4(%rdi)
movups %xmm6, 0x14(%rdi)
movups %xmm6, 0x24(%rdi)
movups %xmm6, 0x30(%rdi)
movaps %xmm0, %xmm6
addss %xmm1, %xmm6
subss %xmm0, %xmm1
movaps %xmm4, %xmm0
addss %xmm5, %xmm0
movaps %xmm5, %xmm7
subss %xmm4, %xmm7
mulss 0xcb985(%rip), %xmm5    # 0x4d3c34
mulss %xmm4, %xmm5
unpcklps %xmm2, %xmm4            # xmm4 = xmm4[0],xmm2[0],xmm4[1],xmm2[1]
movaps 0xcb9c2(%rip), %xmm8    # 0x4d3c80
unpcklps %xmm3, %xmm8            # xmm8 = xmm8[0],xmm3[0],xmm8[1],xmm3[1]
movaps %xmm4, %xmm9
mulps %xmm8, %xmm9
addps %xmm4, %xmm8
divss %xmm1, %xmm6
shufps $0x1, %xmm9, %xmm8      # xmm8 = xmm8[1,0],xmm9[0,0]
shufps $0xe2, %xmm9, %xmm8     # xmm8 = xmm8[2,0],xmm9[2,3]
xorps 0xcb96d(%rip), %xmm0    # 0x4d3c50
subss %xmm2, %xmm3
unpcklps %xmm5, %xmm0            # xmm0 = xmm0[0],xmm5[0],xmm0[1],xmm5[1]
divss %xmm1, %xmm9
movss %xmm9, (%rdi)
movss %xmm6, 0x8(%rdi)
unpcklps %xmm3, %xmm3            # xmm3 = xmm3[0,0,1,1]
divps %xmm3, %xmm8
movlps %xmm8, 0x14(%rdi)
unpcklps %xmm7, %xmm7            # xmm7 = xmm7[0,0,1,1]
divps %xmm7, %xmm0
movlps %xmm0, 0x28(%rdi)
movl $0xbf800000, 0x38(%rdi) # imm = 0xBF800000
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/math.c
// Function: mat4_infFrustum
void mat4_infFrustum(float *out,
                     float left,float right,
                     float bottom,float top,
                     float zNear) {

  memset(out,0,sizeof(float)*16);

  float A=(right+left)/(right-left);
  float B=(top+bottom)/(top-bottom);
  float C=-1.0f;
  float D=-2.0f*zNear;

  float x=(2.0f*zNear)/(right-left);
  float y=(2.0f*zNear)/(top-bottom);

  out[0]=x;
  out[2]=A;
  out[5]=y;
  out[6]=B;
  out[10]=C;
  out[11]=D;
  out[14]=-1.0f;
}

// Assembly:
xorps %xmm5, %xmm5
movups %xmm5, 0x4(%rdi)
movups %xmm5, 0x14(%rdi)
movups %xmm5, 0x24(%rdi)
movups %xmm5, 0x30(%rdi)
movaps %xmm0, %xmm5
addss %xmm1, %xmm5
subss %xmm0, %xmm1
divss %xmm1, %xmm5
movaps %xmm4, %xmm0
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movaps 0xcb93a(%rip), %xmm6    # 0x4d3c80
unpcklps %xmm3, %xmm6            # xmm6 = xmm6[0],xmm3[0],xmm6[1],xmm3[1]
movaps %xmm0, %xmm7
mulps %xmm6, %xmm7
addps %xmm0, %xmm6
shufps $0x1, %xmm7, %xmm6      # xmm6 = xmm6[1,0],xmm7[0,0]
shufps $0xe2, %xmm7, %xmm6     # xmm6 = xmm6[2,0],xmm7[2,3]
subss %xmm2, %xmm3
mulss 0xcb8ce(%rip), %xmm4    # 0x4d3c34
divss %xmm1, %xmm7
movss %xmm7, (%rdi)
movss %xmm5, 0x8(%rdi)
unpcklps %xmm3, %xmm3            # xmm3 = xmm3[0,0,1,1]
divps %xmm3, %xmm6
movlps %xmm6, 0x14(%rdi)
movl $0xbf800000, %eax       # imm = 0xBF800000
movl %eax, 0x28(%rdi)
movss %xmm4, 0x2c(%rdi)
movl %eax, 0x38(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/math.c
// Function: mat4_perspective_fovx
void mat4_perspective_fovx(float *out,
                        float fovx,float aspect,
                        float znear,float zfar) {
  float right=tan(fovx/2.0f)*znear;
  float left=-right;
  float top=right/aspect;
  float bottom=-top;
  mat4_frustum(out,left,right,bottom,top,znear,zfar);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movss %xmm3, 0xc(%rsp)
movss %xmm2, 0x4(%rsp)
movss %xmm1, 0x8(%rsp)
movq %rdi, %rbx
mulss 0xca0cc(%rip), %xmm0    # 0x4d247c
cvtss2sd %xmm0, %xmm0
callq 0x401100
movss 0x4(%rsp), %xmm4
cvtss2sd %xmm4, %xmm1
mulsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm1
movaps 0xcb87e(%rip), %xmm2    # 0x4d3c50
movaps %xmm1, %xmm3
movaps %xmm1, %xmm0
xorps %xmm2, %xmm0
divss 0x8(%rsp), %xmm3
xorps %xmm3, %xmm2
movq %rbx, %rdi
movss 0xc(%rsp), %xmm5
addq $0x10, %rsp
popq %rbx
jmp 0x40827b
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/math.c
// Function: mat4_perspective_fovy
void mat4_perspective_fovy(float *out,
                        float fovy,float aspect,
                        float znear,float zfar) {

  float top=tan(fovy/2.0f)*znear;
  float bottom=-top;
  float right=top*aspect;
  float left=-right;
  mat4_frustum(out,left,right,bottom,top,znear,zfar);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movss %xmm3, 0xc(%rsp)
movss %xmm2, 0x8(%rsp)
movaps %xmm1, 0x10(%rsp)
movq %rdi, %rbx
mulss 0xca064(%rip), %xmm0    # 0x4d247c
cvtss2sd %xmm0, %xmm0
callq 0x401100
movss 0x8(%rsp), %xmm4
cvtss2sd %xmm4, %xmm1
mulsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm3
movaps 0xcb816(%rip), %xmm0    # 0x4d3c50
movaps 0x10(%rsp), %xmm1
mulss %xmm3, %xmm1
movaps %xmm3, %xmm2
xorps %xmm0, %xmm2
xorps %xmm1, %xmm0
movq %rbx, %rdi
movss 0xc(%rsp), %xmm5
addq $0x20, %rsp
popq %rbx
jmp 0x40827b
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/math.c
// Function: mat4_infPerspective_fovx
void mat4_infPerspective_fovx(float *out,
                              float fovx,float aspect,
                              float znear) {
  float right=tan(fovx/2.0f)*znear;
  float left=-right;
  float top=right/aspect;
  float bottom=-top;
  mat4_infFrustum(out,left,right,bottom,top,znear);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movss %xmm2, 0x8(%rsp)
movss %xmm1, 0xc(%rsp)
movq %rdi, %rbx
mulss 0xca001(%rip), %xmm0    # 0x4d247c
cvtss2sd %xmm0, %xmm0
callq 0x401100
movss 0x8(%rsp), %xmm4
cvtss2sd %xmm4, %xmm1
mulsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm1
movaps 0xcb7b3(%rip), %xmm2    # 0x4d3c50
movaps %xmm1, %xmm3
movaps %xmm1, %xmm0
xorps %xmm2, %xmm0
divss 0xc(%rsp), %xmm3
xorps %xmm3, %xmm2
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x408317
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/math.c
// Function: mat4_infPerspective_fovy
void mat4_infPerspective_fovy(float *out,
                              float fovy,float aspect,
                              float znear) {

  float top=tan(fovy/2.0f)*znear;
  float bottom=-top;
  float right=top*aspect;
  float left=-right;
  mat4_infFrustum(out,left,right,bottom,top,znear);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movss %xmm2, 0xc(%rsp)
movaps %xmm1, 0x10(%rsp)
movq %rdi, %rbx
mulss 0xc9fa5(%rip), %xmm0    # 0x4d247c
cvtss2sd %xmm0, %xmm0
callq 0x401100
movss 0xc(%rsp), %xmm4
cvtss2sd %xmm4, %xmm1
mulsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm3
movaps 0xcb757(%rip), %xmm0    # 0x4d3c50
movaps 0x10(%rsp), %xmm1
mulss %xmm3, %xmm1
movaps %xmm3, %xmm2
xorps %xmm0, %xmm2
xorps %xmm1, %xmm0
movq %rbx, %rdi
addq $0x20, %rsp
popq %rbx
jmp 0x408317
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/math.c
// Function: mat4_perspective
void mat4_perspective(float *out,float fov,float aspect,
                      float znear,float zfar) {
  float yScale=1.0f/tanf(fov/2.0f);
  float xScale=yScale/aspect;
  float nearmfar=znear-zfar;

  memset(out,0,sizeof(float)*16);

  out[0]=xScale;
  out[5]=yScale;
  out[10]=(zfar+znear)/nearmfar;
  out[11]=2.0f*zfar*znear/nearmfar;
  out[14]=-1.0f;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movaps %xmm3, 0x10(%rsp)
movss %xmm2, 0xc(%rsp)
movss %xmm1, 0x8(%rsp)
movq %rdi, %rbx
mulss 0xc9f43(%rip), %xmm0    # 0x4d247c
callq 0x4158e0
movss 0xc9f1a(%rip), %xmm1    # 0x4d2460
divss %xmm0, %xmm1
movaps %xmm1, %xmm0
divss 0x8(%rsp), %xmm0
movss 0xc(%rsp), %xmm4
movaps %xmm4, %xmm2
movaps 0x10(%rsp), %xmm5
subss %xmm5, %xmm2
xorps %xmm3, %xmm3
movups %xmm3, 0x14(%rbx)
movups %xmm3, 0x24(%rbx)
movups %xmm3, 0x30(%rbx)
movups %xmm3, 0x4(%rbx)
movss %xmm0, (%rbx)
movss %xmm1, 0x14(%rbx)
movaps %xmm4, %xmm0
movaps %xmm5, %xmm1
addss %xmm5, %xmm0
addss %xmm5, %xmm1
mulss %xmm4, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
unpcklps %xmm2, %xmm2            # xmm2 = xmm2[0,0,1,1]
divps %xmm2, %xmm0
movlps %xmm0, 0x28(%rbx)
movl $0xbf800000, 0x38(%rbx) # imm = 0xBF800000
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/math.c
// Function: mat4_perspectiveInf
void mat4_perspectiveInf(float *out,float fov,float aspect,float znear) {
  float yScale=1.0f/tanf(fov/2.0f);
  float xScale=yScale/aspect;

  memset(out,0,sizeof(float)*16);

  out[0]=xScale;
  out[5]=yScale;
  out[10]=-1.0f;
  out[11]=-2.0f*znear;
  out[14]=-1.0f;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movss %xmm2, 0xc(%rsp)
movss %xmm1, 0x8(%rsp)
movq %rdi, %rbx
mulss 0xc9eb3(%rip), %xmm0    # 0x4d247c
callq 0x4158e0
movss 0xc9e8a(%rip), %xmm1    # 0x4d2460
divss %xmm0, %xmm1
movaps %xmm1, %xmm0
divss 0x8(%rsp), %xmm0
xorps %xmm2, %xmm2
movups %xmm2, 0x14(%rbx)
movups %xmm2, 0x24(%rbx)
movups %xmm2, 0x30(%rbx)
movups %xmm2, 0x4(%rbx)
movss %xmm0, (%rbx)
movss %xmm1, 0x14(%rbx)
movl $0xbf800000, %eax       # imm = 0xBF800000
movl %eax, 0x28(%rbx)
movss 0xc(%rsp), %xmm0
mulss 0xcb61f(%rip), %xmm0    # 0x4d3c34
movss %xmm0, 0x2c(%rbx)
movl %eax, 0x38(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/math.c
// Function: mat4_ortho
void mat4_ortho(float *out,float left,float right,
                float bottom,float top,float nearVal,
                float farVal) {

  memset(out,0,sizeof(float)*16);

  float tx = -(right+left)/(right-left);
  float ty = -(top+bottom)/(top-bottom);
  float tz = -(farVal+nearVal)/(farVal-nearVal);

  out[0]=2.0f/(right-left);
  out[3]=tx;
  out[5]=2.0f/(top-bottom);
  out[7]=ty;
  out[10]=-2.0f/(nearVal-farVal);
  out[11]=tz;
  out[15]=1.0f;
}

// Assembly:
xorps %xmm6, %xmm6
movups %xmm6, 0x4(%rdi)
movups %xmm6, 0x14(%rdi)
movups %xmm6, 0x24(%rdi)
andq $0x0, 0x34(%rdi)
movaps %xmm0, %xmm6
addss %xmm1, %xmm6
movaps 0xcb60b(%rip), %xmm7    # 0x4d3c50
xorps %xmm7, %xmm6
subss %xmm0, %xmm1
divss %xmm1, %xmm6
movaps %xmm2, %xmm0
addss %xmm3, %xmm0
xorps %xmm7, %xmm0
subss %xmm2, %xmm3
divss %xmm3, %xmm0
movaps %xmm4, %xmm2
addss %xmm5, %xmm2
xorps %xmm7, %xmm2
movaps %xmm5, %xmm7
unpcklps %xmm4, %xmm7            # xmm7 = xmm7[0],xmm4[0],xmm7[1],xmm4[1]
unpcklps %xmm5, %xmm4            # xmm4 = xmm4[0],xmm5[0],xmm4[1],xmm5[1]
subps %xmm7, %xmm4
movss 0xcb5bc(%rip), %xmm5    # 0x4d3c3c
movaps %xmm5, %xmm7
divss %xmm1, %xmm7
movss %xmm7, (%rdi)
movss %xmm6, 0xc(%rdi)
divss %xmm3, %xmm5
movss %xmm5, 0x14(%rdi)
movss %xmm0, 0x1c(%rdi)
movaps 0xcb5eb(%rip), %xmm0    # 0x4d3c90
movss %xmm2, %xmm0            # xmm0 = xmm2[0],xmm0[1,2,3]
shufps $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
divps %xmm4, %xmm0
movlps %xmm0, 0x28(%rdi)
movl $0x3f800000, 0x3c(%rdi) # imm = 0x3F800000
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/redblack.c
// Function: rbdestroy
RB_STATIC void
RB_ENTRY(destroy)(struct RB_ENTRY(tree) *rbinfo)
{
	if (rbinfo==NULL)
		return;

	if (rbinfo->rb_root!=RBNULL)
		RB_ENTRY(_destroy)(rbinfo->rb_root);
	
	free(rbinfo);
}

// Assembly:
testq %rdi, %rdi
je 0x4089b8
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
leaq 0x10d843(%rip), %rax    # 0x5161e8
cmpq %rax, %rdi
je 0x4089af
callq 0x4089b9
movq %rbx, %rdi
popq %rbx
jmp 0x4424a0
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/redblack.c
// Function: rb_destroy
static void
RB_ENTRY(_destroy)(struct RB_ENTRY(node) *x)
{
	if (x!=RBNULL)
	{
		if (x->left!=RBNULL)
			RB_ENTRY(_destroy)(x->left);
		if (x->right!=RBNULL)
			RB_ENTRY(_destroy)(x->right);
		RB_ENTRY(_free)(x);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0x10d81e(%rip), %r14    # 0x5161e8
cmpq %r14, %rdi
je 0x4089d4
callq 0x4089b9
movq 0x8(%rbx), %rdi
cmpq %r14, %rdi
je 0x4089e2
callq 0x4089b9
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4424a0
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/redblack.c
// Function: rbfind
RB_STATIC const RB_ENTRY(data_t) * 
RB_ENTRY(find)(const RB_ENTRY(data_t) *key, struct RB_ENTRY(tree) *rbinfo)
{
	struct RB_ENTRY(node) *x;

	if (rbinfo==NULL)
		return(NULL);

	/* If we have a NULL root (empty tree) then just return */
	if (rbinfo->rb_root==RBNULL)
		return(NULL);

	x=RB_ENTRY(_traverse)(0, key, rbinfo);

	return((x==RBNULL) ? NULL : RB_GET(x, key));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rdx
testq %rsi, %rsi
je 0x408bff
leaq 0x10d606(%rip), %r14    # 0x5161e8
cmpq %r14, 0x10(%rdx)
je 0x408bff
movq %rdi, %rsi
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x408a21
cmpq %r14, %rax
je 0x408c01
movq 0x20(%rax), %rbx
jmp 0x408c01
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/redblack.c
// Function: rbdelete
RB_STATIC const RB_ENTRY(data_t) * 
RB_ENTRY(delete)(const RB_ENTRY(data_t) *key, struct RB_ENTRY(tree) *rbinfo)
{
	struct RB_ENTRY(node) *x;
	const RB_ENTRY(data_t) * y;

	if (rbinfo==NULL)
		return(NULL);

	x=RB_ENTRY(_traverse)(0, key, rbinfo);

	if (x==RBNULL)
	{
		return(NULL);
	}
	else
	{
		y=RB_GET(x, key);
		RB_ENTRY(_delete)(&rbinfo->rb_root, x);

		return(y);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
testq %rsi, %rsi
je 0x408de8
movq %rdi, %rsi
xorl %ebx, %ebx
xorl %edi, %edi
movq %r14, %rdx
callq 0x408a21
leaq 0x10d5b1(%rip), %r13    # 0x5161e8
cmpq %r13, %rax
je 0x408dea
movq %rax, %r12
movq (%rax), %rcx
movq 0x20(%rax), %rbx
movq %rax, %r15
cmpq %r13, %rcx
je 0x408c6f
movq %r12, %r15
cmpq %r13, 0x8(%r12)
je 0x408c73
movq %r12, %rdi
callq 0x40911f
movq %rax, %r15
movq (%rax), %rcx
cmpq %r13, %rcx
jne 0x408c73
movq 0x8(%r15), %rcx
addq $0x10, %r14
movq 0x10(%r15), %rax
movq %rax, 0x10(%rcx)
movq %r14, %rdx
cmpq %r13, %rax
je 0x408c93
xorl %edx, %edx
cmpq (%rax), %r15
setne %dl
leaq (%rax,%rdx,8), %rdx
movq %rcx, (%rdx)
cmpq %r12, %r15
je 0x408ca4
movq 0x20(%r15), %rax
movq %rax, 0x20(%r12)
cmpl $0x0, 0x18(%r15)
jne 0x408dde
jmp 0x408dd1
cmpl $0x0, 0x18(%rcx)
jne 0x408dda
leaq 0x10(%rcx), %r12
movq 0x10(%rcx), %rsi
movq (%rsi), %rax
cmpq %rax, %rcx
je 0x408d2c
cmpl $0x1, 0x18(%rax)
jne 0x408cee
andl $0x0, 0x18(%rax)
movl $0x1, 0x18(%rsi)
movq %r14, %rdi
callq 0x4090e0
movq (%r12), %rsi
movq (%rsi), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rdx
cmpl $0x0, 0x18(%rdx)
movl 0x18(%rcx), %edi
je 0x408d89
testl %edi, %edi
jne 0x408d8d
andl $0x0, 0x18(%rdx)
movl $0x1, 0x18(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x4090a1
movq (%r12), %rsi
movq (%rsi), %rax
movq (%rax), %rcx
jmp 0x408d8d
movq 0x8(%rsi), %rax
cmpl $0x1, 0x18(%rax)
jne 0x408d51
andl $0x0, 0x18(%rax)
movl $0x1, 0x18(%rsi)
movq %r14, %rdi
callq 0x4090a1
movq (%r12), %rsi
movq 0x8(%rsi), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
cmpl $0x0, 0x18(%rdx)
movl 0x18(%rcx), %edi
je 0x408da5
testl %edi, %edi
jne 0x408da9
andl $0x0, 0x18(%rdx)
movl $0x1, 0x18(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x4090e0
movq (%r12), %rsi
movq 0x8(%rsi), %rax
movq 0x8(%rax), %rcx
jmp 0x408da9
testl %edi, %edi
je 0x408dc8
movl 0x18(%rsi), %edx
movl %edx, 0x18(%rax)
andl $0x0, 0x18(%rsi)
andl $0x0, 0x18(%rcx)
movq %r14, %rdi
callq 0x4090e0
jmp 0x408dbf
testl %edi, %edi
je 0x408dc8
movl 0x18(%rsi), %edx
movl %edx, 0x18(%rax)
andl $0x0, 0x18(%rsi)
andl $0x0, 0x18(%rcx)
movq %r14, %rdi
callq 0x4090a1
movq %r14, %r12
movq (%r12), %rcx
jmp 0x408dd1
movl $0x1, 0x18(%rax)
jmp 0x408dc2
cmpq (%r14), %rcx
jne 0x408cb4
andl $0x0, 0x18(%rcx)
movq %r15, %rdi
callq 0x4424a0
jmp 0x408dea
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/redblack.c
// Function: rb_walk
static void
RB_ENTRY(_walk)(const struct RB_ENTRY(node) *x, void (*action)(const RB_ENTRY(data_t) *, const VISIT, const int, void *), void *arg, int level)
{
	if (x==RBNULL)
		return;

	if (x->left==RBNULL && x->right==RBNULL)
	{
		/* leaf */
		(*action)(RB_GET(x, key), leaf, level, arg);
	}
	else
	{
		(*action)(RB_GET(x, key), preorder, level, arg);

		RB_ENTRY(_walk)(x->left, action, arg, level+1);

		(*action)(RB_GET(x, key), postorder, level, arg);

		RB_ENTRY(_walk)(x->right, action, arg, level+1);

		(*action)(RB_GET(x, key), endorder, level, arg);
	}
}

// Assembly:
leaq 0x10d3dc(%rip), %rax    # 0x5161e8
cmpq %rax, %rdi
je 0x408ea3
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movq %rdx, %rbx
movq %rsi, %r8
movq %rdi, %r15
cmpq %rax, (%rdi)
jne 0x408e37
cmpq %rax, 0x8(%r15)
je 0x408ea4
leaq 0x20(%r15), %r12
movq 0x20(%r15), %rdi
xorl %esi, %esi
movl %r14d, %edx
movq %rbx, %rcx
movq %r8, %r13
callq *%r8
movq (%r15), %rdi
leal 0x1(%r14), %ebp
movq %r13, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
callq 0x408e05
movq 0x20(%r15), %rdi
pushq $0x1
popq %rsi
movl %r14d, %edx
movq %rbx, %rcx
callq *%r13
movq 0x8(%r15), %rdi
movq %r13, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
callq 0x408e05
movq %r13, %r8
pushq $0x2
popq %rsi
movq (%r12), %rdi
movl %r14d, %edx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%r8
retq
addq $0x20, %r15
pushq $0x3
popq %rsi
movq %r15, %r12
jmp 0x408e88
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/redblack.c
// Function: rblookup
RB_STATIC const RB_ENTRY(data_t) * 
RB_ENTRY(lookup)(int mode, const RB_ENTRY(data_t) *key, struct RB_ENTRY(tree) *rbinfo)
{
	struct RB_ENTRY(node) *x;

	/* If we have a NULL root (empty tree) then just return NULL */
	if (rbinfo==NULL || rbinfo->rb_root==NULL)
		return(NULL);

	x=RB_ENTRY(_lookup)(mode, key, rbinfo);

	return((x==RBNULL) ? NULL : RB_GET(x, key));
}

// Assembly:
testq %rdx, %rdx
je 0x408f77
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq 0x10(%rdx), %rcx
testq %rcx, %rcx
je 0x409093
movl %edi, %ebp
cmpl $0x7, %edi
je 0x408f7e
cmpl $0x8, %ebp
jne 0x408f9c
leaq 0x10d289(%rip), %rax    # 0x5161e8
movq %rax, %rdx
movq %rdx, %rbx
cmpq %rax, %rcx
je 0x409053
movq %rcx, %rdx
movq 0x8(%rcx), %rcx
jmp 0x408f62
xorl %ecx, %ecx
jmp 0x40909d
leaq 0x10d263(%rip), %rax    # 0x5161e8
movq %rax, %rdx
movq %rdx, %rbx
cmpq %rax, %rcx
je 0x409053
movq %rcx, %rdx
movq (%rcx), %rcx
jmp 0x408f88
movq %rsi, %r15
leaq 0x10d242(%rip), %r12    # 0x5161e8
movq %r12, %rbx
movq %rbx, %rdi
movq %rcx, %rbx
movb $0x1, %sil
xorl %edx, %edx
cmpq %r12, %rbx
je 0x408fea
testb $0x1, %sil
je 0x408fea
movq 0x20(%rbx), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq *(%r14)
testl %eax, %eax
js 0x408fe2
movb $0x1, %dl
xorl %esi, %esi
movq %rbx, %rdi
testl %eax, %eax
je 0x408fb4
leaq 0x8(%rbx), %rcx
jmp 0x408fe5
movq %rbx, %rcx
movq (%rcx), %rcx
jmp 0x408fa9
cmpl $0x3, %ebp
setb %cl
testb %dl, %cl
jne 0x409053
testb $0x1, %dl
je 0x409027
cmpl $0x1, %ebp
je 0x409042
cmpl $0x4, %ebp
sete %cl
cmpl $0x2, %ebp
je 0x40901c
cmpl $0x3, %ebp
setne %r8b
notb %sil
orb %r8b, %sil
testb $0x1, %sil
jne 0x409065
testl %eax, %eax
jns 0x409050
callq 0x409151
jmp 0x40904b
xorl %ecx, %ecx
cmpl $0x6, %ebp
ja 0x409004
pushq $0x61
popq %r8
btl %ebp, %r8d
jb 0x409095
pushq $0x12
popq %r8
btl %ebp, %r8d
jae 0x409004
testl %eax, %eax
jle 0x409050
callq 0x40911f
movq %rax, %rbx
jmp 0x409053
movq %rdi, %rbx
leaq 0x10d18e(%rip), %rax    # 0x5161e8
cmpq %rax, %rbx
je 0x409093
movq 0x20(%rbx), %rcx
jmp 0x409095
cmpl $0x5, %ebp
setne %al
andb %dl, %cl
xorb $0x1, %cl
testb %cl, %al
jne 0x409079
movq %rbx, %rdi
jmp 0x409046
cmpl $0x3, %ebp
setne %al
cmpl $0x6, %ebp
setne %cl
xorb $0x1, %dl
orb %al, %dl
testb %dl, %cl
jne 0x409093
movq %rbx, %rdi
jmp 0x409020
xorl %ecx, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
movq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/sobol.c
// Function: sobol_get
int sobol_get(void * state, unsigned int dimension, double * v)
{
  sobol_state_t * s_state = (sobol_state_t *) state;

  unsigned int i_dimension;

  /* Find the position of the least-significant zero in count. */
  int ell = 0;
  int c = s_state->sequence_count;
  while(1) {
    ++ell;
    if((c % 2) == 1) c /= 2;
    else break;
  }

  /* Check for exhaustion. */
  if(ell > SOBOL_BIT_COUNT) {
    // return GSL_EFAILED; /* FIXME: good return code here */
    /////////////////
    sobol_init(state, dimension);

    /* Find the position of the least-significant zero in count. */
    int ell = 0;
    int c = s_state->sequence_count;
    while(1) {
      ++ell;
      if((c % 2) == 1) c /= 2;
      else break;
    }
    /////////////////
  }

  for(i_dimension=0; i_dimension<dimension; i_dimension++) {
    const int direction_i     = s_state->v_direction[ell-1][i_dimension];
    const int old_numerator_i = s_state->last_numerator_vec[i_dimension];
    const int new_numerator_i = old_numerator_i ^ direction_i;
    s_state->last_numerator_vec[i_dimension] = new_numerator_i;
    v[i_dimension] = new_numerator_i * s_state->last_denominator_inv;
  }

  s_state->sequence_count++;

  return GSL_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movl (%rdi), %eax
xorl %ecx, %ecx
pushq $0x58
popq %r15
movl %eax, %edx
movl %edx, %esi
andl $0x80000001, %esi       # imm = 0x80000001
cmpl $0x1, %esi
jne 0x409394
incl %ecx
shrl %edx
addq $0x50, %r15
jmp 0x40937d
cmpl $0x1e, %ecx
jb 0x4093b6
movq %rbx, %rdi
movl %ebp, %esi
callq 0x409184
movl (%rbx), %eax
movl %eax, %ecx
movl %ecx, %edx
andl $0x80000001, %edx       # imm = 0x80000001
shrl %ecx
cmpl $0x1, %edx
je 0x4093a7
movl %ebp, %ecx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x4093e3
movl 0x10(%rbx,%rdx,4), %esi
xorl (%rbx,%r15,2), %esi
movl %esi, 0x10(%rbx,%rdx,4)
cvtsi2sd %esi, %xmm0
mulsd 0x8(%rbx), %xmm0
movsd %xmm0, (%r14,%rdx,8)
incq %rdx
addq $0x2, %r15
jmp 0x4093ba
incl %eax
movl %eax, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/stb_image.c
// Function: stbi_loadf_main
float *stbi_loadf_main(stbi__context *s, int *x, int *y, int *comp, int req_comp)
{
   unsigned char *data;
   #ifndef STBI_NO_HDR
   if (stbi__hdr_test(s))
      return stbi__hdr_load(s,x,y,comp,req_comp);
   #endif
   data = stbi_load_main(s, x, y, comp, req_comp);
   if (data)
      return stbi__ldr_to_hdr(data, *x, *y, req_comp ? req_comp : *comp);
   return stbi__errpf("unknown image type", "Image not of any known type, or corrupt");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %ebx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
callq 0x40c1c5
movq %r14, %rdi
testl %eax, %eax
je 0x40c055
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movl %ebx, %r8d
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x40c216
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movl %ebx, %r8d
callq 0x4094f9
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x40c193
movl (%r13), %eax
movl (%r12), %r14d
testl %ebx, %ebx
jne 0x40c083
movl (%r15), %ebx
imull %eax, %r14d
movl %ebx, %eax
imull %r14d, %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x442160
testq %rax, %rax
je 0x40c19c
movl %ebx, %ecx
andl $0x1, %ecx
leal (%rbx,%rcx), %r13d
decl %r13d
xorl %r15d, %r15d
testl %r13d, %r13d
cmovlel %r15d, %r13d
movq %rbx, 0x30(%rsp)
movslq %ebx, %rcx
testl %r14d, %r14d
cmovlel %r15d, %r14d
movq %rcx, 0x18(%rsp)
leaq (,%rcx,4), %rcx
movq %rcx, 0x20(%rsp)
movq 0x8(%rsp), %r12
movq %rax, 0x10(%rsp)
movq %rax, %rbx
movq %r14, 0x28(%rsp)
cmpq %r14, %r15
je 0x40c182
movq %r15, %rbp
imulq 0x18(%rsp), %rbp
xorl %r14d, %r14d
cmpq %r14, %r13
je 0x40c142
movzbl (%r12,%r14), %eax
cvtsi2ss %eax, %xmm0
divss 0xc81ca(%rip), %xmm0    # 0x4d42e0
cvtss2sd %xmm0, %xmm0
cvtss2sd 0x10a0f6(%rip), %xmm1   # 0x516218
callq 0x415200
cvtss2sd 0x10a0ed(%rip), %xmm1   # 0x51621c
mulsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm0
movss %xmm0, (%rbx,%r14,4)
incq %r14
jmp 0x40c100
cmpl 0x30(%rsp), %r13d
jge 0x40c16b
addq %r13, %rbp
movq 0x8(%rsp), %rax
movzbl (%rax,%rbp), %eax
cvtsi2ss %eax, %xmm0
divss 0xc817f(%rip), %xmm0    # 0x4d42e0
movq 0x10(%rsp), %rax
movss %xmm0, (%rax,%rbp,4)
incq %r15
addq 0x20(%rsp), %rbx
addq 0x18(%rsp), %r12
movq 0x28(%rsp), %r14
jmp 0x40c0eb
movq 0x8(%rsp), %rdi
callq 0x4424a0
movq 0x10(%rsp), %rax
jmp 0x40c1b6
leaq 0xc85a2(%rip), %rax     # 0x4d473c
jmp 0x40c1ad
movq 0x8(%rsp), %rdi
callq 0x4424a0
leaq 0xc8692(%rip), %rax     # 0x4d483f
movq %rax, 0x10d38c(%rip)    # 0x519540
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/stb_image.c
// Function: stbi__cleanup_jpeg
static void stbi__cleanup_jpeg(stbi__jpeg *j)
{
   int i;
   for (i=0; i < j->s->img_n; ++i) {
      if (j->img_comp[i].raw_data) {
         free(j->img_comp[i].raw_data);
         j->img_comp[i].raw_data = NULL;
         j->img_comp[i].data = NULL;
      }
      if (j->img_comp[i].linebuf) {
         free(j->img_comp[i].linebuf);
         j->img_comp[i].linebuf = NULL;
      }
   }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x35e0(%rdi), %r14
xorl %r15d, %r15d
movq (%rbx), %rax
movslq 0x8(%rax), %rax
cmpq %rax, %r15
jge 0x40dffe
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x40dfe4
callq 0x4424a0
xorps %xmm0, %xmm0
movups %xmm0, -0x10(%r14)
movq (%r14), %rdi
testq %rdi, %rdi
je 0x40dff5
callq 0x4424a0
andq $0x0, (%r14)
incq %r15
addq $0x48, %r14
jmp 0x40dfc2
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/stb_image.c
// Function: stbi__jpeg_decode_block
static int stbi__jpeg_decode_block(stbi__jpeg *j, short data[64], stbi__huffman *hdc, stbi__huffman *hac, int b)
{
   int diff,dc,k;
   int t = stbi__jpeg_huff_decode(j, hdc);
   if (t < 0) return stbi__err("bad huffman code","Corrupt JPEG");

   // 0 all the ac values now so we can do it 32-bits at a time
   memset(data,0,64*sizeof(data[0]));

   diff = t ? stbi__extend_receive(j, t) : 0;
   dc = j->img_comp[b].dc_pred + diff;
   j->img_comp[b].dc_pred = dc;
   data[0] = (short) dc;

   // decode AC components, see JPEG spec
   k = 1;
   do {
      int r,s;
      int rs = stbi__jpeg_huff_decode(j, hac);
      if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG");
      s = rs & 15;
      r = rs >> 4;
      if (s == 0) {
         if (rs != 0xf0) break; // end block
         k += 16;
      } else {
         k += r;
         // decode into unzigzag'd location
         data[stbi__jpeg_dezigzag[k++]] = (short) stbi__extend_receive(j,s);
      }
   } while (k < 64);
   return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rsi
callq 0x40e744
testl %eax, %eax
js 0x40e27c
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%r14)
movups %xmm0, 0x60(%r14)
movups %xmm0, 0x50(%r14)
movups %xmm0, 0x40(%r14)
movups %xmm0, 0x30(%r14)
movups %xmm0, 0x20(%r14)
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
je 0x40e207
movq %r15, %rdi
movl %eax, %esi
callq 0x40e86b
jmp 0x40e209
xorl %eax, %eax
movslq %ebp, %rcx
imulq $0x48, %rcx, %rcx
addl 0x35b8(%r15,%rcx), %eax
movl %eax, 0x35b8(%r15,%rcx)
movw %ax, (%r14)
pushq $0x1
popq %r13
leaq 0xc61a1(%rip), %r12     # 0x4d43d0
movq %r15, %rdi
movq %rbx, %rsi
callq 0x40e744
testl %eax, %eax
js 0x40e27c
movl %eax, %esi
andl $0xf, %esi
je 0x40e266
shrl $0x4, %eax
movslq %r13d, %rbp
addq %rax, %rbp
movq %r15, %rdi
callq 0x40e86b
leal 0x1(%rbp), %r13d
movzbl (%r12,%rbp), %ecx
movw %ax, (%r14,%rcx,2)
jmp 0x40e271
cmpl $0xf0, %eax
jne 0x40e277
addl $0x10, %r13d
cmpl $0x40, %r13d
jl 0x40e22f
pushq $0x1
popq %rax
jmp 0x40e28c
leaq 0xc6628(%rip), %rax     # 0x4d48ab
movq %rax, 0x10b2b6(%rip)    # 0x519540
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/stb_image.c
// Function: stbi__extend_receive
stbi_inline static int stbi__extend_receive(stbi__jpeg *j, int n)
{
   unsigned int m = 1 << (n-1);
   unsigned int k;
   if (j->code_bits < n) stbi__grow_buffer_unsafe(j);

   #if 1
   k = stbi_lrot(j->code_buffer, n);
   j->code_buffer = k & ~stbi__bmask[n];
   k &= stbi__bmask[n];
   j->code_bits -= n;
   #else
   k = (j->code_buffer >> (32 - n)) & stbi__bmask[n];
   j->code_bits -= n;
   j->code_buffer <<= n;
   #endif
   // the following test is probably a random branch that won't
   // predict well. I tried to table accelerate it but failed.
   // maybe it's compiling as a conditional move?
   if (k < m)
      return (-1 << n) + k + 1;
   else
      return k;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movl 0x36c4(%rdi), %eax
cmpl %esi, %eax
jge 0x40e88d
movq %rbx, %rdi
callq 0x40e6df
movl 0x36c4(%rbx), %eax
movl 0x36c0(%rbx), %edx
movl %r14d, %ecx
roll %cl, %edx
movl %r14d, %ecx
leaq 0xc5b7e(%rip), %rsi     # 0x4d4420
movl (%rsi,%rcx,4), %ecx
movl %ecx, %esi
notl %esi
andl %edx, %esi
movl %esi, 0x36c0(%rbx)
andl %ecx, %edx
subl %r14d, %eax
leal -0x1(%r14), %ecx
movl %edx, %esi
shrl %cl, %esi
pushq $-0x1
popq %rdi
movl %r14d, %ecx
shll %cl, %edi
movl %eax, 0x36c4(%rbx)
incl %edi
xorl %eax, %eax
testl %esi, %esi
cmovel %edi, %eax
addl %edx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/stb_image.c
// Function: stbi__zexpand
static int stbi__zexpand(stbi__zbuf *z, int n)  // need to make room for n bytes
{
   char *q;
   int cur, limit;
   if (!z->z_expandable) return stbi__err("output buffer limit","Corrupt PNG");
   cur   = (int) (z->zout     - z->zout_start);
   limit = (int) (z->zout_end - z->zout_start);
   while (cur + n > limit)
      limit *= 2;
   q = (char *) realloc(z->zout_start, limit);
   if (q == NULL) return stbi__err("outofmem", "Out of memory");
   z->zout_start = q;
   z->zout       = q + cur;
   z->zout_end   = q + limit;
   return 1;
}

// Assembly:
cmpl $0x0, 0x30(%rdi)
je 0x410673
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %r15
movq 0x20(%rdi), %rdi
subq %rdi, %r15
movl 0x28(%rbx), %eax
subl %edi, %eax
addl %r15d, %esi
movl %eax, %ecx
leal (%rcx,%rcx), %eax
cmpl %ecx, %esi
jg 0x410640
movslq %ecx, %r14
movq %r14, %rsi
callq 0x4427f0
testq %rax, %rax
je 0x410684
movq %rax, 0x20(%rbx)
movslq %r15d, %rcx
addq %rax, %rcx
movq %rcx, 0x18(%rbx)
addq %rax, %r14
movq %r14, 0x28(%rbx)
pushq $0x1
popq %rax
jmp 0x410694
leaq 0xc47f5(%rip), %rax     # 0x4d4e6f
movq %rax, 0x108ebf(%rip)    # 0x519540
xorl %eax, %eax
retq
leaq 0xc41b4(%rip), %rax     # 0x4d483f
movq %rax, 0x108eae(%rip)    # 0x519540
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/stb_image.c
// Function: stbi__zhuffman_decode
stbi_inline static int stbi__zhuffman_decode(stbi__zbuf *a, stbi__zhuffman *z)
{
   int b,s,k;
   if (a->num_bits < 16) stbi__fill_bits(a);
   b = z->fast[a->code_buffer & STBI__ZFAST_MASK];
   if (b < 0xffff) {
      s = z->size[b];
      a->code_buffer >>= s;
      a->num_bits -= s;
      return z->value[b];
   }

   // not resolved by fast table, so compute it the slow way
   // use jpeg approach, which requires MSbits at top
   k = stbi__bit_reverse(a->code_buffer, 16);
   for (s=STBI__ZFAST_BITS+1; ; ++s)
      if (k < z->maxcode[s])
         break;
   if (s == 16) return -1; // invalid code!
   // code size is s, so:
   b = (k >> (16-s)) - z->firstcode[s] + z->firstsymbol[s];
   STBI_ASSERT(z->size[b] == s);
   a->code_buffer >>= s;
   a->num_bits -= s;
   return z->value[b];
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0xf, 0x10(%rdi)
jg 0x4106b2
movq %r14, %rdi
callq 0x4105c6
movl 0x14(%r14), %edx
movl %edx, %eax
andl $0x1ff, %eax            # imm = 0x1FF
movzwl (%rbx,%rax,2), %esi
cmpq $0xffff, %rsi           # imm = 0xFFFF
je 0x4106d7
movzbl 0x484(%rbx,%rsi), %eax
jmp 0x41075e
movl %edx, %eax
rolw $0x8, %ax
movl %eax, %ecx
shrl $0x4, %ecx
movl $0xf0f, %esi            # imm = 0xF0F
andl %esi, %ecx
andl %esi, %eax
shll $0x4, %eax
orl %ecx, %eax
movl $0x3333, %ecx           # imm = 0x3333
movl %eax, %esi
andl %ecx, %esi
shrl $0x2, %eax
andl %ecx, %eax
leal (%rax,%rsi,4), %eax
movl $0x5555, %ecx           # imm = 0x5555
movl %eax, %esi
andl %ecx, %esi
shrl %eax
andl %ecx, %eax
leal (%rax,%rsi,2), %edi
xorl %eax, %eax
movq %rax, %rcx
incq %rax
cmpl %edi, 0x448(%rbx,%rcx,4)
jle 0x410713
cmpq $0x7, %rax
jne 0x41072d
pushq $-0x1
popq %rax
jmp 0x410772
movb $0x7, %cl
subb %al, %cl
shrl %cl, %edi
movzwl 0x412(%rbx,%rax,2), %ecx
subq %rcx, %rdi
movzwl 0x476(%rbx,%rax,2), %esi
addq %rdi, %rsi
movzbl 0x484(%rbx,%rsi), %ecx
addq $-0x9, %rcx
cmpq %rax, %rcx
jne 0x41077a
addq $0x9, %rax
movl %eax, %ecx
shrl %cl, %edx
movl %edx, 0x14(%r14)
subl %eax, 0x10(%r14)
movzwl 0x5a4(%rbx,%rsi,2), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xc47a1(%rip), %rdi     # 0x4d4f22
leaq 0xc4186(%rip), %rsi     # 0x4d490e
leaq 0xc47a3(%rip), %rcx     # 0x4d4f32
movl $0x70a, %edx            # imm = 0x70A
callq 0x41d270
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/stb_image_write.c
// Function: stbiw__sbgrowf
static void *stbiw__sbgrowf(void **arr, int increment, int itemsize)
{
   int m = *arr ? 2*stbiw__sbm(*arr)+increment : increment+1;
   void *p = realloc(*arr ? stbiw__sbraw(*arr) : 0, itemsize * m + sizeof(int)*2);
   assert(p);
   if (p) {
      if (!*arr) ((int *) p)[1] = 0;
      *arr = (void *) ((int *) p + 2);
      stbiw__sbm(*arr) = m;
   }
   return *arr;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x4114ab
movl -0x8(%rax), %ecx
leal 0x1(,%rcx,2), %ebp
jmp 0x4114ae
pushq $0x2
popq %rbp
leaq -0x8(%rax), %rdi
testq %rax, %rax
cmoveq %rax, %rdi
imull %ebp, %esi
movslq %esi, %rsi
addq $0x8, %rsi
callq 0x4427f0
testq %rax, %rax
je 0x4114ea
cmpq $0x0, (%rbx)
jne 0x4114d7
andl $0x0, 0x4(%rax)
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, (%rbx)
movl %ebp, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xe40fd(%rip), %rdi     # 0x4f55ee
leaq 0xc3ca1(%rip), %rsi     # 0x4d5199
leaq 0xc3d90(%rip), %rcx     # 0x4d528f
movl $0x8c, %edx
callq 0x41d270
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/stb_image_write.c
// Function: stbi_write_png
int stbi_write_png(char const *filename, int x, int y, int comp, const void *data, int stride_bytes)
{
   FILE *f;
   int len;
   unsigned char *png = stbi_write_png_to_mem((unsigned char *) data, stride_bytes, x, y, comp, &len);
   if (!png) return 0;
   f = fopen(filename, "wb");
   if (!f) { free(png); return 0; }
   fwrite(png, 1, len, f);
   fclose(f);
   free(png);
   return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %r9d, %r10d
movl %ecx, %eax
movl %edx, %ecx
movl %esi, %edx
movq %rdi, %r14
leaq 0xc(%rsp), %r9
movq %r8, %rdi
movl %r10d, %esi
movl %eax, %r8d
callq 0x411654
testq %rax, %rax
je 0x411c92
movq %rax, %rbx
leaq 0xc06b0(%rip), %rsi     # 0x4d2312
movq %r14, %rdi
callq 0x42bb40
testq %rax, %rax
je 0x411c96
movq %rax, %r14
movslq 0xc(%rsp), %rdx
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %rax, %rcx
callq 0x42be90
movq %r14, %rdi
callq 0x42b410
pushq $0x1
popq %rbp
jmp 0x411c98
xorl %ebp, %ebp
jmp 0x411ca0
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x4424a0
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/timer.c
// Function: timer
double timer() {
  static bool inited=false;
  static uint64_t start;
  uint64_t stop, dif;

  if(!inited) {
    start=getRawTime();
    inited=true;
  }

  stop=getRawTime();
  dif=stop-start;
  return dif/1000000.0;
}

// Assembly:
pushq %rax
cmpb $0x0, 0x107d8d(%rip)    # 0x519a90
jne 0x411d18
callq 0x411cd0
movq %rax, 0x107d87(%rip)    # 0x519a98
movb $0x1, 0x107d78(%rip)    # 0x519a90
callq 0x411cd0
subq 0x107d74(%rip), %rax    # 0x519a98
movq %rax, %xmm1
punpckldq 0xc358f(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0xc3597(%rip), %xmm1    # 0x4d52d0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
divsd 0xc02c3(%rip), %xmm0    # 0x4d2010
popq %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/tinycthread.c
// Function: thrd_create
int thrd_create(thrd_t *thr, thrd_start_t func, void *arg)
{
  /* Fill out the thread startup information (passed to the thread wrapper,
     which will eventually free it) */
  _thread_start_info* ti = (_thread_start_info*)malloc(sizeof(_thread_start_info));
  if (ti == NULL)
  {
    return thrd_nomem;
  }
  ti->mFunction = func;
  ti->mArg = arg;

  /* Create the thread */
#if defined(_TTHREAD_WIN32_)
  *thr = CreateThread(NULL, 0, _thrd_wrapper_function, (LPVOID) ti, 0, NULL);
#elif defined(_TTHREAD_POSIX_)
  if(pthread_create(thr, NULL, _thrd_wrapper_function, (void *)ti) != 0)
  {
    *thr = 0;
  }
#endif

  /* Did we fail to create the thread? */
  if(!*thr)
  {
    free(ti);
    return thrd_error;
  }

  return thrd_success;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
pushq $0x10
popq %rdi
callq 0x442160
testq %rax, %rax
je 0x411eae
movq %rax, %r14
movq %r12, (%rax)
movq %r15, 0x8(%rax)
leaq 0x3a(%rip), %rdx        # 0x411ec7
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0x438530
testl %eax, %eax
je 0x411eb2
andq $0x0, (%rbx)
movq %r14, %rdi
callq 0x4424a0
xorl %eax, %eax
jmp 0x411ebb
pushq $0x4
jmp 0x411eba
cmpq $0x0, (%rbx)
je 0x411ea2
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/tinydir.c
// Function: tinydir_open_sorted
_TINYDIR_FUNC
int tinydir_open_sorted(tinydir_dir *dir, const char *path)
{
	/* Count the number of files first, to pre-allocate the files array */
	size_t n_files = 0;
	if (tinydir_open(dir, path) == -1)
	{
		return -1;
	}
	while (dir->has_next)
	{
		n_files++;
		if (tinydir_next(dir) == -1)
		{
			goto bail;
		}
	}
	tinydir_close(dir);

	if (tinydir_open(dir, path) == -1)
	{
		return -1;
	}

	dir->n_files = 0;
	dir->_files = (tinydir_file *)malloc(sizeof *dir->_files * n_files);
	if (dir->_files == NULL)
	{
		errno = ENOMEM;
		goto bail;
	}
	while (dir->has_next)
	{
		tinydir_file *p_file;
		dir->n_files++;

		p_file = &dir->_files[dir->n_files - 1];
		if (tinydir_readfile(dir, p_file) == -1)
		{
			goto bail;
		}

		if (tinydir_next(dir) == -1)
		{
			goto bail;
		}

		/* Just in case the number of files has changed between the first and
		second reads, terminate without writing into unallocated memory */
		if (dir->n_files == n_files)
		{
			break;
		}
	}

	qsort(dir->_files, dir->n_files, sizeof(tinydir_file), _tinydir_file_cmp);

	return 0;

bail:
	tinydir_close(dir);
	return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r12
movq %rdi, %r14
callq 0x411f9c
pushq $-0x1
popq %rbx
cmpl $-0x1, %eax
je 0x4121c4
xorl %r13d, %r13d
xorl %r15d, %r15d
cmpl $0x0, 0x1000(%r14)
je 0x412105
incq %r15
movq %r14, %rdi
callq 0x4121d0
addq $0x11a0, %r13           # imm = 0x11A0
cmpl $-0x1, %eax
jne 0x4120d7
movq %r14, %rdi
callq 0x412060
jmp 0x4121c4
movq %r14, %rdi
callq 0x412060
movq %r14, %rdi
movq %r12, %rsi
callq 0x411f9c
cmpl $-0x1, %eax
je 0x4121c4
andq $0x0, 0x1008(%r14)
movq %r13, %rdi
callq 0x442160
movq %rax, 0x1010(%r14)
testq %rax, %rax
je 0x412198
xorl %eax, %eax
cmpl $0x0, 0x1000(%r14)
movq 0x1010(%r14), %rsi
je 0x4121a8
leaq 0x1(%rax), %rcx
movq %rcx, 0x1008(%r14)
imulq $0x11a0, %rax, %rax     # imm = 0x11A0
addq %rax, %rsi
movq %r14, %rdi
callq 0x412225
cmpl $-0x1, %eax
je 0x4120f8
movq %r14, %rdi
callq 0x4121d0
cmpl $-0x1, %eax
je 0x4120f8
movq 0x1008(%r14), %rax
cmpq %r15, %rax
jne 0x41213f
movq 0x1010(%r14), %rsi
jmp 0x4121ab
callq 0x41d100
movl $0xc, (%rax)
jmp 0x4120f8
movq %rax, %r15
leaq 0x18e(%rip), %rcx       # 0x412340
movl $0x11a0, %edx           # imm = 0x11A0
movq %rsi, %rdi
movq %r15, %rsi
callq 0x423650
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/tinydir.c
// Function: tinydir_get_ext
_TINYDIR_FUNC
void _tinydir_get_ext(tinydir_file *file)
{
	char *period = strrchr(file->name, '.');
	if (period == NULL)
	{
		file->extension = &(file->name[strlen(file->name)]);
	}
	else
	{
		file->extension = period + 1;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1000(%rdi), %r14
pushq $0x2e
popq %rsi
movq %r14, %rdi
callq 0x401088
testq %rax, %rax
je 0x412387
incq %rax
jmp 0x412392
movq %r14, %rdi
callq 0x401140
addq %r14, %rax
movq %rax, 0x1100(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/tinydir.c
// Function: tinydir_readfile_n
_TINYDIR_FUNC
int tinydir_readfile_n(const tinydir_dir *dir, tinydir_file *file, size_t i)
{
	if (dir == NULL || file == NULL)
	{
		errno = EINVAL;
		return -1;
	}
	if (i >= dir->n_files)
	{
		errno = ENOENT;
		return -1;
	}

	memcpy(file, &dir->_files[i], sizeof(tinydir_file));
	_tinydir_get_ext(file);

	return 0;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
setne %al
testq %rsi, %rsi
setne %cl
testb %cl, %al
jne 0x4123bf
callq 0x41d100
movl $0x16, (%rax)
jmp 0x4123fd
cmpq %rdx, 0x1008(%rdi)
jbe 0x4123f2
movq %rsi, %rbx
imulq $0x11a0, %rdx, %rsi     # imm = 0x11A0
addq 0x1010(%rdi), %rsi
movl $0x11a0, %edx           # imm = 0x11A0
movq %rbx, %rdi
callq 0x401060
movq %rbx, %rdi
callq 0x412364
xorl %eax, %eax
jmp 0x412400
callq 0x41d100
movl $0x2, (%rax)
pushq $-0x1
popq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/archer1357[P]Offline-Raytracer/tinydir.c
// Function: tinydir_open_subdir_n
_TINYDIR_FUNC
int tinydir_open_subdir_n(tinydir_dir *dir, size_t i)
{
	char path[_TINYDIR_PATH_MAX];
	if (dir == NULL)
	{
		errno = EINVAL;
		return -1;
	}
	if (i >= dir->n_files || !dir->_files[i].is_dir)
	{
		errno = ENOENT;
		return -1;
	}

	strcpy(path, dir->_files[i].path);
	tinydir_close(dir);
	if (tinydir_open_sorted(dir, path) == -1)
	{
		return -1;
	}

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
testq %rdi, %rdi
je 0x412474
movq %rsi, %rax
movq %rdi, %rbx
cmpq %rsi, 0x1008(%rdi)
jbe 0x412467
movq 0x1010(%rbx), %rsi
imulq $0x11a0, %rax, %rax     # imm = 0x11A0
cmpl $0x0, 0x1108(%rsi,%rax)
je 0x412467
addq %rax, %rsi
movq %rsp, %r14
movq %r14, %rdi
callq 0x401020
movq %rbx, %rdi
callq 0x412060
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4120b1
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
sete %al
negl %eax
jmp 0x412482
callq 0x41d100
movl $0x2, (%rax)
jmp 0x41247f
callq 0x41d100
movl $0x16, (%rax)
pushq $-0x1
popq %rax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r14
retq