LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrMouse
void tigrMouse(Tigr* bmp, int* x, int* y, int* buttons) {
    TigrInternal* win = tigrInternal(bmp);
    if (x) {
        *x = win->mouseX;
    }
    if (y) {
        *y = win->mouseY;
    }
    if (buttons) {
        *buttons = win->mouseButtons;
    }
}

// Assembly:
cmpq $0x0, 0x20(%rdi)
je 0x73b1
testq %rsi, %rsi
je 0x7396
movl 0x2c4(%rdi), %eax
movl %eax, (%rsi)
testq %rdx, %rdx
je 0x73a3
movl 0x2c8(%rdi), %eax
movl %eax, (%rdx)
testq %rcx, %rcx
je 0x73b0
movl 0x2c0(%rdi), %eax
movl %eax, (%rcx)
retq
pushq %rax
leaq 0x568f(%rip), %rdi      # 0xca48
leaq 0x5694(%rip), %rsi      # 0xca54
leaq 0x5698(%rip), %rcx      # 0xca5f
movl $0x741, %edx            # imm = 0x741
callq 0x3260
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrTouch
int tigrTouch(Tigr* bmp, TigrTouchPoint* points, int maxPoints) {
    int buttons = 0;
    if (maxPoints > 0) {
        tigrMouse(bmp, &points->x, &points->y, &buttons);
    }
    return buttons ? 1 : 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl $0x0, 0xc(%rsp)
testl %edx, %edx
jle 0x73fd
leaq 0x4(%rsi), %rdx
leaq 0xc(%rsp), %rbx
movq %rbx, %rcx
callq 0x7382
xorl %eax, %eax
cmpl $0x0, (%rbx)
setne %al
jmp 0x73ff
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrCheckShaderErrors
void tigrCheckShaderErrors(GLuint object) {
    GLint success;
    GLchar info[2048];
    glGetShaderiv(object, GL_COMPILE_STATUS, &success);
    if (!success) {
        glGetShaderInfoLog(object, sizeof(info), NULL, info);
        tigrError(NULL, "shader compile error : %s\n", info);
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x818, %rsp            # imm = 0x818
movl %edi, %ebx
leaq 0xc(%rsp), %r14
movl $0x8b81, %esi           # imm = 0x8B81
movq %r14, %rdx
callq 0x3780
cmpl $0x0, (%r14)
je 0x7456
addq $0x818, %rsp            # imm = 0x818
popq %rbx
popq %r14
retq
leaq 0x10(%rsp), %r14
movl %ebx, %edi
movl $0x800, %esi            # imm = 0x800
xorl %edx, %edx
movq %r14, %rcx
callq 0x30e0
leaq 0x56bd(%rip), %rsi      # 0xcb30
movq %r14, %rdx
xorl %eax, %eax
callq 0x7276
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrCheckProgramErrors
void tigrCheckProgramErrors(GLuint object) {
    GLint success;
    GLchar info[2048];
    glGetProgramiv(object, GL_LINK_STATUS, &success);
    if (!success) {
        glGetProgramInfoLog(object, sizeof(info), NULL, info);
        tigrError(NULL, "shader link error : %s\n", info);
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x818, %rsp            # imm = 0x818
movl %edi, %ebx
leaq 0xc(%rsp), %r14
movl $0x8b82, %esi           # imm = 0x8B82
movq %r14, %rdx
callq 0x3220
cmpl $0x0, (%r14)
je 0x74ac
addq $0x818, %rsp            # imm = 0x818
popq %rbx
popq %r14
retq
leaq 0x10(%rsp), %r14
movl %ebx, %edi
movl $0x800, %esi            # imm = 0x800
xorl %edx, %edx
movq %r14, %rcx
callq 0x3210
leaq 0x5682(%rip), %rsi      # 0xcb4b
movq %r14, %rdx
xorl %eax, %eax
callq 0x7276
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrCreateShaderProgram
void tigrCreateShaderProgram(GLStuff* gl, const char* fxSource, int fxSize) {
    if (gl->program != 0) {
        glDeleteProgram(gl->program);
        gl->program = 0;
    }

    GLuint vs = glCreateShader(GL_VERTEX_SHADER);
    const char* vs_source = (const char*)&tigr_upscale_gl_vs;
    glShaderSource(vs, 1, &vs_source, &tigr_upscale_gl_vs_size);
    glCompileShader(vs);
    tigrCheckShaderErrors(vs);

    GLuint fs = glCreateShader(GL_FRAGMENT_SHADER);
    const char* fs_sources[] = {
        (const char*)tigr_upscale_gl_fs,
        fxSource,
    };
    const int fs_lengths[] = {
        tigr_upscale_gl_fs_size,
        fxSize,
    };
    glShaderSource(fs, 2, fs_sources, fs_lengths);
    glCompileShader(fs);
    tigrCheckShaderErrors(fs);

    gl->program = glCreateProgram();
    glAttachShader(gl->program, vs);
    glAttachShader(gl->program, fs);
    glLinkProgram(gl->program);
    tigrCheckProgramErrors(gl->program);
    glDeleteShader(vs);
    glDeleteShader(fs);

    gl->uniform_projection = glGetUniformLocation(gl->program, "projection");
    gl->uniform_model = glGetUniformLocation(gl->program, "model");
    gl->uniform_parameters = glGetUniformLocation(gl->program, "parameters");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %rbx
movl 0xc(%rdi), %edi
testl %edi, %edi
je 0x74fb
callq 0x3140
movl $0x0, 0xc(%rbx)
movl $0x8b31, %edi           # imm = 0x8B31
callq 0x3320
movl %eax, %ebp
leaq 0x3e02(%rip), %rax      # 0xb310
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x3ee1(%rip), %rcx      # 0xb3fc
movl %ebp, %edi
movl $0x1, %esi
callq 0x37c0
movl %ebp, %edi
callq 0x32e0
movl %ebp, %edi
callq 0x7427
movl $0x8b30, %edi           # imm = 0x8B30
callq 0x3320
movl %eax, %r14d
leaq 0x3eb7(%rip), %rax      # 0xb400
leaq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %r12, 0x8(%rdx)
leaq 0x8(%rsp), %rcx
movl $0xae, (%rcx)
movl %r15d, 0x4(%rcx)
movl %r14d, %edi
movl $0x2, %esi
callq 0x37c0
movl %r14d, %edi
callq 0x32e0
movl %r14d, %edi
callq 0x7427
callq 0x36c0
movl %eax, 0xc(%rbx)
movl %eax, %edi
movl %ebp, %esi
callq 0x36b0
movl 0xc(%rbx), %edi
movl %r14d, %esi
callq 0x36b0
movl 0xc(%rbx), %edi
callq 0x37b0
movl 0xc(%rbx), %edi
callq 0x747d
movl %ebp, %edi
callq 0x3370
movl %r14d, %edi
callq 0x3370
movl 0xc(%rbx), %edi
leaq 0x559d(%rip), %rsi      # 0xcb63
callq 0x3180
movl %eax, 0x10(%rbx)
movl 0xc(%rbx), %edi
leaq 0x5596(%rip), %rsi      # 0xcb6e
callq 0x3180
movl %eax, 0x14(%rbx)
movl 0xc(%rbx), %edi
leaq 0x558a(%rip), %rsi      # 0xcb74
callq 0x3180
movl %eax, 0x18(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrGAPIDestroy
void tigrGAPIDestroy(Tigr* bmp) {
    TigrInternal* win = tigrInternal(bmp);
    GLStuff* gl = &win->gl;

    if (tigrGAPIBegin(bmp) < 0) {
        tigrError(bmp, "Cannot activate OpenGL context.\n");
        return;
    }

    if (!gl->gl_legacy) {
        glDeleteTextures(2, gl->tex);
        glDeleteProgram(gl->program);
    }

    tigrCheckGLError("destroy");

    if (tigrGAPIEnd(bmp) < 0) {
        tigrError(bmp, "Cannot deactivate OpenGL context.\n");
        return;
    }
}

// Assembly:
pushq %rbx
cmpq $0x0, 0x20(%rdi)
je 0x764c
movq %rdi, %rbx
callq 0x676b
testl %eax, %eax
js 0x766b
cmpl $0x0, 0x54(%rbx)
jne 0x762f
leaq 0x38(%rbx), %rsi
movl $0x2, %edi
callq 0x3520
movl 0x44(%rbx), %edi
callq 0x3140
leaq 0x5579(%rip), %rdi      # 0xcbaf
callq 0x7405
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x32c0
testl %eax, %eax
je 0x7674
popq %rbx
retq
leaq 0x53f5(%rip), %rdi      # 0xca48
leaq 0x53fa(%rip), %rsi      # 0xca54
leaq 0x53fe(%rip), %rcx      # 0xca5f
movl $0x741, %edx            # imm = 0x741
callq 0x3260
leaq 0x551c(%rip), %rsi      # 0xcb8e
jmp 0x767b
leaq 0x553c(%rip), %rsi      # 0xcbb7
xorl %eax, %eax
callq 0x7276
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrGAPIDraw
void tigrGAPIDraw(int legacy, GLuint uniform_model, GLuint tex, Tigr* bmp, int x1, int y1, int x2, int y2) {
    glBindTexture(GL_TEXTURE_2D, tex);
    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, bmp->w, bmp->h, 0, GL_RGBA, GL_UNSIGNED_BYTE, bmp->pix);

    if (!legacy) {
        float sx = (float)(x2 - x1);
        float sy = (float)(y2 - y1);
        float tx = (float)x1;
        float ty = (float)y1;

        float model[16] = { sx, 0.0f, 0.0f, 0.0f, 0.0f, sy, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, tx, ty, 0.0f, 1.0f };

        glUniformMatrix4fv(uniform_model, 1, GL_FALSE, model);
        glDrawArrays(GL_TRIANGLES, 0, 6);
    } else {
#if !(__APPLE__ || __ANDROID__)
        glBegin(GL_QUADS);
        glTexCoord2f(1.0f, 0.0f);
        glVertex2i(x2, y1);
        glTexCoord2f(0.0f, 0.0f);
        glVertex2i(x1, y1);
        glTexCoord2f(0.0f, 1.0f);
        glVertex2i(x1, y2);
        glTexCoord2f(1.0f, 1.0f);
        glVertex2i(x2, y2);
        glEnd();
#else
        assert(0);
#endif
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, %r15d
movl %r8d, %ebp
movq %rcx, %r13
movl %esi, 0xc(%rsp)
movl %edi, %r12d
movl 0x98(%rsp), %ebx
movl 0x90(%rsp), %r14d
movl $0xde1, %edi            # imm = 0xDE1
movl %edx, %esi
callq 0x3460
movl (%r13), %ecx
movl 0x4(%r13), %r8d
subq $0x8, %rsp
movl $0xde1, %edi            # imm = 0xDE1
xorl %esi, %esi
movl $0x8058, %edx           # imm = 0x8058
xorl %r9d, %r9d
pushq 0x18(%r13)
pushq $0x1401                 # imm = 0x1401
pushq $0x1908                 # imm = 0x1908
callq 0x3110
addq $0x20, %rsp
testl %r12d, %r12d
je 0x7776
movl $0x7, %edi
callq 0x30a0
movss 0x39b8(%rip), %xmm0     # 0xb0c0
xorps %xmm1, %xmm1
callq 0x31a0
movl %r14d, %edi
movl %r15d, %esi
callq 0x3490
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
callq 0x31a0
movl %ebp, %edi
movl %r15d, %esi
callq 0x3490
xorps %xmm0, %xmm0
movss 0x3985(%rip), %xmm1     # 0xb0c0
callq 0x31a0
movl %ebp, %edi
movl %ebx, %esi
callq 0x3490
movss 0x396f(%rip), %xmm0     # 0xb0c0
movaps %xmm0, %xmm1
callq 0x31a0
movl %r14d, %edi
movl %ebx, %esi
callq 0x3490
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34d0
subl %ebp, %r14d
cvtsi2ss %r14d, %xmm0
subl %r15d, %ebx
cvtsi2ss %ebx, %xmm1
movd %r15d, %xmm2
movd %ebp, %xmm3
punpckldq %xmm2, %xmm3    # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
cvtdq2ps %xmm3, %xmm2
leaq 0x10(%rsp), %rcx
movss %xmm0, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rcx)
movss %xmm1, 0x14(%rcx)
movups %xmm0, 0x18(%rcx)
movss 0x390a(%rip), %xmm0     # 0xb0c0
movlhps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
movups %xmm0, 0x28(%rcx)
movsd 0x38eb(%rip), %xmm0     # 0xb0b0
movsd %xmm0, 0x38(%rcx)
movl 0xc(%rsp), %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x35e0
movl $0x4, %edi
xorl %esi, %esi
movl $0x6, %edx
callq 0x3040
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrEncodeUTF8
char* tigrEncodeUTF8(char* text, int cp) {
    if (cp < 0 || cp > 0x10ffff) {
        cp = 0xfffd;
    }

#define EMIT(X, Y, Z) *text++ = X | ((cp >> Y) & Z)
    if (cp < 0x80) {
        EMIT(0x00, 0, 0x7f);
    } else if (cp < 0x800) {
        EMIT(0xc0, 6, 0x1f);
        EMIT(0x80, 0, 0x3f);
    } else if (cp < 0x10000) {
        EMIT(0xe0, 12, 0xf);
        EMIT(0x80, 6, 0x3f);
        EMIT(0x80, 0, 0x3f);
    } else {
        EMIT(0xf0, 18, 0x7);
        EMIT(0x80, 12, 0x3f);
        EMIT(0x80, 6, 0x3f);
        EMIT(0x80, 0, 0x3f);
    }
    return text;
#undef EMIT
}

// Assembly:
movq %rdi, %rax
cmpl $0x110000, %esi         # imm = 0x110000
movl $0xfffd, %ecx           # imm = 0xFFFD
cmovbl %esi, %ecx
cmpl $0x7f, %ecx
ja 0x7816
movb %cl, (%rax)
incq %rax
retq
movl %ecx, %edx
cmpl $0x7ff, %ecx            # imm = 0x7FF
ja 0x7836
shrl $0x6, %edx
orb $-0x40, %dl
movb %dl, (%rax)
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x1(%rax)
addq $0x2, %rax
retq
cmpl $0xffff, %ecx           # imm = 0xFFFF
ja 0x7862
shrl $0xc, %edx
orb $-0x20, %dl
movb %dl, (%rax)
movl %ecx, %edx
shrl $0x6, %edx
andb $0x3f, %dl
orb $-0x80, %dl
movb %dl, 0x1(%rax)
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x2(%rax)
addq $0x3, %rax
retq
shrl $0x12, %edx
orb $-0x10, %dl
movb %dl, (%rax)
movl %ecx, %edx
shrl $0xc, %edx
andb $0x3f, %dl
orb $-0x80, %dl
movb %dl, 0x1(%rax)
movl %ecx, %edx
shrl $0x6, %edx
andb $0x3f, %dl
orb $-0x80, %dl
movb %dl, 0x2(%rax)
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x3(%rax)
addq $0x4, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrBeginOpenGL
int tigrBeginOpenGL(Tigr* bmp) {
#ifdef TIGR_GAPI_GL
    TigrInternal* win = tigrInternal(bmp);
    win->gl.gl_user_opengl_rendering = 1;
    return tigrGAPIBegin(bmp) == 0;
#else
    return 0;
#endif
}

// Assembly:
pushq %rax
cmpq $0x0, 0x20(%rdi)
je 0x78b3
movl $0x1, 0x58(%rdi)
callq 0x676b
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, %eax
popq %rcx
retq
leaq 0x518e(%rip), %rdi      # 0xca48
leaq 0x5193(%rip), %rsi      # 0xca54
leaq 0x5197(%rip), %rcx      # 0xca5f
movl $0x741, %edx            # imm = 0x741
callq 0x3260
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrSetPostShader
void tigrSetPostShader(Tigr* bmp, const char* code, int size) {
#ifdef TIGR_GAPI_GL
    tigrGAPIBegin(bmp);
    TigrInternal* win = tigrInternal(bmp);
    GLStuff* gl = &win->gl;
    tigrCreateShaderProgram(gl, code, size);
    tigrGAPIEnd(bmp);
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
callq 0x676b
cmpq $0x0, 0x20(%r15)
je 0x790c
addq $0x38, %r15
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x74d3
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
popq %rbx
popq %r14
popq %r15
jmp 0x32c0
leaq 0x5135(%rip), %rdi      # 0xca48
leaq 0x513a(%rip), %rsi      # 0xca54
leaq 0x513e(%rip), %rcx      # 0xca5f
movl $0x741, %edx            # imm = 0x741
callq 0x3260
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrSetPostFX
void tigrSetPostFX(Tigr* bmp, float p1, float p2, float p3, float p4) {
    TigrInternal* win = tigrInternal(bmp);
    win->p1 = p1;
    win->p2 = p2;
    win->p3 = p3;
    win->p4 = p4;
}

// Assembly:
cmpq $0x0, 0x20(%rdi)
je 0x7953
movss %xmm0, 0x94(%rdi)
movss %xmm1, 0x98(%rdi)
movss %xmm2, 0x9c(%rdi)
movss %xmm3, 0xa0(%rdi)
retq
pushq %rax
leaq 0x50ed(%rip), %rdi      # 0xca48
leaq 0x50f2(%rip), %rsi      # 0xca54
leaq 0x50f6(%rip), %rcx      # 0xca5f
movl $0x741, %edx            # imm = 0x741
callq 0x3260
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: find
static const unsigned char* find(PNG* png, const char* chunk, unsigned minlen) {
    const unsigned char* start;
    while (png->p < png->end) {
        unsigned len = get32(png->p + 0);
        start = png->p;
        png->p += len + 12;
        if (memcmp(start + 4, chunk, 4) == 0 && len >= minlen && png->p <= png->end)
            return start + 8;
    }

    return NULL;
}

// Assembly:
movq (%rdi), %r9
movq 0x8(%rdi), %rcx
xorl %eax, %eax
cmpq %rcx, %r9
jae 0x79bc
movq %r9, %r8
movl (%r9), %r10d
bswapl %r10d
leal 0xc(%r10), %r9d
addq %r8, %r9
movq %r9, (%rdi)
movl 0x4(%r8), %r11d
cmpl (%rsi), %r11d
setne %r11b
cmpl %edx, %r10d
setb %r10b
orb %r11b, %r10b
cmpq %rcx, %r9
seta %r11b
orb %r10b, %r11b
jne 0x797c
addq $0x8, %r8
movq %r8, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: depalette
static void depalette(int w,
                      int h,
                      unsigned char* src,
                      TPixel* dest,
                      int bipp,
                      const unsigned char* plte,
                      const unsigned char* trns,
                      int trnsSize) {
    int x, y, c;
    unsigned char alpha;
    int mask, len;

    switch (bipp) {
        case 4:
            mask = 15;
            len = 1;
            break;
        case 2:
            mask = 3;
            len = 3;
            break;
        case 1:
            mask = 1;
            len = 7;
    }

    for (y = 0; y < h; y++) {
        src++;  // skip filter byte
        for (x = 0; x < w; x++) {
            if (bipp == 8) {
                c = *src++;
            } else {
                int pos = x & len;
                c = (src[0] >> ((len - pos) * bipp)) & mask;
                if (pos == len) {
                    src++;
                }
            }
            alpha = 255;
            if (c < trnsSize) {
                alpha = trns[c];
            }
            *dest++ = tigrRGBA(plte[c * 3 + 0], plte[c * 3 + 1], plte[c * 3 + 2], alpha);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rax
movl %esi, -0x4(%rsp)
cmpl $0x1, %r8d
je 0x7ca4
cmpl $0x2, %r8d
jne 0x7cb2
movl $0x3, %r10d
movl $0x3, %r11d
jmp 0x7cbe
movl $0x7, %r11d
movl $0x1, %r10d
jmp 0x7cbe
movl $0x1, %r11d
movl $0xf, %r10d
cmpl $0x0, -0x4(%rsp)
jle 0x7d64
movl 0x40(%rsp), %ebx
movq 0x38(%rsp), %rsi
xorl %ebp, %ebp
incq %rdx
testl %edi, %edi
jle 0x7d58
xorl %r15d, %r15d
movzbl (%rdx), %r13d
movl $0x1, %r12d
cmpl $0x8, %r8d
je 0x7d0b
movl %r15d, %r14d
andl %r11d, %r14d
xorl %r12d, %r12d
movl %r11d, %ecx
subl %r14d, %ecx
sete %r12b
imull %r8d, %ecx
shrl %cl, %r13d
andl %r10d, %r13d
movl $0xff000000, %ecx       # imm = 0xFF000000
movl %r13d, %r14d
cmpl %ebx, %r13d
jge 0x7d20
movzbl (%rsi,%r14), %ecx
shll $0x18, %ecx
addq %r12, %rdx
leaq (%r14,%r14,2), %r14
movzbl (%r9,%r14), %r12d
movzbl 0x1(%r9,%r14), %r13d
movzbl 0x2(%r9,%r14), %r14d
shll $0x10, %r14d
orl %ecx, %r14d
shll $0x8, %r13d
orl %r12d, %r13d
orl %r14d, %r13d
movl %r13d, (%rax)
addq $0x4, %rax
incl %r15d
cmpl %r15d, %edi
jne 0x7cde
incl %ebp
cmpl -0x4(%rsp), %ebp
jne 0x7cd4
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: convert
static void convert(int bypp, int w, int h, const unsigned char* src, TPixel* dest, const unsigned char* trns) {
    int x, y;
    for (y = 0; y < h; y++) {
        src++;  // skip filter byte
        for (x = 0; x < w; x++, src += bypp) {
            switch (bypp) {
                case 1: {
                    unsigned char c = src[0];
                    if (trns && c == *trns) {
                        *dest++ = tigrRGBA(c, c, c, 0);
                        break;
                    } else {
                        *dest++ = tigrRGB(c, c, c);
                        break;
                    }
                }
                case 2:
                    *dest++ = tigrRGBA(src[0], src[0], src[0], src[1]);
                    break;
                case 3: {
                    unsigned char r = src[0];
                    unsigned char g = src[1];
                    unsigned char b = src[2];
                    if (trns && trns[1] == r && trns[3] == g && trns[5] == b) {
                        *dest++ = tigrRGBA(r, g, b, 0);
                        break;
                    } else {
                        *dest++ = tigrRGB(r, g, b);
                        break;
                    }
                }
                case 4:
                    *dest++ = tigrRGBA(src[0], src[1], src[2], src[3]);
                    break;
            }
        }
    }
}

// Assembly:
testl %edx, %edx
jle 0x7e7b
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %eax
xorl %r10d, %r10d
decl %edi
leaq 0x3567(%rip), %r11      # 0xb2f4
incq %rcx
testl %esi, %esi
jle 0x7e67
movl %esi, %ebx
cmpl $0x3, %edi
ja 0x7e5c
movslq (%r11,%rdi,4), %r14
addq %r11, %r14
jmpq *%r14
movzbl (%rcx), %ebp
testq %r9, %r9
je 0x7e47
cmpb (%r9), %bpl
jne 0x7e47
movl %ebp, %r15d
shll $0x10, %r15d
movl %ebp, %r14d
shll $0x8, %r14d
jmp 0x7e28
movzbl (%rcx), %ebp
movzbl 0x1(%rcx), %r14d
movzbl 0x2(%rcx), %r15d
testq %r9, %r9
je 0x7e30
cmpb %bpl, 0x1(%r9)
jne 0x7e30
cmpb %r14b, 0x3(%r9)
jne 0x7e30
cmpb %r15b, 0x5(%r9)
jne 0x7e30
shll $0x10, %r15d
shll $0x8, %r14d
orl %ebp, %r14d
orl %r15d, %r14d
jmp 0x7e55
movl (%rcx), %r14d
jmp 0x7e55
movzbl (%rcx), %ebp
movzbl 0x1(%rcx), %r15d
shll $0x18, %r15d
movl %ebp, %r12d
shll $0x10, %r12d
movl %ebp, %r14d
shll $0x8, %r14d
orl %r12d, %r14d
orl %r15d, %r14d
orl %ebp, %r14d
jmp 0x7e55
shll $0x10, %r15d
shll $0x8, %r14d
orl %ebp, %r14d
addl %r15d, %r14d
addl $0xff000000, %r14d      # imm = 0xFF000000
jmp 0x7e55
imull $0x10101, %ebp, %r14d   # imm = 0x10101
orl $0xff000000, %r14d      # imm = 0xFF000000
movl %r14d, (%r8)
addq $0x4, %r8
addq %rax, %rcx
decl %ebx
jne 0x7d9a
incl %r10d
cmpl %edx, %r10d
jne 0x7d8d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: encodeByte
static void encodeByte(Save* s, unsigned char v) {
    updateAdler(s, v);

    // Simple RLE compression. We could do better by doing a search
    // to find matches, but this works pretty well TBH.
    if (s->prev == v && s->runlen < 115) {
        s->runlen++;
    } else {
        if (s->runlen)
            endrun(s);

        s->prev = v;
        s->runlen = 1;
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl 0x4(%rdi), %eax
movzwl %ax, %ecx
shrl $0x10, %eax
addl %esi, %ecx
movl %ecx, %edx
subl $0xfff1, %edx           # imm = 0xFFF1
cmovbl %ecx, %edx
movl 0xc(%rdi), %ecx
addl %edx, %eax
movl $0x80078071, %esi       # imm = 0x80078071
imulq %rax, %rsi
shrq $0x2f, %rsi
imull $0xfff1, %esi, %esi     # imm = 0xFFF1
subl %esi, %eax
shll $0x10, %eax
addl %edx, %eax
movl %eax, 0x4(%rdi)
movl 0x10(%rdi), %eax
cmpl %ebp, %ecx
jne 0x7ecf
cmpl $0x73, %eax
jae 0x7ed3
incl %eax
movl %eax, 0x10(%rbx)
jmp 0x7ee5
testl %eax, %eax
je 0x7edb
movq %rbx, %rdi
callq 0x7eec
movl %ebp, 0xc(%rbx)
movl $0x1, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: endrun
static void endrun(Save* s) {
    s->runlen--;
    literal(s, s->prev);

    if (s->runlen >= 67)
        encodelen(s, 277, 4, s->runlen - 67);
    else if (s->runlen >= 35)
        encodelen(s, 273, 3, s->runlen - 35);
    else if (s->runlen >= 19)
        encodelen(s, 269, 2, s->runlen - 19);
    else if (s->runlen >= 11)
        encodelen(s, 265, 1, s->runlen - 11);
    else if (s->runlen >= 3)
        encodelen(s, 257, 0, s->runlen - 3);
    else
        while (s->runlen--)
            literal(s, s->prev);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
decl 0x10(%rdi)
movl 0xc(%rdi), %esi
callq 0x7f8d
movl 0x10(%rbx), %ecx
cmpl $0x43, %ecx
jb 0x7f15
addl $-0x43, %ecx
movq %rbx, %rdi
movl $0x115, %esi            # imm = 0x115
movl $0x4, %edx
jmp 0x7f6c
cmpl $0x23, %ecx
jb 0x7f2c
addl $-0x23, %ecx
movq %rbx, %rdi
movl $0x111, %esi            # imm = 0x111
movl $0x3, %edx
jmp 0x7f6c
cmpl $0x13, %ecx
jb 0x7f43
addl $-0x13, %ecx
movq %rbx, %rdi
movl $0x10d, %esi            # imm = 0x10D
movl $0x2, %edx
jmp 0x7f6c
cmpl $0xb, %ecx
jb 0x7f5a
addl $-0xb, %ecx
movq %rbx, %rdi
movl $0x109, %esi            # imm = 0x109
movl $0x1, %edx
jmp 0x7f6c
cmpl $0x2, %ecx
jbe 0x7f72
addl $-0x3, %ecx
movq %rbx, %rdi
movl $0x101, %esi            # imm = 0x101
xorl %edx, %edx
popq %rbx
jmp 0x803f
subl $0x1, %ecx
movl %ecx, 0x10(%rbx)
jb 0x7f8b
movl 0xc(%rbx), %esi
movq %rbx, %rdi
callq 0x7f8d
subl $0x1, 0x10(%rbx)
jae 0x7f7a
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: literal
static void literal(Save* s, unsigned v) {
    // Encode a literal/length using the built-in tables.
    // Could do better with a custom table but whatever.
    if (v < 144)
        putbitsr(s, 0x030 + v - 0, 8);
    else if (v < 256)
        putbitsr(s, 0x190 + v - 144, 9);
    else if (v < 280)
        putbitsr(s, 0x000 + v - 256, 7);
    else
        putbitsr(s, 0x0c0 + v - 280, 8);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
cmpl $0x8f, %esi
ja 0x7fc0
addl $0x30, %ebx
movl $0x7, %ebp
movl %ebx, %esi
movl %ebp, %ecx
shrl %cl, %esi
movq %r14, %rdi
movl $0x1, %edx
callq 0x4c36
addl $-0x1, %ebp
jb 0x7fa6
jmp 0x803a
cmpl $0xff, %ebx
ja 0x7fed
orl $0x100, %ebx            # imm = 0x100
movl $0x8, %ebp
movl %ebx, %esi
movl %ebp, %ecx
shrl %cl, %esi
movq %r14, %rdi
movl $0x1, %edx
callq 0x4c36
addl $-0x1, %ebp
jb 0x7fd3
jmp 0x803a
cmpl $0x117, %ebx            # imm = 0x117
ja 0x801a
addl $0xffffff00, %ebx       # imm = 0xFFFFFF00
movl $0x6, %ebp
movl %ebx, %esi
movl %ebp, %ecx
shrl %cl, %esi
movq %r14, %rdi
movl $0x1, %edx
callq 0x4c36
addl $-0x1, %ebp
jb 0x8000
jmp 0x803a
addl $-0x58, %ebx
movl $0x7, %ebp
movl %ebx, %esi
movl %ebp, %ecx
shrl %cl, %esi
movq %r14, %rdi
movl $0x1, %edx
callq 0x4c36
addl $-0x1, %ebp
jb 0x8022
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: build
static int build(State* s, unsigned* tree, unsigned char* lens, int symcount) {
    int n, codes[16], first[16], counts[16] = { 0 };

    // Frequency count.
    for (n = 0; n < symcount; n++)
        counts[lens[n]]++;

    // Distribute codes.
    counts[0] = codes[0] = first[0] = 0;
    for (n = 1; n <= 15; n++) {
        codes[n] = (codes[n - 1] + counts[n - 1]) << 1;
        first[n] = first[n - 1] + counts[n - 1];
    }
    CHECK(first[15] + counts[15] <= symcount);

    // Insert keys into the tree for each symbol.
    for (n = 0; n < symcount; n++) {
        int len = lens[n];
        if (len != 0) {
            int code = codes[len]++, slot = first[len]++;
            tree[slot] = (code << (32 - len)) | (n << 4) | len;
        }
    }

    return first[15];
}

// Assembly:
pushq %rbx
subq $0xc0, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl %ecx, %r8d
testl %ecx, %ecx
jle 0x80ea
xorl %eax, %eax
movzbl (%rdx,%rax), %r9d
incl (%rsp,%r9,4)
incq %rax
cmpq %rax, %r8
jne 0x80d9
movl $0x0, (%rsp)
movl $0x1, %eax
xorl %r9d, %r9d
xorl %r10d, %r10d
movl -0x4(%rsp,%rax,4), %r11d
addl %r11d, %r10d
addl %r10d, %r10d
movl %r10d, 0x80(%rsp,%rax,4)
addl %r11d, %r9d
movl %r9d, 0x40(%rsp,%rax,4)
incq %rax
cmpq $0x10, %rax
jne 0x80fc
movl 0x7c(%rsp), %eax
movl 0x3c(%rsp), %r9d
addl %eax, %r9d
cmpl %ecx, %r9d
jg 0x8195
testl %ecx, %ecx
jle 0x818c
shlq $0x4, %r8
xorl %eax, %eax
movzbl (%rdx), %edi
testl %edi, %edi
je 0x817c
leal (,%rdi,4), %r9d
movl 0x80(%rsp,%r9), %r10d
leal 0x1(%r10), %ecx
movl %ecx, 0x80(%rsp,%r9)
movslq 0x40(%rsp,%r9), %r11
leal 0x1(%r11), %ebx
movl %edi, %ecx
negb %cl
shll %cl, %r10d
movl %ebx, 0x40(%rsp,%r9)
orl %eax, %edi
orl %r10d, %edi
movl %edi, (%rsi,%r11,4)
addq $0x10, %rax
incq %rdx
cmpq %rax, %r8
jne 0x813b
movl 0x7c(%rsp), %eax
addq $0xc0, %rsp
popq %rbx
retq
addq $0x28, %rdi
movl $0x1, %esi
callq 0x3100
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: decode
static int decode(State* s, unsigned tree[], int max) {
    // Find the next prefix code.
    unsigned lo = 0, hi = max, key;
    unsigned search = (rev16(s->bits) << 16) | 0xffff;
    while (lo < hi) {
        unsigned guess = (lo + hi) / 2;
        if (search < tree[guess])
            hi = guess;
        else
            lo = guess + 1;
    }

    // Pull out the key and check it.
    key = tree[lo - 1];
    CHECK(((search ^ key) >> (32 - (key & 0xf))) == 0);

    bits(s, key & 0xf);
    return (key >> 4) & 0xfff;
}

// Assembly:
pushq %rbx
movl (%rdi), %eax
movzbl %al, %ecx
leaq 0x4640(%rip), %r8       # 0xc7f0
movzbl (%rcx,%r8), %ecx
movzbl %ah, %eax
movzbl (%rax,%r8), %eax
shll $0x18, %ecx
shll $0x10, %eax
addl %ecx, %eax
addl $0xffff, %eax           # imm = 0xFFFF
testl %edx, %edx
je 0x81f0
xorl %ecx, %ecx
leal (%rcx,%rdx), %r8d
shrl %r8d
cmpl (%rsi,%r8,4), %eax
jb 0x81e5
incl %r8d
movl %r8d, %ecx
jmp 0x81e8
movl %r8d, %edx
cmpl %edx, %ecx
jb 0x81d0
decl %ecx
jmp 0x81f5
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl (%rsi,%rcx,4), %ebx
xorl %ebx, %eax
movl %ebx, %esi
andl $0xf, %esi
movl %esi, %ecx
negb %cl
shrl %cl, %eax
testl %eax, %eax
jne 0x821b
callq 0x55c2
shrl $0x4, %ebx
andl $0xfff, %ebx            # imm = 0xFFF
movl %ebx, %eax
popq %rbx
retq
addq $0x28, %rdi
movl $0x1, %esi
callq 0x3100
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: hasGLXExtension
static int hasGLXExtension(Display* display, const char* wanted) {
    const char* extensions = glXQueryExtensionsString(display, DefaultScreen(display));
    char* dup = strdup(extensions);
    char* found = 0;

    for (char* start = dup;; start = 0) {
        found = strtok(start, " ");
        if (found == 0 || strcmp(found, wanted) == 0) {
            break;
        }
    }

    free(dup);
    return found != 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl 0xe0(%rdi), %esi
callq 0x3550
movq %rax, %rdi
callq 0x3730
movq %rax, %r14
leaq 0x4c11(%rip), %r15      # 0xce62
movq %rax, %rdi
movq %r15, %rsi
callq 0x3640
movq %rax, %r12
testq %rax, %rax
je 0x8278
movq %r12, %rdi
movq %rbx, %rsi
callq 0x3590
movl $0x0, %edi
testl %eax, %eax
jne 0x8254
xorl %ebx, %ebx
testq %r12, %r12
setne %bl
movq %r14, %rdi
callq 0x3410
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tipsy.c
// Function: relpath
char *relpath(const char *name, const char *path) {
#ifdef _WIN32
  #define DIR_SEP '\\'
#else
  #define DIR_SEP '/'
#endif
  size_t ln = strlen(name);
  size_t lp = strlen(path);

  while (lp>0 && path[lp] != DIR_SEP) lp--;

  size_t lt = ln + lp + 1;

  char *out = malloc(sizeof(char)*(lt+1));
  strncpy(out, path, lp);
  out[lp] = DIR_SEP;
  strncpy(&out[lp+1], name, ln);
  out[lt] = '\0';

  return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
callq 0x3150
movq %rax, %r14
movq %r15, %rdi
callq 0x3150
testq %rax, %rax
je 0x82cd
movq %rax, %r12
cmpb $0x2f, (%r15,%r12)
je 0x82d0
decq %r12
jne 0x82c1
xorl %r12d, %r12d
leaq (%r12,%r14), %rbp
leaq (%r12,%r14), %rdi
addq $0x2, %rdi
callq 0x34f0
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x31b0
leaq (%r12,%r13), %rdi
incq %rdi
movb $0x2f, -0x1(%rdi)
movq %rbx, %rsi
movq %r14, %rdx
callq 0x31b0
movb $0x0, 0x1(%r13,%rbp)
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tipsy.c
// Function: project
Vec project(Vec v0, int snap) {
  float ud = DISTANCE;
  float us = ud-1;
  float vs = fminf(HEIGHT, WIDTH)/2 * SCALE;

  Vec v1 = {(v0.x*us)/(v0.z+ud), (v0.y*us)/(v0.z+ud), (v0.z*us)/(v0.z+ud)};
  Vec v2 = {v1.x*vs+WIDTH/2, v1.y*vs+HEIGHT/2, v1.z+DISTANCE};

  if (snap) { v2.x = floorf(v2.x); v2.y = floorf(v2.y); }

  return v2;
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movl %edi, %ebx
movaps %xmm0, %xmm2
movss %xmm1, 0xc(%rsp)
movaps %xmm1, %xmm0
addss 0x4800(%rip), %xmm0     # 0xcd90
mulps 0x4829(%rip), %xmm2     # 0xcdc0
movaps %xmm0, 0x30(%rsp)
shufps $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
divps %xmm0, %xmm2
mulps 0x4826(%rip), %xmm2     # 0xcdd0
addps 0x482f(%rip), %xmm2     # 0xcde0
movaps %xmm2, 0x10(%rsp)
shufps $0x55, %xmm2, %xmm2     # xmm2 = xmm2[1,1,1,1]
movaps %xmm2, %xmm0
callq 0x3120
movaps %xmm0, 0x20(%rsp)
movaps 0x10(%rsp), %xmm0
callq 0x3120
movaps 0x10(%rsp), %xmm2
testl %ebx, %ebx
je 0x85e2
unpcklps 0x20(%rsp), %xmm0       # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
movaps %xmm0, %xmm2
movss 0xc(%rsp), %xmm1
mulss 0x47a4(%rip), %xmm1     # 0xcd94
divss 0x30(%rsp), %xmm1
addss 0x4792(%rip), %xmm1     # 0xcd90
movaps %xmm2, %xmm0
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tipsy.c
// Function: readline
static int readline(char **buf, size_t *buflen, FILE *f) {
  size_t i = 0;
  int ch;
  while ((ch = fgetc(f)) != EOF && ch != '\n') {
    if (ch == '\r') continue;
    if (i + 2 >= *buflen) *buf = realloc(*buf, *buflen = *buflen + 1024);
    (*buf)[i++] = (unsigned char)ch;
  }
  (*buf)[i] = '\0';
  return ch == EOF ? -1 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0x3650
cmpl $0xd, %eax
je 0x8915
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x895c
cmpl $0xa, %ebp
je 0x895c
leaq 0x2(%r12), %rcx
movq (%r15), %rsi
movq (%r14), %rax
cmpq %rsi, %rcx
jb 0x8953
addq $0x400, %rsi            # imm = 0x400
movq %rsi, (%r15)
movq %rax, %rdi
callq 0x3680
movq %rax, (%r14)
movb %bpl, (%rax,%r12)
incq %r12
jmp 0x8915
movq (%r14), %rax
movb $0x0, (%rax,%r12)
xorl %eax, %eax
cmpl $-0x1, %ebp
sete %al
negl %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tipsy.c
// Function: mtl_del
void mtl_del(Mtl *mtl) {
  Mtl *next;
  while (mtl != NULL) {
    free(mtl->name);
    if (mtl->map_Ka != NULL) tigrFree(mtl->map_Ka);
    if (mtl->map_Kd != NULL) tigrFree(mtl->map_Kd);
    next = mtl->next;
    free(mtl);
    mtl = next;
  }
}

// Assembly:
testq %rdi, %rdi
je 0x89f6
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rbx), %rdi
callq 0x3410
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x89cd
callq 0x5a5d
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x89db
callq 0x5a5d
movq 0x18(%rbx), %r14
movq %rbx, %rdi
callq 0x3410
movq %r14, %rbx
testq %r14, %r14
jne 0x89b7
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tipsy.c
// Function: obj_del
void obj_del(Obj *o) {
  mtl_del(o->mtl);
  list_del(o->v);
  list_del(o->vn);
  list_del(o->vt);
  list_del(o->f);
  free(o);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
callq 0x89ab
movq (%rbx), %r14
movq (%r14), %rdi
callq 0x3410
movq %r14, %rdi
callq 0x3410
movq 0x8(%rbx), %r14
movq (%r14), %rdi
callq 0x3410
movq %r14, %rdi
callq 0x3410
movq 0x10(%rbx), %r14
movq (%r14), %rdi
callq 0x3410
movq %r14, %rdi
callq 0x3410
movq 0x18(%rbx), %r14
movq (%r14), %rdi
callq 0x3410
movq %r14, %rdi
callq 0x3410
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3410
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tipsy.c
// Function: obj_flip
void obj_flip(Obj *obj) {
  for (int i = 0; i < obj->v->len; i++) {
    Vec *v = (Vec*)list_get(obj->v, i);
    v->y = -v->y;
    v->z = -v->z;
  }
  for (int i = 0; i < obj->vn->len; i++) {
    Vec *vn = (Vec*)list_get(obj->vn, i);
    vn->y = -vn->y;
    vn->z = -vn->z;
  }
}

// Assembly:
movq (%rdi), %rdx
movslq 0x8(%rdx), %rax
testq %rax, %rax
jle 0x9174
movq (%rdx), %rcx
movslq 0x10(%rdx), %rdx
addq $0x4, %rcx
movaps 0x1ece(%rip), %xmm0     # 0xb030
movsd (%rcx), %xmm1
xorps %xmm0, %xmm1
movlps %xmm1, (%rcx)
addq %rdx, %rcx
decq %rax
jne 0x9162
movq 0x8(%rdi), %rdx
movslq 0x8(%rdx), %rax
testq %rax, %rax
jle 0x91a5
movq (%rdx), %rcx
movslq 0x10(%rdx), %rdx
addq $0x4, %rcx
movaps 0x1e9d(%rip), %xmm0     # 0xb030
movsd (%rcx), %xmm1
xorps %xmm0, %xmm1
movlps %xmm1, (%rcx)
addq %rdx, %rcx
decq %rax
jne 0x9193
retq
// File: /workspace/github_c_makefile_star2_O3/codeplea[P]tinyexpr/repl.c
// Function: main
int main(int argc, char **argv) {
    if (argc == 3 && strcmp(argv[1], "-e") == 0) {
        if (eval(argv[2]) == -1) {
            return 1;
        } else {
            return 0;
        }
    } else if (argc == 1) {
        repl();
        return 0;
    } else {
        printf("Usage: %s\n", argv[0]);
        printf("       %s -e <expression>\n", argv[0]);
        return 1;
    }
}

// Assembly:
pushq %rbx
subq $0x410, %rsp            # imm = 0x410
movq %rsi, %rbx
cmpl $0x3, %edi
je 0x2387
cmpl $0x1, %edi
jne 0x239c
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rbx
movq %rbx, %rsi
callq 0x2140
movl (%rbx), %eax
jmp 0x23c3
movq 0x8(%rbx), %rax
cmpb $0x2d, (%rax)
jne 0x239c
cmpb $0x65, 0x1(%rax)
jne 0x239c
cmpb $0x0, 0x2(%rax)
je 0x23cc
movq (%rbx), %rsi
leaq 0x1c5e(%rip), %rdi      # 0x4004
xorl %eax, %eax
callq 0x2090
movq (%rbx), %rsi
leaq 0x1c58(%rip), %rdi      # 0x400f
xorl %eax, %eax
callq 0x2090
movl $0x1, %eax
addq $0x410, %rsp            # imm = 0x410
popq %rbx
retq
movq 0x10(%rbx), %rdi
callq 0x23e1
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
sete %al
jmp 0x23c3
// File: /workspace/github_c_makefile_star2_O3/codeplea[P]tinyexpr/repl.c
// Function: eval
static int eval(const char *str) {
    int err = 0;
    double r = te_interp(str, &err);
    if (err != 0) {
        printf("Error at position %i\n", err);
        return -1;
    } else {
        printf("%g\n", r);
        return 0;
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0xc(%rsp), %rbx
movl $0x0, (%rbx)
movq %rbx, %rsi
callq 0x2ff1
movl (%rbx), %esi
testl %esi, %esi
je 0x2414
leaq 0x1c24(%rip), %rdi      # 0x402a
xorl %eax, %eax
callq 0x2090
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2424
leaq 0x1c25(%rip), %rdi      # 0x4040
movb $0x1, %al
callq 0x2090
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O3/sabotage-linux[P]libnl-tiny/nl.c
// Function: nl_connect
int nl_connect(struct nl_sock *sk, int protocol)
{
	int err;
	socklen_t addrlen;

	sk->s_fd = socket(AF_NETLINK, SOCK_RAW, protocol);
	if (sk->s_fd < 0) {
		err = -nl_syserr2nlerr(errno);
		goto errout;
	}

	if (!(sk->s_flags & NL_SOCK_BUFSIZE_SET)) {
		err = nl_socket_set_buffer_size(sk, 0, 0);
		if (err < 0)
			goto errout;
	}

	err = bind(sk->s_fd, (struct sockaddr*) &sk->s_local,
		   sizeof(sk->s_local));
	if (err < 0) {
		err = -nl_syserr2nlerr(errno);
		goto errout;
	}

	addrlen = sizeof(sk->s_local);
	err = getsockname(sk->s_fd, (struct sockaddr *) &sk->s_local,
			  &addrlen);
	if (err < 0) {
		err = -nl_syserr2nlerr(errno);
		goto errout;
	}

	if (addrlen != sizeof(sk->s_local)) {
		err = -NLE_NOADDR;
		goto errout;
	}

	if (sk->s_local.nl_family != AF_NETLINK) {
		err = -NLE_AF_NOSUPPORT;
		goto errout;
	}

	sk->s_proto = protocol;

	return 0;
errout:
	close(sk->s_fd);
	sk->s_fd = -1;

	return err;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movl $0x10, %edi
movl $0x3, %esi
movl %ebp, %edx
callq 0x3630
movl %eax, 0x18(%rbx)
testl %eax, %eax
js 0x3b88
testb $0x1, 0x28(%rbx)
jne 0x3b3a
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3430
testl %eax, %eax
js 0x3bb5
movl 0x18(%rbx), %eax
movl %eax, %edi
movq %rbx, %rsi
movl $0xc, %edx
callq 0x3400
testl %eax, %eax
js 0x3b88
leaq 0xc(%rsp), %rdx
movl $0xc, (%rdx)
movl 0x18(%rbx), %edi
movq %rbx, %rsi
callq 0x34c0
testl %eax, %eax
js 0x3b88
movl $0xffffffed, %r14d      # imm = 0xFFFFFFED
cmpl $0xc, 0xc(%rsp)
jne 0x3b9a
movl $0xfffffff5, %r14d      # imm = 0xFFFFFFF5
cmpw $0x10, (%rbx)
jne 0x3b9a
movl %ebp, 0x1c(%rbx)
xorl %r14d, %r14d
jmp 0x3ba9
callq 0x3090
movl (%rax), %edi
callq 0x3330
movl %eax, %r14d
negl %r14d
movl 0x18(%rbx), %edi
callq 0x3230
movl $0xffffffff, 0x18(%rbx) # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %r14d
jmp 0x3b9a
// File: /workspace/github_c_makefile_star2_O3/sabotage-linux[P]libnl-tiny/nl.c
// Function: nl_close
void nl_close(struct nl_sock *sk)
{
	if (sk->s_fd >= 0) {
		close(sk->s_fd);
		sk->s_fd = -1;
	}

	sk->s_proto = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x18(%rdi), %edi
testl %edi, %edi
js 0x3bd1
callq 0x3230
movl $0xffffffff, 0x18(%rbx) # imm = 0xFFFFFFFF
movl $0x0, 0x1c(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/sabotage-linux[P]libnl-tiny/nl.c
// Function: nl_sendto
int nl_sendto(struct nl_sock *sk, void *buf, size_t size)
{
	int ret;

	ret = sendto(sk->s_fd, buf, size, 0, (struct sockaddr *)
		     &sk->s_peer, sizeof(sk->s_peer));
	if (ret < 0)
		return -nl_syserr2nlerr(errno);

	return ret;
}

// Assembly:
pushq %rax
movl 0x18(%rdi), %eax
leaq 0xc(%rdi), %r8
movl %eax, %edi
xorl %ecx, %ecx
movl $0xc, %r9d
callq 0x3210
testl %eax, %eax
jns 0x3c03
callq 0x3090
movl (%rax), %edi
callq 0x3330
negl %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/sabotage-linux[P]libnl-tiny/nl.c
// Function: nl_sendmsg
int nl_sendmsg(struct nl_sock *sk, struct nl_msg *msg, struct msghdr *hdr)
{
	struct nl_cb *cb;
	int ret;

	struct iovec iov = {
		.iov_base = (void *) nlmsg_hdr(msg),
		.iov_len = nlmsg_hdr(msg)->nlmsg_len,
	};

	hdr->msg_iov = &iov;
	hdr->msg_iovlen = 1;

	nlmsg_set_src(msg, &sk->s_local);

	cb = sk->s_cb;
	if (cb->cb_set[NL_CB_MSG_OUT])
		if (nl_cb_call(cb, NL_CB_MSG_OUT, msg) != NL_OK)
			return 0;

	ret = sendmsg(sk->s_fd, hdr, 0);
	if (ret < 0)
		return -nl_syserr2nlerr(errno);

	return ret;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq 0x30(%rsi), %rax
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movl (%rax), %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rdx)
movq $0x1, 0x18(%rdx)
movl 0x8(%rdi), %eax
movl %eax, 0x10(%rsi)
movq (%rdi), %rax
movq %rax, 0x8(%rsi)
movq 0x30(%rdi), %rax
movq 0x30(%rax), %rcx
testq %rcx, %rcx
je 0x3c61
movq 0x80(%rax), %rax
movq %rsi, %rdi
movq %rax, %rsi
callq *%rcx
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x3c81
movl 0x18(%r14), %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x30d0
testl %eax, %eax
jns 0x3c81
callq 0x3090
movl (%rax), %edi
callq 0x3330
negl %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/sabotage-linux[P]libnl-tiny/nl.c
// Function: nl_send_auto_complete
int nl_send_auto_complete(struct nl_sock *sk, struct nl_msg *msg)
{
	struct nlmsghdr *nlh;
	struct nl_cb *cb = sk->s_cb;

	nlh = nlmsg_hdr(msg);
	if (nlh->nlmsg_pid == 0)
		nlh->nlmsg_pid = sk->s_local.nl_pid;

	if (nlh->nlmsg_seq == 0)
		nlh->nlmsg_seq = sk->s_seq_next++;

	if (msg->nm_protocol == -1)
		msg->nm_protocol = sk->s_proto;
	
	nlh->nlmsg_flags |= NLM_F_REQUEST;

	if (!(sk->s_flags & NL_NO_AUTO_ACK))
		nlh->nlmsg_flags |= NLM_F_ACK;

	if (cb->cb_send_ow)
		return cb->cb_send_ow(sk, msg);
	else
		return nl_send(sk, msg);
}

// Assembly:
movq 0x30(%rdi), %rax
movq 0x30(%rsi), %rcx
cmpl $0x0, 0xc(%rcx)
jne 0x3cfc
movl 0x4(%rdi), %edx
movl %edx, 0xc(%rcx)
cmpl $0x0, 0x8(%rcx)
jne 0x3d10
movl 0x20(%rdi), %edx
leal 0x1(%rdx), %r8d
movl %r8d, 0x20(%rdi)
movl %edx, 0x8(%rcx)
cmpl $-0x1, (%rsi)
jne 0x3d1a
movl 0x1c(%rdi), %edx
movl %edx, (%rsi)
movzwl 0x6(%rcx), %edx
movl %edx, %r8d
orl $0x1, %r8d
movw %r8w, 0x6(%rcx)
testb $0x10, 0x28(%rdi)
jne 0x3d37
orl $0x5, %edx
movw %dx, 0x6(%rcx)
movq 0xc0(%rax), %rax
testq %rax, %rax
je 0x33d0
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O3/sabotage-linux[P]libnl-tiny/nl.c
// Function: nl_send_simple
int nl_send_simple(struct nl_sock *sk, int type, int flags, void *buf,
		   size_t size)
{
	int err;
	struct nl_msg *msg;

	msg = nlmsg_alloc_simple(type, flags);
	if (!msg)
		return -NLE_NOMEM;

	if (buf && size) {
		err = nlmsg_append(msg, buf, size, NLMSG_ALIGNTO);
		if (err < 0)
			goto errout;
	}
	

	err = nl_send_auto_complete(sk, msg);
errout:
	nlmsg_free(msg);

	return err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %r15
movq %rcx, %r12
movq %rdi, %r14
movl %esi, %edi
movl %edx, %esi
callq 0x30f0
testq %rax, %rax
je 0x3da9
movq %rax, %rbx
testq %r12, %r12
sete %al
testq %r15, %r15
sete %cl
orb %al, %cl
jne 0x3d92
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl $0x4, %ecx
callq 0x3610
testl %eax, %eax
js 0x3d9d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3500
movl %eax, %ebp
movq %rbx, %rdi
callq 0x35a0
jmp 0x3dae
movl $0xfffffffb, %ebp       # imm = 0xFFFFFFFB
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sabotage-linux[P]libnl-tiny/nl.c
// Function: nl_wait_for_ack
int nl_wait_for_ack(struct nl_sock *sk)
{
	int err;
	struct nl_cb *cb;

	cb = nl_cb_clone(sk->s_cb);
	if (cb == NULL)
		return -NLE_NOMEM;

	nl_cb_set(cb, NL_CB_ACK, NL_CB_CUSTOM, ack_wait_handler, NULL);
	err = nl_recvmsgs(sk, cb);
	nl_cb_put(cb);

	return err;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movq 0x30(%rdi), %rdi
callq 0x33e0
testq %rax, %rax
je 0x43e4
movq %rax, %rbx
leaq 0x38(%rip), %rcx        # 0x43ee
movq %rax, %rdi
movl $0x4, %esi
movl $0x3, %edx
xorl %r8d, %r8d
callq 0x35f0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3170
movl %eax, %ebp
movq %rbx, %rdi
callq 0x32b0
movl %ebp, %eax
jmp 0x43e9
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sabotage-linux[P]libnl-tiny/handlers.c
// Function: nl_cb_alloc
struct nl_cb *nl_cb_alloc(enum nl_cb_kind kind)
{
	int i;
	struct nl_cb *cb;

	if (kind < 0 || kind > NL_CB_KIND_MAX)
		return NULL;

	cb = calloc(1, sizeof(*cb));
	if (!cb)
		return NULL;

	cb->cb_refcnt = 1;

	for (i = 0; i <= NL_CB_TYPE_MAX; i++)
		nl_cb_set(cb, i, kind, NULL, NULL);

	nl_cb_err(cb, kind, NULL, NULL);

	return cb;
}

// Assembly:
cmpl $0x3, %edi
jbe 0x43fc
xorl %eax, %eax
retq
pushq %rbx
movl %edi, %ebx
movl $0x1, %edi
movl $0xd0, %esi
callq 0x3270
testq %rax, %rax
je 0x4445
movl $0x1, 0xc8(%rax)
xorl %ecx, %ecx
xorl %edx, %edx
cmpl $0x3, %ebx
jne 0x443a
movq %rcx, (%rax,%rdx,8)
movq %rcx, 0x50(%rax,%rdx,8)
incq %rdx
cmpq $0xa, %rdx
jne 0x4421
jmp 0x4449
incq %rdx
cmpq $0xa, %rdx
jne 0x4421
jmp 0x4453
xorl %eax, %eax
jmp 0x4453
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/sabotage-linux[P]libnl-tiny/handlers.c
// Function: nl_cb_clone
struct nl_cb *nl_cb_clone(struct nl_cb *orig)
{
	struct nl_cb *cb;
	
	cb = nl_cb_alloc(NL_CB_DEFAULT);
	if (!cb)
		return NULL;

	memcpy(cb, orig, sizeof(*orig));
	cb->cb_refcnt = 1;

	return cb;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %edi
movl $0xd0, %esi
callq 0x3270
movq %rax, %r14
testq %rax, %rax
je 0x44d8
movl $0xd0, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32e0
movl $0x1, 0xc8(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/sabotage-linux[P]libnl-tiny/handlers.c
// Function: nl_cb_put
void nl_cb_put(struct nl_cb *cb)
{
	if (!cb)
		return;

	cb->cb_refcnt--;

	if (cb->cb_refcnt < 0)
		BUG();

	if (cb->cb_refcnt <= 0)
		free(cb);
}

// Assembly:
testq %rdi, %rdi
je 0x4504
movl 0xc8(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc8(%rdi)
testl %eax, %eax
jle 0x4505
cmpl $0x1, %eax
je 0x3060
retq
pushq %rax
callq 0x3650
nop
// File: /workspace/github_c_makefile_star2_O3/sabotage-linux[P]libnl-tiny/msg.c
// Function: nlmsg_ok
int nlmsg_ok(const struct nlmsghdr *nlh, int remaining)
{
	size_t r = remaining;

	return (r >= sizeof(struct nlmsghdr) &&
		nlh->nlmsg_len >= sizeof(struct nlmsghdr) &&
		nlh->nlmsg_len <= r);
}

// Assembly:
xorl %eax, %eax
cmpl $0x10, %esi
jb 0x4526
movl (%rdi), %ecx
cmpq $0x10, %rcx
jb 0x4526
movslq %esi, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
setbe %al
retq
// File: /workspace/github_c_makefile_star2_O3/sabotage-linux[P]libnl-tiny/msg.c
// Function: nlmsg_parse
int nlmsg_parse(struct nlmsghdr *nlh, int hdrlen, struct nlattr *tb[],
		int maxtype, struct nla_policy *policy)
{
	if (!nlmsg_valid_hdr(nlh, hdrlen))
		return -NLE_MSG_TOOSHORT;

	return nla_parse(tb, maxtype, nlmsg_attrdata(nlh, hdrlen),
			 nlmsg_attrlen(nlh, hdrlen), policy);
}

// Assembly:
movl (%rdi), %eax
leal 0x10(%rsi), %r9d
cmpl %eax, %r9d
jbe 0x4548
movl $0xffffffeb, %eax       # imm = 0xFFFFFFEB
retq
addl $0x3, %esi
andl $-0x4, %esi
leaq (%rdi,%rsi), %r9
addq $0x10, %r9
subl %esi, %eax
addl $-0x10, %eax
movq %rdx, %rdi
movl %ecx, %esi
movq %r9, %rdx
movl %eax, %ecx
jmp 0x3310
// File: /workspace/github_c_makefile_star2_O3/sabotage-linux[P]libnl-tiny/msg.c
// Function: nlmsg_validate
int nlmsg_validate(struct nlmsghdr *nlh, int hdrlen, int maxtype,
		   struct nla_policy *policy)
{
	if (!nlmsg_valid_hdr(nlh, hdrlen))
		return -NLE_MSG_TOOSHORT;

	return nla_validate(nlmsg_attrdata(nlh, hdrlen),
			    nlmsg_attrlen(nlh, hdrlen), maxtype, policy);
}

// Assembly:
movl %esi, %eax
movl (%rdi), %esi
leal 0x10(%rax), %r8d
cmpl %esi, %r8d
jbe 0x457d
movl $0xffffffeb, %eax       # imm = 0xFFFFFFEB
retq
addl $0x3, %eax
andl $-0x4, %eax
addq %rax, %rdi
addq $0x10, %rdi
subl %eax, %esi
addl $-0x10, %esi
jmp 0x3540