LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x5e9d
movq %rax, %rbx
movq %r14, %rdi
callq 0x66a7
testl %eax, %eax
js 0x73c4
cmpl $0x0, 0x24(%rbx)
jne 0x73a7
movq %rbx, %rsi
addq $0x8, %rsi
pushq $0x2
popq %rdi
callq 0x3540
movl 0x14(%rbx), %edi
callq 0x3140
leaq 0x4799(%rip), %rdi      # 0xbb47
callq 0x717c
callq 0x66dd
testl %eax, %eax
js 0x73cd
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x475b(%rip), %rsi      # 0xbb26
jmp 0x73d4
leaq 0x477b(%rip), %rsi      # 0xbb4f
xorl %eax, %eax
callq 0x7002
// File: /workspace/github_c_makefile_star2_O2/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 0x3480
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 0x74c9
pushq $0x7
popq %rdi
callq 0x30a0
movss 0x2ba9(%rip), %xmm0     # 0xa004
xorps %xmm1, %xmm1
callq 0x31a0
movl %r14d, %edi
movl %r15d, %esi
callq 0x34b0
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
callq 0x31a0
movl %ebp, %edi
movl %r15d, %esi
callq 0x34b0
xorps %xmm0, %xmm0
movss 0x2b76(%rip), %xmm1     # 0xa004
callq 0x31a0
movl %ebp, %edi
movl %ebx, %esi
callq 0x34b0
movss 0x2b60(%rip), %xmm0     # 0xa004
movaps %xmm0, %xmm1
callq 0x31a0
movl %r14d, %edi
movl %ebx, %esi
callq 0x34b0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34f0
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 0x2afb(%rip), %xmm0     # 0xa004
movlhps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
movups %xmm0, 0x28(%rcx)
movsd 0x4498(%rip), %xmm0     # 0xb9b0
movsd %xmm0, 0x38(%rcx)
pushq $0x1
popq %rsi
movl 0xc(%rsp), %edi
xorl %edx, %edx
callq 0x3600
pushq $0x4
popq %rdi
pushq $0x6
popq %rdx
xorl %esi, %esi
callq 0x3040
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x7563
movb %cl, (%rax)
incq %rax
retq
movl %ecx, %edx
cmpl $0x7ff, %ecx            # imm = 0x7FF
ja 0x7583
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 0x75af
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_O2/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 %rbx
movq %rdi, %rbx
callq 0x5e9d
movl $0x1, 0x28(%rax)
movq %rbx, %rdi
callq 0x66a7
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x66a7
movq %r15, %rdi
callq 0x5e9d
leaq 0x8(%rax), %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x724a
popq %rbx
popq %r14
popq %r15
jmp 0x66dd
// File: /workspace/github_c_makefile_star2_O2/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:
subq $0x18, %rsp
movss %xmm3, 0x14(%rsp)
movss %xmm2, 0x10(%rsp)
movss %xmm1, 0xc(%rsp)
movss %xmm0, 0x8(%rsp)
callq 0x5e9d
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x64(%rax)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x68(%rax)
movss 0x10(%rsp), %xmm0
movss %xmm0, 0x6c(%rax)
movss 0x14(%rsp), %xmm0
movss %xmm0, 0x70(%rax)
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rcx
movq 0x8(%rdi), %r13
xorl %ebx, %ebx
cmpq %r13, %rcx
jae 0x76e0
movq %rcx, %r12
movq %rcx, %rdi
callq 0x76f2
leal 0xc(%rax), %ecx
addq %r12, %rcx
movq %rcx, (%r15)
movl 0x4(%r12), %edx
cmpl (%r14), %edx
setne %dl
cmpl %ebp, %eax
setb %al
orb %dl, %al
cmpq %r13, %rcx
seta %dl
orb %al, %dl
jne 0x76a4
addq $0x8, %r12
movq %r12, %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_O2/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
movl 0xc(%rdi), %ecx
movzwl %ax, %edx
shrl $0x10, %eax
addl %esi, %edx
movl $0xfff1, %esi           # imm = 0xFFF1
movl %edx, %edi
subl %esi, %edi
cmovbl %edx, %edi
addl %edi, %eax
xorl %edx, %edx
divl %esi
shll $0x10, %edx
addl %edi, %edx
movl %edx, 0x4(%rbx)
movl 0x10(%rbx), %eax
cmpl %ebp, %ecx
jne 0x7755
cmpl $0x73, %eax
jae 0x7759
incl %eax
movl %eax, 0x10(%rbx)
jmp 0x776b
testl %eax, %eax
je 0x7761
movq %rbx, %rdi
callq 0x7772
movl %ebp, 0xc(%rbx)
movl $0x1, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x7807
movl 0x10(%rbx), %ecx
cmpl $0x43, %ecx
jb 0x7799
addl $-0x43, %ecx
pushq $0x4
popq %rdx
movq %rbx, %rdi
movl $0x115, %esi            # imm = 0x115
jmp 0x77ea
cmpl $0x23, %ecx
jb 0x77ae
addl $-0x23, %ecx
pushq $0x3
popq %rdx
movq %rbx, %rdi
movl $0x111, %esi            # imm = 0x111
jmp 0x77ea
cmpl $0x13, %ecx
jb 0x77c3
addl $-0x13, %ecx
pushq $0x2
popq %rdx
movq %rbx, %rdi
movl $0x10d, %esi            # imm = 0x10D
jmp 0x77ea
cmpl $0xb, %ecx
jb 0x77d8
addl $-0xb, %ecx
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl $0x109, %esi            # imm = 0x109
jmp 0x77ea
cmpl $0x2, %ecx
jbe 0x77ed
addl $-0x3, %ecx
movq %rbx, %rdi
movl $0x101, %esi            # imm = 0x101
xorl %edx, %edx
popq %rbx
jmp 0x7843
subl $0x1, %ecx
movl %ecx, 0x10(%rbx)
jb 0x7805
movl 0xc(%rbx), %esi
movq %rbx, %rdi
callq 0x7807
movl 0x10(%rbx), %ecx
jmp 0x77ed
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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:
cmpl $0x8f, %esi
ja 0x7816
addl $0x30, %esi
pushq $0x8
jmp 0x7838
cmpl $0xff, %esi
ja 0x7828
orl $0x100, %esi            # imm = 0x100
pushq $0x9
jmp 0x7838
cmpl $0x117, %esi            # imm = 0x117
ja 0x783e
addl $0xffffff00, %esi       # imm = 0xFFFFFF00
pushq $0x7
popq %rdx
jmp 0x4f8e
addl $-0x58, %esi
jmp 0x7812
// File: /workspace/github_c_makefile_star2_O2/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)
xorl %r8d, %r8d
testl %ecx, %ecx
movl $0x0, %eax
cmovgl %ecx, %eax
cmpq %r8, %rax
je 0x7903
movzbl (%rdx,%r8), %r9d
incl (%rsp,%r9,4)
incq %r8
jmp 0x78f0
andl $0x0, (%rsp)
pushq $0x1
popq %r8
xorl %r9d, %r9d
xorl %r10d, %r10d
cmpq $0x10, %r8
je 0x7937
movl -0x4(%rsp,%r8,4), %r11d
addl %r11d, %r10d
addl %r10d, %r10d
movl %r10d, 0x80(%rsp,%r8,4)
addl %r11d, %r9d
movl %r9d, 0x40(%rsp,%r8,4)
incq %r8
jmp 0x7911
movl 0x3c(%rsp), %r8d
addl 0x7c(%rsp), %r8d
cmpl %ecx, %r8d
jg 0x79ac
shlq $0x4, %rax
xorl %edi, %edi
cmpq %rdi, %rax
je 0x799f
movzbl (%rdx), %r8d
testl %r8d, %r8d
je 0x7996
leal (,%r8,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 %r8d, %ecx
negb %cl
shll %cl, %r10d
movl %ebx, 0x40(%rsp,%r9)
orl %edi, %r8d
orl %r10d, %r8d
movl %r8d, (%rsi,%r11,4)
addq $0x10, %rdi
incq %rdx
jmp 0x794c
movl 0x7c(%rsp), %eax
addq $0xc0, %rsp
popq %rbx
retq
addq $0x28, %rdi
pushq $0x1
popq %rsi
callq 0x3100
// File: /workspace/github_c_makefile_star2_O2/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 0x3d7b(%rip), %r8       # 0xb740
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
xorl %ecx, %ecx
cmpl %edx, %ecx
jae 0x79ff
leal (%rcx,%rdx), %r8d
shrl %r8d
cmpl (%rsi,%r8,4), %eax
jb 0x79fa
incl %r8d
movl %r8d, %ecx
jmp 0x79e1
movl %r8d, %edx
jmp 0x79e1
decl %ecx
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 0x7a27
callq 0x56d8
shrl $0x4, %ebx
andl $0xfff, %ebx            # imm = 0xFFF
movl %ebx, %eax
popq %rbx
retq
addq $0x28, %rdi
pushq $0x1
popq %rsi
callq 0x3100
// File: /workspace/github_c_makefile_star2_O2/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 0x3570
movq %rax, %rdi
callq 0x3750
movq %rax, %r14
leaq 0x4397(%rip), %r15      # 0xbdf2
movq %rax, %rdi
movq %r15, %rsi
callq 0x3660
movq %rax, %r12
testq %rax, %rax
je 0x7a82
movq %r12, %rdi
movq %rbx, %rsi
callq 0x35b0
movl $0x0, %edi
testl %eax, %eax
jne 0x7a5e
xorl %ebx, %ebx
testq %r12, %r12
setne %bl
movq %r14, %rdi
callq 0x3430
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
callq 0x3150
movq %rax, %r14
movq %r15, %rdi
callq 0x3150
movq %rax, %r12
incq %r12
cmpq $0x1, %r12
je 0x7ad8
cmpb $0x2f, -0x1(%r15,%r12)
je 0x7ad8
decq %r12
jmp 0x7ac5
leaq (%r14,%r12), %rdi
incq %rdi
callq 0x3510
movq %rax, %r13
leaq -0x1(%r12), %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0x31b0
leaq (%r12,%r13), %r15
movb $0x2f, -0x1(%r13,%r12)
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x31b0
movb $0x0, (%r14,%r15)
movq %r13, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3f9f(%rip), %xmm0     # 0xbd20
mulps 0x3fc8(%rip), %xmm2     # 0xbd50
movaps %xmm0, 0x30(%rsp)
shufps $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
divps %xmm0, %xmm2
mulps 0x3fc5(%rip), %xmm2     # 0xbd60
addps 0x3fce(%rip), %xmm2     # 0xbd70
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 0x7dd3
unpcklps 0x20(%rsp), %xmm0       # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
movaps %xmm0, %xmm2
movss 0xc(%rsp), %xmm1
mulss 0x3f43(%rip), %xmm1     # 0xbd24
divss 0x30(%rsp), %xmm1
addss 0x3f31(%rip), %xmm1     # 0xbd20
movaps %xmm2, %xmm0
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/nkanaev[P]tipsy/src/tipsy.c
// Function: barycenter
Vec barycenter(Vec p, Vec v1, Vec v2, Vec v3) {
  float d = (v2.y-v3.y) * (v1.x-v3.x) + (v3.x-v2.x) * (v1.y - v3.y);
  float u = ((v2.y-v3.y) * (p.x-v3.x) + (v3.x-v2.x) * (p.y-v3.y)) / d;
  float v = ((v3.y-v1.y) * (p.x-v3.x) + (v1.x-v3.x) * (p.y-v3.y)) / d;
  float w = 1.0f - u - v;
  Vec ret = {u, v, w}; return ret;
}

// Assembly:
movaps %xmm6, %xmm1
subps %xmm4, %xmm1
subps %xmm6, %xmm4
movaps %xmm2, %xmm3
movaps %xmm6, %xmm5
shufps $0x1, %xmm0, %xmm5      # xmm5 = xmm5[1,0],xmm0[0,0]
shufps $0xe2, %xmm0, %xmm5     # xmm5 = xmm5[2,0],xmm0[2,3]
movaps %xmm0, %xmm7
shufps $0x1, %xmm2, %xmm7      # xmm7 = xmm7[1,0],xmm2[0,0]
shufps $0xe2, %xmm2, %xmm7     # xmm7 = xmm7[2,0],xmm2[2,3]
shufps $0x1, %xmm6, %xmm2      # xmm2 = xmm2[1,0],xmm6[0,0]
shufps $0xe2, %xmm6, %xmm2     # xmm2 = xmm2[2,0],xmm6[2,3]
subps %xmm2, %xmm5
movaps %xmm5, %xmm0
shufps $0xd4, %xmm4, %xmm0     # xmm0 = xmm0[0,1],xmm4[1,3]
shufps $0xe2, %xmm4, %xmm0     # xmm0 = xmm0[2,0],xmm4[2,3]
shufps $0x55, %xmm4, %xmm4     # xmm4 = xmm4[1,1,1,1]
subps %xmm6, %xmm3
shufps $0x55, %xmm3, %xmm3     # xmm3 = xmm3[1,1,1,1]
mulss %xmm1, %xmm3
subps %xmm6, %xmm7
mulss %xmm7, %xmm4
addss %xmm3, %xmm4
movaps %xmm7, %xmm2
shufps $0x55, %xmm7, %xmm2     # xmm2 = xmm2[1,1],xmm7[1,1]
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
shufps $0xe1, %xmm7, %xmm7     # xmm7 = xmm7[1,0,2,3]
mulps %xmm1, %xmm7
mulps %xmm5, %xmm0
addps %xmm7, %xmm0
shufps $0x0, %xmm4, %xmm4      # xmm4 = xmm4[0,0,0,0]
divps %xmm4, %xmm0
movss 0x2194(%rip), %xmm1     # 0xa004
subss %xmm0, %xmm1
movaps %xmm0, %xmm2
shufps $0x55, %xmm0, %xmm2     # xmm2 = xmm2[1,1],xmm0[1,1]
subss %xmm2, %xmm1
retq
// File: /workspace/github_c_makefile_star2_O2/nkanaev[P]tipsy/src/tipsy.c
// Function: mtl_readfile
Mtl* mtl_readfile(const char *filepath) {
  FILE *f = fopen(filepath, "r");
  if (f == NULL) error("failed to open mtl file: %s", filepath);

  char *line = NULL, *tline = NULL;
  size_t len = 0;

  Mtl *m = NULL;

  while (readline(&line, &len, f) != -1) {
    tline = trim(line);
    if (strncmp(tline, "newmtl ", 7) == 0) {
      char *mtlname = &line[7];
      Mtl *newm = calloc(1, sizeof(Mtl));
      newm->name = strdup(mtlname);
      newm->next = m;
      m = newm;
    } else if (strncmp(tline, "map_Ka ", 7) == 0 && m != NULL) {
      char *imgname = strdup(tline+7);
      char *imgpath = relpath(imgname, filepath);
      Tigr *img = tigrLoadImage(imgpath);
      if (img == NULL) error("failed to open image: {%s}", imgpath);
      m->map_Ka = img;
      free(imgpath);
      free(imgname);
    } else if (strncmp(tline, "map_Kd ", 7) == 0 && m != NULL) {
      char *imgname = strdup(tline+7);
      char *imgpath = relpath(imgname, filepath);
      Tigr *img = tigrLoadImage(imgpath);
      if (img == NULL) error("failed to open image: {%s}", imgpath);
      m->map_Kd = img;
      free(imgpath);
      free(imgname);
    }
  }
  free(line);
  fclose(f);
  return m;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x3d1b(%rip), %rsi      # 0xbbb3
callq 0x3420
testq %rax, %rax
je 0x8025
movq %rax, %r14
leaq 0x8(%rsp), %rax
andq $0x0, (%rax)
leaq 0x10(%rsp), %rax
andq $0x0, (%rax)
xorl %r15d, %r15d
pushq $0x7
popq %rbp
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movq %r14, %rdx
callq 0x80d5
movq 0x8(%rsp), %r13
cmpl $-0x1, %eax
je 0x7ff2
movq %r13, %rdi
callq 0x7b21
movq %rax, %r12
movq %rax, %rdi
leaq 0x3eee(%rip), %rsi      # 0xbde4
movq %rbp, %rdx
callq 0x3160
testl %eax, %eax
je 0x7fc7
testq %r15, %r15
sete %r13b
movq %r12, %rdi
leaq 0x3ed5(%rip), %rsi      # 0xbdec
movq %rbp, %rdx
callq 0x3160
testl %eax, %eax
setne %al
orb %r13b, %al
jne 0x7f5d
addq $0x7, %r12
movq %r12, %rdi
callq 0x3750
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
callq 0x7aa0
movq %rax, %r13
movq %rax, %rdi
callq 0x4e1c
testq %rax, %rax
je 0x8014
movq %rax, 0x8(%r15)
jmp 0x7fb2
testq %r15, %r15
sete %r13b
movq %r12, %rdi
leaq 0x3ea1(%rip), %rsi      # 0xbe0f
movq %rbp, %rdx
callq 0x3160
testl %eax, %eax
setne %al
orb %r13b, %al
jne 0x7ec1
addq $0x7, %r12
movq %r12, %rdi
callq 0x3750
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
callq 0x7aa0
movq %rax, %r13
movq %rax, %rdi
callq 0x4e1c
testq %rax, %rax
je 0x8014
movq %rax, 0x10(%r15)
movq %r13, %rdi
callq 0x3430
movq %r12, %rdi
callq 0x3430
jmp 0x7ec1
addq $0x7, %r13
pushq $0x1
popq %rdi
pushq $0x20
popq %rsi
callq 0x3270
movq %rax, %r12
movq %r13, %rdi
callq 0x3750
movq %rax, (%r12)
movq %r15, 0x18(%r12)
movq %r12, %r15
jmp 0x7ec1
movq %r13, %rdi
callq 0x3430
movq %r14, %rdi
callq 0x3360
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3dd9(%rip), %rdi      # 0xbdf4
movq %r13, %rsi
xorl %eax, %eax
callq 0x8031
leaq 0x3d9c(%rip), %rdi      # 0xbdc8
movq %rbx, %rsi
jmp 0x801e
// File: /workspace/github_c_makefile_star2_O2/nkanaev[P]tipsy/src/tipsy.c
// Function: error
static void error(char *fmt, ...) {
  va_list ap;
  va_start(ap, fmt);
  vfprintf(stderr, fmt, ap);
  fprintf(stderr, "\n");
  exit(1);
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x8090
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rdx
movq %rdi, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq 0x6f29(%rip), %rbx      # 0xefe0
movq (%rbx), %rdi
movq %r10, %rsi
callq 0x3520
movq (%rbx), %rsi
pushq $0xa
popq %rdi
callq 0x34a0
pushq $0x1
popq %rdi
callq 0x3440
// File: /workspace/github_c_makefile_star2_O2/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 0x3670
cmpl $0xd, %eax
je 0x80e9
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x8130
cmpl $0xa, %ebp
je 0x8130
leaq 0x2(%r12), %rcx
movq (%r15), %rsi
movq (%r14), %rax
cmpq %rsi, %rcx
jb 0x8127
addq $0x400, %rsi            # imm = 0x400
movq %rsi, (%r15)
movq %rax, %rdi
callq 0x36a0
movq %rax, (%r14)
movb %bpl, (%rax,%r12)
incq %r12
jmp 0x80e9
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_O2/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rbx, %rbx
je 0x81bb
movq (%rbx), %rdi
callq 0x3430
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x819c
callq 0x5afa
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x81aa
callq 0x5afa
movq 0x18(%rbx), %r14
movq %rbx, %rdi
callq 0x3430
movq %r14, %rbx
jmp 0x8181
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
callq 0x817a
movq (%rbx), %rdi
callq 0x7b64
movq 0x8(%rbx), %rdi
callq 0x7b64
movq 0x10(%rbx), %rdi
callq 0x7b64
movq 0x18(%rbx), %rdi
callq 0x7b64
movq %rbx, %rdi
popq %rbx
jmp 0x3430
// File: /workspace/github_c_makefile_star2_O2/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), %rax
movl 0x8(%rax), %ecx
xorl %edx, %edx
movaps 0x352c(%rip), %xmm0     # 0xbda0
cmpl %ecx, %edx
jge 0x889a
movq (%rax), %rsi
movslq 0x10(%rax), %r8
movslq %edx, %r9
imulq %r8, %r9
movsd 0x4(%rsi,%r9), %xmm1
xorps %xmm0, %xmm1
movlps %xmm1, 0x4(%rsi,%r9)
incl %edx
jmp 0x8874
movq 0x8(%rdi), %rax
movl 0x8(%rax), %ecx
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
cmpl %edx, %ecx
je 0x88ce
movq (%rax), %rsi
movslq 0x10(%rax), %rdi
movslq %edx, %r8
imulq %rdi, %r8
movsd 0x4(%rsi,%r8), %xmm1
xorps %xmm0, %xmm1
movlps %xmm1, 0x4(%rsi,%r8)
incl %edx
jmp 0x88a8
retq
// File: /workspace/github_c_makefile_star2_O2/nkanaev[P]tipsy/src/tipsy.c
// Function: surface_cmp
int surface_cmp(const void *a, const void *b) {
  Surface sa = *(Surface*)a;
  Surface sb = *(Surface*)b;

  float amaxz = fmaxf(fmaxf(sa.v1.z, sa.v2.z), sa.v3.z);
  float bmaxz = fmaxf(fmaxf(sb.v1.z, sb.v2.z), sb.v3.z);

  int apoints = (sa.v1.z < bmaxz) + (sa.v2.z < bmaxz) + (sa.v3.z < bmaxz);
  int bpoints = (sb.v1.z < amaxz) + (sb.v2.z < amaxz) + (sb.v3.z < amaxz);

  return apoints - bpoints;
}

// Assembly:
movss 0x8(%rdi), %xmm4
movss 0x14(%rdi), %xmm3
movss 0x8(%rsi), %xmm1
movss 0x14(%rsi), %xmm2
movss 0x20(%rsi), %xmm0
movaps %xmm4, %xmm5
unpcklps %xmm1, %xmm5            # xmm5 = xmm5[0],xmm1[0],xmm5[1],xmm1[1]
movaps %xmm3, %xmm6
unpcklps %xmm2, %xmm6            # xmm6 = xmm6[0],xmm2[0],xmm6[1],xmm2[1]
movaps %xmm6, %xmm7
maxps %xmm5, %xmm7
cmpunordps %xmm5, %xmm5
andps %xmm5, %xmm6
andnps %xmm7, %xmm5
orps %xmm6, %xmm5
movss 0x20(%rdi), %xmm6
unpcklps %xmm6, %xmm1            # xmm1 = xmm1[0],xmm6[0],xmm1[1],xmm6[1]
unpcklps %xmm0, %xmm6            # xmm6 = xmm6[0],xmm0[0],xmm6[1],xmm0[1]
movaps %xmm6, %xmm7
maxps %xmm5, %xmm7
cmpunordps %xmm5, %xmm5
andps %xmm5, %xmm6
andnps %xmm7, %xmm5
orps %xmm6, %xmm5
pshufd $0x55, %xmm5, %xmm6     # xmm6 = xmm5[1,1,1,1]
xorl %ecx, %ecx
ucomiss %xmm4, %xmm6
seta %cl
pshufd $0x40, %xmm5, %xmm4     # xmm4 = xmm5[0,0,0,1]
xorl %eax, %eax
ucomiss %xmm3, %xmm6
seta %al
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movlhps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
cmpltps %xmm4, %xmm0
movmskps %xmm0, %edx
movl %edx, %esi
andb $0x2, %sil
shrb %sil
movl %edx, %edi
shrb $0x2, %dil
movl %edx, %r8d
shrb $0x3, %r8b
movzbl %r8b, %r8d
addl %ecx, %r8d
movzbl %dil, %ecx
andl $0x1, %ecx
movzbl %sil, %esi
addl %ecx, %esi
andl $0x1, %edx
addl %esi, %edx
subl %edx, %eax
addl %r8d, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/vanhauser-thc[P]vulntest/andreas.cpp
// Function: main
int main(int argc, char *argv[]) {
  std::cout << "admin user does something" << std::endl;
  WebRequestForm admin_request = {"admin", "TopSecret", 5000.0};
  WebRequest(admin_request);
  std::cout << "\n\n--- some time is passing ---\n\n" << std::endl;
  std::cout << "attacker does something" << std::endl;
  double d = strtod(argv[3], NULL);
  std::string arg1(argv[1]);
  std::string arg2(argv[2]);
  WebRequestForm attacker_request = {arg1, arg2, d};
  WebRequest(attacker_request);
  return 0;
}

// Assembly:
pushq %rbx
subq $0xe0, %rsp
movq %rsi, %rbx
movq 0x2a90(%rip), %rdi      # 0x4fd8
leaq 0xb95(%rip), %rsi       # 0x30e4
callq 0x20e0
movq %rax, %rdi
callq 0x2050
leaq 0xb9b(%rip), %rsi       # 0x30fe
leaq 0x98(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x26ec
leaq 0xb8(%rsp), %rdi
leaq 0xb80(%rip), %rsi       # 0x3104
leaq 0x10(%rsp), %rdx
callq 0x26ec
movabsq $0x40b3880000000000, %rax # imm = 0x40B3880000000000
leaq 0x98(%rsp), %rdi
movq %rax, 0x40(%rdi)
callq 0x231b
movq 0x2a28(%rip), %rdi      # 0x4fd8
leaq 0xb57(%rip), %rsi       # 0x310e
callq 0x20e0
movq %rax, %rdi
callq 0x2050
movq 0x2a0d(%rip), %rdi      # 0x4fd8
leaq 0xb5d(%rip), %rsi       # 0x312f
callq 0x20e0
movq %rax, %rdi
callq 0x2050
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0x20a0
movsd %xmm0, 0x8(%rsp)
movq 0x8(%rbx), %rsi
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x26ec
movq 0x10(%rbx), %rsi
leaq 0x78(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x26ec
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2100
leaq 0x50(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x2100
leaq 0x30(%rsp), %rdi
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x40(%rdi)
callq 0x231b
leaq 0x30(%rsp), %rdi
callq 0x27dc
leaq 0x78(%rsp), %rdi
callq 0x2188
leaq 0x10(%rsp), %rdi
callq 0x2188
leaq 0x98(%rsp), %rdi
callq 0x27dc
xorl %eax, %eax
addq $0xe0, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x27dc
jmp 0x26a0
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2188
jmp 0x26a0
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x2188
jmp 0x26af
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2188
jmp 0x26d7
jmp 0x26d4
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x2188
jmp 0x26e4
movq %rax, %rbx
jmp 0x26e4
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x27dc
movq %rbx, %rdi
callq 0x2130
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rsi, %rbx
cmpl $0x3, %edi
je 0x230a
cmpl $0x1, %edi
jne 0x231f
movq 0x3d97(%rip), %r13      # 0x5ff0
leaq 0x1de4(%rip), %rbx      # 0x4044
movq 0x3d59(%rip), %r15      # 0x5fc0
movq %rsp, %r14
xorl %ebp, %ebp
movq (%r13), %rsi
movq %rbx, %rdi
callq 0x20a0
movq (%r15), %rdx
movq %r14, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x20b0
testq %rax, %rax
je 0x2376
movq %rax, %r12
movq %rax, %rdi
callq 0x2080
testq %rax, %rax
je 0x2382
cmpb $0xa, -0x1(%r12,%rax)
jne 0x22b5
decq %rax
movb $0x0, (%r12,%rax)
incq %rax
movq %rax, %rdi
callq 0x2100
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
callq 0x2060
testq %r12, %r12
je 0x234e
cmpb $0x71, (%r12)
jne 0x22e2
cmpb $0x0, 0x1(%r12)
je 0x2346
movq %r12, %rdi
leaq 0x1d5b(%rip), %rsi      # 0x4047
callq 0x20d0
testl %eax, %eax
je 0x2346
movq %r12, %rdi
callq 0x2394
movq %r12, %rdi
callq 0x2030
jmp 0x226c
movq 0x8(%rbx), %rax
cmpb $0x2d, (%rax)
jne 0x231f
cmpb $0x65, 0x1(%rax)
jne 0x231f
cmpb $0x0, 0x2(%rax)
je 0x2362
movq (%rbx), %rsi
leaq 0x1cdb(%rip), %rdi      # 0x4004
xorl %eax, %eax
callq 0x2090
movq (%rbx), %rsi
leaq 0x1cd5(%rip), %rdi      # 0x400f
xorl %eax, %eax
callq 0x2090
pushq $0x1
popq %rbp
jmp 0x234e
movq %r12, %rdi
callq 0x2030
movl %ebp, %eax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rbx), %rdi
callq 0x2394
xorl %ebp, %ebp
cmpl $-0x1, %eax
sete %bpl
jmp 0x234e
movq (%r15), %rdi
callq 0x20e0
testl %eax, %eax
je 0x2386
xorl %ebp, %ebp
jmp 0x234e
leaq 0x1cbf(%rip), %rdi      # 0x404c
callq 0x2110
jmp 0x2382
// File: /workspace/github_c_makefile_star2_O2/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
andl $0x0, (%rbx)
movq %rbx, %rsi
callq 0x2ee1
movl (%rbx), %esi
testl %esi, %esi
je 0x23c2
leaq 0x1c74(%rip), %rdi      # 0x402a
xorl %eax, %eax
callq 0x2090
pushq $-0x1
popq %rax
jmp 0x23d2
leaq 0x1c77(%rip), %rdi      # 0x4040
movb $0x1, %al
callq 0x2090
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x10
popq %rdi
pushq $0x3
popq %rsi
movl %ebp, %edx
callq 0x3680
movl %eax, 0x18(%rbx)
testl %eax, %eax
js 0x37d6
testb $0x1, 0x28(%rbx)
jne 0x3796
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3470
testl %eax, %eax
js 0x3800
movl 0x18(%rbx), %eax
pushq $0xc
popq %rdx
movl %eax, %edi
movq %rbx, %rsi
callq 0x3440
testl %eax, %eax
js 0x37d6
leaq 0xc(%rsp), %rdx
movl $0xc, (%rdx)
movl 0x18(%rbx), %edi
movq %rbx, %rsi
callq 0x3510
testl %eax, %eax
js 0x37d6
cmpl $0xc, 0xc(%rsp)
jne 0x3805
cmpw $0x10, (%rbx)
jne 0x3809
movl %ebp, 0x1c(%rbx)
xorl %r14d, %r14d
jmp 0x37f4
callq 0x30a0
movl (%rax), %edi
callq 0x3370
movl %eax, %r14d
negl %r14d
movl 0x18(%rbx), %edi
callq 0x3260
orl $-0x1, 0x18(%rbx)
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %r14d
jmp 0x37e8
pushq $-0x13
jmp 0x380b
pushq $-0xb
popq %r14
jmp 0x37e8
// File: /workspace/github_c_makefile_star2_O2/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 0x3823
callq 0x3260
orl $-0x1, 0x18(%rbx)
andl $0x0, 0x1c(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0xc
popq %r9
movl %eax, %edi
xorl %ecx, %ecx
callq 0x3240
testl %eax, %eax
jns 0x3850
callq 0x30a0
movl (%rax), %edi
callq 0x3370
negl %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x38ae
movq 0x80(%rax), %rax
movq %rsi, %rdi
movq %rax, %rsi
callq *%rcx
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x38ce
movl 0x18(%r14), %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x30e0
testl %eax, %eax
jns 0x38ce
callq 0x30a0
movl (%rax), %edi
callq 0x3370
negl %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3949
movl 0x4(%rdi), %edx
movl %edx, 0xc(%rcx)
cmpl $0x0, 0x8(%rcx)
jne 0x395d
movl 0x20(%rdi), %edx
leal 0x1(%rdx), %r8d
movl %r8d, 0x20(%rdi)
movl %edx, 0x8(%rcx)
cmpl $-0x1, (%rsi)
jne 0x3967
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 0x3984
orl $0x5, %edx
movw %dx, 0x6(%rcx)
movq 0xc0(%rax), %rax
testq %rax, %rax
je 0x3410
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/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 0x3100
testq %rax, %rax
je 0x39f4
movq %rax, %rbx
testq %r12, %r12
sete %al
testq %r15, %r15
sete %cl
orb %al, %cl
jne 0x39dd
pushq $0x4
popq %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x3660
testl %eax, %eax
js 0x39e8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3550
movl %eax, %ebp
movq %rbx, %rdi
callq 0x35f0
jmp 0x39f7
pushq $-0x5
popq %rbp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3420
testq %rax, %rax
je 0x3fa6
movq %rax, %rbx
leaq 0x32(%rip), %rcx        # 0x3fae
pushq $0x4
popq %rsi
pushq $0x3
popq %rdx
movq %rax, %rdi
xorl %r8d, %r8d
callq 0x3640
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3180
movl %eax, %ebp
movq %rbx, %rdi
callq 0x32e0
movl %ebp, %eax
jmp 0x3fa9
pushq $-0x5
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3fbc
xorl %eax, %eax
retq
pushq %rbx
movl %edi, %ebx
pushq $0x1
popq %rdi
movl $0xd0, %esi
callq 0x32a0
testq %rax, %rax
je 0x4009
movl $0x1, 0xc8(%rax)
xorl %ecx, %ecx
cmpq $0xa, %rcx
je 0x3ff8
cmpl $0x3, %ebx
jne 0x3ff3
andq $0x0, (%rax,%rcx,8)
andq $0x0, 0x50(%rax,%rcx,8)
incq %rcx
jmp 0x3fdd
cmpl $0x3, %ebx
jne 0x400b
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%rax)
jmp 0x400b
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/handlers.c
// Function: nl_cb_set
int nl_cb_set(struct nl_cb *cb, enum nl_cb_type type, enum nl_cb_kind kind,
	      nl_recvmsg_msg_cb_t func, void *arg)
{
	if (type < 0 || type > NL_CB_TYPE_MAX)
		return -NLE_RANGE;

	if (kind < 0 || kind > NL_CB_KIND_MAX)
		return -NLE_RANGE;

	if (kind == NL_CB_CUSTOM) {
		cb->cb_set[type] = func;
		cb->cb_args[type] = arg;
	}

	return 0;
}

// Assembly:
cmpl $0xa, %esi
setae %al
cmpl $0x4, %edx
setae %r9b
orb %al, %r9b
je 0x4023
pushq $-0x8
popq %rax
retq
xorl %eax, %eax
cmpl $0x3, %edx
jne 0x4035
movl %esi, %edx
movq %rcx, (%rdi,%rdx,8)
movq %r8, 0x50(%rdi,%rdx,8)
retq
// File: /workspace/github_c_makefile_star2_O2/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, %r14
xorl %edi, %edi
callq 0x30f0
movq %rax, %rbx
testq %rax, %rax
je 0x4085
movl $0xd0, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3310
movl $0x1, 0xc8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x40b1
movl 0xc8(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc8(%rdi)
testl %eax, %eax
jle 0x40b2
cmpl $0x1, %eax
je 0x3070
retq
pushq %rbp
pushq %rbx
pushq %rax
movq 0x6f3c(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x2f8b(%rip), %rsi      # 0x7051
leaq 0x2f90(%rip), %rbx      # 0x705d
pushq $0x63
popq %rbp
movq %rbx, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x32c0
leaq 0x2f85(%rip), %rdi      # 0x7068
leaq 0x2f80(%rip), %rcx      # 0x706a
movq %rbx, %rsi
movl %ebp, %edx
callq 0x3200
// File: /workspace/github_c_makefile_star2_O2/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 0x410e
movl (%rdi), %ecx
cmpq $0x10, %rcx
jb 0x410e
movslq %esi, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
setbe %al
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r8d, %esi
jae 0x4161
pushq $-0x15
popq %rax
retq
addl $0x3, %eax
andl $-0x4, %eax
addq %rax, %rdi
addq $0x10, %rdi
subl %eax, %esi
addl $-0x10, %esi
jmp 0x3590
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/msg.c
// Function: _nlmsg_alloc
static struct nl_msg *__nlmsg_alloc(size_t len)
{
	struct nl_msg *nm;

	nm = calloc(1, sizeof(*nm));
	if (!nm)
		goto errout;

	nm->nm_refcnt = 1;

	nm->nm_nlh = malloc(len);
	if (!nm->nm_nlh)
		goto errout;

	memset(nm->nm_nlh, 0, sizeof(struct nlmsghdr));

	nm->nm_protocol = -1;
	nm->nm_size = len;
	nm->nm_nlh->nlmsg_len = nlmsg_total_size(0);

	NL_DBG(2, "msg %p: Allocated new message, maxlen=%zu\n", nm, len);

	return nm;
errout:
	free(nm);
	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x1
popq %rdi
pushq $0x48
popq %rsi
callq 0x32a0
movq %rax, %rbx
testq %rax, %rax
je 0x41cb
movl $0x1, 0x40(%rbx)
movq %r14, %rdi
callq 0x33c0
movq %rax, 0x30(%rbx)
testq %rax, %rax
je 0x41cb
andl $0x0, 0xc(%rax)
andq $0x0, 0x4(%rax)
orl $-0x1, (%rbx)
movq %r14, 0x38(%rbx)
movl $0x10, (%rax)
jmp 0x41d5
movq %rbx, %rdi
callq 0x3070
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/msg.c
// Function: nlmsg_inherit
struct nl_msg *nlmsg_inherit(struct nlmsghdr *hdr)
{
	struct nl_msg *nm;

	nm = nlmsg_alloc();
	if (nm && hdr) {
		struct nlmsghdr *new = nm->nm_nlh;

		new->nlmsg_type = hdr->nlmsg_type;
		new->nlmsg_flags = hdr->nlmsg_flags;
		new->nlmsg_seq = hdr->nlmsg_seq;
		new->nlmsg_pid = hdr->nlmsg_pid;
	}

	return nm;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x3580
testq %rax, %rax
sete %cl
testq %rbx, %rbx
sete %dl
orb %cl, %dl
jne 0x420d
movq 0x30(%rax), %rcx
movl 0x4(%rbx), %edx
movl %edx, 0x4(%rcx)
movq 0x8(%rbx), %rdx
movq %rdx, 0x8(%rcx)
popq %rbx
retq