LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsPerspectiveCamera
static void hpsPerspectiveCamera(HPScamera *camera){
    float width = camera->vw * camera->vwRatio;
    float height = camera->vh * camera->vhRatio;
    float scale = tan(hpmDegreesToRadians(camera->viewAngle * 0.5)) 
        * camera->n * 2.0;
    width = ((float) width / (float) height) * scale;
    height = scale;
    float r = width * (0.5 + camera->vx);
    float l = r - width;
    float t = height * (0.5 + camera->vy);
    float b = t - height;
    hpmFrustumViewport(l, r, b, t, camera->n, camera->f,
                       camera->vl, camera->vr, camera->vb, camera->vt,
                       camera->projection);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movsd 0x3c(%rdi), %xmm0
movsd 0x44(%rdi), %xmm1
mulps %xmm0, %xmm1
movaps %xmm1, 0x10(%rsp)
movss 0x38(%rdi), %xmm0
mulss 0x223a(%rip), %xmm0     # 0xb040
callq 0x4230
cvtss2sd %xmm0, %xmm0
callq 0x42e0
movss 0x30(%rbx), %xmm4
movss 0x34(%rbx), %xmm5
xorps %xmm1, %xmm1
cvtss2sd %xmm4, %xmm1
mulsd %xmm0, %xmm1
addsd %xmm1, %xmm1
cvtsd2ss %xmm1, %xmm6
movaps 0x10(%rsp), %xmm1
movaps %xmm1, %xmm0
shufps $0x55, %xmm1, %xmm0     # xmm0 = xmm0[1,1],xmm1[1,1]
divss %xmm0, %xmm1
mulss %xmm6, %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
movaps %xmm1, %xmm8
xorps %xmm1, %xmm1
cvtss2sd 0x5c(%rbx), %xmm1
movsd 0x21b0(%rip), %xmm2     # 0xb010
addsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm1
movaps %xmm1, %xmm0
cvtss2sd %xmm6, %xmm3
cvtss2sd 0x60(%rbx), %xmm7
addsd %xmm2, %xmm7
mulsd %xmm3, %xmm7
xorps %xmm3, %xmm3
cvtsd2ss %xmm7, %xmm3
subss %xmm8, %xmm0
movaps %xmm3, %xmm2
subss %xmm6, %xmm2
movss 0x4c(%rbx), %xmm6
movss 0x50(%rbx), %xmm7
movss 0x54(%rbx), %xmm8
movss 0x58(%rbx), %xmm9
addq $0xb8, %rbx
movss %xmm9, 0x8(%rsp)
movss %xmm8, (%rsp)
movq %rbx, %rdi
callq 0x4390
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsSetCameraViewportScreenPosition
void hpsSetCameraViewportScreenPosition(HPScamera *camera, float left, float right, float bottom, float top){
    if ((left < -1.0) || ( left > 1.0) ||
        (right < -1.0) || ( right > 1.0) ||
        (bottom < -1.0) || ( bottom > 1.0) ||
        (top < -1.0) ||( top > 1.0)){
        fprintf(stderr, "Camera viewport screen position values should be between -1.0 and 1.0.\n");
        return;
    }
    camera->vl = left; camera->vr = right;
    camera->vb = bottom; camera->vt = top;
    camera->update(camera);
}

// Assembly:
ucomiss 0x211f(%rip), %xmm3     # 0xb030
ja 0x8f69
movss 0x2121(%rip), %xmm4     # 0xb03c
ucomiss %xmm3, %xmm4
ja 0x8f69
ucomiss 0x2109(%rip), %xmm2     # 0xb030
ja 0x8f69
ucomiss %xmm2, %xmm4
ja 0x8f69
ucomiss 0x20fb(%rip), %xmm1     # 0xb030
ja 0x8f69
movaps 0x2252(%rip), %xmm5     # 0xb190
andps %xmm0, %xmm5
ucomiss 0x20e8(%rip), %xmm5     # 0xb030
ja 0x8f69
ucomiss %xmm1, %xmm4
ja 0x8f69
movss %xmm0, 0x4c(%rdi)
movss %xmm1, 0x50(%rdi)
movss %xmm2, 0x54(%rdi)
movss %xmm3, 0x58(%rdi)
jmpq *0x1d8(%rdi)
pushq %rax
callq 0x4474
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsMoveCamera
void hpsMoveCamera(HPScamera *camera, float *vec){
    if (camera->style == HPS_ORBIT){
        fprintf(stderr, "Can't move an HPS_ORBIT camera\n");
        return;
    }
    camera->position.x += vec[0];
    camera->position.y += vec[1];
    camera->position.z += vec[2];
}

// Assembly:
cmpl $0x2, 0x8(%rdi)
je 0x8fee
movss (%rsi), %xmm0
addss 0xc(%rdi), %xmm0
movss %xmm0, 0xc(%rdi)
movss 0x4(%rsi), %xmm0
addss 0x10(%rdi), %xmm0
movss %xmm0, 0x10(%rdi)
movss 0x8(%rsi), %xmm0
addss 0x14(%rdi), %xmm0
movss %xmm0, 0x14(%rdi)
retq
pushq %rax
callq 0x4490
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsSetCameraPosition
void hpsSetCameraPosition(HPScamera *camera, float *vec){
    if (camera->style == HPS_ORBIT){
        fprintf(stderr, "Can't move an HPS_ORBIT camera\n");
        return;
    }
    camera->position.x = vec[0];
    camera->position.y = vec[1];
    camera->position.z = vec[2];
}

// Assembly:
cmpl $0x2, 0x8(%rdi)
je 0x901d
movss (%rsi), %xmm0
movss %xmm0, 0xc(%rdi)
movss 0x4(%rsi), %xmm0
movss %xmm0, 0x10(%rdi)
movss 0x8(%rsi), %xmm0
movss %xmm0, 0x14(%rdi)
retq
pushq %rax
callq 0x44ac
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsSetCameraUp
void hpsSetCameraUp(HPScamera *camera, float *up){
    if (camera->style != HPS_LOOK_AT){
        fprintf(stderr, "Can't set up on a non HPS_LOOK_AT camera\n");
        return;
    }
    camera->up.x = up[0];
    camera->up.y = up[1];
    camera->up.z = up[2];
}

// Assembly:
cmpl $0x1, 0x8(%rdi)
jne 0x906c
movss (%rsi), %xmm0
movss %xmm0, 0x18(%rdi)
movss 0x4(%rsi), %xmm0
movss %xmm0, 0x1c(%rdi)
movss 0x8(%rsi), %xmm0
movss %xmm0, 0x20(%rdi)
retq
pushq %rax
callq 0x44e4
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsCameraLookAt
void hpsCameraLookAt(HPScamera *camera, float *p){
    if ((camera->style != HPS_ORBIT) && (camera->style != HPS_LOOK_AT)) {
        fprintf(stderr, "Can't set object to look at for a non HPS_LOOK_AT or HPS_ORBIT camera\n");
        return;
    }
    camera->object.x = p[0];
    camera->object.y = p[1];
    camera->object.z = p[2];
}

// Assembly:
movl 0x8(%rdi), %eax
decl %eax
cmpl $0x2, %eax
jae 0x909f
movss (%rsi), %xmm0
movss %xmm0, 0x24(%rdi)
movss 0x4(%rsi), %xmm0
movss %xmm0, 0x28(%rdi)
movss 0x8(%rsi), %xmm0
movss %xmm0, 0x2c(%rdi)
retq
pushq %rax
callq 0x4500
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsSetCameraYaw
void hpsSetCameraYaw(HPScamera *camera, float angle){
    if ((camera->style != HPS_ORBIT) && (camera->style != HPS_FIRST_PERSON)) {
        fprintf(stderr, "Can't yaw a non HPS_ORBIT or HPS_FIRST_PERSON camera\n");
        return;
    }
    camera->style = HPS_ORBIT;
    camera->rotation.x = angle;
}

// Assembly:
movl 0x8(%rdi), %eax
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0x90e3
movl $0x2, 0x8(%rdi)
movss %xmm0, 0x68(%rdi)
retq
pushq %rax
callq 0x4538
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsPitchCamera
void hpsPitchCamera(HPScamera *camera, float angle){
    if ((camera->style != HPS_ORBIT) && (camera->style != HPS_FIRST_PERSON)) {
        fprintf(stderr, "Can't pitch a non HPS_ORBIT or HPS_FIRST_PERSON camera\n");
        return;
    }
    camera->rotation.y += angle;
    camera->rotation.y = fmin(HALF_PI, fmax(-HALF_PI, camera->rotation.y));
}

// Assembly:
movl 0x8(%rdi), %eax
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0x911c
addss 0x6c(%rdi), %xmm0
cvtss2sd %xmm0, %xmm0
maxsd 0x20a6(%rip), %xmm0     # 0xb1b0
minsd 0x20a6(%rip), %xmm0     # 0xb1b8
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x6c(%rdi)
retq
pushq %rax
callq 0x4554
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsZoomCamera
void hpsZoomCamera(HPScamera *camera, float distance){
    if (camera->style != HPS_ORBIT){
        fprintf(stderr, "Can't zoom a non HPS_ORBIT camera\n");
        return;
    }
    camera->rotation.w += distance;
    camera->rotation.w = (camera->rotation.w < FLT_MIN) ? FLT_MIN : camera->rotation.w;
}

// Assembly:
cmpl $0x2, 0x8(%rdi)
jne 0x9178
addss 0x74(%rdi), %xmm0
movss 0x2052(%rip), %xmm1     # 0xb1c0
maxss %xmm0, %xmm1
movss %xmm1, 0x74(%rdi)
retq
pushq %rax
callq 0x458c
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsResizeCameras
void hpsResizeCameras(float width, float height){
    int i;
    for (i = 0; i < cameraList.size; i++){
	HPScamera *camera = (HPScamera *) cameraList.data[i];
        if (!camera->viewportIsStatic){
            camera->vw = width;
            camera->vh = height;
            camera->update(camera);
        }
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movss %xmm1, 0xc(%rsp)
movss %xmm0, 0x8(%rsp)
movq 0x6303(%rip), %rax      # 0xf4f8
testq %rax, %rax
je 0x923f
movq 0x62ef(%rip), %rcx      # 0xf4f0
xorl %ebx, %ebx
movq (%rcx,%rbx,8), %rdi
cmpb $0x0, 0x64(%rdi)
jne 0x9237
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x3c(%rdi)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x40(%rdi)
callq *0x1d8(%rdi)
movq 0x62c0(%rip), %rcx      # 0xf4f0
movq 0x62c1(%rip), %rax      # 0xf4f8
incq %rbx
cmpq %rbx, %rax
ja 0x9203
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsStrafeCamera
void hpsStrafeCamera(HPScamera *camera, float dist){
    if ((camera->style != HPS_FIRST_PERSON)) {
        fprintf(stderr, "Can't strafe a non HPS_FIRST_PERSON camera\n");
        return;
    }
    float sinYaw = sin(camera->rotation.x);
    float cosYaw = cos(camera->rotation.x);
    camera->position.x += dist * cosYaw;
    camera->position.z += dist * sinYaw;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
cmpl $0x3, 0x8(%rdi)
jne 0x9340
movq %rdi, %rbx
movss %xmm0, 0xc(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x68(%rdi), %xmm0
callq 0x4210
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x68(%rbx), %xmm0
callq 0x4310
cvtsd2ss %xmm0, %xmm0
movss 0xc(%rsp), %xmm1
mulss %xmm1, %xmm0
addss 0xc(%rbx), %xmm0
movss %xmm0, 0xc(%rbx)
movss 0x8(%rsp), %xmm0
mulss %xmm1, %xmm0
addss 0x14(%rbx), %xmm0
movss %xmm0, 0x14(%rbx)
addq $0x10, %rsp
popq %rbx
retq
callq 0x4634
jmp 0x933a
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsInitCameras
void hpsInitCameras(){
    hpsInitVector(&cameraList, 16);
    hpsInitVector(&activeCameras, 16);
    hpsInitVector(&renderQueue, 4096);
    hpsInitVector(&alphaQueue, 1024);
}

// Assembly:
pushq %rax
leaq 0x610b(%rip), %rdi      # 0xf4f0
movl $0x10, %esi
callq 0x4080
leaq 0x611a(%rip), %rdi      # 0xf510
movl $0x10, %esi
callq 0x4080
leaq 0x6129(%rip), %rdi      # 0xf530
movl $0x1000, %esi           # imm = 0x1000
callq 0x4080
leaq 0x6138(%rip), %rdi      # 0xf550
movl $0x400, %esi            # imm = 0x400
popq %rax
jmp 0x4080
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/camera.c
// Function: renderNode
static void renderNode(HPSnode *node, HPScamera *camera){
    hpmMultMat4(camera->viewProjection, node->transform, 
                camera->modelViewProjection);
#ifndef NO_INVERSE_TRANSPOSE
    hpmFastInverseTranspose(node->transform, currentInverseTransposeModel);
#endif
    node->pipeline->render(node->data);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x68(%rdi), %rsi
leaq 0x5e70(%rip), %rdi      # 0xf3b8
leaq 0x5ea9(%rip), %rdx      # 0xf3f8
callq 0x4110
movq 0x68(%rbx), %rdi
leaq 0x5f51(%rip), %rsi      # 0xf4b0
callq 0x4410
movq 0x70(%rbx), %rax
movq 0x88(%rbx), %rdi
popq %rbx
jmpq *0x10(%rax)
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsInit
void hpsInit(){
    hpsInitCameras();
    hpsInitVector(&activeScenes, 16);
    hpsInitVector(&freeScenes, 16);
    hpsPartitionInterface = hpsAABBpartitionInterface;
}

// Assembly:
pushq %rax
xorl %eax, %eax
callq 0x41b0
leaq 0x5fd1(%rip), %rdi      # 0xf570
movl $0x10, %esi
callq 0x4080
leaq 0x5fe0(%rip), %rdi      # 0xf590
movl $0x10, %esi
callq 0x4080
movq 0x59bf(%rip), %rax      # 0xef80
movq (%rax), %rax
movq 0x59ed(%rip), %rcx      # 0xefb8
movq %rax, (%rcx)
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsAddNode
HPSnode *hpsAddNode(HPSnode *parent, void *data,
                    HPSpipeline *pipeline,
                    void (*deleteFunc)(void *)){
    HPSscene *scene = hpsGetScene(parent);
    HPSnode *node = hpsAllocateFrom(scene->nodePool);
    node->transform = hpsAllocateFrom(scene->transformPool);
    node->partitionData.data = node;
    node->partitionData.boundingSphere = hpsAllocateFrom(scene->boundingSpherePool);
    hpmIdentityMat4(node->transform);
    initBoundingSphere(node->partitionData.boundingSphere);
    node->position.x = 0.0; node->position.y = 0.0; node->position.z = 0.0;
    node->rotation.x = 0.0; node->rotation.y = 0.0; node->rotation.z = 0.0; 
    node->rotation.w = 1.0;
    node->data = data;
    node->pipeline = pipeline;
    node->extension = NULL;
    node->parent = parent;
    node->delete = deleteFunc;
    node->needsUpdate = true;
    hpsInitVector(&node->children, 0);
    scene->partitionInterface->addNode(&node->partitionData, scene->partitionStruct);
    if ((HPSscene *) parent == scene)
        hpsPush(&scene->topLevelNodes, node);
    else
        hpsPush(&parent->children, node);
    return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
movq %rdi, %rax
movq %rax, %r15
movq (%rax), %rax
testq %rax, %rax
jne 0x95f7
movq 0x38(%r15), %rdi
callq 0x43a0
movq %rax, %r14
movq 0x48(%r15), %rdi
callq 0x43a0
movq %rax, 0x68(%r14)
leaq 0x8(%r14), %rbp
movq %r14, 0x18(%r14)
movq 0x40(%r15), %rdi
callq 0x43a0
movq %rax, 0x8(%r14)
movq 0x68(%r14), %rdi
callq 0x4250
movq 0x8(%r14), %rax
xorl %ecx, %ecx
movq %rcx, (%rax)
movabsq $0x3f80000000000000, %rdx # imm = 0x3F80000000000000
movq %rdx, 0x8(%rax)
movq %rcx, 0x58(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%r14)
movl $0x3f800000, 0x60(%r14) # imm = 0x3F800000
movq %r13, 0x88(%r14)
movq %r12, 0x70(%r14)
movq %rcx, 0x78(%r14)
movq %rbx, (%r14)
movq (%rsp), %rax
movq %rax, 0x80(%r14)
movb $0x1, 0x90(%r14)
leaq 0x28(%r14), %rdi
xorl %esi, %esi
callq 0x4080
movq 0x28(%r15), %rax
movq 0x30(%r15), %rsi
movq %rbp, %rdi
callq *0x10(%rax)
leaq 0x28(%rbx), %rax
leaq 0x8(%r15), %rdi
cmpq %rbx, %r15
cmovneq %rax, %rdi
movq %r14, %rsi
callq 0x4270
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_O3/AlexCharlton[P]Hyperscene/src/scene.c
// Function: deleteNode
static void deleteNode(HPSnode *node, HPSscene *scene){
    int i;
    scene->partitionInterface->removeNode(&node->partitionData);
    hpsDeleteFrom(node->partitionData.boundingSphere, scene->boundingSpherePool);
    hpsDeleteFrom(node->transform, scene->transformPool);
    for (i = 0; i < node->children.size; i++)
        deleteNode(node->children.data[i], scene);
    if ((HPSscene *) node->parent == scene)
        hpsRemove(&scene->topLevelNodes, node);
    else
        hpsRemove(&node->parent->children, node);
    freeNode(node, scene);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rsi), %rax
addq $0x8, %rdi
callq *0x18(%rax)
movq 0x8(%rbx), %rdi
movq 0x40(%r14), %rsi
callq 0x4400
movq 0x68(%rbx), %rdi
movq 0x48(%r14), %rsi
callq 0x4400
cmpq $0x0, 0x30(%rbx)
je 0x972e
xorl %r15d, %r15d
movq 0x28(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq %r14, %rsi
callq 0x96db
incq %r15
cmpq %r15, 0x30(%rbx)
ja 0x9715
movq (%rbx), %rax
leaq 0x28(%rax), %rdi
leaq 0x8(%r14), %rcx
cmpq %r14, %rax
cmoveq %rcx, %rdi
movq %rbx, %rsi
callq 0x4370
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x9948
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsMakeScene
HPSscene *hpsMakeScene(){
    HPSscene *scene = (freeScenes.size) ?
	hpsPop(&freeScenes) : malloc(sizeof(HPSscene));
    scene->partitionInterface = hpsPartitionInterface;
    scene->nodePool = hpsMakePool(sizeof(HPSnode), hpsNodePoolSize, "Node pool");
    scene->transformPool = hpsMakePool(sizeof(float) * 16, hpsNodePoolSize,
				       "Transform pool");
    scene->boundingSpherePool = hpsMakePool(sizeof(BoundingSphere),
					    hpsNodePoolSize,
					    "Bounding sphere pool");
    scene->partitionStruct = scene->partitionInterface->new();
    scene->null = NULL;
    hpsInitVector(&scene->topLevelNodes, 1024);
    hpsInitVector(&scene->extensions, 4);
    hpsPush(&activeScenes, (void *) scene);
    return scene;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x5da9(%rip)      # 0xf598
je 0x97ff
leaq 0x5d98(%rip), %rdi      # 0xf590
callq 0x42d0
jmp 0x9809
movl $0x78, %edi
callq 0x4260
movq %rax, %rbx
movq 0x57a5(%rip), %rax      # 0xefb8
movq (%rax), %rax
movq %rax, 0x28(%rbx)
movq 0x57bf(%rip), %r14      # 0xefe0
movl (%r14), %esi
leaq 0x1c45(%rip), %rdx      # 0xb470
movl $0x98, %edi
callq 0x40b0
movq %rax, 0x38(%rbx)
movl (%r14), %esi
leaq 0x1c37(%rip), %rdx      # 0xb47a
movl $0x40, %edi
callq 0x40b0
movq %rax, 0x48(%rbx)
movl (%r14), %esi
leaq 0x1c2e(%rip), %rdx      # 0xb489
movl $0x10, %edi
callq 0x40b0
movq %rax, 0x40(%rbx)
movq 0x28(%rbx), %rcx
xorl %eax, %eax
callq *(%rcx)
movq %rax, 0x30(%rbx)
movq $0x0, (%rbx)
leaq 0x8(%rbx), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x4080
leaq 0x58(%rbx), %rdi
movl $0x4, %esi
callq 0x4080
leaq 0x5cd1(%rip), %rdi      # 0xf570
movq %rbx, %rsi
callq 0x4270
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsDeleteScene
void hpsDeleteScene(HPSscene *scene){
    int i;
    for (i = 0; i < scene->topLevelNodes.size; i++)
        freeNode(scene->topLevelNodes.data[i], scene);
    scene->partitionInterface->delete(scene->partitionStruct);
    hpsDeleteExtensions(scene);
    hpsClearPool(scene->nodePool);
    hpsClearPool(scene->transformPool);
    hpsClearPool(scene->boundingSpherePool);
    hpsRemove(&activeScenes, (void *) scene);
    hpsPush(&freeScenes, (void *) scene);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0x98d9
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x9948
incq %r14
cmpq %r14, 0x10(%rbx)
ja 0x98c3
movq 0x28(%rbx), %rax
movq 0x30(%rbx), %rdi
callq *0x8(%rax)
cmpq $0x0, 0x60(%rbx)
je 0x9908
xorl %r14d, %r14d
movq 0x58(%rbx), %rax
movq (%rax,%r14,8), %rcx
movq 0x8(%rax,%r14,8), %rdi
callq *0x28(%rcx)
addq $0x2, %r14
cmpq %r14, 0x60(%rbx)
ja 0x98ee
movq 0x38(%rbx), %rdi
callq 0x4160
movq 0x48(%rbx), %rdi
callq 0x4160
movq 0x40(%rbx), %rdi
callq 0x4160
leaq 0x5c46(%rip), %rdi      # 0xf570
movq %rbx, %rsi
callq 0x4370
leaq 0x5c57(%rip), %rdi      # 0xf590
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4270
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/scene.c
// Function: freeNode
static void freeNode(HPSnode *node, HPSscene *scene){
    int i;
    if (node->delete) node->delete(node->data);
    if (node->children.capacity){
	HPSvector *v = &node->children;
	for (i = 0; i < v->size; i++)
	    freeNode(v->data[i], scene);
	hpsDeleteVector(v);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x80(%rdi), %rax
testq %rax, %rax
je 0x9965
movq 0x88(%rbx), %rdi
callq *%rax
cmpq $0x0, 0x38(%rbx)
je 0x999d
leaq 0x28(%rbx), %r14
cmpq $0x0, 0x30(%rbx)
je 0x9990
xorl %r15d, %r15d
movq 0x28(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x9948
incq %r15
cmpq %r15, 0x30(%rbx)
ja 0x997a
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x43e0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsDeleteExtensions
void hpsDeleteExtensions(HPSscene *scene){
    int i;
    for (i = 0; i < scene->extensions.size; i += 2){
        HPSextension *e = (HPSextension *) scene->extensions.data[i];
        e->delete(scene->extensions.data[i+1]);
    }
}

// Assembly:
cmpq $0x0, 0x60(%rdi)
je 0x99d5
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x58(%rbx), %rax
movq (%rax,%r14,8), %rcx
movq 0x8(%rax,%r14,8), %rdi
callq *0x28(%rcx)
addq $0x2, %r14
cmpq %r14, 0x60(%rbx)
ja 0x99b4
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsSetNodeExtension
void hpsSetNodeExtension(HPSnode *node, HPSextension *extension){
    HPSscene *scene = hpsGetScene(node);
    int i;
    for (i = 0; i < scene->extensions.size; i += 2){
        HPSextension *e = (HPSextension *) scene->extensions.data[i];
        if ((void*) extension == (void*) e){
            node->extension = &scene->extensions.data[i];
            return;
        }
    }
    fprintf(stderr, "Node's %p scene does not have extension %p activated\n", node, extension);
}

// Assembly:
movq %rsi, %rcx
movq %rdi, %rdx
movq %rdi, %rax
movq %rax, %rsi
movq (%rax), %rax
testq %rax, %rax
jne 0x9aac
movq 0x60(%rsi), %rax
testq %rax, %rax
je 0x9ad8
movq 0x58(%rsi), %rsi
xorl %edi, %edi
cmpq %rcx, (%rsi)
je 0x9af0
addq $0x2, %rdi
addq $0x10, %rsi
cmpq %rdi, %rax
ja 0x9ac6
movq 0x5519(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x19b5(%rip), %rsi      # 0xb49e
xorl %eax, %eax
jmp 0x4200
movq %rsi, 0x78(%rdx)
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsActivateExtension
void hpsActivateExtension(HPSscene *scene, HPSextension *extension){
    int i;
    for (i = 0; i < scene->extensions.size; i += 2){
        HPSextension *e = (HPSextension *) scene->extensions.data[i];
        if (e == extension) return;
    }
    hpsPush(&scene->extensions, (void *) extension);
    hpsPush(&scene->extensions, NULL);
    extension->init(&scene->extensions.data[scene->extensions.size-1]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x58(%rdi), %r14
movq 0x60(%rdi), %rax
testq %rax, %rax
je 0x9b1e
movq (%r14), %rcx
xorl %edx, %edx
cmpq %rsi, (%rcx,%rdx,8)
je 0x9b4d
addq $0x2, %rdx
cmpq %rdx, %rax
ja 0x9b0f
movq %r14, %rdi
movq %rsi, %r15
callq 0x4270
movq %r14, %rdi
xorl %esi, %esi
callq 0x4270
movq 0x58(%rbx), %rax
movq 0x60(%rbx), %rcx
leaq (%rax,%rcx,8), %rdi
addq $-0x8, %rdi
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
jmpq *(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsExtensionData
void *hpsExtensionData(HPSscene *scene, HPSextension *extension){
    int i;
    for (i = 0; i < scene->extensions.size; i += 2){
        HPSextension *e = (HPSextension *) scene->extensions.data[i];
        if (e == extension) return scene->extensions.data[i+1];
    }
    return NULL;
}

// Assembly:
movq 0x60(%rdi), %rdx
testq %rdx, %rdx
je 0x9b74
movq 0x58(%rdi), %rcx
xorl %eax, %eax
xorl %edi, %edi
cmpq %rsi, (%rcx,%rdi,8)
je 0x9b77
addq $0x2, %rdi
cmpq %rdi, %rdx
ja 0x9b64
retq
xorl %eax, %eax
retq
movl %edi, %eax
shlq $0x3, %rax
orq $0x8, %rax
movq (%rcx,%rax), %rax
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsPreRenderExtensions
void hpsPreRenderExtensions(HPSscene *scene){
    int i;
    for (i = 0; i < scene->extensions.size; i += 2){
        HPSextension *e = (HPSextension *) scene->extensions.data[i];
        e->preRender(scene->extensions.data[i+1]);
    }
}

// Assembly:
cmpq $0x0, 0x60(%rdi)
je 0x9bb8
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x58(%rbx), %rax
movq (%rax,%r14,8), %rcx
movq 0x8(%rax,%r14,8), %rdi
callq *0x8(%rcx)
addq $0x2, %r14
cmpq %r14, 0x60(%rbx)
ja 0x9b97
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsPostRenderExtensions
void hpsPostRenderExtensions(HPSscene *scene){
    int i;
    for (i = 0; i < scene->extensions.size; i += 2){
        HPSextension *e = (HPSextension *) scene->extensions.data[i];
        e->postRender(scene->extensions.data[i+1]);
    }
}

// Assembly:
cmpq $0x0, 0x60(%rdi)
je 0x9beb
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x58(%rbx), %rax
movq (%rax,%r14,8), %rcx
movq 0x8(%rax,%r14,8), %rdi
callq *0x10(%rcx)
addq $0x2, %r14
cmpq %r14, 0x60(%rbx)
ja 0x9bca
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/scene.c
// Function: updateNode
static void updateNode(HPSnode *node, HPSscene *scene){
    int i;
    if (node->needsUpdate){
        if ((HPSscene *) node->parent == scene){
            hpmQuaternionRotation((float *) &node->rotation, node->transform);
            hpmTranslate((float *) &node->position, node->transform);
        } else {
            float trans[16];
            hpmQuaternionRotation((float *) &node->rotation, trans);
            hpmTranslate((float *) &node->position, trans);
            hpmMultMat4(trans, node->parent->transform, node->transform);
        }
        BoundingSphere *bs = node->partitionData.boundingSphere;
        bs->x = 0;
        bs->y = 0;
        bs->z = 0;
        hpmMat4VecMult(node->transform, (float*) bs);
        if (node->extension){
            hpsUpdateExtensionNode(node);
        }
	scene->partitionInterface->updateNode(&node->partitionData);
        for (i = 0; i < node->children.size; i++){
            HPSnode *child = node->children.data[i];
            child->needsUpdate = true;
            updateNode(child, scene);
        }
        node->needsUpdate = false;
    } else {
        for (i = 0; i < node->children.size; i++)
            updateNode(node->children.data[i], scene);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x0, 0x90(%rdi)
je 0x9c6a
cmpq %r14, (%rbx)
je 0x9c96
leaq 0x54(%rbx), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x4050
leaq 0x48(%rbx), %rdi
movq %r15, %rsi
callq 0x4060
movq (%rbx), %rax
movq 0x68(%rbx), %rdx
movq 0x68(%rax), %rsi
movq %r15, %rdi
callq 0x4110
jmp 0x9cb0
cmpq $0x0, 0x30(%rbx)
je 0x9d20
xorl %r15d, %r15d
movq 0x28(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq %r14, %rsi
callq 0x9c1d
incq %r15
cmpq %r15, 0x30(%rbx)
ja 0x9c78
jmp 0x9d20
leaq 0x54(%rbx), %rdi
movq 0x68(%rbx), %rsi
callq 0x4050
leaq 0x48(%rbx), %rdi
movq 0x68(%rbx), %rsi
callq 0x4060
leaq 0x8(%rbx), %r15
movq 0x8(%rbx), %rsi
movq $0x0, (%rsi)
movl $0x0, 0x8(%rsi)
movq 0x68(%rbx), %rdi
callq 0x41c0
movq 0x78(%rbx), %rax
testq %rax, %rax
je 0x9ce5
movq (%rax), %rcx
movq 0x8(%rax), %rdi
movq %rbx, %rsi
callq *0x20(%rcx)
movq 0x28(%r14), %rax
movq %r15, %rdi
callq *0x20(%rax)
cmpq $0x0, 0x30(%rbx)
je 0x9d19
xorl %r15d, %r15d
movq 0x28(%rbx), %rax
movq (%rax,%r15,8), %rdi
movb $0x1, 0x90(%rdi)
movq %r14, %rsi
callq 0x9c1d
incq %r15
cmpq %r15, 0x30(%rbx)
ja 0x9cf9
movb $0x0, 0x90(%rbx)
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/lighting.c
// Function: hpsInitLighting
void hpsInitLighting(void **data){
    if (!initialized){
        hpsInitVector(&lightQueue, 16);
        hpsCurrentLightPositions = malloc(sizeof(float) * hpsMaxLights * 3);
        hpsCurrentLightDirections = malloc(sizeof(float) * hpsMaxLights * 4);
        hpsCurrentLightColors = malloc(sizeof(float) * hpsMaxLights * 3);
        hpsCurrentLightIntensities = malloc(sizeof(float) * hpsMaxLights);
        hpsCurrentAmbientLight = malloc(sizeof(float) * 3);
        initialized = true;
    }
    SceneLighting *sLighting = malloc(sizeof(SceneLighting));
    sLighting->lightPool = hpsMakePool(sizeof(Light), hpsLightPoolSize, "Light pool");
    *data = sLighting;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, 0x587e(%rip)      # 0xf5bc
jne 0x9dd2
leaq 0x5875(%rip), %rdi      # 0xf5c0
movl $0x10, %esi
callq 0x4080
movq 0x523c(%rip), %rax      # 0xef98
movl (%rax), %r14d
leaq (,%r14,4), %r15
leaq (%r15,%r15,2), %r12
movq %r12, %rdi
callq 0x4260
movq 0x51ee(%rip), %rcx      # 0xef68
movq %rax, (%rcx)
shlq $0x4, %r14
movq %r14, %rdi
callq 0x4260
movq 0x51e8(%rip), %rcx      # 0xef78
movq %rax, (%rcx)
movq %r12, %rdi
callq 0x4260
movq 0x5226(%rip), %rcx      # 0xefc8
movq %rax, (%rcx)
movq %r15, %rdi
callq 0x4260
movq 0x520c(%rip), %rcx      # 0xefc0
movq %rax, (%rcx)
movl $0xc, %edi
callq 0x4260
movq 0x51c8(%rip), %rcx      # 0xef90
movq %rax, (%rcx)
movb $0x1, 0x57ea(%rip)      # 0xf5bc
movl $0x18, %edi
callq 0x4260
movq %rax, %r14
movq 0x51ea(%rip), %rax      # 0xefd0
movl (%rax), %esi
leaq 0x16e5(%rip), %rdx      # 0xb4d4
movl $0x38, %edi
callq 0x40b0
movq %rax, 0x10(%r14)
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/lighting.c
// Function: hpsLightingPreRender
void hpsLightingPreRender(void *data){
    SceneLighting *sLighting = (SceneLighting *) data;
    hpsCurrentAmbientLight[0] = sLighting->ambient.r;
    hpsCurrentAmbientLight[1] = sLighting->ambient.g;
    hpsCurrentAmbientLight[2] = sLighting->ambient.b;

    currentLights = lightQueue.size;
    currentLights = (currentLights > hpsMaxLights) ? hpsMaxLights : currentLights;
    int i;
    for (i = 0; i < currentLights; i++){
        HPSnode *node = (HPSnode *) lightQueue.data[i];
        Light *l = (Light *) hpsNodeData(node);
        float *bs = hpsNodeBoundingSphere(node);
        hpsCurrentLightIntensities[i] = l->intensity;
        hpsCurrentLightPositions[i*3]   = bs[0];
        hpsCurrentLightPositions[i*3+1] = bs[1];
        hpsCurrentLightPositions[i*3+2] = bs[2];
        hpsCurrentLightColors[i*3]   = l->color.r;
        hpsCurrentLightColors[i*3+1] = l->color.g;
        hpsCurrentLightColors[i*3+2] = l->color.b;
        hpsCurrentLightDirections[i*3]   = l->worldDirection.x;
        hpsCurrentLightDirections[i*3+1] = l->worldDirection.y;
        hpsCurrentLightDirections[i*3+2] = l->worldDirection.z;
        hpsCurrentLightDirections[i*3+3] = l->spotAngle;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movss (%rdi), %xmm0
movq 0x5158(%rip), %rax      # 0xef90
movq (%rax), %rax
movss %xmm0, (%rax)
movss 0x4(%rdi), %xmm0
movss %xmm0, 0x4(%rax)
movss 0x8(%rdi), %xmm0
movss %xmm0, 0x8(%rax)
movl 0x576f(%rip), %eax      # 0xf5c8
movq 0x5138(%rip), %rcx      # 0xef98
movl (%rcx), %ecx
cmpl %eax, %ecx
cmovbl %ecx, %eax
movq 0x5132(%rip), %rbp      # 0xefa0
movl %eax, (%rbp)
testl %eax, %eax
je 0x9f61
movl $0x2, %r12d
xorl %r13d, %r13d
movq 0x50ef(%rip), %r15      # 0xef78
movq 0x5730(%rip), %rax      # 0xf5c0
movq (%rax,%r13,8), %rbx
movq %rbx, %rdi
callq 0x4360
movq %rax, %r14
movq %rbx, %rdi
callq 0x4170
movss 0x28(%r14), %xmm0
movq 0x510c(%rip), %rcx      # 0xefc0
movq (%rcx), %rcx
movss %xmm0, (%rcx,%r13,4)
movss (%rax), %xmm0
movq 0x50a0(%rip), %rcx      # 0xef68
movq (%rcx), %rcx
movss %xmm0, -0x8(%rcx,%r12,4)
movss 0x4(%rax), %xmm0
movss %xmm0, -0x4(%rcx,%r12,4)
movss 0x8(%rax), %xmm0
movss %xmm0, (%rcx,%r12,4)
movss (%r14), %xmm0
movq 0x50d3(%rip), %rax      # 0xefc8
movq (%rax), %rax
movss %xmm0, -0x8(%rax,%r12,4)
movss 0x4(%r14), %xmm0
movss %xmm0, -0x4(%rax,%r12,4)
movss 0x8(%r14), %xmm0
movss %xmm0, (%rax,%r12,4)
movss 0x18(%r14), %xmm0
movq (%r15), %rax
movss %xmm0, -0x8(%rax,%r12,4)
movss 0x1c(%r14), %xmm0
movss %xmm0, -0x4(%rax,%r12,4)
movss 0x20(%r14), %xmm0
movss %xmm0, (%rax,%r12,4)
movss 0x24(%r14), %xmm0
movss %xmm0, 0x4(%rax,%r12,4)
incq %r13
movl (%rbp), %eax
addq $0x3, %r12
cmpq %rax, %r13
jb 0x9e89
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/lighting.c
// Function: hpsLightingUpdateNode
void hpsLightingUpdateNode(void *data, HPSnode *node){
    Light *l = (Light *) hpsNodeData(node);
    if (!l->spotAngle) return;

    HPMmat4 *trans = (HPMmat4 *) hpsNodeTransform(node);
    HPMmat4 rot;
    rot._11 = trans->_11;
    rot._12 = trans->_12;
    rot._13 = trans->_13;
    rot._21 = trans->_21;
    rot._22 = trans->_22;
    rot._23 = trans->_23;
    rot._31 = trans->_31;
    rot._32 = trans->_32;
    rot._33 = trans->_33;

    rot._14 = 0;
    rot._24 = 0;
    rot._34 = 0;
    rot._41 = 0;
    rot._42 = 0;
    rot._43 = 0;
    rot._44 = 1;

    l->worldDirection.x = l->direction.x;
    l->worldDirection.y = l->direction.y;
    l->worldDirection.z = l->direction.z;
    hpmMat4VecMult((float *) &rot, (float *) &l->worldDirection);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rsi, %rdi
callq 0x4360
movss 0x24(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x9fad
jnp 0xa037
movq %rax, %rbx
movq %r14, %rdi
callq 0x40d0
movss 0x10(%rax), %xmm0
leaq 0x8(%rsp), %rdi
movss %xmm0, 0x10(%rdi)
movss 0x20(%rax), %xmm0
movss %xmm0, 0x20(%rdi)
movsd (%rax), %xmm0
movsd %xmm0, (%rdi)
movss 0x24(%rax), %xmm0
movss %xmm0, 0x24(%rdi)
movss 0x8(%rax), %xmm0
movss %xmm0, 0x8(%rdi)
movsd 0x14(%rax), %xmm0
movsd %xmm0, 0x14(%rdi)
movss 0x28(%rax), %xmm0
movss %xmm0, 0x28(%rdi)
xorl %eax, %eax
movl %eax, 0xc(%rdi)
movl %eax, 0x1c(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x2c(%rdi)
movl $0x3f800000, 0x3c(%rdi) # imm = 0x3F800000
movq %rbx, %rsi
addq $0x18, %rsi
movsd 0xc(%rbx), %xmm0
movsd %xmm0, 0x18(%rbx)
movss 0x14(%rbx), %xmm0
movss %xmm0, 0x20(%rbx)
callq 0x41c0
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/AlexCharlton[P]Hyperscene/src/lighting.c
// Function: hpsSetAmbientLight
void hpsSetAmbientLight(HPSscene *scene, float* color){
    SceneLighting *sLighting = (SceneLighting *) hpsExtensionData(scene, &lighting);
    sLighting->ambient.r = color[0];
    sLighting->ambient.g = color[1];
    sLighting->ambient.b = color[2];
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movq 0x4dc5(%rip), %rsi      # 0xefa8
callq 0x4330
movss (%rbx), %xmm0
movss %xmm0, (%rax)
movss 0x4(%rbx), %xmm0
movss %xmm0, 0x4(%rax)
movss 0x8(%rbx), %xmm0
movss %xmm0, 0x8(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/chrispanag[P]operating-systems-scheduler/scheduler.c
// Function: addNode
node* addNode(node* list, int id, pid_t pid, char* name) {
  node* head = list;
  if (head == NULL) {
    head = newNode(id, pid, name);
    head->next = head;
    head->prev = head;
  } else {
    while (list->next != head) {
      list = list->next;
    }
    list->next = newNode(id, pid, name);
    list->next->next = head;
    list->next->prev = list;
    head->prev = list->next;
  }
  return head;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebp
movl %esi, %r15d
testq %rdi, %rdi
je 0x14e2
movq %rdi, %rbx
movq %rdi, %rax
movq %rax, %r13
movq 0x10(%rax), %rax
cmpq %rbx, %rax
jne 0x14a6
movl $0x20, %edi
callq 0x1160
movq %rax, %r12
movl %r15d, (%rax)
movl %ebp, 0x4(%rax)
movq %r14, %rdi
callq 0x11d0
movq %rax, 0x8(%r12)
movq %r12, 0x10(%r13)
movq %rbx, 0x10(%r12)
movq %r13, 0x18(%r12)
jmp 0x1508
movl $0x20, %edi
callq 0x1160
movq %rax, %rbx
movl %r15d, (%rax)
movl %ebp, 0x4(%rax)
movq %r14, %rdi
callq 0x11d0
movq %rax, 0x8(%rbx)
movq %rbx, 0x10(%rbx)
movq %rbx, %r12
movq %r12, 0x18(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/chrispanag[P]operating-systems-scheduler/scheduler.c
// Function: printList
void printList(node* list) {
  node* head = list;
  printf("%d ", list->id);
  while (list->next != head) {
    list = list->next;
    printf("%d ", list->id);
  }
  printf("\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %esi
leaq 0xad5(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x10c0
movq 0x10(%rbx), %r15
cmpq %rbx, %r15
je 0x155c
leaq 0xabe(%rip), %r14       # 0x2004
movl (%r15), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x10c0
movq 0x10(%r15), %r15
cmpq %rbx, %r15
jne 0x1546
movl $0xa, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O3/chrispanag[P]operating-systems-scheduler/scheduler.c
// Function: deleteNode
node* deleteNode(node* list, pid_t pid) {
  node* head = list;
  if (list->pid == pid) {
    list->next->prev = head->prev;
    head->prev->next = list->next;
    head = list->next;
    free(list);
    return head;
  }
  list = list->next;
  while (list != head) {
    if (list->pid == pid) {
      list->prev->next = list->next;
      list->next->prev = list->prev;
      free(list);
      break;
    }
    list = list->next;
  }
  return head;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl %esi, 0x4(%rdi)
jne 0x1589
movq 0x18(%rbx), %rax
movq %rbx, %rdi
movq 0x10(%rbx), %rbx
movq %rax, 0x18(%rbx)
movq %rbx, 0x10(%rax)
jmp 0x15aa
movq %rbx, %rdi
movq 0x10(%rdi), %rdi
cmpq %rbx, %rdi
je 0x15af
cmpl %esi, 0x4(%rdi)
jne 0x158c
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rcx
movq %rax, 0x10(%rcx)
movq %rcx, 0x18(%rax)
callq 0x1050
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/chrispanag[P]operating-systems-scheduler/scheduler.c
// Function: accessNode
node* accessNode(node* list, pid_t pid) {
  node* head = list;
  do {
    if (list->pid == pid) {
      return list;
    }
    list = list->next;
  } while (list != head);
  printf("Error: The node with id: %d, doesn't exist!\n", pid);
  return NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl %esi, 0x4(%rbx)
je 0x15d6
movq 0x10(%rbx), %rbx
cmpq %rdi, %rbx
jne 0x15b8
leaq 0xa3b(%rip), %rdi       # 0x2008
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x10c0
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/aparrish[P]rwet-examples-c/randomize_words.c
// Function: main
int main() {

	UT_array* line_words;
	char* line, * randomized_line;
	int len;

	srand(time(NULL));

	while (!feof(stdin)) {
		len = ap_getline(&line, stdin);

		utarray_new(line_words, &ut_str_icd);

		/* tokenize line, pushing into array */
		char* word;
		word = strtok(line, " \n");
		while (word != NULL) {
			utarray_push_back(line_words, &word);
			word = strtok(NULL, " \n");
		}

		/* shuffle */
		utarray_sort(line_words, shuffle);

		join_new(&randomized_line, line_words, " ");
		printf("%s\n", randomized_line);

		utarray_free(line_words);
		free(randomized_line);
		free(line);

	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorl %edi, %edi
callq 0x10c0
movl %eax, %edi
callq 0x1080
movq 0x2d61(%rip), %r15      # 0x3fe0
movq (%r15), %rdi
callq 0x10a0
testl %eax, %eax
jne 0x13e5
leaq 0xd6e(%rip), %r14       # 0x2004
movl $0x8, %r12d
movq %rsp, %rbp
movq (%r15), %rsi
leaq 0x10(%rsp), %rdi
callq 0x1428
movl $0x1, %edi
movl $0x30, %esi
callq 0x1090
movq %rax, %rbx
movups 0x2afb(%rip), %xmm0     # 0x3dc0
movups %xmm0, 0x18(%rax)
movups 0x2ae0(%rip), %xmm0     # 0x3db0
movups %xmm0, 0x8(%rax)
movq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x10f0
movq %rax, (%rsp)
testq %rax, %rax
je 0x134e
movl (%rbx), %ecx
movl 0x4(%rbx), %eax
incl %ecx
cmpl %eax, %ecx
jbe 0x1322
testl %eax, %eax
leal (%rax,%rax), %eax
cmovel %r12d, %eax
cmpl %eax, %ecx
ja 0x12f5
movl %eax, 0x4(%rbx)
movq 0x28(%rbx), %rdi
movl %eax, %esi
imulq 0x8(%rbx), %rsi
callq 0x10e0
movq %rax, 0x28(%rbx)
testq %rax, %rax
je 0x13f6
movq 0x18(%rbx), %rax
movq 0x8(%rbx), %rdx
movl (%rbx), %edi
leal 0x1(%rdi), %ecx
imulq %rdx, %rdi
addq 0x28(%rbx), %rdi
movl %ecx, (%rbx)
movq %rbp, %rsi
testq %rax, %rax
je 0x1345
callq *%rax
jmp 0x134a
callq 0x10b0
xorl %edi, %edi
jmp 0x12d9
movq 0x28(%rbx), %rdi
movl (%rbx), %esi
movq 0x8(%rbx), %rdx
leaq -0x113(%rip), %rcx      # 0x124c
callq 0x1060
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
leaq 0xc94(%rip), %rdx       # 0x2007
callq 0x17ab
movq 0x8(%rsp), %rdi
callq 0x1050
cmpl $0x0, 0x4(%rbx)
je 0x13b9
cmpq $0x0, 0x20(%rbx)
je 0x13b0
cmpl $0x0, (%rbx)
je 0x13b0
xorl %r13d, %r13d
movq 0x8(%rbx), %rdi
imulq %r13, %rdi
addq 0x28(%rbx), %rdi
callq *0x20(%rbx)
incq %r13
movl (%rbx), %eax
cmpq %rax, %r13
jb 0x1397
movq 0x28(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
movq 0x8(%rsp), %rdi
callq 0x1030
movq 0x10(%rsp), %rdi
callq 0x1030
movq (%r15), %rdi
callq 0x10a0
testl %eax, %eax
je 0x129f
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1110
// File: /workspace/github_c_makefile_star2_O3/j4r0g[P]Projet_Labyrinthe/fonctions/labyrinthe.c
// Function: afficher_stats
void afficher_stats(t_lab lab[X][Y], t_fourmi fourmi[]) {
	int nb_ins=nb_insecte();
	int i;
	char male[10] = "male";
	char femelle[10] = "femelle";
	char sexe[10];
	printf("\nIl y a actuellement %i insecte dans le labyrinthe\n", nb_ins);
	for(i=0;i<nb_ins;i++){
		if(fourmi[i].sexe==0){
			strcpy(sexe, male);
		}
		else {
			strcpy(sexe, femelle);
		}
		int nourriture=fourmi[i].nourriture;
		int age = fourmi[i].age;
		int x=fourmi[i].x;
		int y=fourmi[i].y;
		printf("La fourmi %i est de sexe %s à encore pour %i tours de nourriture et %i tours de vie, elle est en x=%i et y=%i.\n", i, sexe, nourriture+1, age+1, x, y);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
xorl %eax, %eax
callq 0x2fac
movl %eax, %ebp
leaq 0x4d7d(%rip), %rdi      # 0x602a
movl %eax, %esi
xorl %eax, %eax
callq 0x10a0
testl %ebp, %ebp
jle 0x1325
movl %ebp, %r13d
addq $0x10, %rbx
leaq 0x4d96(%rip), %r14      # 0x605e
leaq 0x8(%rsp), %r15
movabsq $0x656c6c656d6566, %rbp # imm = 0x656C6C656D6566
xorl %r12d, %r12d
cmpl $0x0, -0x10(%rbx)
je 0x12e7
movq %rbp, 0x8(%rsp)
jmp 0x12f4
movb $0x0, 0xc(%rsp)
movl $0x656c616d, 0x8(%rsp)  # imm = 0x656C616D
movl -0xc(%rbx), %ecx
movl -0x8(%rbx), %r8d
movl -0x4(%rbx), %r9d
movl (%rbx), %eax
incl %ecx
incl %r8d
movl %eax, (%rsp)
movq %r14, %rdi
movl %r12d, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x10a0
incq %r12
addq $0x14, %rbx
cmpq %r12, %r13
jne 0x12da
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/j4r0g[P]Projet_Labyrinthe/fonctions/labyrinthe.c
// Function: init_lab
void init_lab(t_lab lab[X][Y]){
	int tmp;
	int i,j;
	FILE * fic1;
	fic1 = fopen("../doc/lab_test.txt", "r");

	while(!feof(fic1))
	{
		for(i =0; i<X; i++){
			for(j =0; j<Y; j++){
				fscanf(fic1, "%d ", &tmp);
				lab[i][j].etat = tmp;
				lab[i][j].decouvert = unseen;
			}
		}
	}
	fclose(fic1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
leaq 0x4d5c(%rip), %rdi      # 0x60cf
leaq 0x5411(%rip), %rsi      # 0x678b
callq 0x1120
movq %rax, %r14
movq %rax, %rdi
callq 0x10f0
testl %eax, %eax
jne 0x13f6
leaq 0x4d4e(%rip), %r15      # 0x60e3
leaq 0xc(%rsp), %r12
xorl %r13d, %r13d
imulq $0x2d0, %r13, %rbp      # imm = 0x2D0
addq 0x10(%rsp), %rbp
movl $0x4, %ebx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1060
movl 0xc(%rsp), %eax
movl %eax, (%rbp,%rbx)
movl $0x0, -0x4(%rbp,%rbx)
addq $0xc, %rbx
cmpq $0x2d4, %rbx            # imm = 0x2D4
jne 0x13ae
incq %r13
cmpq $0x1e, %r13
jne 0x139d
movq %r14, %rdi
callq 0x10f0
movl $0x0, %r13d
testl %eax, %eax
je 0x139d
movq %r14, %rdi
callq 0x1080
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/j4r0g[P]Projet_Labyrinthe/fonctions/labyrinthe.c
// Function: nbr_cases_vide
int nbr_cases_vide(t_lab lab[X][Y]){
	int i, j;
	int nbr_cases_vide = 0;
	for (i=0; i<X; i++){
		for (j=0; j<Y; j++){
			if(lab[i][j].etat == vide){
				nbr_cases_vide++;
			}
		}
	}
	return nbr_cases_vide;
}

// Assembly:
xorl %ecx, %ecx
movdqa 0x4bf9(%rip), %xmm0     # 0x6010
xorl %eax, %eax
movd %eax, %xmm1
movl $0x28, %eax
movd (%rdi,%rax), %xmm2
movd -0xc(%rdi,%rax), %xmm3
punpckldq %xmm2, %xmm3    # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
movd -0x18(%rdi,%rax), %xmm2
movd -0x24(%rdi,%rax), %xmm4
punpckldq %xmm2, %xmm4    # xmm4 = xmm4[0],xmm2[0],xmm4[1],xmm2[1]
punpcklqdq %xmm3, %xmm4    # xmm4 = xmm4[0],xmm3[0]
pcmpeqd %xmm0, %xmm4
psubd %xmm4, %xmm1
addq $0x30, %rax
cmpq $0x2f8, %rax            # imm = 0x2F8
jne 0x1422
pshufd $0xee, %xmm1, %xmm2     # xmm2 = xmm1[2,3,2,3]
paddd %xmm1, %xmm2
pshufd $0x55, %xmm2, %xmm1     # xmm1 = xmm2[1,1,1,1]
paddd %xmm2, %xmm1
movd %xmm1, %eax
incq %rcx
addq $0x2d0, %rdi            # imm = 0x2D0
cmpq $0x1e, %rcx
jne 0x1419
retq
// File: /workspace/github_c_makefile_star2_O3/j4r0g[P]Projet_Labyrinthe/fonctions/labyrinthe.c
// Function: lissage_lab
int lissage_lab(t_lab lab[X][Y]){
	int i, j;
	int mur_adj=0;
	int a_lisse=0;
	for (i=0; i<X; i++){
		for (j=0; j<Y; j++){
			if(lab[i][j].etat == mur){
				mur_adj=0;

				if(lab[i][j-1].etat == vide){
					mur_adj++;
				}
				if(lab[i][j+1].etat == vide){
					mur_adj++;
				}
				if(lab[i-1][j].etat == vide){
					mur_adj++;
				}
				if(lab[i+1][j].etat == vide){
					mur_adj++;
				}
				if(mur_adj >= 3 ){
					lab[i][j].etat = vide;
					a_lisse=1;
				}

			}
		}
	}
	return a_lisse;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
xorl %ecx, %ecx
leaq 0x2d0(%rdi), %rdx
xorl %eax, %eax
imulq $0x2d0, %rcx, %rsi      # imm = 0x2D0
leaq (%rdi,%rsi), %r8
addq $-0x2d0, %r8            # imm = 0xFD30
leaq (%rdx,%rsi), %r9
addq %rdi, %rsi
xorl %r10d, %r10d
leaq (%r10,%r10,2), %r11
cmpl $0x23, 0x4(%rsi,%r11,4)
jne 0x151c
leaq (,%r10,4), %rbx
leaq (%rbx,%rbx,2), %rbx
xorl %r14d, %r14d
cmpl $0x20, -0x8(%rbx,%rsi)
sete %r14b
incq %r10
leal 0x1(%r14), %ebp
cmpl $0x20, 0x10(%rbx,%rsi)
cmovnel %r14d, %ebp
xorl %r14d, %r14d
cmpl $0x20, 0x4(%r8,%rbx)
sete %r14b
xorl %r15d, %r15d
cmpl $0x20, 0x4(%r9,%rbx)
sete %r15b
addl %r14d, %r15d
addl %ebp, %r15d
cmpl $0x3, %r15d
jb 0x151f
leaq (%rsi,%r11,4), %rax
addq $0x4, %rax
movl $0x20, (%rax)
movl $0x1, %eax
jmp 0x151f
incq %r10
cmpq $0x3c, %r10
jne 0x14ad
incq %rcx
cmpq $0x1e, %rcx
jne 0x1491
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/j4r0g[P]Projet_Labyrinthe/fonctions/labyrinthe.c
// Function: gene_nour
void gene_nour(t_lab lab[X][Y]) {
	int nombrex, nombrey;
	srand(time(NULL));
	int i, nb_nourr=10;
	for(i=0; i<nb_nourr; i++) {
		nombrex = rand()%X;
		nombrey = rand()%Y;
		while(lab[nombrex][nombrey].etat!=vide || !coord_correctes(nombrex, nombrey)){
			nombrex = rand()%X;
			nombrey = rand()%Y;
		}
		lab[nombrex][nombrey].etat=food;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %edi, %edi
callq 0x1100
movl %eax, %edi
callq 0x10d0
callq 0x1170
movl %eax, %ebp
callq 0x1170
movslq %ebp, %rdx
imulq $-0x77777777, %rdx, %rcx # imm = 0x88888889
shrq $0x20, %rcx
addl %edx, %ecx
movl %ecx, %esi
shrl $0x1f, %esi
sarl $0x4, %ecx
addl %esi, %ecx
movl %ecx, %esi
shll $0x5, %esi
addl %ecx, %ecx
subl %esi, %ecx
addl %edx, %ecx
cltq
imulq $-0x77777777, %rax, %rdx # imm = 0x88888889
shrq $0x20, %rdx
addl %eax, %edx
movl %edx, %esi
shrl $0x1f, %esi
sarl $0x5, %edx
addl %esi, %edx
imull $0x3c, %edx, %edx
subl %edx, %eax
movslq %ecx, %rdx
movslq %eax, %rsi
imulq $0x2d0, %rdx, %rdx      # imm = 0x2D0
addq %rbx, %rdx
leaq (%rsi,%rsi,2), %rsi
cmpl $0x20, 0x4(%rdx,%rsi,4)
jne 0x1ab4
addl $-0x1d, %ecx
cmpl $-0x1c, %ecx
setb %cl
addl $-0x3b, %eax
cmpl $-0x3a, %eax
setb %al
orb %cl, %al
jne 0x1ab4
leaq (%rdx,%rsi,4), %rax
addq $0x4, %rax
movl $0x2a, (%rax)
incl %r14d
cmpl $0xa, %r14d
jne 0x1ab4
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/j4r0g[P]Projet_Labyrinthe/fonctions/labyrinthe.c
// Function: decouvrir_lab
void decouvrir_lab(t_lab lab[X][Y]) {
	int i, j;
	for(i=0; i<X; i++) {
		for(j=0; j<Y; j++) {
			lab[i][j].decouvert=seen;
		}
	}
}

// Assembly:
xorl %eax, %eax
movq $-0x2d0, %rcx           # imm = 0xFD30
movl $0x1, 0x2d0(%rdi,%rcx)
addq $0xc, %rcx
jne 0x1b5d
incq %rax
addq $0x2d0, %rdi            # imm = 0x2D0
cmpq $0x1e, %rax
jne 0x1b56
retq
nop