LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/readwrite.c
// Function: Write
static int Write(lua_State *L)
    {
    ud_t *ud;
    size_t size;
    sf_count_t frames, nframes = 0;
    sndfile_t sndfile = checksndfile(L, 1, &ud);
    int t = checktype(L, 2);
    const char *ptr = luaL_checklstring(L, 3, &size);
    switch(t)
        {
        case NONSF_TYPE_SHORT:  frames = CheckSize_short(L, 3, ud, size);
                                nframes = sf.writef_short(sndfile, (short*)ptr, frames);
                                break;
        case NONSF_TYPE_INT:    frames = CheckSize_int(L, 3, ud, size);
                                nframes = sf.writef_int(sndfile, (int*)ptr, frames);
                                break;
        case NONSF_TYPE_FLOAT:  frames = CheckSize_float(L, 3, ud, size);
                                nframes = sf.writef_float(sndfile, (float*)ptr, frames);
                                break;
        case NONSF_TYPE_DOUBLE: frames = CheckSize_double(L, 3, ud, size);
                                nframes = sf.writef_double(sndfile, (double*)ptr, frames);
                                break;
        default:
            return luaL_argerror(L, 2, "invalid type");
        }
    lua_pushinteger(L, nframes);
    lua_pushinteger(L, frames);
    return 2;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x34db(%rip), %rcx      # 0xd097
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0x4400
movq %rax, %r14
movq %rbx, %rdi
movl $0x65, %esi
movl $0x2, %edx
callq 0x4130
movl %eax, %r12d
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x3, %esi
callq 0x4380
decl %r12d
cmpl $0x3, %r12d
ja 0x9cd7
movq %rax, %r15
leaq 0x476a(%rip), %rax      # 0xe374
movslq (%rax,%r12,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x8(%rsp), %rcx
movq (%rsp), %rax
movslq 0x2c(%rcx), %rcx
addq %rcx, %rcx
movl $0x90, %r13d
jmp 0x9c74
movq 0x8(%rsp), %rcx
movq (%rsp), %rax
movslq 0x2c(%rcx), %rcx
shlq $0x2, %rcx
movl $0xb0, %r13d
jmp 0x9c74
movq 0x8(%rsp), %rcx
movq (%rsp), %rax
movslq 0x2c(%rcx), %rcx
shlq $0x3, %rcx
movl $0xc0, %r13d
jmp 0x9c74
movq 0x8(%rsp), %rcx
movq (%rsp), %rax
movslq 0x2c(%rcx), %rcx
shlq $0x2, %rcx
movl $0xa0, %r13d
addq 0x9365(%rip), %r13      # 0x12fe0
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
je 0x9c9e
leaq 0x4857(%rip), %rdx      # 0xe4e3
movq %rbx, %rdi
movl $0x3, %esi
callq 0x4110
movslq %eax, %r12
jmp 0x9ca1
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *(%r13)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4320
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4320
movl $0x2, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x47f8(%rip), %rdx      # 0xe4d6
movq %rbx, %rdi
movl $0x2, %esi
callq 0x4110
jmp 0x9cc9
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/readwrite.c
// Function: SetBitrateMode
static int SetBitrateMode(lua_State *L)
    {
    sndfile_t sndfile = checksndfile(L, 1, NULL);
    int val = checkbitratemode(L, 2);
    sf.command(sndfile, SFC_SET_BITRATE_MODE, NULL, val);
    return 0;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x32fc(%rip), %rcx      # 0xd097
movl $0x1, %esi
xorl %edx, %edx
callq 0x4400
movq %rax, %r14
movq %rbx, %rdi
movl $0xc, %esi
movl $0x2, %edx
callq 0x4130
movq 0x921d(%rip), %r8       # 0x12fe0
movq %r14, %rdi
movl $0x1305, %esi           # imm = 0x1305
xorl %edx, %edx
movl %eax, %ecx
callq *0x40(%r8)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/readwrite.c
// Function: GetBitrateMode
static int GetBitrateMode(lua_State *L)
    {
    sndfile_t sndfile = checksndfile(L, 1, NULL);
    int val = sf.command(sndfile, SFC_GET_BITRATE_MODE, NULL, 0);
    pushbitratemode(L, val);
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x32af(%rip), %rcx      # 0xd097
movl $0x1, %esi
xorl %edx, %edx
callq 0x4400
movq 0x91e5(%rip), %r8       # 0x12fe0
movq %rax, %rdi
movl $0x1304, %esi           # imm = 0x1304
xorl %edx, %edx
xorl %ecx, %ecx
callq *0x40(%r8)
movq %rbx, %rdi
movl $0xc, %esi
movl %eax, %edx
callq 0x4120
movl $0x1, %eax
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/sndfile.c
// Function: GetFileinfo
static int GetFileinfo(lua_State *L)
    {
    ud_t *ud;
    sndfile_t sndfile = checksndfile(L, 1, &ud);
    update_sfinfo(L, sndfile, ud);
    pushinfo(L, &ud->sfinfo);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x3149(%rip), %rcx      # 0xd097
movq %rsp, %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x4400
movq (%r14), %rdx
movq 0x9078(%rip), %r8       # 0x12fe0
addq $0x20, %rdx
movq %rax, %rdi
movl $0x1002, %esi           # imm = 0x1002
movl $0x20, %ecx
callq *0x40(%r8)
movq (%r14), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x43b0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/sndfile.c
// Function: GetFormat
static int GetFormat(lua_State *L)
    {
    ud_t *ud;
    sndfile_t sndfile = checksndfile(L, 1, &ud);
    update_sfinfo(L, sndfile, ud);
    pushformat(L, ud->sfinfo.format & SF_FORMAT_TYPEMASK);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x30f0(%rip), %rcx      # 0xd097
movq %rsp, %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x4400
movq (%r14), %rdx
movq 0x901f(%rip), %r8       # 0x12fe0
addq $0x20, %rdx
movq %rax, %rdi
movl $0x1002, %esi           # imm = 0x1002
movl $0x20, %ecx
callq *0x40(%r8)
movq (%r14), %rax
movl $0xfff0000, %edx        # imm = 0xFFF0000
andl 0x30(%rax), %edx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x4120
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/sndfile.c
// Function: GetSubformat
static int GetSubformat(lua_State *L)
    {
    ud_t *ud;
    sndfile_t sndfile = checksndfile(L, 1, &ud);
    update_sfinfo(L, sndfile, ud);
    pushsubformat(L, ud->sfinfo.format & SF_FORMAT_SUBMASK);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x308e(%rip), %rcx      # 0xd097
movq %rsp, %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x4400
movq (%r14), %rdx
movq 0x8fbd(%rip), %r8       # 0x12fe0
addq $0x20, %rdx
movq %rax, %rdi
movl $0x1002, %esi           # imm = 0x1002
movl $0x20, %ecx
callq *0x40(%r8)
movq (%r14), %rax
movzwl 0x30(%rax), %edx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x4120
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/sndfile.c
// Function: GetEndianness
static int GetEndianness(lua_State *L)
    {
    ud_t *ud;
    sndfile_t sndfile = checksndfile(L, 1, &ud);
    update_sfinfo(L, sndfile, ud);
    pushendianness(L, ud->sfinfo.format & SF_FORMAT_ENDMASK);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x3030(%rip), %rcx      # 0xd097
movq %rsp, %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x4400
movq (%r14), %rdx
movq 0x8f5f(%rip), %r8       # 0x12fe0
addq $0x20, %rdx
movq %rax, %rdi
movl $0x1002, %esi           # imm = 0x1002
movl $0x20, %ecx
callq *0x40(%r8)
movq (%r14), %rax
movl $0x30000000, %edx       # imm = 0x30000000
andl 0x30(%rax), %edx
movq %rbx, %rdi
movl $0x3, %esi
callq 0x4120
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/sndfile.c
// Function: GetSeekable
static int GetSeekable(lua_State *L)
    {
    ud_t *ud;
    sndfile_t sndfile = checksndfile(L, 1, &ud);
    update_sfinfo(L, sndfile, ud);
    lua_pushboolean(L, ud->sfinfo.seekable);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2e11(%rip), %rcx      # 0xd097
movq %rsp, %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x4400
movq (%r14), %rdx
movq 0x8d40(%rip), %r8       # 0x12fe0
addq $0x20, %rdx
movq %rax, %rdi
movl $0x1002, %esi           # imm = 0x1002
movl $0x20, %ecx
callq *0x40(%r8)
movq (%r14), %rax
movl 0x38(%rax), %esi
movq %rbx, %rdi
callq 0x4550
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/sndfile.c
// Function: SetString
static int SetString(lua_State *L)
    {
    sndfile_t sndfile = checksndfile(L, 1, NULL);
    int str_type = checkstringtype(L, 2);
    const char *str = luaL_checkstring(L, 3);
    if(sf.set_string(sndfile, str_type, str))
        return sndfileerror(L, sndfile);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x2da8(%rip), %rcx      # 0xd097
movl $0x1, %esi
xorl %edx, %edx
callq 0x4400
movq %rax, %r14
movq %rbx, %rdi
movl $0x4, %esi
movl $0x2, %edx
callq 0x4130
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x4380
movq 0x8cb8(%rip), %rcx      # 0x12fe0
movq %r14, %rdi
movl %ebp, %esi
movq %rax, %rdx
callq *0x58(%rcx)
testl %eax, %eax
je 0xa346
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x4340
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/sndfile.c
// Function: GetString
static int GetString(lua_State *L)
    {
    int str_type = checkstringtype(L, 2);
    sndfile_t sndfile = checksndfile(L, 1, NULL);
    const char *str = sf.get_string(sndfile, str_type);
    if(!str) return 0;
    lua_pushstring(L, str);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x4, %esi
movl $0x2, %edx
callq 0x4130
movl %eax, %ebp
leaq 0x2d2b(%rip), %rcx      # 0xd097
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x4400
movq 0x8c5b(%rip), %rcx      # 0x12fe0
movq %rax, %rdi
movl %ebp, %esi
callq *0x60(%rcx)
testq %rax, %rax
je 0xa3a3
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4780
movl $0x1, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/sndfile.c
// Function: GetEmbedFileInfo
static int GetEmbedFileInfo (lua_State *L)
    {
    SF_EMBED_FILE_INFO info;
    sndfile_t sndfile = checksndfile(L, 1, NULL);
    if(sf.command(sndfile, SFC_GET_EMBED_FILE_INFO, &info, sizeof(info)) != 0)
        return sndfileerror(L, sndfile);
    lua_pushinteger(L, info.offset);
    lua_pushinteger(L, info.length);
    return 2;
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x2cdb(%rip), %rcx      # 0xd097
movl $0x1, %esi
xorl %edx, %edx
callq 0x4400
movq %rax, %r14
movq 0x8c0e(%rip), %rax      # 0x12fe0
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movl $0x10b0, %esi           # imm = 0x10B0
movl $0x10, %ecx
callq *0x40(%rax)
testl %eax, %eax
je 0xa3f8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4340
jmp 0xa417
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4320
movq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x4320
movl $0x2, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/sndfile.c
// Function: freesndfile
static int freesndfile(lua_State *L, ud_t *ud)
    {
    int ec;
    sndfile_t sndfile = (sndfile_t)ud->handle;
    chunknode_t *chunklist = ud->chunklist;
    if(!freeuserdata(L, ud)) return 0;
    TRACE_DELETE(sndfile, "sndfile");
    ec = sf.close(sndfile);
    freechunks(L, chunklist);
    if(ec != 0) 
        return luaL_error(L, sf.error_number(ec));
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %r15
movq 0x40(%rsi), %r14
callq 0x4720
testl %eax, %eax
je 0xa6a4
movq 0x89a9(%rip), %rax      # 0x12ff8
cmpl $0x0, (%rax)
je 0xa665
leaq 0x3f62(%rip), %rdi      # 0xe5bd
movq %r15, %rsi
xorl %eax, %eax
callq 0x4290
movq 0x8974(%rip), %r12      # 0x12fe0
movq %r15, %rdi
callq *0x108(%r12)
movl %eax, %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x47b0
testl %ebp, %ebp
je 0xa6a4
movl %ebp, %edi
callq *0x28(%r12)
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x46c0
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/structs.c
// Function: moonsndfile_pushinfo
int pushinfo(lua_State *L, SF_INFO *p)
    {
    lua_newtable(L);
    lua_pushinteger(L, p->format); lua_setfield(L, -2, "code");
    pushformat(L, FORMAT(p->format)); lua_setfield(L, -2, "format");
    pushsubformat(L, SUBFORMAT(p->format)); lua_setfield(L, -2, "subformat");
    pushendianness(L, ENDIANNESS(p->format)); lua_setfield(L, -2, "endianness");
    lua_pushinteger(L, p->frames); lua_setfield(L, -2, "frames");
    lua_pushinteger(L, p->samplerate); lua_setfield(L, -2, "samplerate");
    lua_pushinteger(L, p->channels); lua_setfield(L, -2, "channels");
    lua_pushinteger(L, p->sections); lua_setfield(L, -2, "sections");
    lua_pushboolean(L, p->seekable); lua_setfield(L, -2, "seekable");
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0x4220
movslq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x4320
leaq 0x3c8c(%rip), %rdx      # 0xe637
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movl $0xfff0000, %edx        # imm = 0xFFF0000
andl 0x10(%r14), %edx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x4120
leaq 0x343f(%rip), %rdx      # 0xde14
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movzwl 0x10(%r14), %edx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x4120
leaq 0x3c58(%rip), %rdx      # 0xe653
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movl $0x30000000, %edx       # imm = 0x30000000
andl 0x10(%r14), %edx
movq %rbx, %rdi
movl $0x3, %esi
callq 0x4120
leaq 0x3469(%rip), %rdx      # 0xde8e
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x4320
leaq 0x3aba(%rip), %rdx      # 0xe4fe
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movslq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x4320
leaq 0x2818(%rip), %rdx      # 0xd27c
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movslq 0xc(%r14), %rsi
movq %rbx, %rdi
callq 0x4320
leaq 0x2739(%rip), %rdx      # 0xd1bd
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movslq 0x14(%r14), %rsi
movq %rbx, %rdi
callq 0x4320
leaq 0x3a61(%rip), %rdx      # 0xe505
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movl 0x18(%r14), %esi
movq %rbx, %rdi
callq 0x4550
leaq 0x3a4a(%rip), %rdx      # 0xe50e
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/structs.c
// Function: moonsndfile_pushformatinfo
int pushformatinfo(lua_State *L, SF_FORMAT_INFO *p)
    {
    lua_newtable(L);
    pushformat(L, p->format); lua_setfield(L, -2, "format");
    lua_pushinteger(L, p->format); lua_setfield(L, -2, "code");
    lua_pushstring(L, p->name); lua_setfield(L, -2, "name");
    lua_pushstring(L, p->extension); lua_setfield(L, -2, "extension");
    GetSubFormats(L, p->format); lua_setfield(L, -2, "subformats"); 
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorl %r12d, %r12d
xorl %esi, %esi
xorl %edx, %edx
callq 0x4220
movl (%r14), %edx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x4120
leaq 0x32ff(%rip), %rdx      # 0xde14
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x4320
leaq 0x3b03(%rip), %rdx      # 0xe637
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x4780
leaq 0x3d53(%rip), %rdx      # 0xe8a7
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x4780
leaq 0x3b27(%rip), %rdx      # 0xe69b
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movl (%r14), %ebp
movq 0x8455(%rip), %r13      # 0x12fe0
leaq 0xc(%rsp), %r14
xorl %edi, %edi
movl $0x1032, %esi           # imm = 0x1032
movq %r14, %rdx
movl $0x4, %ecx
callq *0x40(%r13)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4220
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x40(%rsp)
movl $0x1, 0x3c(%rsp)
cmpl $0x0, (%r14)
jle 0xac50
andl $0xfff0000, %ebp        # imm = 0xFFF0000
leaq 0x10(%rsp), %r14
xorl %r15d, %r15d
movl %r15d, 0x10(%rsp)
xorl %edi, %edi
movl $0x1033, %esi           # imm = 0x1033
movq %r14, %rdx
movl $0x18, %ecx
callq *0x40(%r13)
movl 0x10(%rsp), %eax
orl %ebp, %eax
movl %eax, 0x40(%rsp)
leaq 0x30(%rsp), %rdi
callq *0x48(%r13)
testl %eax, %eax
je 0xac46
xorl %edi, %edi
movl $0x1028, %esi           # imm = 0x1028
movq %r14, %rdx
movl $0x18, %ecx
callq *0x40(%r13)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4330
incl %r12d
movslq %r12d, %rdx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4420
incl %r15d
cmpl 0xc(%rsp), %r15d
jl 0xabe6
leaq 0x3a4e(%rip), %rdx      # 0xe6a5
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movl $0x1, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/structs.c
// Function: moonsndfile_pushsubformatinfo
int pushsubformatinfo(lua_State *L, SF_FORMAT_INFO *p)
    {
    lua_newtable(L);
    pushsubformat(L, p->format); lua_setfield(L, -2, "subformat");
    lua_pushinteger(L, p->format); lua_setfield(L, -2, "code");
    lua_pushstring(L, p->name); lua_setfield(L, -2, "name");
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0x4220
movl (%r14), %edx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x4120
leaq 0x39b1(%rip), %rdx      # 0xe653
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x4320
leaq 0x3976(%rip), %rdx      # 0xe637
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x4780
leaq 0x3bc6(%rip), %rdx      # 0xe8a7
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/structs.c
// Function: moonsndfile_pushsimpleformat
int pushsimpleformat(lua_State *L, SF_FORMAT_INFO *p)
    {
    lua_newtable(L);
    lua_pushinteger(L, p->format); lua_setfield(L, -2, "code");
    lua_pushstring(L, p->name); lua_setfield(L, -2, "name");
    lua_pushstring(L, p->extension); lua_setfield(L, -2, "extension");
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0x4220
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x4320
leaq 0x3917(%rip), %rdx      # 0xe637
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x4780
leaq 0x3b67(%rip), %rdx      # 0xe8a7
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x4780
leaq 0x393b(%rip), %rdx      # 0xe69b
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/structs.c
// Function: moonsndfile_checkchunk
chunknode_t *checkchunk(lua_State *L, int arg)
    {
    const char *id;
    const char *data;
    size_t id_size, datalen;
    chunknode_t *p;
    if(lua_isnoneornil(L, arg))
        { luaL_argerror(L, arg, errstring(ERR_NOTPRESENT)); return NULL; }
    if(lua_type(L, arg) != LUA_TTABLE)
        { luaL_argerror(L, arg, errstring(ERR_TABLE)); return NULL; }

    lua_getfield(L, arg, "id");
    id = luaL_checklstring(L, -1, &id_size);
    if(!id || id_size == 0 || id_size > 64)
        { lua_pop(L, 1); luaL_argerror(L, arg, "missing or invalid 'id' field"); return NULL; }
    lua_pop(L, 1);
    
    lua_getfield(L, arg, "data");
    data = luaL_optlstring(L, -1, NULL, &datalen);
    lua_pop(L, 1);
    
    p = (chunknode_t*)Malloc(L, sizeof(chunknode_t));
    if(id) memcpy(p->chunk.id, id, id_size);
    if(data && datalen > 0)
        {
        p->chunk.data = MallocNoErr(L, datalen);
        if(!p->chunk.data)
            { 
            freechunk(L, p);
            luaL_argerror(L, arg, errstring(ERR_MEMORY)); 
            return NULL;
            }
        memcpy(p->chunk.data, data, datalen);
        }
    return p;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movq %rdi, %r14
callq 0x4730
testl %eax, %eax
jle 0xaec0
movq %r14, %rdi
movl %ebx, %esi
callq 0x4730
cmpl $0x5, %eax
jne 0xaec7
leaq 0x2bd3(%rip), %rdx      # 0xd9b7
movq %r14, %rdi
movl %ebx, %esi
callq 0x47e0
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x4380
movq %rax, %r12
movq (%r15), %r15
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4080
testq %r12, %r12
je 0xaef3
addq $-0x41, %r15
cmpq $-0x41, %r15
jbe 0xaef3
leaq 0x34ec(%rip), %rdx      # 0xe320
movq %r14, %rdi
movl %ebx, %esi
callq 0x47e0
leaq 0x8(%rsp), %rbp
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
movq %rbp, %rcx
callq 0x4270
movq %rax, %r13
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4080
movl $0x58, %esi
movq %r14, %rdi
callq 0x41e0
movq %rax, %r15
leaq 0x8(%rax), %rdi
movq 0x10(%rsp), %rdx
movq %r12, %rsi
callq 0x44b0
testq %r13, %r13
setne %al
movq (%rbp), %rsi
testq %rsi, %rsi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xaee1
movq %r14, %rdi
callq 0x4390
movq %rax, 0x50(%r15)
testq %rax, %rax
je 0xaf01
movq 0x8(%rsp), %rdx
movq %rax, %rdi
movq %r13, %rsi
callq 0x44b0
jmp 0xaee1
movl $0x1, %edi
jmp 0xaecc
movl $0xfffffffc, %edi       # imm = 0xFFFFFFFC
callq 0x4660
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
callq 0x4110
xorl %r15d, %r15d
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x37b6(%rip), %rdx      # 0xe6b0
movq %r14, %rdi
movl %ebx, %esi
jmp 0xaed9
movq %r14, %rdi
movq %r15, %rsi
callq 0x4240
movl $0xfffffffa, %edi       # imm = 0xFFFFFFFA
jmp 0xaecc
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/structs.c
// Function: moonsndfile_pushchunk
int pushchunk(lua_State *L, chunk_t *p)
    {
    lua_newtable(L);
    lua_pushlstring(L, p->id, p->id_size);
    lua_setfield(L, -2, "id");
    if(p->data && p->datalen > 0)
        {
        lua_pushlstring(L, (const char*)p->data, p->datalen);
        lua_setfield(L, -2, "data");
        }
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0x4220
movl 0x40(%r14), %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4650
leaq 0x2a7b(%rip), %rdx      # 0xd9b7
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movq 0x48(%r14), %rsi
testq %rsi, %rsi
je 0xaf77
movl 0x44(%r14), %edx
testq %rdx, %rdx
je 0xaf77
movq %rbx, %rdi
callq 0x4650
leaq 0x33b6(%rip), %rdx      # 0xe320
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4300
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/utils.c
// Function: moonsndfile_tablelen
int tablelen(lua_State *L, int arg)
/* counts the elements of the table at arg */
    {
    int n = 0;
    if(!lua_istable(L, arg))
        return luaL_error(L, errstring(ERR_TABLE));
    lua_pushnil(L);
    while(lua_next(L, arg) != 0)
        { lua_pop(L, 1); n++; }
    return n;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0x4730
cmpl $0x5, %eax
jne 0xbc85
movq %rbx, %rdi
callq 0x46d0
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4150
xorl %r14d, %r14d
testl %eax, %eax
je 0xbc9a
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4080
incl %r14d
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4150
jmp 0xbc65
leaq 0x2b8c(%rip), %rsi      # 0xe818
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x46c0
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/utils.c
// Function: moonsndfile_testboolean
int testboolean(lua_State *L, int arg, int *err)
    {
    if(!lua_isboolean(L, arg))
        { *err = ERR_TYPE; return 0; }
    *err = 0;
    return lua_toboolean(L, arg);
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0x4730
cmpl $0x1, %eax
jne 0xbf37
movl $0x0, (%rbx)
movq %r14, %rdi
movl %ebp, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x40d0
movl $0xfffffffe, (%rbx)     # imm = 0xFFFFFFFE
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/utils.c
// Function: moonsndfile_nil_sndfileerror
int nil_sndfileerror(lua_State *L, sndfile_t sndfile)
    { 
    const char *str = sf.strerror(sndfile);
    lua_pushnil(L);
    lua_pushstring(L, str ? str : "unknown error");
    return 2;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x7034(%rip), %rax      # 0x12fe0
movq %rsi, %rdi
callq *0x20(%rax)
movq %rax, %r14
movq %rbx, %rdi
callq 0x46d0
testq %r14, %r14
leaq 0x28e9(%rip), %rsi      # 0xe8b0
cmovneq %r14, %rsi
movq %rbx, %rdi
callq 0x4780
movl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonsndfile/src/version.c
// Function: VersionNumbers
static int VersionNumbers(lua_State *L)
    {
    lua_pushinteger(L, VerMajor);
    lua_pushinteger(L, VerMinor);
    lua_pushinteger(L, VerPatch);
    return 3;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x7478(%rip), %esi      # 0x1358c
callq 0x4320
movl 0x7471(%rip), %esi      # 0x13590
movq %rbx, %rdi
callq 0x4320
movl 0x7467(%rip), %esi      # 0x13594
movq %rbx, %rdi
callq 0x4320
movl $0x3, %eax
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/agl[P]obstcp/obstcp-redir.c
// Function: connect_cb
static void
connect_cb(int fd, short events, void *arg) {
  struct connection *conn = (struct connection *) arg;

  int err;
  socklen_t errlen = sizeof(err);
  if (getsockopt(conn->outfd, SOL_SOCKET, SO_ERROR, &err, &errlen)) {
    perror("getsockopt for connection result");
    connection_free(conn);
    return;
  }

  if (err) {
    fprintf(stderr, "Connection error: %s\n", strerror(err));
    connection_free(conn);
    return;
  }

  connection_setevents(conn);

  return;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
leaq 0xc(%rsp), %r8
movl $0x4, (%r8)
movl 0x1cc(%rdx), %edi
leaq 0x8(%rsp), %rcx
movl $0x1, %esi
movl $0x4, %edx
callq 0x1100
testl %eax, %eax
jne 0x18b9
movl 0x8(%rsp), %edi
testl %edi, %edi
jne 0x18cf
movq %rbx, %rdi
callq 0x18d9
addq $0x10, %rsp
popq %rbx
retq
leaq 0x686e(%rip), %rdi      # 0x812e
callq 0x11c0
movq %rbx, %rdi
callq 0x19cd
jmp 0x18b3
movq %rbx, %rsi
callq 0x1345
jmp 0x18b3
// File: /workspace/github_c_makefile_star2_O1/agl[P]obstcp/obstcp-redir.c
// Function: connection_setevents
static void
connection_setevents(struct connection *conn) {
  const short outev = (conn->outqlen < QUEUE_MAX ? EV_READ : 0) |
                      EV_PERSIST |
                      (conn->outqhead ? EV_WRITE : 0);
  const short obsev = (conn->obsqlen < QUEUE_MAX ? EV_READ : 0) |
                      EV_PERSIST |
                      (conn->obsqhead ? EV_WRITE : 0);

  if (conn->outevent.ev_events != outev) {
    if (conn->outevent.ev_events) {
      event_del(&conn->outevent);
    }
    event_set(&conn->outevent, conn->outfd, outev, connection_out_cb, conn);
    event_add(&conn->outevent, NULL);
  }

  if (conn->obsevent.ev_events != obsev) {
    if (conn->obsevent.ev_events) {
      event_del(&conn->obsevent);
    }
    event_set(&conn->obsevent, conn->fd, obsev, connection_obs_cb, conn);
    event_add(&conn->obsevent, NULL);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x8000, %eax           # imm = 0x8000
xorl %ecx, %ecx
cmpl %eax, 0x300(%rdi)
setb %cl
xorl %edx, %edx
cmpq $0x0, 0x2d0(%rdi)
setne %dl
shll $0x2, %edx
leal (%rdx,%rcx,2), %r15d
addl $0x10, %r15d
xorl %ecx, %ecx
cmpl %eax, 0x304(%rdi)
setb %cl
xorl %eax, %eax
cmpq $0x0, 0x2e0(%rdi)
setne %al
shll $0x2, %eax
leal (%rax,%rcx,2), %ebp
addl $0x10, %ebp
movzwl 0x2b8(%rdi), %eax
cmpw %r15w, %ax
je 0x1973
leaq 0x250(%rbx), %r14
testw %ax, %ax
je 0x194d
movq %r14, %rdi
callq 0x10a0
movl 0x1cc(%rbx), %esi
movzwl %r15w, %edx
leaq 0x10b(%rip), %rcx       # 0x1a69
movq %r14, %rdi
movq %rbx, %r8
callq 0x1190
movq %r14, %rdi
xorl %esi, %esi
callq 0x1120
movzwl 0x238(%rbx), %eax
cmpw %bp, %ax
jne 0x198a
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1d0(%rbx), %r14
testw %ax, %ax
je 0x199e
movq %r14, %rdi
callq 0x10a0
movl 0x1c8(%rbx), %esi
movzwl %bp, %edx
leaq 0x285(%rip), %rcx       # 0x1c33
movq %r14, %rdi
movq %rbx, %r8
callq 0x1190
movq %r14, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1120
// File: /workspace/github_c_makefile_star2_O1/agl[P]obstcp/obstcp-redir.c
// Function: connection_free
static void
connection_free(struct connection *conn) {
  struct chunk *c, *next;

  if (conn->outevent.ev_events) {
    event_del(&conn->outevent);
  }

  if (conn->obsevent.ev_events) {
    event_del(&conn->obsevent);
  }

  close(conn->fd);
  close(conn->outfd);

  for (c = conn->outqhead; c; c = next) {
    next = c->next;
    free(c);
  }

  for (c = conn->obsqhead; c; c = next) {
    next = c->next;
    free(c);
  }

  obstcp_rbuf_free(&conn->rbuf);

  free(conn);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpw $0x0, 0x2b8(%rdi)
je 0x19ea
leaq 0x250(%rbx), %rdi
callq 0x10a0
cmpw $0x0, 0x238(%rbx)
je 0x1a00
leaq 0x1d0(%rbx), %rdi
callq 0x10a0
movl 0x1c8(%rbx), %edi
callq 0x10e0
movl 0x1cc(%rbx), %edi
callq 0x10e0
movq 0x2d0(%rbx), %rdi
testq %rdi, %rdi
je 0x1a32
movq (%rdi), %r14
callq 0x1030
movq %r14, %rdi
testq %r14, %r14
jne 0x1a22
movq 0x2e0(%rbx), %rdi
testq %rdi, %rdi
je 0x1a4e
movq (%rdi), %r14
callq 0x1030
movq %r14, %rdi
testq %r14, %r14
jne 0x1a3e
leaq 0x198(%rbx), %rdi
callq 0x3de8
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/agl[P]obstcp/obstcp-redir.c
// Function: connection_obs_cb
static void
connection_obs_cb(int fd, short events, void *arg) {
  struct connection *conn = (struct connection *) arg;

  if (EV_READ & events) {
    int queued;
    if (ioctl(conn->fd, SIOCINQ, &queued)) {
      perror("ioctl");
      connection_free(conn);
      return;
    }
    if (!queued) queued = 16;

    struct chunk *c = malloc(sizeof(struct chunk) + queued);
    if (!c) return;
    memset(c, 0, sizeof(struct chunk));

    const ssize_t n =
      obstcp_rbuf_read_fd(&conn->rbuf, conn->fd, c->data, queued);

    if (n < 0) {
      if (errno == EAGAIN || errno == EWOULDBLOCK) return;
      perror("read");
      free(c);
      connection_free(conn);
      return;
    } else if (n == 0) {
      free(c);
      connection_free(conn);
      return;
    } else {
      c->length = n;
      const char was_empty_q = conn->outqhead ? 0 : 1;

      conn->outqlen += c->length;
      if (conn->pendingqhead) {
        chunks_move(&conn->outqhead, &conn->outqtail,
                    &conn->pendingqhead, &conn->pendingqtail);
      }
      chunk_nq(c, &conn->outqhead, &conn->outqtail);
      if (was_empty_q) if (!connection_out_write(conn)) return;
    }
  }

  if (EV_WRITE & events) {
    if (!connection_obs_write(conn)) return;
  }

  connection_setevents(conn);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
testb $0x2, %bpl
jne 0x1c69
movzwl %bp, %eax
testb $0x4, %al
je 0x1c5c
movq %rbx, %rdi
callq 0x1dcd
testl %eax, %eax
je 0x1dc2
movq %rbx, %rdi
callq 0x18d9
jmp 0x1dc2
movl 0x1c8(%rbx), %edi
leaq 0x4(%rsp), %rdx
movl $0x541b, %esi           # imm = 0x541B
xorl %eax, %eax
callq 0x10d0
testl %eax, %eax
jne 0x1dae
cmpl $0x0, 0x4(%rsp)
jne 0x1c97
movl $0x10, 0x4(%rsp)
movslq 0x4(%rsp), %r15
leaq 0x18(%r15), %rdi
callq 0x1160
testq %rax, %rax
je 0x1dc2
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
leaq 0x198(%rbx), %rdi
movl 0x1c8(%rbx), %esi
movq %rax, %rdx
addq $0x18, %rdx
movq %r15, %rcx
callq 0x41fe
testq %rax, %rax
js 0x1d8e
je 0x1da4
movl %eax, 0x10(%r14)
movq 0x2d0(%rbx), %rcx
movq 0x2f0(%rbx), %rdx
addl %eax, 0x300(%rbx)
testq %rdx, %rdx
je 0x1d49
leaq 0x2f0(%rbx), %rax
movq (%rdx), %rsi
movq 0x2d8(%rbx), %rdi
movq %rdi, 0x8(%rdx)
movq $0x0, (%rdx)
movq %rdx, 0x2d8(%rbx)
cmpq $0x0, 0x2d0(%rbx)
jne 0x1d3b
movq %rdx, 0x2d0(%rbx)
movq %rsi, %rdx
testq %rsi, %rsi
jne 0x1d0e
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq 0x2d8(%rbx), %rax
movq %rax, 0x8(%r14)
movq $0x0, (%r14)
movq %r14, 0x2d8(%rbx)
cmpq $0x0, 0x2d0(%rbx)
jne 0x1d73
movq %r14, 0x2d0(%rbx)
testq %rcx, %rcx
jne 0x1c45
movq %rbx, %rdi
callq 0x1e52
testl %eax, %eax
jne 0x1c45
jmp 0x1dc2
callq 0x1050
cmpl $0xb, (%rax)
je 0x1dc2
leaq 0x63cc(%rip), %rdi      # 0x816b
callq 0x11c0
movq %r14, %rdi
callq 0x1030
jmp 0x1dba
leaq 0x63b0(%rip), %rdi      # 0x8165
callq 0x11c0
movq %rbx, %rdi
callq 0x19cd
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/agl[P]obstcp/obstcp-redir.c
// Function: connection_obs_write
static int
connection_obs_write(struct connection *conn) {
  struct chunk *c, *next;
  for (c = conn->obsqhead; c; c = next) {
    next = c->next;
    if (!connection_write(c, conn->fd)) {
      connection_free(conn);
      return 0;
    }
    if (c->done == c->length) {
      conn->obsqlen -= c->length;
      chunk_free(&conn->obsqhead, &conn->obsqtail);
    } else {
      break;
    }
  }

  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x2e0(%rdi), %r13
movl $0x1, %ebx
testq %r13, %r13
je 0x1e41
movq %rdi, %r14
leaq 0x2e0(%rdi), %r15
leaq 0x2e8(%rdi), %r12
movq (%r13), %rbp
movl 0x1c8(%r14), %esi
movq %r13, %rdi
callq 0x1ed7
testl %eax, %eax
je 0x1e37
movl 0x10(%r13), %eax
cmpl %eax, 0x14(%r13)
jne 0x1e41
subl %eax, 0x304(%r14)
movq %r15, %rdi
movq %r12, %rsi
callq 0x1f45
movq %rbp, %r13
testq %rbp, %rbp
jne 0x1dfa
jmp 0x1e41
movq %r14, %rdi
callq 0x19cd
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/agl[P]obstcp/obstcp-redir.c
// Function: connection_out_write
static int
connection_out_write(struct connection *conn) {
  struct chunk *c, *next;
  for (c = conn->outqhead; c; c = next) {
    next = c->next;
    if (!connection_write(c, conn->outfd)) {
      connection_free(conn);
      return 0;
    }
    if (c->done == c->length) {
      conn->outqlen -= c->length;
      chunk_free(&conn->outqhead, &conn->outqtail);
    } else {
      break;
    }
  }

  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x2d0(%rdi), %r13
movl $0x1, %ebx
testq %r13, %r13
je 0x1ec6
movq %rdi, %r14
leaq 0x2d0(%rdi), %r15
leaq 0x2d8(%rdi), %r12
movq (%r13), %rbp
movl 0x1cc(%r14), %esi
movq %r13, %rdi
callq 0x1ed7
testl %eax, %eax
je 0x1ebc
movl 0x10(%r13), %eax
cmpl %eax, 0x14(%r13)
jne 0x1ec6
subl %eax, 0x300(%r14)
movq %r15, %rdi
movq %r12, %rsi
callq 0x1f45
movq %rbp, %r13
testq %rbp, %rbp
jne 0x1e7f
jmp 0x1ec6
movq %r14, %rdi
callq 0x19cd
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/agl[P]obstcp/obstcp-redir.c
// Function: connection_write
static int
connection_write(struct chunk *c, int fd) {
  if (c->length == c->done) return 1;

  ssize_t n;
  do {
    n = write(fd, c->data + c->done, c->length - c->done);
  } while (n == -1 && errno == EINTR);

  if (n < 0) {
    if (errno == EAGAIN || errno == EWOULDBLOCK) return 1;
    return 0;
  } else if (n == 0) {
    return 0;
  } else {
    c->done += n;
    return 1;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x10(%rdi), %eax
movl $0x1, %ebx
cmpl 0x14(%rdi), %eax
je 0x1f3a
movl %esi, %ebp
movq %rdi, %r14
leaq 0x18(%rdi), %r12
movl 0x10(%r14), %edx
movl 0x14(%r14), %esi
subl %esi, %edx
addq %r12, %rsi
movl %ebp, %edi
callq 0x1090
movq %rax, %r15
cmpq $-0x1, %rax
jne 0x1f1c
callq 0x1050
cmpl $0x4, (%rax)
je 0x1ef5
testq %r15, %r15
js 0x1f29
je 0x1f38
addl %r15d, 0x14(%r14)
jmp 0x1f3a
callq 0x1050
xorl %ebx, %ebx
cmpl $0xb, (%rax)
sete %bl
jmp 0x1f3a
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/agl[P]obstcp/obstcp-redir.c
// Function: chunk_free
static void
chunk_free(struct chunk **head, struct chunk **tail) {
  if ((*head)->next)
    (*head)->next->last = NULL;

  struct chunk *next = (*head)->next;
  free(*head);

  if (*tail == *head) *tail = NULL;
  *head = next;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x1f63
movq $0x0, 0x8(%rax)
movq (%rbx), %rdi
movq (%rdi), %r15
callq 0x1030
movq (%r14), %rax
cmpq (%rbx), %rax
jne 0x1f7d
movq $0x0, (%r14)
movq %r15, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/os/qq_alloc.c
// Function: qq_alloc
void *
qq_alloc(size_t size)
{
    void  *p;

    p = malloc(size);
    if (p == NULL) {
        qq_log_error(errno, "malloc(%uz) failed", size);
    }

    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x2340
movq %rax, %rbx
testq %rax, %rax
jne 0x246b
callq 0x2030
movl (%rax), %edi
leaq 0x7ba3(%rip), %rsi      # 0xa004
movq %r14, %rdx
xorl %eax, %eax
callq 0x6c5d
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/os/qq_alloc.c
// Function: qq_calloc
void *
qq_calloc(size_t size)
{
    void  *p;

    p = qq_alloc(size);

    if (p) {
        memset(p, 0, size);
    }

    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x243c
testq %rax, %rax
je 0x2499
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2160
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/os/qq_alloc.c
// Function: qq_memalign
void *
qq_memalign(size_t alignment, size_t size)
{
    void  *p;

    p = memalign(alignment, size);
    if (p == NULL) {
        qq_log_error(errno, "memalign(%uz, %uz) failed", alignment, size);
    }

    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
callq 0x22b0
movq %rax, %r14
testq %rax, %rax
jne 0x24d8
callq 0x2030
movl (%rax), %edi
leaq 0x7b4c(%rip), %rsi      # 0xa017
movq %r15, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x6c5d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/app/qq_android_app.c
// Function: qq_android_app_init
qq_int_t
qq_android_app_init(qq_cycle_t *cycle)
{
    if (qq_add_listening_config(SOCK_STREAM,
        QQ_ANDROID_APP_TCP_LISTENING_PORT,
        QQ_ANDROID_APP_TCP_LISTENING_POOL_SIZE,
        qq_android_app_init_connection_handler) == QQ_ERROR)
    {
        qq_log_error(0, "qq_android_app_init()->qq_add_listening_config() failed");
        return QQ_ERROR;
    }

    return QQ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x37(%rip), %rcx        # 0x252a
movl $0x400, %edx            # imm = 0x400
movl $0x1, %edi
movl $0x2af8, %esi           # imm = 0x2AF8
callq 0x659c
cmpq $-0x1, %rax
je 0x2511
xorl %eax, %eax
jmp 0x2528
leaq 0x7b19(%rip), %rsi      # 0xa031
xorl %edi, %edi
xorl %eax, %eax
callq 0x6c5d
movq $-0x1, %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/app/qq_android_app.c
// Function: qq_android_app_init_connection_handler
static void
qq_android_app_init_connection_handler(qq_connection_t *c)
{
    qq_event_t   *rev, *wev;

    qq_log_debug("qq_android_app_init_connection_handler()");

    rev = c->read;
    rev->handler = qq_android_app_read_event_handler;

    wev = c->write;
    wev->handler = qq_android_app_write_event_handler;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x7b45(%rip), %rdi      # 0xa07f
xorl %eax, %eax
callq 0x6daa
movq 0x8(%rbx), %rax
leaq 0x3b(%rip), %rcx        # 0x2587
movq %rcx, 0x10(%rax)
movq 0x10(%rbx), %rax
leaq 0x74(%rip), %rcx        # 0x25cf
movq %rcx, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/app/qq_android_app.c
// Function: qq_android_app_read_event_handler
static void
qq_android_app_read_event_handler(qq_event_t *ev)
{
    qq_log_debug("qq_android_app_read_event_handler()");

    qq_connection_t   *c;
    u_char             buf[3];
    int                len;

    c = ev->data;
    len = c->recv(c, buf, 3);

    c->send(c, buf, 3);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x7b0c(%rip), %rdi      # 0xa0a8
xorl %eax, %eax
callq 0x6daa
movq (%rbx), %rbx
leaq -0x13(%rbp), %r14
movl $0x3, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x28(%rbx)
movl $0x3, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x30(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/app/qq_app.c
// Function: qq_app_init
qq_int_t
qq_app_init(qq_cycle_t *cycle)
{
    if (qq_mysql_init() == QQ_ERROR) {
        qq_log_error(0, "qq_mysql_init() failed");
        return QQ_ERROR;
    }

    if (qq_ios_app_init(cycle) == QQ_ERROR) {
        qq_log_error(0, "qq_ios_app_init() failed");
        return QQ_ERROR;
    }

    if (qq_android_app_init(cycle) == QQ_ERROR) {
        qq_log_error(0, "qq_android_app_init() failed");
        return QQ_ERROR;
    }

    if (qq_wifi_device_init(cycle) == QQ_ERROR) {
        qq_log_error(0, "qq_wifi_device_init() failed");
        return QQ_ERROR;
    }

    if (qq_video_audio_device_init(cycle) == QQ_ERROR) {
        qq_log_error(0, "qq_video_audio_device_init() failed");
        return QQ_ERROR;
    }

    return QQ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x7ae4
cmpq $-0x1, %rax
je 0x2634
movq %rbx, %rdi
callq 0x3bdc
cmpq $-0x1, %rax
je 0x263d
movq %rbx, %rdi
callq 0x24e8
cmpq $-0x1, %rax
je 0x2646
movq %rbx, %rdi
callq 0x8eb0
cmpq $-0x1, %rax
je 0x264f
movq %rbx, %rdi
callq 0x8e1c
cmpq $-0x1, %rax
je 0x2658
xorl %eax, %eax
jmp 0x266f
leaq 0x7ab6(%rip), %rsi      # 0xa0f1
jmp 0x265f
leaq 0x7ac4(%rip), %rsi      # 0xa108
jmp 0x265f
leaq 0x7ad4(%rip), %rsi      # 0xa121
jmp 0x265f
leaq 0x7ae8(%rip), %rsi      # 0xa13e
jmp 0x265f
leaq 0x7afc(%rip), %rsi      # 0xa15b
xorl %edi, %edi
xorl %eax, %eax
callq 0x6c5d
movq $-0x1, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/app/qq_app.c
// Function: qq_app_done
void
qq_app_done(qq_cycle_t *cycle)
{
    qq_log_debug("qq_app_done()");

    qq_mysql_close();
    qq_ios_app_done();
    qq_android_app_done();
    qq_wifi_device_done();
    qq_video_audio_device_done();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x7afe(%rip), %rdi      # 0xa17f
xorl %eax, %eax
callq 0x6daa
callq 0x7b7f
callq 0x3cb7
callq 0x2566
callq 0x905d
popq %rbp
jmp 0x8e9b
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/app/qq_app.c
// Function: qq_app_close_connection
void
qq_app_close_connection(qq_connection_t *c)
{
    qq_pool_t  *pool;

    qq_log_debug("qq_app_close_connection(fd:%d)", c->fd);

    c->destroyed = 1;

    pool = c->pool;

    qq_close_connection(c);

    qq_destroy_pool(pool);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x18(%rdi), %esi
leaq 0x7ad7(%rip), %rdi      # 0xa18d
xorl %eax, %eax
callq 0x6daa
orb $0x4, 0x98(%rbx)
movq 0x40(%rbx), %r14
movq %rbx, %rdi
callq 0x285e
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2338
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/core/qq_buf.c
// Function: qq_create_temp_buf
qq_buf_t *
qq_create_temp_buf(qq_pool_t *pool, size_t size)
{
    qq_buf_t *b;

    b = qq_calloc_buf(pool);
    if (b == NULL) {
        return NULL;
    }

    b->start = qq_palloc(pool, size);
    if (b->start == NULL) {
        return NULL;
    }

    b->pos = b->start;
    b->last = b->start;
    b->end = b->last + size;
    b->temporary = 1;

    return b;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl $0x38, %esi
callq 0x7e46
testq %rax, %rax
je 0x2726
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x7e00
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x2726
movq %rax, (%rbx)
movq %rax, 0x8(%rbx)
addq %rax, %r14
movq %r14, 0x28(%rbx)
orb $0x1, 0x30(%rbx)
jmp 0x2728
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/qq-smart[P]qq_sh_server/core/qq_connection.c
// Function: qq_get_connection
qq_connection_t *
qq_get_connection(qq_socket_t s)
{
    qq_uint_t         instance;
    qq_event_t       *rev, *wev;
    qq_connection_t  *c;

    c = qq_cycle->free_connections;
    if (c == NULL) {
        qq_log_error(0, 
                     "qq_get_connection(connection_n:%u) worker_connections are not enough",
                     qq_cycle->connection_n);

        return NULL;
    }

    qq_cycle->free_connections = c->data;
    qq_cycle->free_connection_n--;

    rev = c->read;
    wev = c->write;

    memset(c, 0, sizeof(qq_connection_t));

    c->read = rev;
    c->write = wev;
    c->fd = s;

    instance = rev->instance;

    memset(rev, 0, sizeof(qq_event_t));
    memset(wev, 0, sizeof(qq_event_t));

    rev->instance = !instance;
    wev->instance = !instance;

    rev->index = QQ_INVALID_INDEX;
    wev->index = QQ_INVALID_INDEX;

    rev->data = c;
    wev->data = c;

    wev->write = 1;

    return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0xcb63(%rip), %rax      # 0xf2b0
movq (%rax), %rax
movq 0x18(%rax), %rbx
testq %rbx, %rbx
je 0x2814
movl %edi, %r14d
movq (%rbx), %rcx
movq %rcx, 0x18(%rax)
decq 0x20(%rax)
movq 0x8(%rbx), %r12
movq 0x10(%rbx), %r15
xorl %r13d, %r13d
movl $0xa0, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2160
movq %r12, 0x8(%rbx)
movq %r15, 0x10(%rbx)
movl %r14d, 0x18(%rbx)
movl 0x8(%r12), %eax
notl %eax
movq %r13, 0x50(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%r12)
movups %xmm0, 0x30(%r12)
movups %xmm0, 0x20(%r12)
movups %xmm0, 0x10(%r12)
movups %xmm0, (%r12)
movups %xmm0, (%r15)
movups %xmm0, 0x10(%r15)
movups %xmm0, 0x20(%r15)
movups %xmm0, 0x30(%r15)
movups %xmm0, 0x40(%r15)
movq %r13, 0x50(%r15)
andl $0x4, %eax
movl 0x8(%r12), %ecx
andl $-0x5, %ecx
orl %eax, %ecx
movl %ecx, 0x8(%r12)
movl 0x8(%r15), %ecx
andl $-0x5, %ecx
orl %eax, %ecx
movl %ecx, 0x8(%r15)
movl $0xd0d0d0d0, %eax       # imm = 0xD0D0D0D0
movq %rax, 0x18(%r12)
movq %rax, 0x18(%r15)
movq %rbx, (%r12)
movq %rbx, (%r15)
orb $0x1, 0x8(%r15)
jmp 0x282a
movq 0x8(%rax), %rdx
leaq 0x798d(%rip), %rsi      # 0xa1ac
xorl %ebx, %ebx
xorl %edi, %edi
xorl %eax, %eax
callq 0x6c5d
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq