LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/texture.c
// Function: Data
static int Data(lua_State *L)
/* returns data as a binary string */
    {
    size_t len;
    texture_t *texture = checktexture(L, 1);
    if(!Compressed(texture)) return 0;
    len = texture->mWidth;
    lua_pushlstring(L, (char*)(texture->pcData), len);
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x3681(%rip), %rdx      # 0x115d6
movl $0x1, %esi
callq 0x66f0
xorl %ecx, %ecx
cmpl $0x0, 0x4(%rax)
jne 0xdf7a
movl (%rax), %edx
movq 0x18(%rax), %rsi
movq %rbx, %rdi
callq 0x6670
movl $0x1, %ecx
movl %ecx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/texture.c
// Function: Texel_
static int Texel_(lua_State *L, int asfloat)
    {
    unsigned int u, v, i;
    texture_t *texture = checktexture(L, 1);
    if(Compressed(texture)) return 0;
    u = checkindex(L, 2);
    v = checkindex(L, 3);
    if(u >= texture->mWidth)
        return luaL_argerror(L, 2, "out of range");
    if(v >= texture->mHeight)
        return luaL_argerror(L, 3, "out of range");
    i =  v * texture->mWidth + u; /* texel index */
    if(asfloat)
        return pushtexelf(L, &(texture->pcData[i]), 0);
    return pushtexel(L, &(texture->pcData[i]), 0);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x3615(%rip), %rdx      # 0x115d6
movl $0x1, %esi
callq 0x66f0
cmpl $0x0, 0x4(%rax)
je 0xe025
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x6310
movl %eax, %r15d
movq %rbx, %rdi
movl $0x3, %esi
callq 0x6310
movl (%r14), %esi
cmpl %esi, %r15d
jae 0xe032
cmpl 0x4(%r14), %eax
jae 0xe043
imull %eax, %esi
addl %r15d, %esi
shlq $0x2, %rsi
addq 0x18(%r14), %rsi
movq %rbx, %rdi
xorl %edx, %edx
addq $0x8, %rsp
testl %ebp, %ebp
je 0xe061
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x69c0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2170(%rip), %rdx      # 0x101a9
movq %rbx, %rdi
movl $0x2, %esi
jmp 0xe052
leaq 0x215f(%rip), %rdx      # 0x101a9
movq %rbx, %rdi
movl $0x3, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x61c0
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x69c8
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/texture.c
// Function: Texels_
static int Texels_(lua_State *L, int asfloat)
/* returns a W*H matrix (table) of textels (4-value tables) */
    {
#define W texture->mWidth
#define H texture->mHeight
    unsigned int u, v, i;
    int (*push)(lua_State*L, texel_t*, int) = (asfloat==0) ? pushtexel : pushtexelf;
    texture_t *texture = checktexture(L, 1);
    if(Compressed(texture)) return 0;
    lua_newtable(L);
    for(v = 0; v < H; v++)
        {
        lua_newtable(L); /* v-th row */
        for(u = 0; u < W; u++)
            {
            i =  v*W + u; /* texel index */
            push(L, &(texture->pcData[i]), 1); /* u-th texel in the v-th row */
            lua_rawseti(L, -2, u+1);
            }
        lua_rawseti(L, -2, v+1);
        }   
    return 1;
#undef W
#undef H
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
jne 0xe087
movq 0x9f63(%rip), %r13      # 0x17fe8
jmp 0xe08e
movq 0x9f42(%rip), %r13      # 0x17fd0
leaq 0x3541(%rip), %rdx      # 0x115d6
movl $0x1, %ebp
movq %rbx, %rdi
movl $0x1, %esi
callq 0x66f0
cmpl $0x0, 0x4(%rax)
je 0xe138
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cmpl $0x0, 0x4(%r14)
je 0xe13a
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
movl (%r14), %esi
testl %esi, %esi
je 0xe115
xorl %r12d, %r12d
imull %r15d, %esi
addl %r12d, %esi
shlq $0x2, %rsi
addq 0x18(%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq *%r13
incq %r12
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r12, %rdx
callq 0x6470
movl (%r14), %esi
cmpq %rsi, %r12
jb 0xe0e0
incq %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x6470
movl 0x4(%r14), %eax
cmpq %rax, %r15
jb 0xe0ca
movl $0x1, %ebp
jmp 0xe13a
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/udata.c
// Function: moonassimp_udata_unref
int udata_unref(lua_State *L, const void *ptr)
/* unreference udata so that it will be garbage collected */
    {
//  printf("unref object %p\n", ptr);
    udata_t *udata = udata_search((uintptr_t)ptr);
    if(!udata) 
        return luaL_error(L, "invalid object pointer %p", ptr);
    if(udata->ref != LUA_NOREF)
        {
        luaL_unref(L, LUA_REGISTRYINDEX, udata->ref);
        udata->ref = LUA_NOREF;
        }
    return 0;
    }

// Assembly:
pushq %rbx
movq %rsi, %rdx
movq 0xa04b(%rip), %rbx      # 0x18510
testq %rbx, %rbx
je 0xe4db
cmpq %rdx, 0x20(%rbx)
ja 0xe4d6
jae 0xe4ea
addq $0x8, %rbx
movq (%rbx), %rbx
jmp 0xe4c5
leaq 0x31c0(%rip), %rsi      # 0x116a2
xorl %eax, %eax
popq %rbx
jmp 0x67a0
movl 0x28(%rbx), %edx
cmpl $-0x2, %edx
je 0xe503
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x6910
movl $0xfffffffe, 0x28(%rbx) # imm = 0xFFFFFFFE
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/udata.c
// Function: moonassimp_udata_free
int udata_free(lua_State *L, const void *ptr)
/* this should be called in the __gc metamethod
 */
    {
    udata_t *udata = udata_search((uintptr_t)ptr);
//  printf("free object %p\n", ptr);
    if(!udata) 
        return luaL_error(L, "invalid object pointer %p", ptr);
    /* release all references */
    if(udata->ref != LUA_NOREF)
        luaL_unref(L, LUA_REGISTRYINDEX, udata->ref);
    udata_remove(udata);
    free(udata);
    /* mem is released by Lua at garbage collection */
    return 0;
    }

// Assembly:
pushq %rbx
movq %rsi, %rdx
movq 0x9ffe(%rip), %rbx      # 0x18510
testq %rbx, %rbx
je 0xe528
cmpq %rdx, 0x20(%rbx)
ja 0xe523
jae 0xe537
addq $0x8, %rbx
movq (%rbx), %rbx
jmp 0xe512
leaq 0x3173(%rip), %rsi      # 0x116a2
xorl %eax, %eax
popq %rbx
jmp 0x67a0
movl 0x28(%rbx), %edx
cmpl $-0x2, %edx
je 0xe549
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x6910
movq %rbx, %rdi
callq 0xe55d
movq %rbx, %rdi
callq 0x60a0
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/udata.c
// Function: moonassimp_udata_push
int udata_push(lua_State *L, const void *ptr)
    {
    udata_t *udata = udata_search((uintptr_t)ptr);
//  printf("push object %p\n", ptr);
    if(!udata) 
        return luaL_error(L, "invalid object pointer %p", ptr);
    if(udata->ref == LUA_NOREF)
        return luaL_error(L, "unreferenced object");
    if(lua_rawgeti(L, LUA_REGISTRYINDEX, udata->ref) != LUA_TUSERDATA)
        return luaL_error(L, UNEXPECTED_ERROR);
    return 1; /* one value pushed */
    }

// Assembly:
pushq %rbx
movq %rsi, %rdx
movq %rdi, %rbx
movq 0x9bac(%rip), %rax      # 0x18510
testq %rax, %rax
je 0xe97a
cmpq %rdx, 0x20(%rax)
ja 0xe975
jae 0xe98c
addq $0x8, %rax
movq (%rax), %rax
jmp 0xe964
leaq 0x2d21(%rip), %rsi      # 0x116a2
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x67a0
movslq 0x28(%rax), %rdx
cmpq $-0x2, %rdx
jne 0xe9a8
leaq 0x2d1f(%rip), %rsi      # 0x116bc
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x67a0
movq %rbx, %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x62b0
cmpl $0x7, %eax
jne 0xe9c1
movl $0x1, %eax
popq %rbx
retq
leaq 0x17ee(%rip), %rsi      # 0x101b6
leaq 0x2d01(%rip), %rdx      # 0x116d0
movq %rbx, %rdi
movl $0xa3, %ecx
xorl %eax, %eax
popq %rbx
jmp 0x67a0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/udata.c
// Function: moonassimp_udata_free_all
void udata_free_all(void)
/* free all without unreferencing (for atexit()) */
    {
    udata_t *udata;
    while((udata = udata_first(0)))
        {
        udata_remove(udata);
        free(udata);
        }
    }

// Assembly:
movq 0x9b2a(%rip), %rax      # 0x18510
testq %rax, %rax
je 0xea1b
pushq %rbx
movq %rax, %rbx
cmpq $0x0, 0x20(%rax)
je 0xe9fe
movq (%rbx), %rax
testq %rax, %rax
jne 0xe9ec
movq %rbx, %rdi
callq 0xe55d
movq %rbx, %rdi
callq 0x60a0
movq 0x9afb(%rip), %rax      # 0x18510
testq %rax, %rax
jne 0xe9ec
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/utils.c
// Function: moonassimp_checkindex
int checkindex(lua_State *L, int arg)
    {
    int val = luaL_checkinteger(L, arg);
    if(val < 1)
        return luaL_argerror(L, arg, "positive integer expected");
    return val - 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x6440
testl %eax, %eax
jle 0xef95
decl %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x27e9(%rip), %rdx      # 0x11785
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x61c0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/utils.c
// Function: moonassimp_optindex
int optindex(lua_State *L, int arg, int optval /* 0-based */)
    {
    int val = luaL_optinteger(L, arg, optval + 1);
    if(val < 1)
        return luaL_argerror(L, arg, "positive integer expected");
    return val - 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
incl %edx
movslq %edx, %rdx
callq 0x6550
testl %eax, %eax
jle 0xefce
decl %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x27b0(%rip), %rdx      # 0x11785
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x61c0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/utils.c
// Function: moonassimp_pushvector2
int pushvector2(lua_State *L, vector2_t *vec, int astable)
    {
    if(astable)
        {
        lua_newtable(L);
        lua_pushnumber(L, vec->x); lua_seti(L, -2, 1);
        lua_pushnumber(L, vec->y); lua_seti(L, -2, 2);
        return 1;
        }
    lua_pushnumber(L, vec->x);  
    lua_pushnumber(L, vec->y);  
    return 2;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
je 0xf053
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cvtss2sd (%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x1, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
xorps %xmm0, %xmm0
cvtss2sd 0x4(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x2, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
movl $0x1, %eax
jmp 0xf076
cvtss2sd (%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
xorps %xmm0, %xmm0
cvtss2sd 0x4(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/utils.c
// Function: moonassimp_pushvector3
int pushvector3(lua_State *L, vector3_t *vec, int astable)
    {
    if(astable)
        {
        lua_newtable(L);
        lua_pushnumber(L, vec->x); lua_seti(L, -2, 1);
        lua_pushnumber(L, vec->y); lua_seti(L, -2, 2);
        lua_pushnumber(L, vec->z); lua_seti(L, -2, 3);
        return 1;
        }
    lua_pushnumber(L, vec->x);  
    lua_pushnumber(L, vec->y);  
    lua_pushnumber(L, vec->z);  
    return 3;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
je 0xf104
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cvtss2sd (%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x1, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
xorps %xmm0, %xmm0
cvtss2sd 0x4(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x2, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
xorps %xmm0, %xmm0
cvtss2sd 0x8(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x3, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
movl $0x1, %eax
jmp 0xf138
cvtss2sd (%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
xorps %xmm0, %xmm0
cvtss2sd 0x4(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
xorps %xmm0, %xmm0
cvtss2sd 0x8(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x3, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/utils.c
// Function: moonassimp_pushcolor4
int pushcolor4(lua_State *L, color4_t *col, int astable)
    {
    if(astable)
        {
        lua_newtable(L);
        lua_pushnumber(L, col->r); lua_seti(L, -2, 1);
        lua_pushnumber(L, col->g); lua_seti(L, -2, 2);
        lua_pushnumber(L, col->b); lua_seti(L, -2, 3);
        lua_pushnumber(L, col->a); lua_seti(L, -2, 4);
        return 1;
        }
    lua_pushnumber(L, col->r);  
    lua_pushnumber(L, col->g);  
    lua_pushnumber(L, col->b);  
    lua_pushnumber(L, col->a);  
    return 4;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
je 0xf2af
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cvtss2sd (%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x1, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
xorps %xmm0, %xmm0
cvtss2sd 0x4(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x2, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
xorps %xmm0, %xmm0
cvtss2sd 0x8(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x3, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
xorps %xmm0, %xmm0
cvtss2sd 0xc(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x4, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
movl $0x1, %eax
jmp 0xf2f4
cvtss2sd (%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
xorps %xmm0, %xmm0
cvtss2sd 0x4(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
xorps %xmm0, %xmm0
cvtss2sd 0x8(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
xorps %xmm0, %xmm0
cvtss2sd 0xc(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x4, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/utils.c
// Function: moonassimp_pushquaternion
int pushquaternion(lua_State *L, quaternion_t *quat, int astable)
    {
    if(astable)
        {
        lua_newtable(L);
        lua_pushnumber(L, quat->w); lua_seti(L, -2, 1);
        lua_pushnumber(L, quat->x); lua_seti(L, -2, 2);
        lua_pushnumber(L, quat->y); lua_seti(L, -2, 3);
        lua_pushnumber(L, quat->z); lua_seti(L, -2, 4);
        return 1;
        }
    lua_pushnumber(L, quat->w); 
    lua_pushnumber(L, quat->x); 
    lua_pushnumber(L, quat->y); 
    lua_pushnumber(L, quat->z); 
    return 4;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
je 0xf3a9
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
cvtss2sd (%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x1, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
xorps %xmm0, %xmm0
cvtss2sd 0x4(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x2, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
xorps %xmm0, %xmm0
cvtss2sd 0x8(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x3, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
xorps %xmm0, %xmm0
cvtss2sd 0xc(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x4, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
movl $0x1, %eax
jmp 0xf3ee
cvtss2sd (%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
xorps %xmm0, %xmm0
cvtss2sd 0x4(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
xorps %xmm0, %xmm0
cvtss2sd 0x8(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
xorps %xmm0, %xmm0
cvtss2sd 0xc(%r14), %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x4, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/utils.c
// Function: moonassimp_pushtexel
int pushtexel(lua_State *L, texel_t *vec, int astable)
    {
    if(astable)
        {
        lua_newtable(L);
        lua_pushinteger(L, vec->r); lua_seti(L, -2, 1);
        lua_pushinteger(L, vec->g); lua_seti(L, -2, 2);
        lua_pushinteger(L, vec->b); lua_seti(L, -2, 3);
        lua_pushinteger(L, vec->a); lua_seti(L, -2, 4);
        return 1;
        }
    lua_pushinteger(L, vec->r); 
    lua_pushinteger(L, vec->g); 
    lua_pushinteger(L, vec->b); 
    lua_pushinteger(L, vec->a); 
    return 4;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
je 0xf496
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
movzbl 0x2(%r14), %esi
movq %rbx, %rdi
callq 0x6300
movl $0x1, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
movzbl 0x1(%r14), %esi
movq %rbx, %rdi
callq 0x6300
movl $0x2, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
movzbl (%r14), %esi
movq %rbx, %rdi
callq 0x6300
movl $0x3, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
movzbl 0x3(%r14), %esi
movq %rbx, %rdi
callq 0x6300
movl $0x4, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
movl $0x1, %eax
jmp 0xf4ce
movzbl 0x2(%r14), %esi
movq %rbx, %rdi
callq 0x6300
movzbl 0x1(%r14), %esi
movq %rbx, %rdi
callq 0x6300
movzbl (%r14), %esi
movq %rbx, %rdi
callq 0x6300
movzbl 0x3(%r14), %esi
movq %rbx, %rdi
callq 0x6300
movl $0x4, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/utils.c
// Function: moonassimp_pushtexelf
int pushtexelf(lua_State *L, texel_t *vec, int astable)
    {
    if(astable)
        {
        lua_newtable(L);
        lua_pushnumber(L, vec->r/255.f); lua_seti(L, -2, 1);
        lua_pushnumber(L, vec->g/255.f); lua_seti(L, -2, 2);
        lua_pushnumber(L, vec->b/255.f); lua_seti(L, -2, 3);
        lua_pushnumber(L, vec->a/255.f); lua_seti(L, -2, 4);
        return 1;
        }
    lua_pushnumber(L, vec->r/255.f);    
    lua_pushnumber(L, vec->g/255.f);    
    lua_pushnumber(L, vec->b/255.f);    
    lua_pushnumber(L, vec->a/255.f);    
    return 4;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
je 0xf5c2
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
movzbl 0x2(%r14), %eax
cvtsi2ss %eax, %xmm0
divss 0x2213(%rip), %xmm0     # 0x11718
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x1, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
movzbl 0x1(%r14), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x21e1(%rip), %xmm0     # 0x11718
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x2, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
movzbl (%r14), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x21b0(%rip), %xmm0     # 0x11718
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x3, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
movzbl 0x3(%r14), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x217e(%rip), %xmm0     # 0x11718
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x4, %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x63e0
movl $0x1, %eax
jmp 0xf643
movzbl 0x2(%r14), %eax
cvtsi2ss %eax, %xmm0
divss 0x2145(%rip), %xmm0     # 0x11718
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x6500
movzbl 0x1(%r14), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x2125(%rip), %xmm0     # 0x11718
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x6500
movzbl (%r14), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x2106(%rip), %xmm0     # 0x11718
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x6500
movzbl 0x3(%r14), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x20e6(%rip), %xmm0     # 0x11718
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x6500
movl $0x4, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/utils.c
// Function: moonassimp_newuserdata
ud_t *newuserdata(lua_State *L, void *ptr, const char *mt)
    {
    ud_t *ud;
    ud = (ud_t*)udata_new(L, sizeof(ud_t), ptr, mt);
    memset(ud, 0, sizeof(ud_t));
    ud->obj = ptr ? ptr : (void*)ud;
    MarkValid(ud);
    return ud;
    }

// Assembly:
pushq %rbx
movq %rdx, %rcx
movq %rsi, %rbx
movl $0x30, %esi
movq %rbx, %rdx
callq 0x6280
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
testq %rbx, %rbx
cmoveq %rax, %rbx
movq $0x0, 0x28(%rax)
movq %rbx, (%rax)
movl $0x1, 0x8(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/utils.c
// Function: moonassimp_freeuserdata
int freeuserdata(lua_State *L, void *ptr)
    {
    ud_t *ud = userdata(ptr);
    if(!ud || !IsValid(ud))
        return 0; /* already deleted */
    CancelValid(ud);
    udata_free(L, ptr);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x6770
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0xfd78
movl 0x8(%rcx), %edx
testb $0x1, %dl
je 0xfd78
andl $-0x2, %edx
movl %edx, 0x8(%rcx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x62c0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/utils.c
// Function: moonassimp_testxxx
void* testxxx(lua_State *L, int arg, const char *mt)
    {
    ud_t *ud = (ud_t*)udata_test(L, arg, mt);
    if(ud && IsValid(ud))
        return ud->obj;
    return NULL;
    }

// Assembly:
pushq %rax
callq 0x6730
testq %rax, %rax
je 0xfd91
testb $0x1, 0x8(%rax)
jne 0xfd95
xorl %eax, %eax
jmp 0xfd98
movq (%rax), %rax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/utils.c
// Function: moonassimp_checkxxx
void* checkxxx(lua_State *L, int arg, const char *mt)
    {
    void *p = testxxx(L, arg, mt);
    if(p) return p;
    lua_pushfstring(L, "not a %s", mt);
    luaL_argerror(L, arg, lua_tostring(L, -1));
    return NULL;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r14
callq 0x6730
testq %rax, %rax
je 0xfdc2
testb $0x1, 0x8(%rax)
je 0xfdc2
movq (%rax), %r12
testq %r12, %r12
jne 0xfdf5
leaq 0x19d6(%rip), %rsi      # 0x1179f
xorl %r12d, %r12d
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x63d0
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x61e0
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
callq 0x61c0
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/videolan[P]bitstream/examples/rtp_check_seqnum.c
// Function: main
int main(int i_argc, char **ppsz_argv)
{
    int i_packet_size = DEFAULT_PACKET_SIZE;

    if (ppsz_argv[1] != NULL &&
        (!strcmp(ppsz_argv[1], "-h") || !strcmp(ppsz_argv[1], "--help")))
        usage(ppsz_argv[0]);

    if (ppsz_argv[1] != NULL)
        i_packet_size = atoi(ppsz_argv[1]);
    if (i_packet_size > 65535 || i_packet_size < RTP_HEADER_SIZE)
        usage(ppsz_argv[0]);

    uint8_t p_buffer[i_packet_size];
    uint16_t i_seqnum = 0;

    for ( ; ; ) {
        ssize_t toto;
        if ((toto=read(STDIN_FILENO, p_buffer, i_packet_size)) != i_packet_size) {
            fprintf(stderr, "couldn't read %zd\n", toto);
            exit(EXIT_FAILURE);
        }

        if (!rtp_check_hdr(p_buffer)) {
            fprintf(stderr, "invalid RTP header\n");
            continue;
        }

        uint16_t i_new_seqnum = rtp_get_seqnum(p_buffer);
        if (i_new_seqnum != i_seqnum)
            fprintf(stderr, "received packet %hu while expecting %hu\n",
                    i_new_seqnum, i_seqnum);
        i_seqnum = (i_new_seqnum + 1) % 65536;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rsi), %r14
movl $0x530, %eax            # imm = 0x530
testq %r14, %r14
jne 0x125c
movl %eax, %ebx
movq %rsp, %r14
leaq 0xf(%rbx), %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
xorl %edi, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1030
cmpq %rbx, %rax
jne 0x1246
movq 0x2e20(%rip), %r13      # 0x3ff8
xorl %r12d, %r12d
movb (%r14), %al
andb $-0x40, %al
negb %al
jno 0x120e
movzwl 0x2(%r14), %r15d
rolw $0x8, %r15w
cmpw %r12w, %r15w
jne 0x122a
incl %r15d
movl %r15d, %r12d
xorl %edi, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1030
cmpq %rbx, %rax
je 0x11db
jmp 0x1246
movq (%r13), %rcx
movl $0x13, %esi
movl $0x1, %edx
leaq 0xdfb(%rip), %rdi       # 0x201e
callq 0x1080
jmp 0x11fa
movzwl %r15w, %edx
movzwl %r12w, %ecx
movq (%r13), %rdi
leaq 0xdf5(%rip), %rsi       # 0x2032
xorl %eax, %eax
callq 0x1050
jmp 0x11f4
movq 0x2dab(%rip), %rcx      # 0x3ff8
movq (%rcx), %rdi
leaq 0xdb4(%rip), %rsi       # 0x200b
movq %rax, %rdx
jmp 0x12b6
movq %rsi, %rbx
cmpb $0x2d, (%r14)
jne 0x1273
cmpb $0x68, 0x1(%r14)
jne 0x1273
cmpb $0x0, 0x2(%r14)
je 0x12a2
leaq 0xd8a(%rip), %rsi       # 0x2004
movq %r14, %rdi
callq 0x1040
testl %eax, %eax
je 0x12a2
movq %r14, %rdi
callq 0x1060
movl %eax, %ecx
addl $0xffff0000, %ecx       # imm = 0xFFFF0000
cmpl $0xffff000b, %ecx       # imm = 0xFFFF000B
ja 0x11ac
movq (%rbx), %rdx
movq 0x2d4c(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xda5(%rip), %rsi       # 0x205b
xorl %eax, %eax
callq 0x1050
movl $0x1, %edi
callq 0x1070
// File: /workspace/github_c_makefile_star2_O3/evilwombat[P]gopro-fw-tools/h3-wifi-address.c
// Function: patch_buffer
static int patch_buffer(unsigned char *buf, int *offsets, unsigned char val, unsigned char old_val)
{
	int i;

	for (i = 0; offsets[i] != -1; i++) {
		if (buf[offsets[i]] != old_val) {
			printf("Patching mismatch at offset %08x, expected %02x, got %02x\n",
			       offsets[i], old_val, buf[offsets[i]]);
			return -1;
		}

		buf[offsets[i]] = val;
	}

	return 0;
}

// Assembly:
movq %rsi, %r8
movl (%rsi), %esi
xorl %eax, %eax
cmpl $-0x1, %esi
je 0x15d7
pushq %rax
addq $0x4, %r8
movslq %esi, %r10
movzbl (%rdi,%r10), %r9d
cmpb %cl, %r9b
jne 0x15ba
movb %dl, (%rdi,%r10)
movl (%r8), %esi
addq $0x4, %r8
cmpl $-0x1, %esi
jne 0x159b
jmp 0x15d3
movzbl %cl, %edx
leaq 0xcd2(%rip), %rdi       # 0x2296
movl %r9d, %ecx
xorl %eax, %eax
callq 0x1080
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_14/sort.c
// Function: main
int main(int argc, char *argv[])
{
  if (!parse_arg_list(argc, argv))
  {
    puts("Error: invalid arguments.");
    return EXIT_FAILURE;
  }

  size_t nr_of_lines;
  char *line_ptr[MAX_NR_OF_LINES];

  if ((nr_of_lines = read_lines(line_ptr, MAX_NR_OF_LINES)) != -1)
  {
    quick_sort((void **)line_ptr, 0, nr_of_lines - 1, (int (*)(void *, void *))comp);
    write_lines(line_ptr, nr_of_lines);
  }
  else
  {
    puts("Error: input too large.");
    return EXIT_FAILURE;
  }

  return EXIT_SUCCESS;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x9c40, %rsp           # imm = 0x9C40
callq 0x121a
testl %eax, %eax
je 0x11f1
movq %rsp, %rdi
movl $0x1388, %esi           # imm = 0x1388
callq 0x12b3
cmpq $-0x1, %rax
je 0x11fa
movq %rax, %r14
movq %rax, %rdx
decq %rdx
movq 0x2e8b(%rip), %rcx      # 0x4060
xorl %ebx, %ebx
movq %rsp, %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x13a2
movq %r15, %rdi
movq %r14, %rsi
callq 0x1451
jmp 0x120b
leaq 0xe0c(%rip), %rdi       # 0x2004
jmp 0x1201
leaq 0xe1d(%rip), %rdi       # 0x201e
callq 0x1040
movl $0x1, %ebx
movl %ebx, %eax
addq $0x9c40, %rsp           # imm = 0x9C40
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_14/sort.c
// Function: parse_arg_list
int parse_arg_list(int argc, char *argv[])
{
  for (int i = 1; i < argc; ++i)
  {
    size_t arg_len = strlen(argv[i]);
    if (arg_len > 1 && argv[i][0] == '-')
    {
      for (size_t j = 1; j < arg_len; ++j)
      {
        switch (argv[i][j])
        {
        case 'n':
          comp = numcmp;
          break;

        case 'r':
          order = -1;
          break;

        default:
          return 0;
          break;
        }
      }
    }
    else
    {
      return 0;
    }
  }

  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movb $0x1, %bpl
cmpl $0x2, %edi
jge 0x1243
movzbl %bpl, %eax
andl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %rbx
movl %edi, %r15d
movl $0x1, %r12d
xorl %ebp, %ebp
leaq 0x258(%rip), %r13       # 0x14b0
movq (%rbx,%r12,8), %r14
movq %r14, %rdi
callq 0x1060
cmpq $0x2, %rax
jb 0x122d
cmpb $0x2d, (%r14)
jne 0x122d
movl $0x1, %ecx
movq (%rbx,%r12,8), %rdx
movzbl (%rdx,%rcx), %edx
cmpl $0x72, %edx
je 0x1290
cmpl $0x6e, %edx
jne 0x122d
movq %r13, 0x2dd2(%rip)      # 0x4060
jmp 0x129a
movl $0xffffffff, 0x2dbe(%rip) # imm = 0xFFFFFFFF
incq %rcx
cmpq %rcx, %rax
jne 0x1275
incq %r12
cmpq %r15, %r12
setae %bpl
jne 0x1258
jmp 0x122d
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_14/sort.c
// Function: read_lines
size_t read_lines(char *line_ptr[], const size_t max_nr_of_lines)
{
  size_t line_length;
  size_t nr_of_lines = 0;

  char *current_line = alloc(MAX_LINE_LEN);
  char *current_line_copy = NULL;

  while ((line_length = get_line(current_line, MAX_LINE_LEN)))
  {
    if (nr_of_lines >= max_nr_of_lines || (current_line_copy = alloc(line_length)) == NULL)
    {
      return -1;
    }
    else
    {
      current_line[line_length - 1] = '\0';
      strcpy(current_line_copy, current_line);
      line_ptr[nr_of_lines++] = current_line_copy;
    }
  }

  afree(current_line);

  return nr_of_lines;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movq 0x2d9d(%rip), %rbx      # 0x4068
leaq 0x2dae(%rip), %r13      # 0x4080
movq %r13, %rax
subq %rbx, %rax
addq $0x2710, %rax           # imm = 0x2710
cmpq $0x3e8, %rax            # imm = 0x3E8
jae 0x12ea
xorl %ebx, %ebx
jmp 0x12f8
leaq 0x3e8(%rbx), %rax
movq %rax, 0x2d70(%rip)      # 0x4068
movl $0x3e8, %esi            # imm = 0x3E8
movq %rbx, %rdi
callq 0x14f3
xorl %ebp, %ebp
testq %rax, %rax
je 0x1367
movq $-0x1, %rcx
cmpq %rbp, %r14
je 0x1390
movq 0x2d49(%rip), %r12      # 0x4068
movq %r13, %rdx
subq %r12, %rdx
addq $0x2710, %rdx           # imm = 0x2710
cmpq %rax, %rdx
jb 0x1390
leaq (%r12,%rax), %rdx
movq %rdx, 0x2d2c(%rip)      # 0x4068
testq %r12, %r12
je 0x1390
movb $0x0, -0x1(%rbx,%rax)
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1030
movq %r12, (%r15,%rbp,8)
incq %rbp
movl $0x3e8, %esi            # imm = 0x3E8
movq %rbx, %rdi
callq 0x14f3
jmp 0x1307
leaq 0x2d12(%rip), %rax      # 0x4080
cmpq %rax, %rbx
setae %cl
addq $0x2710, %rax           # imm = 0x2710
cmpq %rax, %rbx
setb %al
andb %cl, %al
cmpb $0x1, %al
jne 0x138d
movq %rbx, 0x2cdb(%rip)      # 0x4068
movq %rbp, %rcx
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_14/sort.c
// Function: quick_sort
void quick_sort(void *v[], size_t start, size_t end, int (*comp)(void *, void *))
{
  if ((long)start >= (long)end)
  {
    return;
  }

  swap(v, start, (start + end) / 2);

  size_t last = start;
  for (size_t i = start + 1; i <= end; ++i)
  {
    if ((*comp)(v[i], v[start]) < 0)
    {
      swap(v, ++last, i);
    }
  }

  swap(v, start, last);
  quick_sort(v, start, last - 1, comp);
  quick_sort(v, last + 1, end, comp);
}

// Assembly:
cmpq %rdx, %rsi
jge 0x1450
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
leaq (%r12,%r14), %rax
movq (%r15,%r12,8), %rcx
andq $-0x2, %rax
movq (%r15,%rax,4), %rdx
movq %rdx, (%r15,%r12,8)
movq %rcx, (%r15,%rax,4)
leaq 0x1(%r12), %rbp
movq %r12, %r13
cmpq %r14, %rbp
ja 0x1416
movq (%r15,%rbp,8), %rdi
movq (%r15,%r12,8), %rsi
callq *%rbx
testl %eax, %eax
jns 0x140a
movq 0x8(%r15,%r13,8), %rax
movq (%r15,%rbp,8), %rcx
movq %rcx, 0x8(%r15,%r13,8)
incq %r13
movq %rax, (%r15,%rbp,8)
incq %rbp
cmpq %r14, %rbp
jbe 0x13e7
leaq 0x1(%r13), %rbp
movq (%r15,%r12,8), %rax
movq (%r15,%r13,8), %rcx
movq %rcx, (%r15,%r12,8)
movq %rax, (%r15,%r13,8)
decq %r13
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x13a2
movq %rbp, %r12
cmpq %r14, %rbp
jl 0x13c2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_14/sort.c
// Function: numcmp
int numcmp(const char *s1, const char *s2)
{
  double nr1 = atof(s1);
  double nr2 = atof(s2);

  if (nr1 < nr2)
  {
    return order * -1;
  }
  else if (nr1 > nr2)
  {
    return order * 1;
  }

  return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
callq 0x1050
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
callq 0x1050
movsd 0x8(%rsp), %xmm1
xorl %eax, %eax
ucomisd %xmm1, %xmm0
jbe 0x14e1
subl 0x2b79(%rip), %eax      # 0x4058
jmp 0x14ed
ucomisd %xmm0, %xmm1
jbe 0x14ed
movl 0x2b6b(%rip), %eax      # 0x4058
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/misc/maq2sam.c
// Function: maq_delete_maqmap
void maq_delete_maqmap(maqmap_t *mm)
{
	int i;
	if (mm == 0) return;
	for (i = 0; i < mm->n_ref; ++i)
		free(mm->ref_name[i]);
	free(mm->ref_name);
	free(mm->mapped_reads);
	free(mm);
}

// Assembly:
testq %rdi, %rdi
je 0x1303
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x4(%rdi)
jle 0x12e2
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1040
incq %r14
movslq 0x4(%rbx), %rax
cmpq %rax, %r14
jl 0x12c9
movq 0x8(%rbx), %rdi
callq 0x1040
movq 0x18(%rbx), %rdi
callq 0x1040
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1040
retq
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/misc/maq2sam.c
// Function: maqmap_read_header
maqmap_t *maqmap_read_header(gzFile fp)
{
	maqmap_t *mm;
	int k, len;
	mm = maq_new_maqmap();
	gzread(fp, &mm->format, sizeof(int));
	if (mm->format != MAQMAP_FORMAT_NEW) {
		if (mm->format > 0) {
			fprintf(stderr, "** Obsolete map format is detected. Please use 'mapass2maq' command to convert the format.\n");
			exit(3);
		}
		assert(mm->format == MAQMAP_FORMAT_NEW);
	}
	gzread(fp, &mm->n_ref, sizeof(int));
	mm->ref_name = (char**)calloc(mm->n_ref, sizeof(char*));
	for (k = 0; k != mm->n_ref; ++k) {
		gzread(fp, &len, sizeof(int));
		mm->ref_name[k] = (char*)malloc(len * sizeof(char));
		gzread(fp, mm->ref_name[k], len);
	}
	/* read number of mapped reads */
	gzread(fp, &mm->n_mapped_reads, sizeof(uint64_t));
	return mm;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %edi
movl $0x20, %esi
callq 0x10a0
movq %rax, %r14
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x10b0
movl (%r14), %eax
cmpl $-0x1, %eax
jne 0x13e6
leaq 0x4(%r14), %rsi
movq %rbx, %rdi
movl $0x4, %edx
callq 0x10b0
movslq 0x4(%r14), %r15
movl $0x8, %esi
movq %r15, %rdi
callq 0x10a0
movq %rax, 0x8(%r14)
testq %r15, %r15
je 0x13c1
xorl %r13d, %r13d
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl $0x4, %edx
callq 0x10b0
movl 0xc(%rsp), %eax
movslq %eax, %r12
movq %r12, %rdi
callq 0x10e0
movq 0x8(%r14), %rcx
movq %rax, (%rcx,%r13,8)
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rsi
movq %rbx, %rdi
movl %r12d, %edx
callq 0x10b0
incq %r13
movl 0x4(%r14), %eax
cmpq %rax, %r13
jne 0x137b
movq %r14, %rsi
addq $0x10, %rsi
movq %rbx, %rdi
movl $0x8, %edx
callq 0x10b0
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
testl %eax, %eax
jle 0x13ef
callq 0x1130
leaq 0xc6a(%rip), %rdi       # 0x2060
leaq 0xc83(%rip), %rsi       # 0x2080
leaq 0xc86(%rip), %rcx       # 0x208a
movl $0x4b, %edx
callq 0x1090
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/misc/maq2sam.c
// Function: main
int main(int argc, char *argv[])
{
	gzFile fp;
	if (argc == 1) {
		fprintf(stderr, "Version: %s\n", PACKAGE_VERSION);
		fprintf(stderr, "Usage: maq2sam <in.map> [<readGroup>]\n");
		return 1;
	}
	fp = strcmp(argv[1], "-")? gzopen(argv[1], "r") : gzdopen(fileno(stdin), "r");
	maq2tam_core(fp, argc > 2? argv[2] : 0);
	gzclose(fp);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x1, %edi
je 0x1821
movq %rsi, %rbx
movl %edi, %ebp
movq 0x8(%rsi), %rdi
cmpb $0x2d, (%rdi)
jne 0x17c5
cmpb $0x0, 0x1(%rdi)
je 0x1802
leaq 0x9bd(%rip), %rsi       # 0x2189
callq 0x10f0
movq %rax, %r15
xorl %r14d, %r14d
cmpl $0x3, %ebp
jl 0x17e2
movq 0x10(%rbx), %rsi
jmp 0x17e4
xorl %esi, %esi
movq %r15, %rdi
callq 0x140e
movq %r15, %rdi
callq 0x1030
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x27cf(%rip), %rax      # 0x3fd8
movq (%rax), %rdi
callq 0x10d0
leaq 0x971(%rip), %rsi       # 0x2189
movl %eax, %edi
callq 0x1060
jmp 0x17d1
callq 0x1177
movl $0x1, %r14d
jmp 0x17f4
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/test/test-vcf-api.c
// Function: check_alleles
static int check_alleles(bcf1_t *rec, const char **alleles, int num) {
    int i;
    if (rec->n_allele !=  num) {
        fprintf(stderr, "Wrong number of alleles - expected %d, got %d\n",
                num, rec->n_allele);
        return -1;
    }
    if (bcf_unpack(rec, BCF_UN_STR) != 0)
        return -1;
    for (i = 0; i < num; i++) {
        if (0 != strcmp(alleles[i], rec->d.allele[i])) {
            fprintf(stderr,
                    "Mismatch for allele %d : expected '%s' got '%s'\n",
                    i, alleles[i], rec->d.allele[i]);
            return -1;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movl 0x18(%rdi), %ecx
shrl $0x10, %ecx
cmpl %edx, %ecx
jne 0x7326
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %esi
callq 0x3a803
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x7315
testl %ebp, %ebp
je 0x7313
movq 0x88(%r15), %rbx
movl %ebp, %ebp
xorl %r15d, %r15d
movq (%r14,%r15,8), %r12
movq (%rbx,%r15,8), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x46e0
testl %eax, %eax
jne 0x7347
incq %r15
cmpq %r15, %rbp
jne 0x72f4
xorl %ecx, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xcacb3(%rip), %rax     # 0xd1fe0
movq (%rax), %rdi
leaq 0xa5204(%rip), %rsi     # 0xac53b
movl %ebp, %edx
xorl %eax, %eax
callq 0x4720
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
jmp 0x7315
movq 0xcac92(%rip), %rax     # 0xd1fe0
movq (%rax), %rdi
leaq 0xa5212(%rip), %rsi     # 0xac56a
movl %r15d, %edx
movq %r12, %rcx
movq %r13, %r8
xorl %eax, %eax
callq 0x4720
jmp 0x7340
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/test/test-vcf-api.c
// Function: iterator
void iterator(const char *fname)
{
    htsFile *fp = hts_open(fname, "r");
    if (!fp) error("Failed to open \"%s\" : %s", fname, strerror(errno));
    bcf_hdr_t *hdr = bcf_hdr_read(fp);
    if (!hdr) error("bcf_hdr_read : %s", strerror(errno));
    hts_idx_t *idx;
    hts_itr_t *iter;

    bcf_index_build(fname, 0);
    idx = bcf_index_load(fname);

    iter = bcf_itr_queryi(idx, bcf_hdr_name2id(hdr, "20"), 1110600, 1110800);
    bcf_itr_destroy(iter);

    iter = bcf_itr_querys(idx, hdr, "20:1110600-1110800");
    bcf_itr_destroy(iter);

    hts_idx_destroy(idx);
    bcf_hdr_destroy(hdr);
    int ret;
    if ( (ret=hts_close(fp)) )
    {
        fprintf(stderr,"hts_close(%s): non-zero status %d\n",fname,ret);
        exit(ret);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xa7a5c(%rip), %rsi     # 0xaf544
callq 0xbbc0
testq %rax, %rax
je 0x7bb7
movq %rax, %r14
movq %rax, %rdi
callq 0x30c97
testq %rax, %rax
je 0x7bd7
movq %rax, %r15
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3dbfc
movq %rbx, %rdi
xorl %esi, %esi
callq 0x12f71
movq %rax, %r12
leaq 0xa3722(%rip), %rdx     # 0xab24d
movq %r15, %rdi
movl $0x1, %esi
callq 0x2fa59
leaq 0x2b4cf(%rip), %r13     # 0x3300e
movl $0x10f248, %edx         # imm = 0x10F248
movl $0x10f310, %ecx         # imm = 0x10F310
movq %r12, %rdi
movl %eax, %esi
movq %r13, %r8
callq 0xf649
leaq 0x7aec(%rip), %rbp      # 0xf649
movq %rax, %rdi
callq 0x101fd
leaq 0xa3f2c(%rip), %rsi     # 0xaba98
leaq -0x8cc(%rip), %rdx      # 0x72a7
movq %r12, %rdi
movq %r15, %rcx
movq %rbp, %r8
movq %r13, %r9
callq 0x120bd
movq %rax, %rdi
callq 0x101fd
movq %r12, %rdi
callq 0xcf9b
movq %r15, %rdi
callq 0x30af4
movq %r14, %rdi
callq 0xce22
testl %eax, %eax
jne 0x7bf4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0xa2485(%rip), %rdi     # 0xaa04f
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x602c
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0xa3b14(%rip), %rdi     # 0xab6fe
movq %rax, %rsi
xorl %eax, %eax
callq 0x602c
movq %rbx, %rdi
movl %eax, %esi
callq 0x4aa0
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/test/test-vcf-api.c
// Function: check_format_values
void check_format_values(const char *fname)
{
    htsFile *fp = hts_open(fname, "r");
    bcf_hdr_t *hdr = bcf_hdr_read(fp);
    bcf1_t *line = bcf_init();

    while (bcf_read(fp, hdr, line) == 0)
    {
        float *values = 0;
        int count = 0;
        int ret = bcf_get_format_float(hdr, line, "TF", &values, &count);

        // NOTE the return value from bcf_get_format_float is different from
        // bcf_get_info_float in the sense that vector-end markers also count.
        if (ret != 4 ||
            count < ret ||
            !bcf_float_is_missing(values[0]) ||
            values[1] != 47.11f ||
            !bcf_float_is_vector_end(values[2]) ||
            !bcf_float_is_vector_end(values[3]))
        {
            fprintf(stderr, "bcf_get_format_float didn't produce the expected output.\n");
            exit(-1);
        }

        free(values);
    }

    bcf_destroy(line);
    bcf_hdr_destroy(hdr);
    hts_close(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0xa74b2(%rip), %rsi     # 0xaf544
callq 0xbbc0
movq %rax, %rbx
movq %rax, %rdi
callq 0x30c97
movq %rax, %r14
callq 0x31d1e
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x322f9
testl %eax, %eax
jne 0x8155
leaq 0xc(%rsp), %rbp
leaq 0xcb401(%rip), %r12     # 0xd34d0
leaq 0xcb3fe(%rip), %r13     # 0xd34d4
movq $0x0, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movq %r14, %rdi
movq %r15, %rsi
leaq 0xa3b82(%rip), %rdx     # 0xabc76
leaq 0x10(%rsp), %rcx
movq %rbp, %r8
movl $0x2, %r9d
callq 0x431e2
cmpl $0x4, %eax
jne 0x817c
cmpl $0x4, 0xc(%rsp)
jl 0x817c
movq 0x10(%rsp), %rdi
movl (%r12), %eax
cmpl (%rdi), %eax
jne 0x817c
movss 0x4(%rdi), %xmm0
ucomiss 0xa1f1c(%rip), %xmm0    # 0xaa048
jne 0x817c
jp 0x817c
movl 0x8(%rdi), %eax
cmpl %eax, (%r13)
jne 0x817c
cmpl 0xc(%rdi), %eax
jne 0x817c
callq 0x45c0
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x322f9
testl %eax, %eax
je 0x80d6
movq %r15, %rdi
callq 0x31ec9
movq %r14, %rdi
callq 0x30af4
movq %rbx, %rdi
callq 0xce22
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4b38
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/test/test-vcf-api.c
// Function: test_open_format
void test_open_format(void) {
    char mode[5];
    int ret;
    strcpy(mode, "r");
    ret = vcf_open_mode(mode+1, "mode1.bcf", NULL);
    if (strncmp(mode, "rb", 2) || ret)
        error("Mode '%s' does not match the expected value '%s'", mode, "rb");
    mode[1] = 0;
    ret = vcf_open_mode(mode+1, "mode1.vcf", NULL);
    if (strncmp(mode, "r", 1) || ret)
        error("Mode '%s' does not match the expected value '%s'", mode, "r");
    mode[1] = 0;
    ret = vcf_open_mode(mode+1, "mode1.vcf.gz", NULL);
    if (strncmp(mode, "rz", 2) || ret)
        error("Mode '%s' does not match the expected value '%s'", mode, "rz");
    mode[1] = 0;
    ret = vcf_open_mode(mode+1, "mode1.vcf.bgz", NULL);
    if (strncmp(mode, "rz", 2) || ret)
        error("Mode '%s' does not match the expected value '%s'", mode, "rz");
    mode[1] = 0;
    ret = vcf_open_mode(mode+1, "mode1.xcf", NULL);
    if (!ret)
        error("Expected failure for wrong extension 'xcf'");
    mode[1] = 0;
    ret = vcf_open_mode(mode+1, "mode1.vcf.gbz", NULL);
    if (!ret)
        error("Expected failure for wrong extension 'vcf.gbz'");
    mode[1] = 0;
    ret = vcf_open_mode(mode+1, "mode1.bvcf.bgz", NULL);
    if (!ret)
        error("Expected failure for wrong extension 'vcf.bvcf.bgz'");
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0xb(%rsp), %rbx
movw $0x72, -0x1(%rbx)
leaq 0xa3ae8(%rip), %rsi     # 0xabe5b
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3a672
cmpw $0x6272, -0x1(%rbx)     # imm = 0x6272
jne 0x8464
testl %eax, %eax
jne 0x8464
movb $0x0, 0xb(%rsp)
leaq 0xa3af9(%rip), %rsi     # 0xabe96
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3a672
cmpb $0x72, 0xa(%rsp)
jne 0x8474
testl %eax, %eax
jne 0x8474
movb $0x0, 0xb(%rsp)
leaq 0xa3ada(%rip), %rsi     # 0xabea0
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3a672
cmpw $0x7a72, 0xa(%rsp)      # imm = 0x7A72
jne 0x8454
testl %eax, %eax
jne 0x8454
movb $0x0, 0xb(%rsp)
leaq 0xa3ac7(%rip), %rsi     # 0xabeb0
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3a672
cmpw $0x7a72, 0xa(%rsp)      # imm = 0x7A72
jne 0x8454
testl %eax, %eax
jne 0x8454
movb $0x0, 0xb(%rsp)
leaq 0xa3ab2(%rip), %rsi     # 0xabebe
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3a672
testl %eax, %eax
je 0x848e
movb $0x0, 0xb(%rsp)
leaq 0xa3acd(%rip), %rsi     # 0xabef3
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3a672
testl %eax, %eax
je 0x8497
movb $0x0, 0xb(%rsp)
leaq 0xa3af0(%rip), %rsi     # 0xabf30
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3a672
testl %eax, %eax
je 0x84a0
addq $0x10, %rsp
popq %rbx
retq
leaq 0xa3a0a(%rip), %rdi     # 0xabe65
leaq 0xa3a4b(%rip), %rdx     # 0xabead
jmp 0x8482
leaq 0xa39fa(%rip), %rdi     # 0xabe65
leaq 0xa3289(%rip), %rdx     # 0xab6fb
jmp 0x8482
leaq 0xa39ea(%rip), %rdi     # 0xabe65
leaq 0xa70c2(%rip), %rdx     # 0xaf544
leaq 0xa(%rsp), %rsi
xorl %eax, %eax
callq 0x602c
leaq 0xa3a33(%rip), %rdi     # 0xabec8
jmp 0x84a7
leaq 0xa3a63(%rip), %rdi     # 0xabf01
jmp 0x84a7
leaq 0xa3a98(%rip), %rdi     # 0xabf3f
xorl %eax, %eax
callq 0x602c
// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/test/test-vcf-api.c
// Function: main
int main(int argc, char **argv)
{
    char *fname = argc>1 ? argv[1] : "rmme.bcf";

    // format test. quiet unless there's a failure
    test_get_format_values(fname);

    // main test. writes to stdout
    write_bcf(fname);
    bcf_to_vcf(fname);
    iterator(fname);

    // additional tests. quiet unless there's a failure.
    test_get_info_values(fname);
    test_invalid_end_tag();
    test_open_format();
    test_rlen_values();
    return 0;
}

// Assembly:
pushq %rbx
cmpl $0x2, %edi
jl 0x8a4d
movq 0x8(%rsi), %rbx
jmp 0x8a54
leaq 0xa3822(%rip), %rbx     # 0xac276
movq %rbx, %rdi
callq 0x7e7d
movq %rbx, %rdi
callq 0x807d
movq %rbx, %rdi
callq 0x60e8
movq %rbx, %rdi
callq 0x736a
movq %rbx, %rdi
callq 0x7ad3
movq %rbx, %rdi
callq 0x7bfe
callq 0x8193
callq 0x835c
callq 0x84ae
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O3/mjosaarinen[P]brutus/crypto_aead/oceankeyakv2/generic64lc/KeccakP-1600-opt64.c
// Function: KeccakP1600_AddBytesInLane
void KeccakP1600_AddBytesInLane(void *state, unsigned int lanePosition, const unsigned char *data, unsigned int offset, unsigned int length)
{
#if (PLATFORM_BYTE_ORDER == IS_LITTLE_ENDIAN)
    UINT64 lane;
    if (length == 0)
        return;
    if (length == 1)
        lane = data[0];
    else {
        lane = 0;
        memcpy(&lane, data, length);
    }
    lane <<= offset*8;
#else
    UINT64 lane = 0;
    unsigned int i;
    for(i=0; i<length; i++)
        lane |= ((UINT64)data[i]) << ((i+offset)*8);
#endif
    ((UINT64*)state)[lanePosition] ^= lane;
}

// Assembly:
testl %r8d, %r8d
je 0x583e
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0x1, %r8d
jne 0x5807
movzbl (%rdx), %eax
jmp 0x5825
movq %rsp, %r15
movq $0x0, (%r15)
movl %r8d, %eax
movq %r15, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x5650
movq (%r15), %rax
shll $0x3, %r14d
shlxq %r14, %rax, %rax
movl %ebp, %ecx
xorq %rax, (%rbx,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq