LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/ftpproto.c
// Function: do_rnfr
void do_rnfr(session_t *sess)
{
    if ( NULL == sess->rn_filepath ) 
        sess->rn_filepath = (char*)malloc(strlen(sess->arg));
    else 
    {
        free(sess->rn_filepath);
        sess->rn_filepath = (char*)malloc(strlen(sess->arg) + 2);
    }

    strcpy(sess->rn_filepath,sess->arg);

    ftp_reply(sess,FTP_RESTOK,"Ready for RNTO.");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0xc28(%rdi), %rdi
testq %rdi, %rdi
je 0x6151
callq 0x3040
leaq 0x818(%rbx), %rdi
callq 0x3180
addq $0x2, %rax
jmp 0x615d
leaq 0x818(%rbx), %rdi
callq 0x3180
movq %rax, %rdi
callq 0x3390
movq %rax, 0xc28(%rbx)
leaq 0x818(%rbx), %rsi
movq %rax, %rdi
callq 0x3090
leaq 0x2641(%rip), %rdx      # 0x87c3
movq %rbx, %rdi
movl $0x15e, %esi            # imm = 0x15E
popq %rbx
jmp 0x4d4c
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/ftpproto.c
// Function: do_rnto
void do_rnto(session_t *sess)
{
    if ( NULL == sess->rn_filepath) 
    {
        ftp_reply(sess,FTP_NEEDRNFR,"RNFR required first.");
        return;
    }

    if ( -1 == rename(sess->rn_filepath,sess->arg))
    {
        printf("oripath:%s\t,detpath:%s\n",sess->rn_filepath,sess->arg);
        ftp_reply(sess,FTP_FILEFAIL,"Rename failed.");
    }
    else
        ftp_reply(sess,FTP_RENAMEOK,"Rename successful.");

    free(sess->rn_filepath);
    sess->rn_filepath = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xc28(%rdi), %rdi
testq %rdi, %rdi
je 0x61c8
leaq 0x818(%rbx), %r14
movq %r14, %rsi
callq 0x3470
cmpl $-0x1, %eax
je 0x61e3
leaq 0x2651(%rip), %rdx      # 0x880f
movq %rbx, %rdi
movl $0xfa, %esi
jmp 0x620a
leaq 0x2604(%rip), %rdx      # 0x87d3
movq %rbx, %rdi
movl $0x1f7, %esi            # imm = 0x1F7
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4d4c
movq 0xc28(%rbx), %rsi
leaq 0x25f7(%rip), %rdi      # 0x87e8
movq %r14, %rdx
xorl %eax, %eax
callq 0x31c0
leaq 0x25fe(%rip), %rdx      # 0x8800
movq %rbx, %rdi
movl $0x226, %esi            # imm = 0x226
callq 0x4d4c
movq 0xc28(%rbx), %rdi
callq 0x3040
movq $0x0, 0xc28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/ftpproto.c
// Function: do_feat
void do_feat(session_t *sess)
{
    ftp_lreply(sess,FTP_FEAT,"Features");
    writen(sess->ctrlfd," EPRT\r\n",strlen(" EPRT\r\n"));
    writen(sess->ctrlfd," EPSV\r\n",strlen(" EPSV\r\n"));
    writen(sess->ctrlfd," MDTM\r\n",strlen(" MDTM\r\n"));
    writen(sess->ctrlfd," PASV\r\n",strlen(" PASV\r\n"));
    writen(sess->ctrlfd," REST STREAM\r\n",strlen(" REST STREAM\r\n"));
    writen(sess->ctrlfd," SIZE\r\n",strlen(" SIZE\r\n"));
    writen(sess->ctrlfd," TVFS\r\n",strlen(" PASV\r\n"));
    writen(sess->ctrlfd," UTF8\r\n",strlen(" UTF8\r\n"));
    ftp_reply(sess,FTP_FEAT,"End");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x23ed(%rip), %rdx      # 0x88dc
movl $0xd3, %esi
callq 0x4dbd
movl 0x8(%rbx), %edi
leaq 0x23e2(%rip), %rsi      # 0x88e5
movl $0x7, %edx
callq 0x4465
movl 0x8(%rbx), %edi
leaq 0x23d6(%rip), %rsi      # 0x88ed
movl $0x7, %edx
callq 0x4465
movl 0x8(%rbx), %edi
leaq 0x23ca(%rip), %rsi      # 0x88f5
movl $0x7, %edx
callq 0x4465
movl 0x8(%rbx), %edi
leaq 0x23be(%rip), %rsi      # 0x88fd
movl $0x7, %edx
callq 0x4465
movl 0x8(%rbx), %edi
leaq 0x23b2(%rip), %rsi      # 0x8905
movl $0xe, %edx
callq 0x4465
movl 0x8(%rbx), %edi
leaq 0x23ad(%rip), %rsi      # 0x8914
movl $0x7, %edx
callq 0x4465
movl 0x8(%rbx), %edi
leaq 0x23a1(%rip), %rsi      # 0x891c
movl $0x7, %edx
callq 0x4465
movl 0x8(%rbx), %edi
leaq 0x2395(%rip), %rsi      # 0x8924
movl $0x7, %edx
callq 0x4465
leaq 0x238c(%rip), %rdx      # 0x892c
movq %rbx, %rdi
movl $0xd3, %esi
popq %rbx
jmp 0x4d4c
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/ftpproto.c
// Function: do_size
void do_size(session_t *sess)
{
    struct stat statbuf;
    if ( -1 == stat(sess->arg,&statbuf) )
    {
        ftp_reply(sess,FTP_FILEFAIL,"Could not get file size.");
        return;
    }

    if ( !S_ISREG(statbuf.st_mode) )
    {
        ftp_reply(sess,FTP_FILEFAIL,"Could not get file size.");
        return;
    }

    char sizebuf[128] = {0};
    sprintf(sizebuf,"%d",(int)statbuf.st_size);
    ftp_reply(sess,FTP_SIZEOK,sizebuf);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdi, %rbx
addq $0x818, %rdi            # imm = 0x818
movq %rsp, %rsi
callq 0x3330
cmpl $-0x1, %eax
je 0x6641
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%rsp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x6641
xorps %xmm0, %xmm0
leaq 0x90(%rsp), %r14
movaps %xmm0, 0x70(%r14)
movaps %xmm0, 0x60(%r14)
movaps %xmm0, 0x50(%r14)
movaps %xmm0, 0x40(%r14)
movaps %xmm0, 0x30(%r14)
movaps %xmm0, 0x20(%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
movl 0x30(%rsp), %edx
leaq 0x1cbc(%rip), %rsi      # 0x82d8
movq %r14, %rdi
xorl %eax, %eax
callq 0x34c0
movq %rbx, %rdi
movl $0xd5, %esi
movq %r14, %rdx
callq 0x4d4c
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
retq
leaq 0x22e8(%rip), %rdx      # 0x8930
movq %rbx, %rdi
movl $0x226, %esi            # imm = 0x226
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
jmp 0x4d4c
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/ftpproto.c
// Function: do_stat
void do_stat(session_t *sess)
{
    ftp_lreply(sess,FTP_STATOK,"FTP server status:");
    char buf[1024] = {0};

    struct in_addr inaddr;
    inaddr.s_addr = (sess->ip);
    sprintf(buf," Connected to %s\r\n",inet_ntoa(inaddr));
    writen(sess->ctrlfd,buf,strlen(buf));

    memset(buf,0,sizeof(char) * 1024);
    sprintf(buf," Logged in as %s\r\n",username);
    writen(sess->ctrlfd,buf,strlen(buf));
    
    memset(buf,0,sizeof(char) * 1024);
    if ( sess->bASCII )
        sprintf(buf," TYPE: ASCII \r\n");
    else
        sprintf(buf," TYPE: BINARY \r\n");
    writen(sess->ctrlfd,buf,strlen(buf));

    memset(buf,0,sizeof(char) * 1024);
    if ( 0 == tunable_connect_timeout ) 
        sprintf(buf," No session timeout\r\n");
    else
        sprintf(buf," Session timeout in seconds is %u\r\n",tunable_connect_timeout);
    writen(sess->ctrlfd,buf,strlen(buf));

    ftp_reply(sess,FTP_STATOK,"End of status");
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movq %rdi, %rbx
leaq 0x22d5(%rip), %rdx      # 0x8949
movl $0xd3, %esi
callq 0x4dbd
movq %rsp, %r14
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0x3220
movl 0xc44(%rbx), %edi
callq 0x3120
leaq 0x22ba(%rip), %rsi      # 0x895c
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x34c0
movl 0x8(%rbx), %ebp
movq %r14, %rdi
callq 0x3180
movl %ebp, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x4465
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0x3220
leaq 0x2292(%rip), %rsi      # 0x896f
leaq 0x5c3c(%rip), %rdx      # 0xc320
movq %r14, %rdi
xorl %eax, %eax
callq 0x34c0
movl 0x8(%rbx), %ebp
movq %r14, %rdi
callq 0x3180
movl %ebp, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x4465
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0x3220
cmpl $0x0, 0x10(%rbx)
je 0x6728
movups 0x2260(%rip), %xmm0     # 0x8982
movaps %xmm0, (%rsp)
jmp 0x6738
movups 0x2263(%rip), %xmm0     # 0x8992
movaps %xmm0, (%rsp)
movb $0x0, 0x10(%rsp)
movl 0x8(%rbx), %ebp
movq %rsp, %r14
movq %r14, %rdi
callq 0x3180
movl %ebp, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x4465
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0x3220
leaq 0x5b97(%rip), %rax      # 0xc300
movl (%rax), %edx
testl %edx, %edx
je 0x6782
leaq 0x2243(%rip), %rsi      # 0x89b9
movq %rsp, %rdi
xorl %eax, %eax
callq 0x34c0
jmp 0x679c
movups 0x221a(%rip), %xmm0     # 0x89a3
movaps %xmm0, (%rsp)
movabsq $0xa0d74756f656d, %rax  # imm = 0xA0D74756F656D
movq %rax, 0xe(%rsp)
movl 0x8(%rbx), %ebp
movq %rsp, %r14
movq %r14, %rdi
callq 0x3180
movl %ebp, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x4465
leaq 0x221f(%rip), %rdx      # 0x89dd
movq %rbx, %rdi
movl $0xd3, %esi
callq 0x4d4c
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/ftpproto.c
// Function: do_help
void do_help(session_t *sess)
{
    ftp_lreply(sess,FTP_HELP,"The following commands are recognized.");
    writen(sess->ctrlfd," ABOR ACCT ALLO APPE CDUP CWD  DELE EPRT EPSV FEAT HELP LIST MDTM MKD\r\n",
            strlen(" ABOR ACCT ALLO APPE CDUP CWD  DELE EPRT EPSV FEAT HELP LIST MDTM MKD\r\n"));
    writen(sess->ctrlfd," MODE NLST NOOP OPTS PASS PASV PORT PWD  QUIT REIN REST RETR RMD  RNFR\r\n",
            strlen(" MODE NLST NOOP OPTS PASS PASV PORT PWD  QUIT REIN REST RETR RMD  RNFR\r\n"));
    writen(sess->ctrlfd," RNTO SITE SIZE SMNT STAT STOR STOU STRU SYST TYPE USER XCUP XCWD XMKD\r\n",
            strlen(" RNTO SITE SIZE SMNT STAT STOR STOU STRU SYST TYPE USER XCUP XCWD XMKD\r\n"));
    writen(sess->ctrlfd," XPWD XRMD\r\n",strlen(" XPWD XRMD\r\n"));
    ftp_reply(sess,FTP_HELP,"HELP OK");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x2200(%rip), %rdx      # 0x89f3
movl $0xd6, %esi
callq 0x4dbd
movl 0x8(%rbx), %edi
leaq 0x2213(%rip), %rsi      # 0x8a1a
movl $0x47, %edx
callq 0x4465
movl 0x8(%rbx), %edi
leaq 0x2247(%rip), %rsi      # 0x8a62
movl $0x48, %edx
callq 0x4465
movl 0x8(%rbx), %edi
leaq 0x227c(%rip), %rsi      # 0x8aab
movl $0x48, %edx
callq 0x4465
movl 0x8(%rbx), %edi
leaq 0x22b1(%rip), %rsi      # 0x8af4
movl $0xc, %edx
callq 0x4465
leaq 0x22ad(%rip), %rdx      # 0x8b01
movq %rbx, %rdi
movl $0xd6, %esi
popq %rbx
jmp 0x4d4c
nop
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/ftpnobody.c
// Function: set_minprivilage
void set_minprivilage(void)
{
    struct passwd* pwd = getpwnam("nobody");
    if ( NULL == pwd )
        ERR_EXIT("getpwnam error");
    if ( -1 == setegid(pwd->pw_gid))
        ERR_EXIT("setegid error"); 
    if ( -1 == seteuid(pwd->pw_uid))
        ERR_EXIT("seteuid error"); 

    struct __user_cap_header_struct cap_header;
    cap_header.version = _LINUX_CAPABILITY_VERSION_1;
    cap_header.pid = 0;
    struct __user_cap_data_struct cap_data;
    cap_data.effective = cap_data.permitted = 1 << CAP_NET_BIND_SERVICE;
    cap_data.inheritable = 0;
    if ( -1 == capset(&cap_header,&cap_data))
        ERR_EXIT("capset error");
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
leaq 0x226e(%rip), %rdi      # 0x8b2b
callq 0x32f0
testq %rax, %rax
je 0x6920
movq %rax, %rbx
movl 0x14(%rax), %edi
callq 0x3520
cmpl $-0x1, %eax
je 0x6925
movl 0x10(%rbx), %edi
callq 0x3550
cmpl $-0x1, %eax
je 0x692a
leaq 0xc(%rsp), %rsi
movq $0x19980330, (%rsi)     # imm = 0x19980330
movabsq $0x40000000400, %rax    # imm = 0x40000000400
leaq 0x14(%rsp), %rdx
movq %rax, (%rdx)
movl $0x0, 0x8(%rdx)
movl $0x7e, %edi
xorl %eax, %eax
callq 0x3310
cmpl $-0x1, %eax
je 0x692f
addq $0x20, %rsp
popq %rbx
retq
callq 0x386f
callq 0x385a
callq 0x3845
callq 0x3830
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/ftpnobody.c
// Function: do_getdatafd
void do_getdatafd(session_t* ssinf)
{
    char ip[128] = {0};
    int port;
    if ( -1 == ftpipc_recv_data(ssinf->nobodyfd,ip,128))
        return;
    if ( -1 == ftpipc_recv_data(ssinf->nobodyfd,&port,sizeof(int)))
       return;
    //printf("nobody recv data:oip:%s\t,%u\n",ip,port);


    struct sockaddr_in addr;
    if ( -1 == ftpipc_recv_data(ssinf->nobodyfd,&addr,sizeof(addr)))
        return;
    //printf("ip:%s\tport:%d\n",inet_ntoa(addr.sin_addr),ntohs(addr.sin_port)); 



    int fd = tcp_clnt(ip,port);
    if ( -1 == connect_timeout(fd,&addr,tunable_connect_timeout))
    {
        ERR_EXIT("connect_timeout error");
    }
    //printf("connect success\n");
     

    if ( -1 == fd )
        ftpipc_send_ret(ssinf->nobodyfd,FTPIPC_RET_BAD);
    
    ftpipc_send_ret(ssinf->nobodyfd,FTPIPC_RET_OK);
    ftpipc_send_fd(ssinf->nobodyfd,fd); 

    close(fd);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rsi
movaps %xmm0, 0x70(%rsi)
movaps %xmm0, 0x60(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movl (%rdi), %edi
movl $0x80, %edx
callq 0x6b68
cmpl $-0x1, %eax
je 0x6a00
movl (%rbx), %edi
leaq 0xc(%rsp), %rsi
movl $0x4, %edx
callq 0x6b68
cmpl $-0x1, %eax
je 0x6a00
movl (%rbx), %edi
leaq 0x10(%rsp), %rsi
movl $0x10, %edx
callq 0x6b68
cmpl $-0x1, %eax
je 0x6a00
movzwl 0xc(%rsp), %esi
leaq 0x20(%rsp), %rdi
callq 0x3e43
movl %eax, %ebp
leaq 0x5940(%rip), %rax      # 0xc300
movl (%rax), %edx
leaq 0x10(%rsp), %rsi
movl %ebp, %edi
callq 0x428f
cmpl $-0x1, %eax
je 0x6a0a
cmpl $-0x1, %ebp
jne 0x69e4
movl (%rbx), %edi
movl $0x2, %esi
callq 0x6ac4
movl (%rbx), %edi
movl $0x1, %esi
callq 0x6ac4
movl (%rbx), %edi
movl %ebp, %esi
callq 0x6bed
movl %ebp, %edi
callq 0x3260
addq $0xa8, %rsp
popq %rbx
popq %rbp
retq
callq 0x3884
nop
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/ftpipc.c
// Function: ftpipc_init
int ftpipc_init(session_t* ssinf)
{
    int fd[2];
    if (-1 == socketpair(AF_UNIX,SOCK_STREAM,0,fd))
        ERR_EXIT("socketpair error");

    ssinf->protofd = fd[0];
    ssinf->nobodyfd = fd[1];

    return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rcx
movl $0x1, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x3350
cmpl $-0x1, %eax
je 0x6a48
movl 0x8(%rsp), %eax
movl %eax, 0x4(%rbx)
movl 0xc(%rsp), %eax
movl %eax, (%rbx)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
callq 0x3899
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/ftpipc.c
// Function: ftpipc_close
void ftpipc_close(session_t* ssinf)
{
    if ( ssinf->protofd != -1 )
        close(ssinf->protofd);
    if ( ssinf->nobodyfd != -1 )
        close(ssinf->nobodyfd);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x4(%rdi), %edi
cmpl $-0x1, %edi
je 0x6a5e
callq 0x3260
movl (%rbx), %edi
cmpl $-0x1, %edi
je 0x6a6b
popq %rbx
jmp 0x3260
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/hash.c
// Function: hash_test
void hash_test()
{
    stu_t stu[3] = {
        {"aaa","12345"},
        {"bbb","dadad"},
        {"ccc","xxxxx"},
    };

    hashtable_t* hash = hashtable_init(5,hash_fun);
    int i = 0;
    for ( i = 0 ; i < 3 ; ++i)
    {
        hashtable_add(hash,stu[i].name,strlen(stu[i].name),stu[i].school,strlen(stu[i].name));
    }

    hashtable_del(hash,"aaa",strlen("aaa"));
    hashtable_add(hash,stu[0].name,strlen(stu[0].name),stu[0].school,strlen(stu[0].name));


    char *str = hashtable_search(hash,"aaa",3);
    if  ( NULL == str )
        printf("not fount\n");
    else
        printf("name:\"aaa\",school:%s\n",str);


    hashtable_destroy(&hash);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
leaq 0x157(%rip), %rsi       # 0x6d67
movl $0x5, %edi
callq 0x6ce7
movq %rax, %rbx
movq %rax, 0x8(%rsp)
movl $0x8, %r12d
leaq 0x5181(%rip), %r13      # 0xbdb0
movq -0x8(%r12,%r13), %r14
movq (%r12,%r13), %r15
movq %r14, %rdi
callq 0x3180
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
movq %r15, %rcx
movl %eax, %r8d
callq 0x6d96
addq $0x10, %r12
cmpq $0x38, %r12
jne 0x6c2f
leaq 0x1f17(%rip), %r14      # 0x8b7b
movq %rbx, %rdi
movq %r14, %rsi
movl $0x3, %edx
callq 0x6e61
leaq 0x1f04(%rip), %rcx      # 0x8b7f
movq %rbx, %rdi
movq %r14, %rsi
movl $0x3, %edx
movl $0x3, %r8d
callq 0x6d96
movq %rbx, %rdi
movq %r14, %rsi
movl $0x3, %edx
callq 0x6f76
testq %rax, %rax
je 0x6cac
movq 0x8(%rax), %rsi
jmp 0x6cae
xorl %esi, %esi
testq %rsi, %rsi
je 0x6cc3
leaq 0x1edf(%rip), %rdi      # 0x8b99
xorl %eax, %eax
callq 0x31c0
jmp 0x6ccf
leaq 0x1f11(%rip), %rdi      # 0x8bdb
callq 0x30c0
leaq 0x8(%rsp), %rdi
callq 0x6ec6
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/hash.c
// Function: hashtable_init
hashtable_t* hashtable_init(int buckets,hash_fun_t hash_fun)
{
    hashtable_t* hash = (hashtable_t*)malloc(sizeof(hashtable_t));

    int size = buckets * sizeof(node_t*);
    hash->pnode = (node_t**)malloc(size);
    hash->buckets = buckets;
    hash->hash_fun = hash_fun;
    memset(hash->pnode,0,size);

    int i = 0;
    while ( i < buckets )
    {
        (hash->pnode[i]) = (node_t*)malloc(sizeof(node_t));
        (hash->pnode[i])->pnext = NULL;
        i++;
    } 

    return hash;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r12
movl %edi, %r15d
movl $0x18, %edi
callq 0x3390
movq %rax, %rbx
leal (,%r15,8), %eax
movslq %eax, %r13
movq %r13, %rdi
callq 0x3390
movq %rax, %r14
movq %rax, 0x10(%rbx)
movl %r15d, (%rbx)
movq %r12, 0x8(%rbx)
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x3220
testl %r15d, %r15d
jle 0x6d5a
movl %r15d, %r15d
xorl %r12d, %r12d
movl $0x20, %edi
callq 0x3390
movq %rax, (%r14,%r12,8)
movq $0x0, 0x10(%rax)
incq %r12
cmpq %r12, %r15
jne 0x6d3c
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/hash.c
// Function: hash_fun
unsigned int static hash_fun(void* key,int hash_size)
{
    unsigned int hash = 0;
    char* str = key;

    while ( *str ) 
    {
        hash = (*str++) + (hash << 6) + (hash << 16) -hash;
    }

    return (hash & 0x7FFFFFFF) % hash_size;
        
}

// Assembly:
movb (%rdi), %cl
testb %cl, %cl
je 0x6d8d
incq %rdi
xorl %eax, %eax
movsbl %cl, %ecx
imull $0x1003f, %eax, %eax    # imm = 0x1003F
addl %ecx, %eax
movb (%rdi), %cl
incq %rdi
testb %cl, %cl
jne 0x6d72
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
jmp 0x6d8f
xorl %eax, %eax
xorl %edx, %edx
divl %esi
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/hash.c
// Function: hashtable_add
int hashtable_add(hashtable_t* hash,void* key,int key_size,void* val,int val_size)
{
     if  ( NULL != hashtable_get_node(hash,key,key_size)) 
     {
         fprintf(stderr,"key exists.");
         return -1;
     }

     node_t* node = hashtable_getbucket(hash,key);
     node_t* toadd = (node_t*)malloc(sizeof(node_t));
     toadd->key = (void*)malloc(key_size);
     toadd->val = (void*)malloc(val_size);
     toadd->pnext = NULL;
     memcpy(toadd->key,key,key_size);
     memcpy(toadd->val,val,val_size);

     toadd->pnext = node->pnext;
     toadd->pprev = node;
     node->pnext = toadd;
     if ( toadd->pnext )
         toadd->pnext->pprev = toadd;
     
     return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rcx, %rbx
movl %edx, %r13d
movq %rsi, %r14
movq %rdi, %r15
callq 0x6f76
testq %rax, %rax
jne 0x6e55
movq %r15, %rdi
movq %r14, %rsi
callq 0x6f4e
movq %rax, %r12
movl $0x20, %edi
callq 0x3390
movq %rax, %r15
movslq %r13d, %r13
movq %r13, %rdi
callq 0x3390
movq %rbx, (%rsp)
movq %rax, %rbx
movq %rax, (%r15)
movslq %ebp, %rbp
movq %rbp, %rdi
callq 0x3390
movq %r14, %rsi
movq %rax, %r14
movq %rax, 0x8(%r15)
movq $0x0, 0x10(%r15)
movq %rbx, %rdi
movq %r13, %rdx
callq 0x3340
movq %r14, %rdi
movq (%rsp), %rsi
movq %rbp, %rdx
callq 0x3340
movq 0x10(%r12), %rax
movq %rax, 0x10(%r15)
movq %r12, 0x18(%r15)
movq %r15, 0x10(%r12)
movq 0x10(%r15), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x6e46
movq %r15, 0x18(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x38ae
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x6e46
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/hash.c
// Function: hashtable_del
int hashtable_del(hashtable_t* hash,void* key,int key_size)
{
     node_t* node = hashtable_get_node(hash,key,key_size);
     if ( NULL == node) 
     {
         fprintf(stderr,"key not exists.");
         return -1;
     }
     
     node->pprev->pnext = node->pnext;
     if ( node->pnext )
         node->pnext->pprev = node->pprev;
     free(node->key);
     free(node->val);
     free(node);
     return 0;
}

// Assembly:
pushq %rbx
callq 0x6f76
testq %rax, %rax
je 0x6ea5
movq %rax, %rbx
movq 0x10(%rax), %rcx
movq 0x18(%rax), %rax
movq %rcx, 0x10(%rax)
movq 0x10(%rbx), %rcx
testq %rcx, %rcx
je 0x6e88
movq %rax, 0x18(%rcx)
movq (%rbx), %rdi
callq 0x3040
movq 0x8(%rbx), %rdi
callq 0x3040
movq %rbx, %rdi
callq 0x3040
xorl %eax, %eax
popq %rbx
retq
callq 0x38ca
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x6ea3
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/hash.c
// Function: hashtable_destroy
void hashtable_destroy(hashtable_t** phash)
{
    int i = 0;
    hashtable_t* hash = *phash;
    while ( i < hash->buckets )
    {
        node_t* node= (hash->pnode)[i]->pnext;
        while ( NULL != node) 
        {
            node_t* tmp = node;
            node = node->pnext;
            free(tmp->key);
            free(tmp->val);
            free(tmp);
        }
        free(hash->pnode[i]);
        i++;
    } 
    free((hash->pnode));
    free(hash);
    *phash = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
cmpl $0x0, (%r14)
jle 0x6f2c
xorl %r12d, %r12d
movq 0x10(%r14), %rax
movq (%rax,%r12,8), %rax
movq 0x10(%rax), %r15
testq %r15, %r15
je 0x6f14
movq (%r15), %rdi
movq 0x10(%r15), %r13
callq 0x3040
movq 0x8(%r15), %rdi
callq 0x3040
movq %r15, %rdi
callq 0x3040
movq %r13, %r15
testq %r13, %r13
jne 0x6eef
movq 0x10(%r14), %rax
movq (%rax,%r12,8), %rdi
callq 0x3040
incq %r12
movslq (%r14), %rax
cmpq %rax, %r12
jl 0x6ede
movq 0x10(%r14), %rdi
callq 0x3040
movq %r14, %rdi
callq 0x3040
movq $0x0, (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/hash.c
// Function: hashtable_getbucket
node_t* hashtable_getbucket(hashtable_t* hash,void* key)
{
    unsigned int nbucket = hash->hash_fun(key,hash->buckets);
    if ( nbucket > hash->buckets )
    {
        fprintf(stderr,"hash fun error.");
        return NULL;
    }
    return (hash->pnode)[nbucket];

}

// Assembly:
pushq %rbx
movq %rsi, %rax
movq %rdi, %rbx
movl (%rdi), %esi
movq %rax, %rdi
callq *0x8(%rbx)
cmpl (%rbx), %eax
ja 0x6f6d
movq 0x10(%rbx), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rax
popq %rbx
retq
callq 0x38e6
xorl %eax, %eax
jmp 0x6f6b
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/test.c
// Function: printconf
int printconf()
{
    printf("listen address:%s\n",tunable_listen_address);
    printf("listen_port:%u\n",tunable_listen_port);
    printf("max_clients:%u\n",tunable_max_clients);
    printf("max_per_ip:%u\n",tunable_max_per_ip);
    printf("accept_timeout:%u\n",tunable_accept_timeout);
    printf("connect_timeout:%u\n",tunable_connect_timeout);
    printf("idle_session_timeout:%u\n",tunable_idle_session_timeout);
    printf("data_connection_timeout:%u\n",tunable_data_connection_timeout);
    printf("local_umask:%o\n",tunable_local_umask);
    printf("upload_max_rate:%u\n",tunable_upload_max_rate);
    printf("download_max_rate:%u\n",tunable_download_max_rate);
    printf("pasv_enable:%d\n",tunable_pasv_enable);
    printf("port_enable:%d\n",tunable_port_enable);
    return 0;
}

// Assembly:
pushq %rax
leaq 0x5344(%rip), %rax      # 0xc308
movq (%rax), %rsi
leaq 0x1c17(%rip), %rdi      # 0x8be5
xorl %eax, %eax
callq 0x31c0
leaq 0x52ec(%rip), %rax      # 0xc2c8
movl (%rax), %esi
leaq 0x1c13(%rip), %rdi      # 0x8bf8
xorl %eax, %eax
callq 0x31c0
leaq 0x52d9(%rip), %rax      # 0xc2cc
movl (%rax), %esi
leaq 0x1c0c(%rip), %rdi      # 0x8c08
xorl %eax, %eax
callq 0x31c0
leaq 0x52c6(%rip), %rax      # 0xc2d0
movl (%rax), %esi
leaq 0x1c05(%rip), %rdi      # 0x8c18
xorl %eax, %eax
callq 0x31c0
leaq 0x52b3(%rip), %rax      # 0xc2d4
movl (%rax), %esi
leaq 0x1bfd(%rip), %rdi      # 0x8c27
xorl %eax, %eax
callq 0x31c0
leaq 0x52c8(%rip), %rax      # 0xc300
movl (%rax), %esi
leaq 0x1bf9(%rip), %rdi      # 0x8c3a
xorl %eax, %eax
callq 0x31c0
leaq 0x5289(%rip), %rax      # 0xc2d8
movl (%rax), %esi
leaq 0x1bf6(%rip), %rdi      # 0x8c4e
xorl %eax, %eax
callq 0x31c0
leaq 0x5276(%rip), %rax      # 0xc2dc
movl (%rax), %esi
leaq 0x1bf8(%rip), %rdi      # 0x8c67
xorl %eax, %eax
callq 0x31c0
leaq 0x5263(%rip), %rax      # 0xc2e0
movl (%rax), %esi
leaq 0x1bfd(%rip), %rdi      # 0x8c83
xorl %eax, %eax
callq 0x31c0
leaq 0x5250(%rip), %rax      # 0xc2e4
movl (%rax), %esi
leaq 0x1bf6(%rip), %rdi      # 0x8c93
xorl %eax, %eax
callq 0x31c0
leaq 0x523d(%rip), %rax      # 0xc2e8
movl (%rax), %esi
leaq 0x1bf3(%rip), %rdi      # 0x8ca7
xorl %eax, %eax
callq 0x31c0
leaq 0x51fe(%rip), %rax      # 0xc2c0
movl (%rax), %esi
leaq 0x1bf2(%rip), %rdi      # 0x8cbd
xorl %eax, %eax
callq 0x31c0
leaq 0x51eb(%rip), %rax      # 0xc2c4
movl (%rax), %esi
leaq 0x1beb(%rip), %rdi      # 0x8ccd
xorl %eax, %eax
callq 0x31c0
xorl %eax, %eax
popq %rcx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/clntlmt.c
// Function: clntlmt_init
int clntlmt_init()
{
    clients = 0;
    hash_ip_clients = hashtable_init(2 * tunable_max_clients,hash_fun_limit);
    hash_pid_ip = hashtable_init(2 * tunable_max_clients,hash_fun_limit);
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x0, 0x52a2(%rip)      # 0xc3a0
leaq 0x51c7(%rip), %r14      # 0xc2cc
movl (%r14), %edi
addl %edi, %edi
leaq 0x2d(%rip), %rbx        # 0x713e
movq %rbx, %rsi
callq 0x6ce7
movq %rax, 0x5288(%rip)      # 0xc3a8
movl (%r14), %edi
addl %edi, %edi
movq %rbx, %rsi
callq 0x6ce7
movq %rax, 0x527c(%rip)      # 0xc3b0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/clntlmt.c
// Function: clntlmt_destroy
int clntlmt_destroy()
{
    clients = 0;
    hashtable_destroy(&hash_ip_clients);
    hashtable_destroy(&hash_pid_ip);
    return 0;
}

// Assembly:
pushq %rax
movl $0x0, 0x524e(%rip)      # 0xc3a0
leaq 0x524f(%rip), %rdi      # 0xc3a8
callq 0x6ec6
leaq 0x524b(%rip), %rdi      # 0xc3b0
callq 0x6ec6
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/clntlmt.c
// Function: clntlmt_del
void clntlmt_del(pid_t pid)
{
    unsigned int* ip = hashtable_search(hash_pid_ip,&pid,sizeof(pid));
    int* ret = hashtable_search(hash_ip_clients,ip,sizeof(*ip));
    if ( 1 == *ret )
        hashtable_del(hash_ip_clients,ip,sizeof(*ip));
    else 
        *ret = *ret - 1;

    hashtable_del(hash_pid_ip,&pid,sizeof(pid));
    clients--;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0xc(%rsp), %rsi
movl %edi, (%rsi)
movq 0x51ad(%rip), %rdi      # 0xc3b0
movl $0x4, %edx
callq 0x6eb1
movq %rax, %rbx
movq 0x5191(%rip), %rdi      # 0xc3a8
movq %rax, %rsi
movl $0x4, %edx
callq 0x6eb1
movl (%rax), %ecx
cmpl $0x1, %ecx
jne 0x7241
movq 0x5176(%rip), %rdi      # 0xc3a8
movq %rbx, %rsi
movl $0x4, %edx
callq 0x6e61
jmp 0x7245
decl %ecx
movl %ecx, (%rax)
movq 0x5164(%rip), %rdi      # 0xc3b0
leaq 0xc(%rsp), %rsi
movl $0x4, %edx
callq 0x6e61
decl 0x513f(%rip)            # 0xc3a0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/icysunlight[P]miniftpd/clntlmt.c
// Function: clntlmt_check
int clntlmt_check(unsigned int ip)
{
    if ( tunable_max_per_ip > 0 && clients_ip_get(ip) > tunable_max_per_ip)
    {
        return -1;
    }
    if ( tunable_max_clients > 0 && clients  > tunable_max_clients )
    {
        return -2;
    }
    return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x505d(%rip), %rbx      # 0xc2d0
cmpl $0x0, (%rbx)
je 0x72a0
leaq 0xc(%rsp), %rsi
movl %edi, (%rsi)
movq 0x5122(%rip), %rdi      # 0xc3a8
movl $0x4, %edx
callq 0x6eb1
testq %rax, %rax
je 0x72c9
movl (%rax), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl (%rbx), %ecx
ja 0x72c3
leaq 0x5025(%rip), %rax      # 0xc2cc
movl (%rax), %eax
testl %eax, %eax
sete %cl
cmpl %eax, 0x50ec(%rip)      # 0xc3a0
setbe %al
orb %cl, %al
movzbl %al, %eax
leal -0x2(,%rax,2), %eax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x1a0d(%rip), %rdi      # 0x8cdd
leaq 0x1a12(%rip), %rsi      # 0x8ce9
leaq 0x1a15(%rip), %rcx      # 0x8cf3
movl $0x10, %edx
callq 0x3210
// File: /workspace/github_c_makefile_star2_O1/YunyiQian[P]multitel3/./raytrace.c
// Function: model_input
int model_input(char *name,MODEL *m){
	FILE *fp;
	int error;
	int i,im1;

	if ( name==NULL ){
		fprintf(stderr,"No model name\n");
		return -1;
	}else{
		fp = fopen(name,"r");
		if ( fp == NULL ){
			fprintf(stderr,"Error in opening model file\n");
			return -1;
		}
	}

	fscanf(fp,"%d",&m->nlay);
	if ( m->nlay > MAXLAY ){
		fprintf(stderr,"Too many layers in model file\n");
		m->nlay = MAXLAY;
	}

	for (i=0;i<m->nlay;i++){
		fscanf(fp,"%lf%lf%lf%lf%lf%lf",&m->depth[i],&m->vp[i],&m->vs[i],&m->rou[i],&m->qp[i],&m->qs[i]);
	}
	
	fclose(fp);

	for (i=1,im1=0;i<m->nlay;i++,im1++){
		if (m->depth[i] < m->depth[im1]){
			fprintf(stderr,"Depth in model file is not correct\n");
			return -1;
		}
	}

	return m->nlay;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rdi, %rdi
je 0x1615
movq %rsi, %rbx
leaq 0x2c73(%rip), %rsi      # 0x4173
callq 0x10c0
testq %rax, %rax
je 0x161c
leaq 0x2c7d(%rip), %rsi      # 0x4192
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1040
cmpl $0x3e9, (%rbx)          # imm = 0x3E9
jge 0x1623
cmpl $0x0, (%rbx)
movq %rbx, %rsi
jle 0x15dd
movl $0x9c48, %r14d          # imm = 0x9C48
movl $0x7d08, %ebx           # imm = 0x7D08
movl $0x3e88, %ecx           # imm = 0x3E88
movl $0x1f48, %edx           # imm = 0x1F48
movl $0x8, %r8d
movl $0x5dc8, %r12d          # imm = 0x5DC8
xorl %r13d, %r13d
movq %rsi, -0x40(%rbp)
movq %r8, -0x48(%rbp)
movq %rdx, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
leaq (%rsi,%r12), %rdx
leaq (%rsi,%r8), %rcx
movq -0x30(%rbp), %rax
leaq (%rsi,%rax), %r8
movq -0x38(%rbp), %rax
leaq (%rsi,%rax), %r9
leaq (%rsi,%rbx), %r10
leaq (%rsi,%r14), %r11
movq %r15, %rdi
leaq 0x2c19(%rip), %rsi      # 0x41b4
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x1040
movq -0x48(%rbp), %r8
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %rsi
addq $0x10, %rsp
incq %r13
movslq (%rsi), %rax
addq $0x8, %r14
addq $0x8, %rbx
addq $0x8, %rcx
addq $0x8, %rdx
addq $0x8, %r8
addq $0x8, %r12
cmpq %rax, %r13
jl 0x1565
movq %r15, %rdi
movq %rsi, %rbx
callq 0x1060
movl (%rbx), %eax
cmpl $0x2, %eax
jl 0x163a
movq %rbx, %rsi
leal -0x1(%rax), %ecx
xorl %edx, %edx
movsd 0x5dc8(%rsi,%rdx,8), %xmm0
ucomisd 0x5dd0(%rsi,%rdx,8), %xmm0
ja 0x1630
incq %rdx
cmpq %rdx, %rcx
jne 0x15f7
jmp 0x163a
callq 0x11e0
jmp 0x1635
callq 0x11b1
jmp 0x1635
movq %rbx, %rdi
callq 0x1150
jmp 0x1531
callq 0x1182
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/YunyiQian[P]multitel3/./raytrace.c
// Function: model_init
void model_init(MODEL *m,double sdepth,int *ilay1,double rdepth,int *ilay2,int P){
	int i;
	
	if (sdepth < rdepth){
		*ilay1 = inslay(sdepth,m);
		*ilay2 = inslay(rdepth,m);
	}else{
		*ilay2 = inslay(rdepth,m);
		*ilay1 = inslay(sdepth,m);
	}
	if ( *ilay1 == -1 || *ilay2 == -1 ){
		fprintf(stderr,"Error in creating layer at given depth\n");
		exit (-1);
	}

	mhrv_interp(m,P);
	model_setcmb(m);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, -0x2c(%rbp)
movq %rdx, %r15
movq %rsi, %rbx
ucomisd %xmm0, %xmm1
movq %rdi, %r14
movapd %xmm0, %xmm2
minsd %xmm1, %xmm2
movq %rdx, %r13
cmovaq %rsi, %r13
maxsd %xmm0, %xmm1
movsd %xmm1, -0x38(%rbp)
movq %rsi, %r12
cmovaq %rdx, %r12
movapd %xmm2, %xmm0
callq 0x16d8
movl %eax, (%r13)
movsd -0x38(%rbp), %xmm0
movq %r14, %rdi
callq 0x16d8
movl %eax, (%r12)
cmpl $-0x1, (%rbx)
je 0x16d3
cmpl $-0x1, (%r15)
je 0x16d3
movq %r14, %rdi
movl -0x2c(%rbp), %esi
callq 0x18ed
movq %r14, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1b8f
callq 0x120f
// File: /workspace/github_c_makefile_star2_O1/YunyiQian[P]multitel3/./raytrace.c
// Function: model_setcmb
void model_setcmb(MODEL *m){
	int i;

	m->ncmb = -1;
	m->nicb = -1;
	for (i=1;i<m->nlay;i++){
		if (m->vs[i-1] < SMALL && m->vs[i] > SMALL){
			m->nicb = i;
			return;
		}
		if (m->vs[i-1] > SMALL && m->vs[i] < SMALL){
			m->ncmb = i;
		}
	}
	return;
}

// Assembly:
movq $-0x1, 0x13888(%rdi)
movslq (%rdi), %rax
cmpq $0x2, %rax
jl 0x1bff
pushq %rbp
movq %rsp, %rbp
decq %rax
xorl %ecx, %ecx
movsd 0x24e4(%rip), %xmm0     # 0x4098
movsd 0x1f48(%rdi,%rcx,8), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x1bd2
movsd 0x1f50(%rdi,%rcx,8), %xmm2
ucomisd %xmm0, %xmm2
ja 0x1bf6
ucomisd %xmm0, %xmm1
jbe 0x1bec
ucomisd 0x1f50(%rdi,%rcx,8), %xmm0
jbe 0x1bec
leal 0x1(%rcx), %edx
movl %edx, 0x13888(%rdi)
incq %rcx
cmpq %rcx, %rax
jne 0x1bb4
jmp 0x1bfe
incl %ecx
movl %ecx, 0x1388c(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonfreetype/src/advance.c
// Function: Get_advance
static int Get_advance(lua_State *L)
    {
    FT_Error ec;
    FT_Fixed advance;
    FT_Face *face = checkface(L, 1);
    FT_UInt glyph_index = checkindex(L, 2);
    FT_Int32 load_flags = checkflags(L, 3); // checkloadflags
    ec = FT_Get_Advance(*face, glyph_index, load_flags, &advance);
    CheckError(L, ec);
    lua_pushinteger(L, advance);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %ebp
movl $0x1, %esi
callq 0x7ab0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x7330
movl %eax, %r15d
movq %rbx, %rdi
movl $0x3, %esi
callq 0x7760
movq (%r14), %rdi
movq %rsp, %rcx
movl %r15d, %esi
movl %eax, %edx
callq 0x7460
testl %eax, %eax
je 0x7ef2
movl %eax, %edi
callq 0x7d00
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x7a60
movl %eax, %ebp
jmp 0x7efe
movq (%rsp), %rsi
movq %rbx, %rdi
callq 0x7530
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonfreetype/src/advance.c
// Function: Get_advances
static int Get_advances(lua_State *L)
    {
    FT_Error ec;
    FT_UInt i;
    FT_Fixed *padvance;
    FT_Face *face = checkface(L, 1);
    FT_UInt start = checkindex(L, 2); /* glyph_index */
    FT_UInt count = checkindex(L, 3);
    FT_Int32 load_flags = checkflags(L, 4); //checkloadflags
    if(count < 1)
        return luaL_argerror(L, 3, "positive number expected");
    padvance = (FT_Fixed*)Malloc(L, sizeof(FT_Fixed)*count);
    ec = FT_Get_Advances(*face, start, count, load_flags, padvance);
    if(ec) Free(L, padvance); /* CheckError() will return, so free the allocated memory */
    CheckError(L, ec);
    for(i=0; i<count; i++)
        lua_pushinteger(L, padvance[i]);
    Free(L, padvance);
    return count;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x7ab0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x7330
movl %eax, %r15d
movq %rbx, %rdi
movl $0x3, %esi
callq 0x7330
movl %eax, %ebp
movq %rbx, %rdi
movl $0x4, %esi
callq 0x7760
testl %ebp, %ebp
je 0x7fba
movq %rax, %r13
movl %ebp, %r12d
leaq (,%r12,8), %rsi
movq %rbx, %rdi
callq 0x7c00
movq %r14, %rcx
movq %rax, %r14
movq (%rcx), %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r13d, %ecx
movq %rax, %r8
callq 0x70d0
testl %eax, %eax
je 0x7fdc
movl %eax, %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x79e0
movl %r15d, %edi
callq 0x7d00
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7a60
leaq 0xa06a(%rip), %rdx      # 0x1202b
movq %rbx, %rdi
movl $0x3, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7260
xorl %r15d, %r15d
movq (%r14,%r15,8), %rsi
movq %rbx, %rdi
callq 0x7530
incq %r15
cmpq %r15, %r12
jne 0x7fdf
movq %rbx, %rdi
movq %r14, %rsi
callq 0x79e0
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_O1/stetre[P]moonfreetype/src/bitmap.c
// Function: moonfreetype_checkbitmap
FT_Bitmap* checkbitmap(lua_State *L, int arg)
    {
    FT_Bitmap *p = testbitmap(L, arg);
    if(p) return p;
    luaL_argerror(L, arg, "not a bitmap");
    return NULL;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0xa04e(%rip), %rdx      # 0x1206e
callq 0x7630
testq %rax, %rax
je 0x802f
movq (%rax), %rax
jmp 0x8031
xorl %eax, %eax
testq %rax, %rax
jne 0x8049
leaq 0xa007(%rip), %rdx      # 0x12044
movq %r14, %rdi
movl %ebx, %esi
callq 0x7260
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonfreetype/src/bitmap.c
// Function: moonfreetype_pushbitmap
int pushbitmap(lua_State *L, FT_Bitmap *bitmap, FT_Library library)
    {
    ud_t *ud = userdata(bitmap);
    if(ud)
        return udata_push(L, bitmap);
    /* create userdata for bitmap  owned by FreeType */
    DBG("created bitmap %p (on push)\n", (void*)bitmap);
    newuserdata(L, (void*)bitmap, BITMAP_MT);
    ud = userdata(bitmap);
    ud->library = library;
    ud->allocated = 0;
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x7230
testq %rax, %rax
je 0x807c
movq %r15, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x7180
leaq 0x9fce(%rip), %rdi      # 0x12051
movq %r14, %rsi
xorl %eax, %eax
callq 0x7270
leaq 0x9fda(%rip), %rdx      # 0x1206e
movq %r15, %rdi
movq %r14, %rsi
callq 0x72a0
movq %r14, %rdi
callq 0x7230
movq %rbx, 0x8(%rax)
movl $0x0, 0x18(%rax)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonfreetype/src/bitmap.c
// Function: moonfreetype_pushbitmapdata
int pushbitmapdata(lua_State *L, FT_Bitmap bitmap, FT_Int left, FT_Int top, int leftandtop)
/* pushes bitmap contents in a table */
    {
    size_t len; 
    lua_newtable(L);
    if(leftandtop)
        {
        lua_pushinteger(L, left);
        lua_setfield(L, -2, "left");
        lua_pushinteger(L, top);
        lua_setfield(L, -2, "top");
        }
    lua_pushinteger(L, bitmap.rows);
    lua_setfield(L, -2, "rows");
    lua_pushinteger(L, bitmap.width);
    lua_setfield(L, -2, "width");
    lua_pushinteger(L, bitmap.pitch);
    lua_setfield(L, -2, "pitch");
    pushpixelmode(L, bitmap.pixel_mode);
    lua_setfield(L, -2, "pixel_mode");
    if(bitmap.pixel_mode == FT_PIXEL_MODE_GRAY)
        {
        lua_pushinteger(L, bitmap.num_grays); 
        lua_setfield(L, -2, "num_grays");
        }
    len = bitmap.rows * (FT_ULong)bitmap.pitch; /* +/- buffer length */
    if(len)
        {
        len = len > 0 ? len : -len; /* pich may be negative */
        lua_pushlstring(L, (char*)bitmap.buffer, len);
        lua_setfield(L, -2, "buffer");
        }
    /* palette_mode: not used currently 
     * palette:      not used currently 
     */
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r15d
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x30(%rsp), %r12
xorl %esi, %esi
xorl %edx, %edx
callq 0x73c0
testl %r15d, %r15d
je 0x8121
movslq %r14d, %rsi
movq %rbx, %rdi
callq 0x7530
leaq 0xa516(%rip), %rdx      # 0x1260b
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x7530
leaq 0x9f6e(%rip), %rdx      # 0x12082
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
movl (%r12), %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7530
leaq 0x9f4f(%rip), %rdx      # 0x12086
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
movl 0x4(%r12), %esi
movq %rbx, %rdi
callq 0x7530
leaq 0xbe9e(%rip), %rdx      # 0x13ff6
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
movslq 0x8(%r12), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7530
leaq 0x9f0f(%rip), %rdx      # 0x1208b
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
movzbl 0x1a(%r12), %ebp
movq %rbx, %rdi
movl $0xc, %esi
movl %ebp, %edx
callq 0x7280
leaq 0x9eec(%rip), %rdx      # 0x12091
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
cmpl $0x2, %ebp
jne 0x81d9
movzwl 0x18(%r12), %esi
movq %rbx, %rdi
callq 0x7530
leaq 0x9ed0(%rip), %rdx      # 0x1209c
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
imulq %r14, %r15
testq %r15, %r15
je 0x8206
movq 0x10(%r12), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x7960
leaq 0x9ead(%rip), %rdx      # 0x120a6
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x74e0
movl $0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonfreetype/src/bitmap.c
// Function: moonfreetype_freebitmap
int freebitmap(lua_State *L, FT_Bitmap *bitmap)
    {
    ud_t *ud = userdata(bitmap);
    FT_Library library = ud->library;
    int allocated = ud->allocated;
    if(!freeuserdata(L, bitmap))
        return 0; /* double call */
    DBG("deleting bitmap %p\n", (void*)bitmap);
    if(!allocated)
        return 0;
    FT_Bitmap_Done(library, bitmap);
    Free(L, bitmap);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x7230
movq 0x8(%rax), %r15
movl 0x18(%rax), %ebp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7370
testl %eax, %eax
je 0x826a
leaq 0x9e67(%rip), %rdi      # 0x120ad
movq %rbx, %rsi
xorl %eax, %eax
callq 0x7270
testl %ebp, %ebp
je 0x826a
movq %r15, %rdi
movq %rbx, %rsi
callq 0x7550
movq %r14, %rdi
movq %rbx, %rsi
callq 0x79e0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonfreetype/src/bitmap.c
// Function: New_bitmap
static int New_bitmap(lua_State *L)
/* bitmap = new_bitmap(library) 
 */
    {
    ud_t *ud;
    FT_Library *library = checklibrary(L, 1);
    FT_Bitmap *bitmap = (FT_Bitmap*)Malloc(L, sizeof(FT_Bitmap));

    FT_Bitmap_Init(bitmap);
    DBG("created bitmap %p\n", (void*)bitmap);
    newuserdata(L, (void*)bitmap, BITMAP_MT);
    ud = userdata(bitmap);
    ud->library = *library;
    ud->allocated = 1;
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x1, %esi
callq 0x76c0
movq %rax, %rbx
movl $0x28, %esi
movq %r14, %rdi
callq 0x7c00
movq %rax, %r15
movq %rax, %rdi
callq 0x75b0
leaq 0x9df0(%rip), %rdi      # 0x120e1
movq %r15, %rsi
xorl %eax, %eax
callq 0x7270
leaq 0x9d6c(%rip), %rdx      # 0x1206e
movq %r14, %rdi
movq %r15, %rsi
callq 0x72a0
movq %r15, %rdi
callq 0x7230
movq (%rbx), %rcx
movq %rcx, 0x8(%rax)
movl $0x1, 0x18(%rax)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonfreetype/src/bitmap.c
// Function: Bitmap_copy
static int Bitmap_copy(lua_State *L)
    {
    FT_Error ec;
    ud_t *src_ud, *dst_ud;
    FT_Bitmap *src_bitmap = checkbitmap(L, 1);
    FT_Bitmap *dst_bitmap = checkbitmap(L, 2);
    src_ud = userdata(src_bitmap);
    dst_ud = userdata(dst_bitmap);
    //DBG("libraries: src %p dst %p\n", (void*)(src_ud->library), (void*)(dst_ud->library));
    if(src_ud->library != dst_ud->library)
        return luaL_error(L, "bitmaps do not belong to the same library");
    ec = FT_Bitmap_Copy(src_ud->library, src_bitmap, dst_bitmap);
    CheckError(L, ec);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x7110
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x7110
movq %rax, %r15
movq %r14, %rdi
callq 0x7230
movq %rax, %r12
movq %r15, %rdi
callq 0x7230
movq 0x8(%r12), %rdi
cmpq 0x8(%rax), %rdi
je 0x83b2
leaq 0x9d47(%rip), %rsi      # 0x120f4
movq %rbx, %rdi
jmp 0x83ce
movq %r14, %rsi
movq %r15, %rdx
callq 0x7410
testl %eax, %eax
je 0x83e0
movl %eax, %edi
callq 0x7d00
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x7a60
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonfreetype/src/bitmap.c
// Function: Bitmap_convert
static int Bitmap_convert(lua_State *L)
    {
    FT_Error ec;
    ud_t *src_ud, *dst_ud;
    FT_Bitmap *src_bitmap = checkbitmap(L, 1);
    FT_Bitmap *dst_bitmap = checkbitmap(L, 2);
    FT_Int alignment = luaL_checkinteger(L, 3);
    src_ud = userdata(src_bitmap);
    dst_ud = userdata(dst_bitmap);
    //DBG("libraries: src %p dst %p\n", (void*)(src_ud->library), (void*)(dst_ud->library));
    if(src_ud->library != dst_ud->library)
        return luaL_error(L, "bitmaps do not belong to the same library");
    ec = FT_Bitmap_Convert(src_ud->library, src_bitmap, dst_bitmap, alignment);
    CheckError(L, ec);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x7110
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x7110
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
callq 0x7760
movq %rax, %r12
movq %r14, %rdi
callq 0x7230
movq %rax, %r13
movq %r15, %rdi
callq 0x7230
movq 0x8(%r13), %rdi
cmpq 0x8(%rax), %rdi
je 0x8450
leaq 0x9ca9(%rip), %rsi      # 0x120f4
movq %rbx, %rdi
jmp 0x846f
movq %r14, %rsi
movq %r15, %rdx
movl %r12d, %ecx
callq 0x7920
testl %eax, %eax
je 0x847f
movl %eax, %edi
callq 0x7d00
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x7a60
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonfreetype/src/bitmap.c
// Function: Bitmap_embolden
static int Bitmap_embolden(lua_State *L)
//@@ GlyphSlot_Own_Bitmap ?
    {
    FT_Error ec;
    FT_Bitmap *bitmap = checkbitmap(L, 1);
    FT_Pos xstrength = luaL_checkinteger(L, 2);
    FT_Pos ystrength = luaL_checkinteger(L, 3);
    ud_t *ud = userdata(bitmap);
    ec = FT_Bitmap_Embolden(ud->library, bitmap, xstrength, ystrength);
    CheckError(L, ec);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x7110
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x7760
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
callq 0x7760
movq %rax, %r12
movq %r14, %rdi
callq 0x7230
movq 0x8(%rax), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x7c30
testl %eax, %eax
je 0x8500
movl %eax, %edi
callq 0x7d00
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x7a60
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonfreetype/src/bitmap.c
// Function: Data
static int Data(lua_State *L)
/* bitmapdata = bitmap:data([left, top]) 
 * left and top default to 0 */
    {
    FT_Bitmap *bitmap = checkbitmap(L, 1);
    FT_Int left = luaL_optinteger(L, 2, 0);
    FT_Int top = luaL_optinteger(L, 3, 0);
    pushbitmapdata(L, *bitmap, left, top, 1);
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x7110
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x7820
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x7820
movq 0x20(%r14), %rcx
movq %rcx, 0x20(%rsp)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbx, %rdi
movl %r15d, %esi
movl %eax, %edx
movl $0x1, %ecx
callq 0x7cd0
movl $0x1, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq