LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/mishun[P]plantri/plantri.c
// Function: scanspecialloops
static void
scanspecialloops(EDGE *loop[], int nloops, int nbtot, int nbop)
 
/* The recursive procedure for adding special loops.
   As this procedure is entered, nv,ne,degree etc are set for some graph,
   and nbtot/nbop are the values returned by canon() for that graph.
   loops[0..nloops-1] are all the loops, of which there is at least one.
   The loops are all in min form. */
{
    register int i;
    int xnbtot,xnbop,nloopmakers,ngood;
    EDGE *loopmaker[MAXE],*good[(MAXE+1)/2],*good_inv[(MAXE+1)/2];
 
    got_one(nbtot,nbop,1);

#ifdef PRE_FILTER_SPECIALLOOP
    if (!(PRE_FILTER_SPECIALLOOP)) return;
#endif

    find_special_loopmakers(loop,nloops,loopmaker,&nloopmakers);
    if (nloopmakers == 0) return;
 
    if (nbtot > 1) prune_edgelist(loopmaker,&nloopmakers,nbtot);
 
    for (i = 0; i < nloopmakers; ++i)
    {
        switch_edge(loopmaker[i]);

        loop[nloops] = loopmaker[i];
        find_start_loops(loop,nloops+1,good,good_inv,&ngood);
        if (ngood > 0)
        {
            if (canon_edge_oriented(good,ngood,1,good_inv,ngood,1,
		                        degree,numbering,&xnbtot,&xnbop))
                scanspecialloops(loop,nloops+1,xnbtot,xnbop);
        }

        switch_edge_back(loopmaker[i]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x1788, %rsp           # imm = 0x1788
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl -0x18(%rbp), %edi
movl -0x1c(%rbp), %esi
movl $0x1, %edx
callq 0x8080
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
leaq -0xbd0(%rbp), %rdx
leaq -0x2c(%rbp), %rcx
callq 0x2ff70
cmpl $0x0, -0x2c(%rbp)
jne 0x2faab
jmp 0x2fbae
cmpl $0x1, -0x18(%rbp)
jle 0x2fac4
leaq -0xbd0(%rbp), %rdi
movl -0x18(%rbp), %edx
leaq -0x2c(%rbp), %rsi
callq 0x24fb0
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x2fbae
movslq -0x20(%rbp), %rax
movq -0xbd0(%rbp,%rax,8), %rdi
callq 0x23c60
movslq -0x20(%rbp), %rax
movq -0xbd0(%rbp,%rax,8), %rdx
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
addl $0x1, %esi
leaq -0x11a0(%rbp), %rdx
leaq -0x1770(%rbp), %rcx
leaq -0x30(%rbp), %r8
callq 0x30390
cmpl $0x0, -0x30(%rbp)
jle 0x2fb8f
leaq -0x11a0(%rbp), %rdi
movl -0x30(%rbp), %esi
leaq -0x1770(%rbp), %rcx
movl -0x30(%rbp), %r8d
movl $0x1, %r9d
leaq 0xe0b7(%rip), %rbx      # 0x3dc00
leaq 0xe1b0(%rip), %r11      # 0x3dd00
leaq -0x24(%rbp), %r10
leaq -0x28(%rbp), %rax
movl %r9d, %edx
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0xf4b0
cmpl $0x0, %eax
je 0x2fb8d
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
addl $0x1, %esi
movl -0x24(%rbp), %edx
movl -0x28(%rbp), %ecx
callq 0x2fa60
jmp 0x2fb8f
movslq -0x20(%rbp), %rax
movq -0xbd0(%rbp,%rax,8), %rdi
callq 0x24c40
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x2facb
addq $0x1788, %rsp           # imm = 0x1788
popq %rbx
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mishun[P]plantri/plantri.c
// Function: sortedges
static void
sortedges(EDGE **ed, int ned)

/* Sort an array of edges according to address.
   Good for short arrays only. */
{
    register int i,j;
    EDGE *edi;

    for (i = 1; i < ned; ++i)
    {
        edi = ed[i];
        for (j = i; ed[j-1] > edi; )
        {
            ed[j] = ed[j-1];
            if (--j <= 0) break;
        }
        ed[j] = edi;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x1, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x2fc51
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
cmpq -0x20(%rbp), %rax
jbe 0x2fc36
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jg 0x2fc34
jmp 0x2fc36
jmp 0x2fbf0
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2fbd2
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mishun[P]plantri/plantri.c
// Function: bipnftlaststep
static void
bipnftlaststep(EDGE *extP[], int *nextP, triangle nft[], int numnft)

/* Remove from extP[0..*nextP-1] those extensions which do not
   hit all of nft[0..numnft-1]. */
{
    int i,j,k;

    for (j = 0; j < numnft; ++j)
    {
        RESETMARKS;
        MARKLO(nft[j].e1); MARKLO(nft[j].e1->invers);
        MARKLO(nft[j].e2); MARKLO(nft[j].e2->invers);
        MARKLO(nft[j].e3); MARKLO(nft[j].e3->invers);
        
        k = 0;
        for (i = 0; i < *nextP; ++i)
            if (ISMARKEDLO(extP[i])) extP[k++] = extP[i];
        *nextP = k;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x32834
movl 0x99c8(%rip), %eax      # 0x3c084
addl $0x2, %eax
movl %eax, 0x99bf(%rip)      # 0x3c084
cmpl $0x7530, %eax           # imm = 0x7530
jle 0x3270c
movl $0x2, 0x99ae(%rip)      # 0x3c084
movl $0x0, -0x2c(%rbp)
cmpl $0x1198, -0x2c(%rbp)    # imm = 0x1198
jge 0x3270a
movslq -0x2c(%rbp), %rcx
leaq 0x227f3f(%rip), %rax    # 0x25a630
shlq $0x6, %rcx
addq %rcx, %rax
movl $0x0, 0x30(%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x326dd
jmp 0x3270c
movl 0x9972(%rip), %ecx      # 0x3c084
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq (%rax), %rax
movl %ecx, 0x30(%rax)
movl 0x9957(%rip), %ecx      # 0x3c084
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq (%rax), %rax
movq 0x20(%rax), %rax
movl %ecx, 0x30(%rax)
movl 0x9938(%rip), %ecx      # 0x3c084
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq 0x8(%rax), %rax
movl %ecx, 0x30(%rax)
movl 0x991c(%rip), %ecx      # 0x3c084
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rax
movl %ecx, 0x30(%rax)
movl 0x98fc(%rip), %ecx      # 0x3c084
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq 0x10(%rax), %rax
movl %ecx, 0x30(%rax)
movl 0x98e0(%rip), %ecx      # 0x3c084
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq 0x10(%rax), %rax
movq 0x20(%rax), %rax
movl %ecx, 0x30(%rax)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x3281d
movq -0x8(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x30(%rax), %eax
cmpl 0x9898(%rip), %eax      # 0x3c084
jne 0x32810
movq -0x8(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movl -0x28(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x28(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x32812
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x327cc
movl -0x28(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x326aa
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mishun[P]plantri/plantri.c
// Function: is_bip_P
static int
is_bip_P(EDGE *e)

/* Return 1 if e is the reference edge of a valid P reduction,
   otherwise 0.  It must be that e is an edge of the graph. */
{
    int z;
    EDGE *e1,*ew,*ewlast;

    if (degree[e->start] != 4 || degree[e->end] == 4) return 0;
    if (degree[e->next->end] == 4 || degree[e->prev->end] == 4) return 0;
    e1 = e->next->next;
    if (degree[e1->end] != 4) return 0;
    z = e1->invers->next->next->end;
    if (degree[z] == 4) return 1;
    ew = e->invers;
    ewlast = ew->prev;
    for (ew = ew->next->next; ew != ewlast; ew = ew->next)
        if (ew->end == z) break;
    if (ew != ewlast) return 0;
    else              return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movslq (%rax), %rcx
leaq 0xa01a(%rip), %rax      # 0x3dc00
cmpl $0x4, (%rax,%rcx,4)
jne 0x33c01
movq -0x10(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0xa005(%rip), %rax      # 0x3dc00
cmpl $0x4, (%rax,%rcx,4)
jne 0x33c0d
movl $0x0, -0x4(%rbp)
jmp 0x33d16
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq 0x4(%rax), %rcx
leaq 0x9fe0(%rip), %rax      # 0x3dc00
cmpl $0x4, (%rax,%rcx,4)
je 0x33c3f
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rax), %rcx
leaq 0x9fc7(%rip), %rax      # 0x3dc00
cmpl $0x4, (%rax,%rcx,4)
jne 0x33c4b
movl $0x0, -0x4(%rbp)
jmp 0x33d16
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x9f96(%rip), %rax      # 0x3dc00
cmpl $0x4, (%rax,%rcx,4)
je 0x33c7c
movl $0x0, -0x4(%rbp)
jmp 0x33d16
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %eax
movl %eax, -0x14(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x9f63(%rip), %rax      # 0x3dc00
cmpl $0x4, (%rax,%rcx,4)
jne 0x33cac
movl $0x1, -0x4(%rbp)
jmp 0x33d16
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x33cfc
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x33cec
jmp 0x33cfc
jmp 0x33cee
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x33cd4
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x33d0f
movl $0x0, -0x4(%rbp)
jmp 0x33d16
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mishun[P]plantri/plantri.c
// Function: legal_P1_reduction_nf4
static int
legal_P1_reduction_nf4(EDGE *e)

/* checks whether the edge e characterizes a legal P1-reduction.
   Version for 3-connected quadrangulations without non-facial 4-cycles.
   Returns 1 if yes, 0 otherwise.

   It is assumed that edge->start has degree 3, and that both the side
   vertices edge->next->end and edge->prev->end have degree at least 4.
*/

{
    EDGE *e1,*e1last,*e2,*e2last;

    if (degree[e->end] == 3) return TRUE;

    RESETMARKS_V;

    e1 = e->invers;
    e1last = e1->prev;
    e1 = e1->next->next;
    do
    {
	MARK_V(e1->end);
	e1 = e1->next;
    } while (e1 != e1last);

    e1 = e->next->invers->prev->invers;
    e1last = e1->prev;
    e1 = e1->next;
    do
    {
	e2last = e1->invers;
	e2 = e2last->next;
	do
	{
	    if (ISMARKED_V(e2->end)) return FALSE;
	    e2 = e2->next;
	} while (e2 != e2last);
        
        e1 = e1->next;
    } while (e1 != e1last);

    return TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x81a9(%rip), %rax      # 0x3dc00
cmpl $0x3, (%rax,%rcx,4)
jne 0x35a69
movl $0x1, -0x4(%rbp)
jmp 0x35ba9
movl 0x6621(%rip), %eax      # 0x3c090
addl $0x1, %eax
movl %eax, 0x6618(%rip)      # 0x3c090
cmpl $0x7530, %eax           # imm = 0x7530
jle 0x35ab5
movl $0x1, 0x6607(%rip)      # 0x3c090
movl $0x0, -0x34(%rbp)
cmpl $0x40, -0x34(%rbp)
jge 0x35ab3
movslq -0x34(%rbp), %rcx
leaq 0x26b19f(%rip), %rax    # 0x2a0c40
movl $0x0, (%rax,%rcx,4)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x35a90
jmp 0x35ab5
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movl 0x65ad(%rip), %edx      # 0x3c090
movq -0x18(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x26b14e(%rip), %rax    # 0x2a0c40
movl %edx, (%rax,%rcx,4)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x35add
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x26b0de(%rip), %rax    # 0x2a0c40
movl (%rax,%rcx,4), %eax
cmpl 0x6525(%rip), %eax      # 0x3c090
jne 0x35b76
movl $0x0, -0x4(%rbp)
jmp 0x35ba9
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x35b53
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x35b3b
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/soso7885[P]OPCUA_example/demo_src/server_repeated_job.c
// Function: main
int main(int argc, char** argv) {
    signal(SIGINT, stopHandler); /* catches ctrl-c */

    UA_ServerConfig config = UA_ServerConfig_standard;
    UA_ServerNetworkLayer nl = UA_ServerNetworkLayerTCP(UA_ConnectionConfig_standard, 16664);
    config.networkLayers = &nl;
    config.networkLayersSize = 1;
    UA_Server *server = UA_Server_new(config);

    /* add a repeated job to the server */
    UA_Job job = {.type = UA_JOBTYPE_METHODCALL,
                  .job.methodCall = {.method = testCallback, .data = NULL} };
    UA_Server_addRepeatedJob(server, job, 2000, NULL); // call every 2 sec

    UA_StatusCode retval = UA_Server_run(server, &running);
    UA_Server_delete(server);
    nl.deleteMembers(&nl);
    return (int)retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x350, %rsp            # imm = 0x350
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x2, %edi
leaq 0x15b(%rip), %rsi       # 0x1320
callq 0x1070
leaq -0x170(%rbp), %rdi
movq 0x2e08(%rip), %rsi      # 0x3fe0
movl $0x160, %edx            # imm = 0x160
callq 0x1060
movq 0x2e07(%rip), %rax      # 0x3ff0
movq (%rax), %rcx
movq %rcx, -0x1c0(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x1b8(%rbp)
movl 0x10(%rax), %eax
movl %eax, -0x1b0(%rbp)
leaq -0x1a8(%rbp), %rdi
leaq -0x1c0(%rbp), %rax
movl $0x4118, %esi           # imm = 0x4118
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movl 0x10(%rax), %eax
movl %eax, 0x10(%rsp)
callq 0x1040
leaq -0x1a8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq $0x1, -0x80(%rbp)
movq %rsp, %rdi
movl $0x2c, %ecx
leaq -0x170(%rbp), %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x1030
movq %rax, -0x1c8(%rbp)
movq 0x2b4a(%rip), %rax      # 0x3db8
movq %rax, -0x1e8(%rbp)
movq 0x2b44(%rip), %rax      # 0x3dc0
movq %rax, -0x1e0(%rbp)
movq 0x2b3e(%rip), %rax      # 0x3dc8
movq %rax, -0x1d8(%rbp)
movq 0x2b38(%rip), %rax      # 0x3dd0
movq %rax, -0x1d0(%rbp)
movq -0x1c8(%rbp), %rdi
leaq -0x1e8(%rbp), %rax
movl $0x7d0, %esi            # imm = 0x7D0
xorl %ecx, %ecx
movl %ecx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x1050
movq -0x1c8(%rbp), %rdi
leaq 0x2d75(%rip), %rsi      # 0x4060
callq 0x1080
movl %eax, -0x1ec(%rbp)
movq -0x1c8(%rbp), %rdi
callq 0x1090
leaq -0x1a8(%rbp), %rdi
callq *-0x178(%rbp)
movl -0x1ec(%rbp), %eax
addq $0x350, %rsp            # imm = 0x350
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/main.c
// Function: hash_fun
unsigned int hash_fun(void* key,int hashtable_size)
{
    unsigned int hash = 0;
    char* str = key;
    while(*str)
    {
        hash += (hash << 5) + (*str++);
    }

    return ( hash & 0x7fffffff ) % hashtable_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x39f5
movl -0x10(%rbp), %eax
shll $0x5, %eax
movq -0x18(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movsbl (%rcx), %ecx
addl %ecx, %eax
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x39ca
movl -0x10(%rbp), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %edx, %edx
divl -0xc(%rbp)
movl %edx, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/sysutil.c
// Function: file_rdlock
int file_rdlock(int filefd)
{
    struct flock lk;
    lk.l_type = F_RDLCK;
    lk.l_whence = SEEK_SET;
    lk.l_start = 0;
    lk.l_len = 0;

    return fcntl(filefd,F_SETLK,&lk);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movw $0x0, -0x28(%rbp)
movw $0x0, -0x26(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
movl -0x4(%rbp), %edi
movl $0x6, %esi
leaq -0x28(%rbp), %rdx
movb $0x0, %al
callq 0x30e0
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/sysutil.c
// Function: tcp_srv
int tcp_srv(const char* host,const unsigned short port)
{
    int fd = socket(AF_INET,SOCK_STREAM,0);
    if (-1 == fd)
        ERR_EXIT("socket error");

    int on = 1;
    if (-1 == setsockopt(fd,SOL_SOCKET,SO_REUSEADDR,(const char*)&on,sizeof(on)))
        ERR_EXIT("setsockopt error");

    struct sockaddr_in srvaddr;
    memset(&srvaddr,0,sizeof(srvaddr));
    srvaddr.sin_family = AF_INET;
    srvaddr.sin_port = htons(port);
    if (NULL != host)
    {
        if (0 == inet_aton(host,&srvaddr.sin_addr))
            ERR_EXIT("inet_aton");
    }
    else
        srvaddr.sin_addr.s_addr = htonl(INADDR_ANY);

    if (-1 == bind(fd,(struct sockaddr*)&srvaddr,sizeof(srvaddr)))
        ERR_EXIT("bind error");

    if (-1 == listen(fd,10))
        ERR_EXIT("listen error");

    return fd;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x3540
movl %eax, -0x10(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl -0x10(%rbp), %eax
jne 0x3bd9
jmp 0x3bc3
leaq 0x551c(%rip), %rdi      # 0x90e6
callq 0x3470
movl $0x1, %edi
callq 0x34e0
movl $0x1, -0x14(%rbp)
movl -0x10(%rbp), %edi
movl $0x1, %esi
movl $0x2, %edx
leaq -0x14(%rbp), %rcx
movl $0x4, %r8d
callq 0x30c0
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x3c1f
jmp 0x3c09
leaq 0x54e3(%rip), %rdi      # 0x90f3
callq 0x3470
movl $0x1, %edi
callq 0x34e0
leaq -0x24(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x3220
movw $0x2, -0x24(%rbp)
movzwl -0xa(%rbp), %edi
callq 0x3190
movw %ax, -0x22(%rbp)
xorl %eax, %eax
cmpq -0x8(%rbp), %rax
je 0x3c7d
movq -0x8(%rbp), %rdi
leaq -0x24(%rbp), %rsi
addq $0x4, %rsi
callq 0x3380
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x3c7b
jmp 0x3c65
leaq 0x5498(%rip), %rdi      # 0x9104
callq 0x3470
movl $0x1, %edi
callq 0x34e0
jmp 0x3c87
xorl %edi, %edi
callq 0x3210
movl %eax, -0x20(%rbp)
movl -0x10(%rbp), %edi
leaq -0x24(%rbp), %rsi
movl $0x10, %edx
callq 0x3410
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x3cbb
jmp 0x3ca5
leaq 0x5462(%rip), %rdi      # 0x910e
callq 0x3470
movl $0x1, %edi
callq 0x34e0
movl -0x10(%rbp), %edi
movl $0xa, %esi
callq 0x33c0
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x3ceb
jmp 0x3cd5
leaq 0x543d(%rip), %rdi      # 0x9119
callq 0x3470
movl $0x1, %edi
callq 0x34e0
movl -0x10(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/sysutil.c
// Function: tcp_clnt
int tcp_clnt(const char* host,const unsigned short port)
{
    int fd = socket(PF_INET,SOCK_STREAM,0);
    if (-1 == fd)
        ERR_EXIT("socket error");

    int on = 1;
    if (-1 == setsockopt(fd,SOL_SOCKET,SO_REUSEADDR,(const char*)&on,sizeof(on)))
        ERR_EXIT("setsockopt error");
    
    if ( port > 0 )
    {
        struct sockaddr_in srvaddr;
        memset(&srvaddr,0,sizeof(srvaddr));
        srvaddr.sin_family = AF_INET;
        srvaddr.sin_port = htons(port);
        if (0 == inet_aton(host,&srvaddr.sin_addr))
            ERR_EXIT("inet_aton");
        if (-1 == bind(fd,(struct sockaddr*)&srvaddr,sizeof(srvaddr)))
            ERR_EXIT("bind error");
    }

    return fd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x3540
movl %eax, -0x10(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl -0x10(%rbp), %eax
jne 0x3d49
jmp 0x3d33
leaq 0x53ac(%rip), %rdi      # 0x90e6
callq 0x3470
movl $0x1, %edi
callq 0x34e0
movl $0x1, -0x14(%rbp)
movl -0x10(%rbp), %edi
movl $0x1, %esi
movl $0x2, %edx
leaq -0x14(%rbp), %rcx
movl $0x4, %r8d
callq 0x30c0
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x3d8f
jmp 0x3d79
leaq 0x5373(%rip), %rdi      # 0x90f3
callq 0x3470
movl $0x1, %edi
callq 0x34e0
movzwl -0xa(%rbp), %eax
cmpl $0x0, %eax
jle 0x3e26
leaq -0x24(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x3220
movw $0x2, -0x24(%rbp)
movzwl -0xa(%rbp), %edi
callq 0x3190
movw %ax, -0x22(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x24(%rbp), %rsi
addq $0x4, %rsi
callq 0x3380
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x3df0
jmp 0x3dda
leaq 0x5323(%rip), %rdi      # 0x9104
callq 0x3470
movl $0x1, %edi
callq 0x34e0
movl -0x10(%rbp), %edi
leaq -0x24(%rbp), %rsi
movl $0x10, %edx
callq 0x3410
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x3e24
jmp 0x3e0e
leaq 0x52f9(%rip), %rdi      # 0x910e
callq 0x3470
movl $0x1, %edi
callq 0x34e0
jmp 0x3e26
movl -0x10(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/sysutil.c
// Function: getlocalip
int getlocalip(char *ip)
{
    int sockfd; 
    if(-1 == (sockfd = socket(PF_INET, SOCK_STREAM, 0)))
    {
        perror( "socket" );
        return -1;
    }
    struct ifreq req;
    struct sockaddr_in *host;
    bzero(&req, sizeof(struct ifreq));
    strcpy(req.ifr_name, "eth0"); 
    ioctl(sockfd, SIOCGIFADDR, &req);
    host = (struct sockaddr_in*)&req.ifr_addr;
    strcpy(ip, inet_ntoa(host->sin_addr));
    close(sockfd);
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x3540
movl %eax, %ecx
movl %ecx, -0x14(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x3e70
leaq 0x52c4(%rip), %rdi      # 0x9126
callq 0x3470
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3ede
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x3220
leaq -0x40(%rbp), %rdi
leaq 0x52a2(%rip), %rsi      # 0x912d
callq 0x3080
movl -0x14(%rbp), %edi
movl $0x8915, %esi           # imm = 0x8915
leaq -0x40(%rbp), %rdx
movb $0x0, %al
callq 0x3230
leaq -0x40(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movl 0x4(%rax), %edi
callq 0x3110
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x3080
movl -0x14(%rbp), %edi
callq 0x3260
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/sysutil.c
// Function: activate_nonblock
void activate_nonblock(int fd)
{
    int ret;
    int flags = fcntl(fd, F_GETFL);
    if (flags == -1)
        ERR_EXIT("fcntl");

    flags |= O_NONBLOCK;
    ret = fcntl(fd, F_SETFL, flags);
    if (ret == -1)
        ERR_EXIT("fcntl");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %edi
movl $0x3, %esi
movb $0x0, %al
callq 0x30e0
movl %eax, -0xc(%rbp)
cmpl $-0x1, -0xc(%rbp)
jne 0x3f2b
jmp 0x3f15
leaq 0x5216(%rip), %rdi      # 0x9132
callq 0x3470
movl $0x1, %edi
callq 0x34e0
movl -0xc(%rbp), %eax
orl $0x800, %eax            # imm = 0x800
movl %eax, -0xc(%rbp)
movl -0x4(%rbp), %edi
movl -0xc(%rbp), %edx
movl $0x4, %esi
movb $0x0, %al
callq 0x30e0
movl %eax, -0x8(%rbp)
cmpl $-0x1, -0x8(%rbp)
jne 0x3f69
jmp 0x3f53
leaq 0x51d8(%rip), %rdi      # 0x9132
callq 0x3470
movl $0x1, %edi
callq 0x34e0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/sysutil.c
// Function: read_timeout
int read_timeout(int fd, unsigned int wait_seconds)
{
    int ret = 0;
    if (wait_seconds > 0)
    {
        fd_set read_fdset;
        struct timeval timeout;

        FD_ZERO(&read_fdset);
        FD_SET(fd, &read_fdset);

        timeout.tv_sec = wait_seconds;
        timeout.tv_usec = 0;
        do
        {
            ret = select(fd + 1, &read_fdset, NULL, NULL, &timeout);
        } while (ret < 0 && errno == EINTR);

        if (ret == 0)
        {
            ret = -1;
            errno = ETIMEDOUT;
        }
        else if (ret == 1)
            ret = 0;
    }

    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x0, -0x8(%rbp)
jbe 0x4123
jmp 0x4014
leaq -0x90(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl $0x0, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
cmpq $0x10, %rax
jae 0x405e
movq -0xb0(%rbp), %rax
movl -0xa4(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0x402c
jmp 0x4060
movl -0x4(%rbp), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movl -0x4(%rbp), %eax
movl $0x40, %esi
cltd
idivl %esi
cltq
orq -0x90(%rbp,%rax,8), %rcx
movq %rcx, -0x90(%rbp,%rax,8)
movl -0x8(%rbp), %eax
movq %rax, -0xa0(%rbp)
movq $0x0, -0x98(%rbp)
movl -0x4(%rbp), %edi
addl $0x1, %edi
leaq -0x90(%rbp), %rsi
xorl %eax, %eax
movl %eax, %ecx
leaq -0xa0(%rbp), %r8
movq %rcx, %rdx
callq 0x3370
movl %eax, -0xc(%rbp)
xorl %eax, %eax
cmpl $0x0, -0xc(%rbp)
movb %al, -0xb1(%rbp)
jge 0x40ee
callq 0x3050
cmpl $0x4, (%rax)
sete %al
movb %al, -0xb1(%rbp)
movb -0xb1(%rbp), %al
testb $0x1, %al
jne 0x40ac
cmpl $0x0, -0xc(%rbp)
jne 0x4112
movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF
callq 0x3050
movl $0x6e, (%rax)
jmp 0x4121
cmpl $0x1, -0xc(%rbp)
jne 0x411f
movl $0x0, -0xc(%rbp)
jmp 0x4121
jmp 0x4123
movl -0xc(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/sysutil.c
// Function: write_timeout
int write_timeout(int fd, unsigned int wait_seconds)
{
    int ret = 0;
    if (wait_seconds > 0)
    {
        fd_set write_fdset;
        struct timeval timeout;

        FD_ZERO(&write_fdset);
        FD_SET(fd, &write_fdset);

        timeout.tv_sec = wait_seconds;
        timeout.tv_usec = 0;
        do
        {
            ret = select(fd + 1, NULL, NULL, &write_fdset, &timeout);
        } while (ret < 0 && errno == EINTR);

        if (ret == 0)
        {
            ret = -1;
            errno = ETIMEDOUT;
        }
        else if (ret == 1)
            ret = 0;
    }

    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x0, -0x8(%rbp)
jbe 0x4263
jmp 0x4154
leaq -0x90(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl $0x0, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
cmpq $0x10, %rax
jae 0x419e
movq -0xb0(%rbp), %rax
movl -0xa4(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0x416c
jmp 0x41a0
movl -0x4(%rbp), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movl -0x4(%rbp), %eax
movl $0x40, %esi
cltd
idivl %esi
cltq
orq -0x90(%rbp,%rax,8), %rcx
movq %rcx, -0x90(%rbp,%rax,8)
movl -0x8(%rbp), %eax
movq %rax, -0xa0(%rbp)
movq $0x0, -0x98(%rbp)
movl -0x4(%rbp), %edi
addl $0x1, %edi
xorl %eax, %eax
movl %eax, %edx
leaq -0x90(%rbp), %rcx
leaq -0xa0(%rbp), %r8
movq %rdx, %rsi
callq 0x3370
movl %eax, -0xc(%rbp)
xorl %eax, %eax
cmpl $0x0, -0xc(%rbp)
movb %al, -0xb1(%rbp)
jge 0x422e
callq 0x3050
cmpl $0x4, (%rax)
sete %al
movb %al, -0xb1(%rbp)
movb -0xb1(%rbp), %al
testb $0x1, %al
jne 0x41ec
cmpl $0x0, -0xc(%rbp)
jne 0x4252
movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF
callq 0x3050
movl $0x6e, (%rax)
jmp 0x4261
cmpl $0x1, -0xc(%rbp)
jne 0x425f
movl $0x0, -0xc(%rbp)
jmp 0x4261
jmp 0x4263
movl -0xc(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/sysutil.c
// Function: accept_timeout
int accept_timeout(int fd, struct sockaddr_in *addr, unsigned int wait_seconds)
{
    int ret;
    socklen_t addrlen = sizeof(struct sockaddr_in);

    if (wait_seconds > 0)
    {
        fd_set accept_fdset;
        struct timeval timeout;
        FD_ZERO(&accept_fdset);
        FD_SET(fd, &accept_fdset);
        timeout.tv_sec = wait_seconds;
        timeout.tv_usec = 0;
        do
        {
            ret = select(fd + 1, &accept_fdset, NULL, NULL, &timeout);
        } while (ret < 0 && errno == EINTR);
        if (ret == -1)
            return -1;
        else if (ret == 0)
        {
            errno = ETIMEDOUT;
            return -1;
        }
    }

    if (addr != NULL)
        ret = accept(fd, (struct sockaddr*)addr, &addrlen);
    else
        ret = accept(fd, NULL, NULL);
/*  if (ret == -1)
        ERR_EXIT("accept");
        */

    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x10, -0x1c(%rbp)
cmpl $0x0, -0x14(%rbp)
jbe 0x43a9
jmp 0x4298
leaq -0xa0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movl $0x0, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
cmpq $0x10, %rax
jae 0x42e2
movq -0xc0(%rbp), %rax
movl -0xb4(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0xb4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb4(%rbp)
jmp 0x42b0
jmp 0x42e4
movl -0x8(%rbp), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movl -0x8(%rbp), %eax
movl $0x40, %esi
cltd
idivl %esi
cltq
orq -0xa0(%rbp,%rax,8), %rcx
movq %rcx, -0xa0(%rbp,%rax,8)
movl -0x14(%rbp), %eax
movq %rax, -0xb0(%rbp)
movq $0x0, -0xa8(%rbp)
movl -0x8(%rbp), %edi
addl $0x1, %edi
leaq -0xa0(%rbp), %rsi
xorl %eax, %eax
movl %eax, %ecx
leaq -0xb0(%rbp), %r8
movq %rcx, %rdx
callq 0x3370
movl %eax, -0x18(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x18(%rbp)
movb %al, -0xc1(%rbp)
jge 0x4372
callq 0x3050
cmpl $0x4, (%rax)
sete %al
movb %al, -0xc1(%rbp)
movb -0xc1(%rbp), %al
testb $0x1, %al
jne 0x4330
cmpl $-0x1, -0x18(%rbp)
jne 0x438b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x43dd
cmpl $0x0, -0x18(%rbp)
jne 0x43a5
callq 0x3050
movl $0x6e, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x43dd
jmp 0x43a7
jmp 0x43a9
cmpq $0x0, -0x10(%rbp)
je 0x43c5
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq -0x1c(%rbp), %rdx
callq 0x34a0
movl %eax, -0x18(%rbp)
jmp 0x43d7
movl -0x8(%rbp), %edi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x34a0
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/sysutil.c
// Function: readn
ssize_t readn(int fd, void *buf, size_t count)
{
    size_t nleft = count;
    ssize_t nread;
    char *bufp = (char*)buf;

    while (nleft > 0)
    {
        if ((nread = read(fd, bufp, nleft)) < 0)
        {
            if (errno == EINTR)
                continue;
            return -1;
        }
        else if (nread == 0)
            return count - nleft;

        bufp += nread;
        nleft -= nread;
    }

    return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x28(%rbp)
jbe 0x468e
movl -0xc(%rbp), %edi
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x3280
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jge 0x465a
callq 0x3050
cmpl $0x4, (%rax)
jne 0x4650
jmp 0x4623
movq $-0x1, -0x8(%rbp)
jmp 0x4696
cmpq $0x0, -0x30(%rbp)
jne 0x466f
movq -0x20(%rbp), %rax
subq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4696
jmp 0x4671
movq -0x30(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x4623
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/sysutil.c
// Function: writen
ssize_t writen(int fd, const void *buf, size_t count)
{
    size_t nleft = count;
    ssize_t nwritten;
    char *bufp = (char*)buf;

    while (nleft > 0)
    {
        if ((nwritten = write(fd, bufp, nleft)) < 0)
        {
            if (errno == EINTR)
                continue;
            return -1;
        }
        else if (nwritten == 0)
            continue;

        bufp += nwritten;
        nleft -= nwritten;
    }

    return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x28(%rbp)
jbe 0x4722
movl -0xc(%rbp), %edi
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x30f0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jge 0x46fa
callq 0x3050
cmpl $0x4, (%rax)
jne 0x46f0
jmp 0x46c3
movq $-0x1, -0x8(%rbp)
jmp 0x472a
cmpq $0x0, -0x30(%rbp)
jne 0x4703
jmp 0x46c3
jmp 0x4705
movq -0x30(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x46c3
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/sysutil.c
// Function: recv_peek
ssize_t recv_peek(int sockfd, void *buf, size_t len)
{
    while (1)
    {
        int ret = recv(sockfd, buf, len, MSG_PEEK);
        if (ret == -1 && errno == EINTR)
            continue;
        return ret;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl $0x2, %ecx
callq 0x3040
movl %eax, -0x1c(%rbp)
cmpl $-0x1, -0x1c(%rbp)
jne 0x477d
callq 0x3050
cmpl $0x4, (%rax)
jne 0x477d
jmp 0x4753
movslq -0x1c(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/sysutil.c
// Function: readline
ssize_t readline(int sockfd, void *buf, size_t maxline)
{
    int ret;
    int nread;
    char *bufp = buf;
    int nleft = maxline;
    while (1)
    {
        ret = recv_peek(sockfd, bufp, nleft);
        if (ret < 0)
            return ret;
        else if (ret == 0)
            return ret;

        nread = ret;
        int i;
        for (i=0; i<nread; i++)
        {
            if (bufp[i] == '\n')
            {
                ret = readn(sockfd, bufp, i+1);
                if (ret != i+1)
                    exit(EXIT_FAILURE);

                return ret;
            }
        }

        if (nread > nleft)
            exit(EXIT_FAILURE);

        nleft -= nread;
        ret = readn(sockfd, bufp, nread);
        if (ret != nread)
            exit(EXIT_FAILURE);

        bufp += nread;
    }

    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movl %eax, -0x34(%rbp)
movl -0xc(%rbp), %edi
movq -0x30(%rbp), %rsi
movslq -0x34(%rbp), %rdx
callq 0x4740
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jge 0x47d8
movslq -0x24(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x48b1
cmpl $0x0, -0x24(%rbp)
jne 0x47eb
movslq -0x24(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x48b1
jmp 0x47ed
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x28(%rbp), %eax
jge 0x4859
movq -0x30(%rbp), %rax
movslq -0x38(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x484c
movl -0xc(%rbp), %edi
movq -0x30(%rbp), %rsi
movl -0x38(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdx
callq 0x4600
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl -0x38(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
je 0x4842
movl $0x1, %edi
callq 0x34e0
movslq -0x24(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x48b1
jmp 0x484e
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x47fa
movl -0x28(%rbp), %eax
cmpl -0x34(%rbp), %eax
jle 0x486b
movl $0x1, %edi
callq 0x34e0
movl -0x28(%rbp), %ecx
movl -0x34(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x34(%rbp)
movl -0xc(%rbp), %edi
movq -0x30(%rbp), %rsi
movslq -0x28(%rbp), %rdx
callq 0x4600
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
je 0x489b
movl $0x1, %edi
callq 0x34e0
movl -0x28(%rbp), %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
jmp 0x47b2
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/sysutil.c
// Function: send_fd
void send_fd(int sock_fd, int fd)
{
    int ret;
    struct msghdr msg;
    struct cmsghdr *p_cmsg;
    struct iovec vec;
    char cmsgbuf[CMSG_SPACE(sizeof(fd))];
    int *p_fds;
    char sendchar = 0;
    msg.msg_control = cmsgbuf;
    msg.msg_controllen = sizeof(cmsgbuf);
    p_cmsg = CMSG_FIRSTHDR(&msg);
    p_cmsg->cmsg_level = SOL_SOCKET;
    p_cmsg->cmsg_type = SCM_RIGHTS;
    p_cmsg->cmsg_len = CMSG_LEN(sizeof(fd));
    p_fds = (int*)CMSG_DATA(p_cmsg);
    *p_fds = fd;

    msg.msg_name = NULL;
    msg.msg_namelen = 0;
    msg.msg_iov = &vec;
    msg.msg_iovlen = 1;
    msg.msg_flags = 0;

    vec.iov_base = &sendchar;
    vec.iov_len = sizeof(sendchar);
    ret = sendmsg(sock_fd, &msg, 0);
    if (ret != 1)
        ERR_EXIT("sendmsg");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movb $0x0, -0x89(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x18, -0x20(%rbp)
cmpq $0x10, -0x20(%rbp)
jb 0x48fc
movq -0x28(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x4907
xorl %eax, %eax
movq %rax, -0x98(%rbp)
jmp 0x4907
movq -0x98(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movl $0x1, 0x8(%rax)
movq -0x50(%rbp), %rax
movl $0x1, 0xc(%rax)
movq -0x50(%rbp), %rax
movq $0x14, (%rax)
movq -0x50(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x88(%rbp)
movl -0x8(%rbp), %ecx
movq -0x88(%rbp), %rax
movl %ecx, (%rax)
movq $0x0, -0x48(%rbp)
movl $0x0, -0x40(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x1, -0x30(%rbp)
movl $0x0, -0x18(%rbp)
leaq -0x89(%rbp), %rax
movq %rax, -0x60(%rbp)
movq $0x1, -0x58(%rbp)
movl -0x4(%rbp), %edi
leaq -0x48(%rbp), %rsi
xorl %edx, %edx
callq 0x30a0
movl %eax, -0xc(%rbp)
cmpl $0x1, -0xc(%rbp)
je 0x49b6
jmp 0x49a0
leaq 0x4791(%rip), %rdi      # 0x9138
callq 0x3470
movl $0x1, %edi
callq 0x34e0
addq $0xa0, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/sysutil.c
// Function: recv_fd
int recv_fd(const int sock_fd)
{
    int ret;
    struct msghdr msg;
    char recvchar;
    struct iovec vec;
    int recv_fd;
    char cmsgbuf[CMSG_SPACE(sizeof(recv_fd))];
    struct cmsghdr *p_cmsg;
    int *p_fd;
    vec.iov_base = &recvchar;
    vec.iov_len = sizeof(recvchar);
    msg.msg_name = NULL;
    msg.msg_namelen = 0;
    msg.msg_iov = &vec;
    msg.msg_iovlen = 1;
    msg.msg_control = cmsgbuf;
    msg.msg_controllen = sizeof(cmsgbuf);
    msg.msg_flags = 0;

    p_fd = (int*)CMSG_DATA(CMSG_FIRSTHDR(&msg));
    *p_fd = -1;
    ret = recvmsg(sock_fd, &msg, 0);
    if (ret != 1)
        ERR_EXIT("recvmsg");

    p_cmsg = CMSG_FIRSTHDR(&msg);
    if (p_cmsg == NULL)
        ERR_EXIT("no passed fd");


    p_fd = (int*)CMSG_DATA(p_cmsg);
    recv_fd = *p_fd;
    if (recv_fd == -1)
        ERR_EXIT("no passed fd");

    return recv_fd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl %edi, -0x4(%rbp)
leaq -0x41(%rbp), %rax
movq %rax, -0x58(%rbp)
movq $0x1, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
movl $0x0, -0x38(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x1, -0x28(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x18, -0x18(%rbp)
movl $0x0, -0x10(%rbp)
cmpq $0x10, -0x18(%rbp)
jb 0x4a28
movq -0x20(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x4a33
xorl %eax, %eax
movq %rax, -0x98(%rbp)
jmp 0x4a33
movq -0x98(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movl -0x4(%rbp), %edi
leaq -0x40(%rbp), %rsi
xorl %edx, %edx
callq 0x33e0
movl %eax, -0x8(%rbp)
cmpl $0x1, -0x8(%rbp)
je 0x4a81
jmp 0x4a6b
leaq 0x46ce(%rip), %rdi      # 0x9140
callq 0x3470
movl $0x1, %edi
callq 0x34e0
cmpq $0x10, -0x18(%rbp)
jb 0x4a95
movq -0x20(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0x4aa0
xorl %eax, %eax
movq %rax, -0xa0(%rbp)
jmp 0x4aa0
movq -0xa0(%rbp), %rax
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x88(%rbp)
jne 0x4ad0
jmp 0x4aba
leaq 0x4687(%rip), %rdi      # 0x9148
callq 0x3470
movl $0x1, %edi
callq 0x34e0
movq -0x88(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x5c(%rbp)
cmpl $-0x1, -0x5c(%rbp)
jne 0x4b0c
jmp 0x4af6
leaq 0x464b(%rip), %rdi      # 0x9148
callq 0x3470
movl $0x1, %edi
callq 0x34e0
movl -0x5c(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/session.c
// Function: init_session
void init_session(session_t* ssinf,int conn)
{
    memset(ssinf,0,sizeof(session_t));
    ssinf->ctrlfd = conn;
    ssinf->protofd = ssinf->nobodyfd = -1;

    ssinf->bASCII = 0;

    ssinf->rn_filepath = NULL;
    ssinf->pasv_lsfd = -1;

    ssinf->burg = 0;

    ssinf->ip = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0xc48, %edx            # imm = 0xC48
callq 0x3220
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x4(%rax)  # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xc28(%rax)
movq -0x8(%rbp), %rax
movl $0xffffffff, 0xc20(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl $0x0, 0xc40(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xc44(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/session.c
// Function: begin_session
int begin_session(session_t* sessioninf)
{

    ftpipc_init(sessioninf);

    pid_t pid = fork();
    if (-1 == pid)
        ERR_EXIT("fork error");

    if (pid > 0)
    {
        //nobody process
        //set the process nobody
        ftpipc_setnobody(sessioninf);
        handle_pri(sessioninf);
    }
    if (0 == pid)
    {
        //ftp proto
        ftpipc_setproto(sessioninf);
        handle_ftp(sessioninf);
    }
    
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7fd0
callq 0x3530
movl %eax, -0xc(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl -0xc(%rbp), %eax
jne 0x4bef
jmp 0x4bd9
leaq 0x4598(%rip), %rdi      # 0x9178
callq 0x3470
movl $0x1, %edi
callq 0x34e0
cmpl $0x0, -0xc(%rbp)
jle 0x4c07
movq -0x8(%rbp), %rdi
callq 0x8070
movq -0x8(%rbp), %rdi
callq 0x7d30
xorl %eax, %eax
cmpl -0xc(%rbp), %eax
jne 0x4c20
movq -0x8(%rbp), %rdi
callq 0x80a0
movq -0x8(%rbp), %rdi
callq 0x6160
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/session.c
// Function: clear_session
void clear_session(session_t* ssinf)
{
    clear_transfer(ssinf);

    if ( -1 != ssinf->nobodyfd )
        close(ssinf->nobodyfd); 
    if ( -1 != ssinf->protofd )
        close(ssinf->protofd); 
    if ( -1 != ssinf->ctrlfd )
        close(ssinf->ctrlfd); 
    if ( -1 != ssinf->datafd )
        close(ssinf->datafd); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4cc0
movq -0x8(%rbp), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl (%rcx), %eax
je 0x4c5d
movq -0x8(%rbp), %rax
movl (%rax), %edi
callq 0x3260
movq -0x8(%rbp), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0x4(%rcx), %eax
je 0x4c77
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edi
callq 0x3260
movq -0x8(%rbp), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0x8(%rcx), %eax
je 0x4c91
movq -0x8(%rbp), %rax
movl 0x8(%rax), %edi
callq 0x3260
movq -0x8(%rbp), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0xc(%rcx), %eax
je 0x4cab
movq -0x8(%rbp), %rax
movl 0xc(%rax), %edi
callq 0x3260
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/session.c
// Function: clear_transfer
void clear_transfer(session_t* ssinf)
{
    shutdown(ssinf->datafd,SHUT_RDWR);
    ssinf->datafd = -1;
    if ( has_port(ssinf) )
    {
        free(ssinf->port_addr);
        ssinf->port_addr = NULL;
    }
    if ( has_pasv(ssinf) )
    {
        close(ssinf->pasv_lsfd);
        ssinf->pasv_lsfd = -1;
    }
    if ( NULL != ssinf->rn_filepath )
        free(ssinf->rn_filepath);
    ssinf->rest_pos = 0;
    ssinf->bappe = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %edi
movl $0x2, %esi
callq 0x3140
movq -0x8(%rbp), %rax
movl $0xffffffff, 0xc(%rax)  # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rdi
callq 0x4d80
cmpl $0x0, %eax
je 0x4d15
movq -0x8(%rbp), %rax
movq 0xc18(%rax), %rdi
callq 0x3030
movq -0x8(%rbp), %rax
movq $0x0, 0xc18(%rax)
movq -0x8(%rbp), %rdi
callq 0x4da0
cmpl $0x0, %eax
je 0x4d40
movq -0x8(%rbp), %rax
movl 0xc20(%rax), %edi
callq 0x3260
movq -0x8(%rbp), %rax
movl $0xffffffff, 0xc20(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq 0xc28(%rcx), %rax
je 0x4d5f
movq -0x8(%rbp), %rax
movq 0xc28(%rax), %rdi
callq 0x3030
movq -0x8(%rbp), %rax
movq $0x0, 0xc30(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x14(%rax)
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/session.c
// Function: ratelim_init
int ratelim_init(session_t* sess)
{
    struct timeval tv;
    if ( -1 == gettimeofday(&tv,NULL) ) 
        return -1;

    sess->ts_sec = tv.tv_sec;
    sess->ts_usec = tv.tv_usec;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
leaq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x31f0
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x4ded
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4e14
movq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc38(%rax)
movq -0x18(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc3c(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)