LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: onlyuser[P]Sandbox/test_c/pre_0x/main4.cpp
// Function: main
int main() {
    // C-style array
    int my_array[5] = {1, 2, 3, 4, 5};

    // Pass the array to a function
    func(my_array);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movq 0xe4a(%rip), %rax       # 0x2010
movq %rax, -0x20(%rbp)
movq 0xe47(%rip), %rax       # 0x2018
movq %rax, -0x18(%rbp)
movl 0xe45(%rip), %eax       # 0x2020
movl %eax, -0x10(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x11f0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: onlyuser[P]Sandbox/test_c/pre_0x/main4.cpp
// Function: void func<int, 5>(int (&) [5])
void func(T (&a)[N]) {
#if 1
    for(int i = 0; i < N; i++) {
        std::cout << a[i] << std::endl;
    }
#else
    // Here N stores the correct size information for the array
    // Basically N is equal to sizeof(my_array)/sizeof(my_array[0]) so the next code will work as expected:
    for(int i = 0; i < N; ++i) {
        a[i] = a[i] + i;
    }
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x5, -0xc(%rbp)
jge 0x123a
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movq 0x2dbd(%rip), %rdi      # 0x3fd8
callq 0x1060
movq %rax, %rdi
movq 0x2d9e(%rip), %rsi      # 0x3fc8
callq 0x1040
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1203
addq $0x10, %rsp
popq %rbp
retq
// File: FreeSlave[P]vhlt/hlvis/flow.cpp
// Function: PortalFlow(portal_t*)
void            PortalFlow(portal_t* p)
{
    threaddata_t    data;
    unsigned        i;

    if (p->status != stat_working)
        Error("PortalFlow: reflowed");

    p->visbits = (byte*)calloc(1, g_bitbytes);

    memset(&data, 0, sizeof(data));
    data.leafvis = p->visbits;
    data.base = p;

    data.pstack_head.head = &data.pstack_head;
    data.pstack_head.portal = p;
    data.pstack_head.source = p->winding;
    data.pstack_head.portalplane = &p->plane;
    for (i = 0; i < g_bitlongs; i++)
    {
        ((long*)data.pstack_head.mightsee)[i] = ((long*)p->mightsee)[i];
    }
    RecursiveLeafFlow(p->leaf, &data, &data.pstack_head);

#ifdef ZHLT_NETVIS
    p->fromclient = g_clientid;
#endif
    p->status = stat_done;
#ifdef ZHLT_NETVIS
    Flag_VIS_DONE_PORTAL(g_visportalindex);
#endif
}

// Assembly:
subq $0x1508, %rsp           # imm = 0x1508
movq %rdi, 0x1500(%rsp)
movq 0x1500(%rsp), %rax
cmpl $0x1, 0x20(%rax)
je 0x10b2b
leaq 0xbb3c(%rip), %rdi      # 0x1c660
movb $0x0, %al
callq 0xa380
leaq 0x2094c76(%rip), %rax   # 0x20a57a8
movl (%rax), %eax
movl %eax, %esi
movl $0x1, %edi
callq 0x3160
movq %rax, %rcx
movq 0x1500(%rsp), %rax
movq %rcx, 0x28(%rax)
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
movl $0x14f0, %edx           # imm = 0x14F0
callq 0x3120
movq 0x1500(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x1500(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x10(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x1020(%rsp)
movq 0x1500(%rsp), %rax
movq %rax, 0x1030(%rsp)
movq 0x1500(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x1038(%rsp)
movq 0x1500(%rsp), %rax
movq %rax, 0x14e8(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
leaq 0x2094bd6(%rip), %rcx   # 0x20a57ac
cmpl (%rcx), %eax
jae 0x10c04
movq 0x1500(%rsp), %rax
movq 0x30(%rax), %rax
movl 0xc(%rsp), %ecx
movq (%rax,%rcx,8), %rcx
movl 0xc(%rsp), %eax
movq %rcx, 0x20(%rsp,%rax,8)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x10bcb
movq 0x1500(%rsp), %rax
movl 0x10(%rax), %edi
leaq 0x10(%rsp), %rdx
addq $0x10, %rdx
leaq 0x10(%rsp), %rsi
callq 0x10c40
movq 0x1500(%rsp), %rax
movl $0x2, 0x20(%rax)
addq $0x1508, %rsp           # imm = 0x1508
retq
nopl (%rax)
// File: FreeSlave[P]vhlt/hlvis/flow.cpp
// Function: SimpleFlood(unsigned char*, int, unsigned char*, unsigned int*)
static void     SimpleFlood(byte* const srcmightsee, const int leafnum, byte* const portalsee, unsigned int* const c_leafsee)
{
    unsigned        i;
    leaf_t*         leaf;
    portal_t*       p;

    {
        const unsigned  offset = leafnum >> 3;
        const unsigned  bit = (1 << (leafnum & 7));
    
        if (srcmightsee[offset] & bit)
        {
            return;
        }
        else
        {
            srcmightsee[offset] |= bit;
        }
    }

    (*c_leafsee)++;
    leaf = &g_leafs[leafnum];

    for (i = 0; i < leaf->numportals; i++)
    {
        p = leaf->portals[i];
        if (!portalsee[p - g_portals])
        {
            continue;
        }
        SimpleFlood(srcmightsee, p->leaf, portalsee, c_leafsee);
    }
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movl 0x3c(%rsp), %eax
sarl $0x3, %eax
movl %eax, 0xc(%rsp)
movl 0x3c(%rsp), %ecx
andl $0x7, %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, 0x8(%rsp)
movq 0x40(%rsp), %rax
movl 0xc(%rsp), %ecx
movzbl (%rax,%rcx), %eax
andl 0x8(%rsp), %eax
cmpl $0x0, %eax
je 0x116df
jmp 0x117a4
movl 0x8(%rsp), %esi
movq 0x40(%rsp), %rax
movl 0xc(%rsp), %ecx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movq 0x28(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x2094078(%rip), %rax   # 0x20a5780
movq (%rax), %rax
movslq 0x3c(%rsp), %rcx
imulq $0x810, %rcx, %rcx      # imm = 0x810
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
movq 0x18(%rsp), %rcx
cmpl (%rcx), %eax
jae 0x117a4
movq 0x18(%rsp), %rax
movl 0x24(%rsp), %ecx
movq 0x10(%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rax
leaq 0x209401c(%rip), %rcx   # 0x20a5778
movq (%rcx), %rcx
subq %rcx, %rax
movl $0x48, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq (%rsp), %rax
cmpb $0x0, (%rax,%rcx)
jne 0x1177b
jmp 0x11797
movq 0x40(%rsp), %rdi
movq 0x10(%rsp), %rax
movl 0x10(%rax), %esi
movq 0x30(%rsp), %rdx
movq 0x28(%rsp), %rcx
callq 0x11690
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x11727
addq $0x48, %rsp
retq
nopl (%rax)
// File: FreeSlave[P]vhlt/hlvis/flow.cpp
// Function: FreeStackWinding(winding_t const*, pstack_s*)
inline static void     FreeStackWinding(const winding_t* const w, pstack_t* const stack)
{
    int             i;

    i = w - stack->windings;

    if (i < 0 || i > 2)
        return;                                            // not from local

    if (stack->freewindings[i])
        Error("FreeStackWinding: allready free");
    stack->freewindings[i] = 1;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
addq $0x1028, %rcx           # imm = 0x1028
subq %rcx, %rax
movl $0x188, %ecx            # imm = 0x188
cqto
idivq %rcx
movl %eax, 0x4(%rsp)
cmpl $0x0, 0x4(%rsp)
jl 0x14a8e
cmpl $0x2, 0x4(%rsp)
jle 0x14a90
jmp 0x14ac4
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
cmpb $0x0, 0x14c0(%rax,%rcx)
je 0x14ab2
leaq 0x7c69(%rip), %rdi      # 0x1c714
movb $0x0, %al
callq 0xa380
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movb $0x1, 0x14c0(%rax,%rcx)
addq $0x18, %rsp
retq
nopl (%rax)
// File: FreeSlave[P]vhlt/hlvis/flow.cpp
// Function: AllocStackWinding(pstack_s*)
inline static winding_t* AllocStackWinding(pstack_t* const stack)
{
    int             i;

    for (i = 0; i < 3; i++)
    {
        if (stack->freewindings[i])
        {
            stack->freewindings[i] = 0;
            return &stack->windings[i];
        }
    }

    Error("AllocStackWinding: failed");

    return NULL;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
cmpl $0x3, 0x4(%rsp)
jge 0x14b3e
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
cmpb $0x0, 0x14c0(%rax,%rcx)
je 0x14b2f
movq 0x8(%rsp), %rax
movslq 0x4(%rsp), %rcx
movb $0x0, 0x14c0(%rax,%rcx)
movq 0x8(%rsp), %rax
addq $0x1028, %rax           # imm = 0x1028
movslq 0x4(%rsp), %rcx
imulq $0x188, %rcx, %rcx      # imm = 0x188
addq %rcx, %rax
movq %rax, 0x10(%rsp)
jmp 0x14b55
jmp 0x14b31
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x14ae1
leaq 0x7bef(%rip), %rdi      # 0x1c734
movb $0x0, %al
callq 0xa380
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nop
// File: FreeSlave[P]vhlt/hlvis/flow.cpp
// Function: AddPlane(pstack_s*, plane_t const*)
inline static void AddPlane(pstack_t* const stack, const plane_t* const split)
{
    int     j;
    
    if (stack->clipPlaneCount)
    {
        for (j = 0; j < stack->clipPlaneCount; j++)
        {
            if (fabs((stack->clipPlane[j]).dist - split->dist) <= EQUAL_EPSILON &&
                VectorCompare((stack->clipPlane[j]).normal, split->normal))
            {
                return;
            }
        }
    }
    stack->clipPlane[stack->clipPlaneCount] = *split;
    stack->clipPlaneCount++;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
cmpl $0x0, 0x14d0(%rax)
je 0x14c15
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
movq 0x10(%rsp), %rcx
cmpl 0x14d0(%rcx), %eax
jge 0x14c13
movq 0x10(%rsp), %rax
movq 0x14d8(%rax), %rax
movslq 0x4(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movss 0xc(%rax), %xmm0
movq 0x8(%rsp), %rax
subss 0xc(%rax), %xmm0
callq 0x10ae0
cvtss2sd %xmm0, %xmm1
movsd 0x7a77(%rip), %xmm0     # 0x1c648
ucomisd %xmm1, %xmm0
jb 0x14c01
movq 0x10(%rsp), %rax
movq 0x14d8(%rax), %rdi
movslq 0x4(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
movq 0x8(%rsp), %rsi
callq 0x14c60
testb $0x1, %al
jne 0x14bff
jmp 0x14c01
jmp 0x14c5b
jmp 0x14c03
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x14b88
jmp 0x14c15
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq 0x14d8(%rax), %rax
movq 0x10(%rsp), %rdx
movslq 0x14d0(%rdx), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movl 0x14d0(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14d0(%rax)
addq $0x18, %rsp
retq
// File: FreeSlave[P]vhlt/hlvis/vis.cpp
// Function: SaveVisData(char const*)
void		SaveVisData(const char *filename)
{
	int i;
	FILE *fp = fopen(filename, "wb");

	if(!fp)
		return;

	SafeWrite(fp, g_dvisdata, (vismap_p - g_dvisdata));

	// BUG BUG BUG!
	// Leaf offsets need to be saved too!!!!
	for(i = 0; i < g_numleafs; i++)
	{
		SafeWrite(fp, &g_dleafs[i].visofs, sizeof(int));
	}

	fclose(fp);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x52e1(%rip), %rsi      # 0x1a906
callq 0x32a0
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x15637
jmp 0x156ac
movq (%rsp), %rdi
movq 0x20e018e(%rip), %rax   # 0x20f57d0
leaq 0x14c87(%rip), %rcx     # 0x2a2d0
subq %rcx, %rax
movl %eax, %edx
leaq 0x14c7b(%rip), %rsi     # 0x2a2d0
callq 0x9a30
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
leaq 0xa14c97(%rip), %rcx    # 0xa2a304
cmpl (%rcx), %eax
jge 0x156a3
movq (%rsp), %rdi
movslq 0xc(%rsp), %rax
leaq 0xa14c8f(%rip), %rsi    # 0xa2a310
imulq $0x1c, %rax, %rax
addq %rax, %rsi
addq $0x4, %rsi
movl $0x4, %edx
callq 0x9a30
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x15662
movq (%rsp), %rdi
callq 0x3230
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/hlvis/vis.cpp
// Function: VisLeafnumForPoint(float const*)
int        VisLeafnumForPoint(const vec3_t point)
{
    int             nodenum;
    vec_t           dist;
    dnode_t*        node;
    dplane_t*       plane;

    nodenum = 0;
    while (nodenum >= 0)
    {
        node = &g_dnodes[nodenum];
        plane = &g_dplanes[node->planenum];
        dist = DotProduct(point, plane->normal) - plane->dist;
        if (dist >= 0.0)
        {
            nodenum = node->children[0];
        }
        else
        {
            nodenum = node->children[1];
        }
    }

    return -nodenum - 2;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl $0x0, -0xc(%rsp)
cmpl $0x0, -0xc(%rsp)
jl 0x15799
movslq -0xc(%rsp), %rcx
leaq 0x10b4b6c(%rip), %rax   # 0x10ca250
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rsp)
movq -0x18(%rsp), %rax
movslq (%rax), %rcx
leaq 0xaf4b41(%rip), %rax    # 0xb0a240
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movq -0x8(%rsp), %rax
movss (%rax), %xmm1
movq -0x20(%rsp), %rax
movss (%rax), %xmm2
movq -0x8(%rsp), %rax
movss 0x4(%rax), %xmm0
movq -0x20(%rsp), %rax
mulss 0x4(%rax), %xmm0
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
movq -0x8(%rsp), %rax
movss 0x8(%rax), %xmm0
movq -0x20(%rsp), %rax
movss 0x8(%rax), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq -0x20(%rsp), %rax
subss 0xc(%rax), %xmm0
movss %xmm0, -0x10(%rsp)
movss -0x10(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x15787
movq -0x18(%rsp), %rax
movswl 0x4(%rax), %eax
movl %eax, -0xc(%rsp)
jmp 0x15794
movq -0x18(%rsp), %rax
movswl 0x6(%rax), %eax
movl %eax, -0xc(%rsp)
jmp 0x156cd
xorl %eax, %eax
subl -0xc(%rsp), %eax
subl $0x2, %eax
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/hlvis/vis.cpp
// Function: LoadPortalsByFilename(char const*)
static void     LoadPortalsByFilename(const char* const filename)
{
    char* file_image;

    if (!q_exists(filename))
    {
        Error("Portal file '%s' does not exist, cannot vis the map\n", filename);
    }
    LoadFile(filename, &file_image);
    LoadPortals(file_image);
    free(file_image);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x98d0
testb $0x1, %al
jne 0x163da
movq 0x10(%rsp), %rsi
leaq 0x69be(%rip), %rdi      # 0x1cd91
movb $0x0, %al
callq 0xa380
movq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x9a80
movq 0x8(%rsp), %rdi
callq 0x16840
movq 0x8(%rsp), %rdi
callq 0x32b0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/hlvis/vis.cpp
// Function: NewWinding(int)
static winding_t* NewWinding(const int points)
{
    winding_t*      w;
    int             size;

    if (points > MAX_POINTS_ON_WINDING)
    {
        Error("NewWinding: %i points > MAX_POINTS_ON_WINDING", points);
    }

#ifdef ZHLT_64BIT_FIX
    size = (int)(intptr_t)((winding_t*)0)->points[points];
#else
    size = (int)((winding_t*)0)->points[points];
#endif
    w = (winding_t*)calloc(1, size);

    return w;
}

// Assembly:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
cmpl $0x80, 0x14(%rsp)
jle 0x172b4
movl 0x14(%rsp), %esi
leaq 0x5ccd(%rip), %rdi      # 0x1cf7a
movb $0x0, %al
callq 0xa380
movslq 0x14(%rsp), %rcx
xorl %eax, %eax
addq $0x8, %rax
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl %eax, 0x4(%rsp)
movslq 0x4(%rsp), %rsi
movl $0x1, %edi
callq 0x3160
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: FreeSlave[P]vhlt/hlvis/vis.cpp
// Function: PlaneFromWinding(winding_t*, plane_t*)
static void     PlaneFromWinding(winding_t* w, plane_t* plane)
{
    vec3_t          v1;
    vec3_t          v2;

    // calc plane
    VectorSubtract(w->points[2], w->points[1], v1);
    VectorSubtract(w->points[0], w->points[1], v2);
    CrossProduct(v2, v1, plane->normal);
    VectorNormalize(plane->normal);
    plane->dist = DotProduct(w->points[0], plane->normal);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movss 0x20(%rax), %xmm0
movq 0x20(%rsp), %rax
subss 0x14(%rax), %xmm0
movss %xmm0, 0xc(%rsp)
movq 0x20(%rsp), %rax
movss 0x24(%rax), %xmm0
movq 0x20(%rsp), %rax
subss 0x18(%rax), %xmm0
movss %xmm0, 0x10(%rsp)
movq 0x20(%rsp), %rax
movss 0x28(%rax), %xmm0
movq 0x20(%rsp), %rax
subss 0x1c(%rax), %xmm0
movss %xmm0, 0x14(%rsp)
movq 0x20(%rsp), %rax
movss 0x8(%rax), %xmm0
movq 0x20(%rsp), %rax
subss 0x14(%rax), %xmm0
movss %xmm0, (%rsp)
movq 0x20(%rsp), %rax
movss 0xc(%rax), %xmm0
movq 0x20(%rsp), %rax
subss 0x18(%rax), %xmm0
movss %xmm0, 0x4(%rsp)
movq 0x20(%rsp), %rax
movss 0x10(%rax), %xmm0
movq 0x20(%rsp), %rax
subss 0x1c(%rax), %xmm0
movss %xmm0, 0x8(%rsp)
movss 0x4(%rsp), %xmm0
movss 0x14(%rsp), %xmm2
movss 0x8(%rsp), %xmm1
mulss 0x10(%rsp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq 0x18(%rsp), %rax
movss %xmm0, (%rax)
movss 0x8(%rsp), %xmm0
movss 0xc(%rsp), %xmm2
movss (%rsp), %xmm1
mulss 0x14(%rsp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq 0x18(%rsp), %rax
movss %xmm0, 0x4(%rax)
movss (%rsp), %xmm0
movss 0x10(%rsp), %xmm2
movss 0x4(%rsp), %xmm1
mulss 0xc(%rsp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq 0x18(%rsp), %rax
movss %xmm0, 0x8(%rax)
movq 0x18(%rsp), %rdi
callq 0x10780
movq 0x20(%rsp), %rax
movss 0x8(%rax), %xmm1
movq 0x18(%rsp), %rax
movss (%rax), %xmm2
movq 0x20(%rsp), %rax
movss 0xc(%rax), %xmm0
movq 0x18(%rsp), %rax
mulss 0x4(%rax), %xmm0
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
movq 0x20(%rsp), %rax
movss 0x10(%rax), %xmm0
movq 0x18(%rsp), %rax
movss 0x8(%rax), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq 0x18(%rsp), %rax
movss %xmm0, 0xc(%rax)
addq $0x28, %rsp
retq
nop
// File: FreeSlave[P]vhlt/hlvis/vis.cpp
// Function: CalcPortalVis()
static void     CalcPortalVis()
{
#ifndef ZHLT_NETVIS
    // g_fastvis just uses mightsee for a very loose bound
    if (g_fastvis)
    {
        int             i;

        for (i = 0; i < g_numportals * 2; i++)
        {
            g_portals[i].visbits = g_portals[i].mightsee;
            g_portals[i].status = stat_done;
        }
        return;
    }
#endif

#ifdef ZHLT_NETVIS
    LeafThread(0);
#else
    NamedRunThreadsOn(g_numportals * 2, g_estimate, LeafThread);
#endif
}

// Assembly:
pushq %rax
testb $0x1, 0x208e308(%rip)   # 0x20a57b0
je 0x17519
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
movl 0x208e2b4(%rip), %ecx   # 0x20a5770
shll %ecx
cmpl %ecx, %eax
jge 0x17517
movq 0x208e2af(%rip), %rax   # 0x20a5778
movslq 0x4(%rsp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x30(%rax), %rcx
movq 0x208e298(%rip), %rax   # 0x20a5778
movslq 0x4(%rsp), %rdx
imulq $0x48, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x28(%rax)
movq 0x208e281(%rip), %rax   # 0x20a5778
movslq 0x4(%rsp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl $0x2, 0x20(%rax)
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x174b2
jmp 0x17555
leaq 0x5d31(%rip), %rdi      # 0x1d251
callq 0xa0f0
movq %rax, %rsi
leaq 0x364c(%rip), %rdi      # 0x1ab7b
movb $0x0, %al
callq 0x9ed0
movl 0x208e234(%rip), %edi   # 0x20a5770
shll %edi
movb 0xad4c(%rip), %al       # 0x22290
leaq 0x6e5(%rip), %rdx       # 0x17c30
andb $0x1, %al
movzbl %al, %esi
callq 0xc0a0
popq %rax
retq
nopw (%rax,%rax)
// File: FreeSlave[P]vhlt/hlvis/vis.cpp
// Function: LeafThread(int)
static void     LeafThread(int unused)
{
    portal_t*       p;

    while (1)
    {
        if (!(p = GetNextPortal()))
        {
            return;
        }

        PortalFlow(p);

        Verbose("portal:%4i  mightsee:%4i  cansee:%4i\n", (int)(p - g_portals), p->nummightsee, p->numcansee);
    }
}

// Assembly:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
callq 0x17ca0
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
jne 0x17c4d
addq $0x18, %rsp
retq
movq 0x8(%rsp), %rdi
callq 0x10b00
movq 0x8(%rsp), %rax
movq 0x208db15(%rip), %rcx   # 0x20a5778
subq %rcx, %rax
movl $0x48, %ecx
cqto
idivq %rcx
movl %eax, %esi
movq 0x8(%rsp), %rax
movl 0x38(%rax), %edx
movq 0x8(%rsp), %rax
movl 0x3c(%rax), %ecx
leaq 0x55d4(%rip), %rdi      # 0x1d25d
movb $0x0, %al
callq 0xa900
jmp 0x17c38
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/hlvis/zones.cpp
// Function: Zones::getZoneFromBounds(BoundingBox const&)
UINT32 Zones::getZoneFromBounds(const BoundingBox& bounds)
{
    UINT32 x;
    for (x=0; x<m_ZoneCount; x++)
    {
        if (m_ZoneBounds[x].testSuperset(bounds))
        {
            return x;
        }
    }
    return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movl $0x0, 0xc(%rsp)
movq (%rsp), %rcx
movl 0xc(%rsp), %eax
cmpl 0x8(%rcx), %eax
jae 0x17e38
movq (%rsp), %rax
movq 0x20(%rax), %rdi
movl 0xc(%rsp), %eax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x18460
testb $0x1, %al
jne 0x17e1f
jmp 0x17e29
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x17e40
jmp 0x17e2b
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x17def
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: FreeSlave[P]vhlt/hlvis/zones.cpp
// Function: Zones::getZoneFromWinding(Winding const&)
UINT32 Zones::getZoneFromWinding(const Winding& winding)
{
    UINT32          x;
    BoundingBox     bounds;

    for (x=0; x<winding.m_NumPoints; x++)
    {
        bounds.add(winding.m_Points[x]);
    }

    return getZoneFromBounds(bounds);
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x2c(%rsp), %rdi
callq 0x108b0
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
movq 0x48(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x17ed2
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x44(%rsp), %ecx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,4), %rsi
leaq 0x2c(%rsp), %rdi
callq 0x108c0
jmp 0x17ea9
jmp 0x17eab
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x17e7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x2c(%rsp), %rdi
callq 0x10a70
jmp 0x17efa
movq 0x10(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
callq 0x17dd0
movl %eax, 0xc(%rsp)
jmp 0x17ee7
leaq 0x2c(%rsp), %rdi
callq 0x10a70
movl 0xc(%rsp), %eax
addq $0x58, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x3410
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/hlvis/zones.cpp
// Function: WindingFromFace(dface_t const*)
static Winding*      WindingFromFace(const dface_t* f)
{
    int             i;
    int             se;
    dvertex_t*      dv;
    int             v;
    Winding*        w = new Winding(f->numedges);

    for (i = 0; i < f->numedges; i++)
    {
        se = g_dsurfedges[f->firstedge + i];
        if (se < 0)
        {
            v = g_dedges[-se].v[1];
        }
        else
        {
            v = g_dedges[se].v[0];
        }

        dv = &g_dvertexes[v];
        VectorCopy(dv->point, w->m_Points[i]);
    }

    return w;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl $0x20, %edi
callq 0x3240
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rax
movswl 0x8(%rax), %esi
callq 0xd780
jmp 0x1831e
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movl $0x0, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
movq 0x40(%rsp), %rcx
movswl 0x8(%rcx), %ecx
cmpl %ecx, %eax
jge 0x1844c
movq 0x40(%rsp), %rax
movl 0x4(%rax), %eax
addl 0x3c(%rsp), %eax
movslq %eax, %rcx
leaq 0x1e0bf15(%rip), %rax   # 0x1e24270
movl (%rax,%rcx,4), %eax
movl %eax, 0x38(%rsp)
cmpl $0x0, 0x38(%rsp)
jge 0x183a6
xorl %eax, %eax
subl 0x38(%rsp), %eax
movslq %eax, %rcx
leaq 0x1cf1ed7(%rip), %rax   # 0x1d0a250
movzwl 0x2(%rax,%rcx,4), %eax
movl %eax, 0x2c(%rsp)
jmp 0x183ba
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
movl $0x20, %esi
callq 0x3250
jmp 0x18456
movslq 0x38(%rsp), %rcx
leaq 0x1cf1e9e(%rip), %rax   # 0x1d0a250
movzwl (%rax,%rcx,4), %eax
movl %eax, 0x2c(%rsp)
movslq 0x2c(%rsp), %rcx
leaq 0xff1e8a(%rip), %rax    # 0x100a250
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movss (%rax), %xmm0
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x3c(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, (%rax)
movq 0x30(%rsp), %rax
movss 0x4(%rax), %xmm0
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x3c(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x4(%rax)
movq 0x30(%rsp), %rax
movss 0x8(%rax), %xmm0
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x3c(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x8(%rax)
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x18330
movq 0x20(%rsp), %rax
addq $0x48, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0x3410
// File: FreeSlave[P]vhlt/hlvis/zones.h
// Function: Zones::Zones(unsigned int)
Zones(UINT32 ZoneCount)
    {
        m_ZoneCount = ZoneCount + 1;    // Zone 0 is used for all points outside all nodes
        m_ZoneVisMatrix = new bool[m_ZoneCount * m_ZoneCount];
        memset(m_ZoneVisMatrix, 0, sizeof(bool) * m_ZoneCount * m_ZoneCount);
        m_ZonePtrs = new bool*[m_ZoneCount];
        m_ZoneBounds = new BoundingBox[m_ZoneCount];

        UINT32 x;
        bool* dstPtr = m_ZoneVisMatrix;
        bool** srcPtr = m_ZonePtrs;
        for (x=0; x<m_ZoneCount; x++, srcPtr++, dstPtr += m_ZoneCount)
        {
            *srcPtr = dstPtr;
        }
    }

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movl %esi, 0x7c(%rsp)
movq 0x80(%rsp), %rcx
movq %rcx, 0x30(%rsp)
leaq 0x88c9(%rip), %rax      # 0x20d80
addq $0x10, %rax
movq %rax, (%rcx)
movl 0x7c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rcx)
movl 0x8(%rcx), %eax
imull 0x8(%rcx), %eax
movl %eax, %eax
movl %eax, %edi
callq 0x3040
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x10(%rax), %rdi
movl 0x8(%rax), %ecx
movl %ecx, %edx
shlq $0x0, %rdx
movl 0x8(%rax), %eax
imulq %rax, %rdx
xorl %esi, %esi
callq 0x3120
movq 0x30(%rsp), %rax
movl 0x8(%rax), %eax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3040
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x18(%rax)
movl 0x8(%rax), %eax
movq %rax, 0x40(%rsp)
movl $0x18, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
addq $0x8, %rdi
setb %al
orb %al, %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
movq %rdi, 0x38(%rsp)
callq 0x3040
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x48(%rsp)
movq %rax, (%rcx)
addq $0x8, %rcx
movq %rcx, 0x50(%rsp)
cmpq $0x0, %rax
je 0x185d1
movq 0x50(%rsp), %rax
movq 0x40(%rsp), %rcx
imulq $0x18, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x108b0
jmp 0x185b9
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rax
addq $0x18, %rax
cmpq %rcx, %rax
movq %rax, 0x28(%rsp)
jne 0x185a8
movq 0x30(%rsp), %rax
movq 0x50(%rsp), %rcx
movq %rcx, 0x20(%rax)
movq 0x10(%rax), %rcx
movq %rcx, 0x60(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x58(%rsp)
movl $0x0, 0x68(%rsp)
movq 0x30(%rsp), %rcx
movl 0x68(%rsp), %eax
cmpl 0x8(%rcx), %eax
jae 0x186a2
movq 0x60(%rsp), %rcx
movq 0x58(%rsp), %rax
movq %rcx, (%rax)
movq 0x30(%rsp), %rax
movl 0x68(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0x68(%rsp)
movq 0x58(%rsp), %rcx
addq $0x8, %rcx
movq %rcx, 0x58(%rsp)
movl 0x8(%rax), %ecx
movq 0x60(%rsp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0x60(%rsp)
jmp 0x185f9
movq 0x50(%rsp), %rcx
movq %rax, %rsi
movq 0x18(%rsp), %rax
movq %rsi, 0x70(%rsp)
movl %edx, 0x6c(%rsp)
cmpq %rax, %rcx
movq %rax, 0x10(%rsp)
je 0x18691
movq 0x10(%rsp), %rdi
addq $-0x18, %rdi
movq %rdi, 0x8(%rsp)
callq 0x10a70
movq 0x50(%rsp), %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x10(%rsp)
jne 0x1866a
movq 0x38(%rsp), %rsi
movq 0x48(%rsp), %rdi
callq 0x3480
jmp 0x186aa
addq $0x88, %rsp
retq
movq 0x70(%rsp), %rdi
callq 0x3410
nopw %cs:(%rax,%rax)
nop
// File: FreeSlave[P]vhlt/common/boundingbox.h
// Function: BoundingBox::testSubset(BoundingBox const&) const
bool testSubset(const BoundingBox& other) const
    {
        if (
                (m_Mins[0] >= other.m_Mins[0]) &&
                (m_Maxs[0] <= other.m_Maxs[0]) &&
                (m_Mins[1] >= other.m_Mins[1]) &&
                (m_Maxs[1] <= other.m_Maxs[1]) &&
                (m_Mins[2] >= other.m_Mins[2]) &&
                (m_Maxs[2] <= other.m_Maxs[2])
           )
        {
            return true;
        }
        return false;
    }

// Assembly:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x20(%rsp)
movss (%rax), %xmm0
movq -0x18(%rsp), %rax
ucomiss (%rax), %xmm0
jb 0x187be
movq -0x20(%rsp), %rax
movss 0xc(%rax), %xmm1
movq -0x18(%rsp), %rax
movss 0xc(%rax), %xmm0
ucomiss %xmm1, %xmm0
jb 0x187be
movq -0x20(%rsp), %rax
movss 0x4(%rax), %xmm0
movq -0x18(%rsp), %rax
ucomiss 0x4(%rax), %xmm0
jb 0x187be
movq -0x20(%rsp), %rax
movss 0x10(%rax), %xmm1
movq -0x18(%rsp), %rax
movss 0x10(%rax), %xmm0
ucomiss %xmm1, %xmm0
jb 0x187be
movq -0x20(%rsp), %rax
movss 0x8(%rax), %xmm0
movq -0x18(%rsp), %rax
ucomiss 0x8(%rax), %xmm0
jb 0x187be
movq -0x20(%rsp), %rax
movss 0x14(%rax), %xmm1
movq -0x18(%rsp), %rax
movss 0x14(%rax), %xmm0
ucomiss %xmm1, %xmm0
jb 0x187be
movb $0x1, -0x1(%rsp)
jmp 0x187c3
movb $0x0, -0x1(%rsp)
movb -0x1(%rsp), %al
andb $0x1, %al
retq
nopw (%rax,%rax)
// File: dentiny[P]HTTP-Cache-Proxy/Proxy.cpp
// Function: Proxy::Proxy()
Proxy() : 
		logger { "log.txt" },
		cache { LRUCache(CACHE_SIZE) }
	{
		// error shouldn't happen in the constructor
		// but if it does, release all the resouces allocated and exit the process
		constructServer();
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
addq $0x8, %rax
movq %rax, -0x50(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x4650
movq -0x48(%rbp), %rdx
leaq 0x14664(%rip), %rsi     # 0x19008
leaq -0x28(%rbp), %rdi
callq 0x4bf0
jmp 0x49af
movq -0x50(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x4ca0
jmp 0x49be
leaq -0x28(%rbp), %rdi
callq 0x4250
leaq -0x29(%rbp), %rdi
callq 0x4420
movq -0x58(%rbp), %rdi
addq $0x250, %rdi            # imm = 0x250
movq %rdi, -0x60(%rbp)
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x4d70
jmp 0x49eb
movq -0x58(%rbp), %rdi
leaq 0x1461a(%rip), %rax     # 0x19010
movq %rax, 0x2a8(%rdi)
callq 0x4db0
jmp 0x4a04
addq $0x60, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x4a2d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x4250
leaq -0x29(%rbp), %rdi
callq 0x4420
jmp 0x4a64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x4a5b
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x5020
movq -0x50(%rbp), %rdi
callq 0x5050
movq -0x38(%rbp), %rdi
callq 0x4640
nopl (%rax)
// File: dentiny[P]HTTP-Cache-Proxy/Proxy.cpp
// Function: Proxy::run()
void run()
	{
		unsigned client_id = 0; // id to mark different 

		// (1) wait until an request of sending arrives
		// (2) every time a client fd is caught, create a new thread to handle the request
		while(true)
		{ 
			std::string client_ip;
			int client_fd = acceptConnection(client_ip);
			if(client_fd == -1) // request error
			{
				continue;
			}
			std::thread thd(&Proxy::handleRequest, this, client_id, client_fd, client_ip);
			thd.detach();

			// assign every request/thread a unique id
			client_id = (client_id == INT_MAX) ? 0 : ++client_id;
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movl $0x0, -0xc(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x4510
movq -0x70(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x6850
movl %eax, -0x74(%rbp)
jmp 0x4aad
movl -0x74(%rbp), %eax
movl %eax, -0x34(%rbp)
cmpl $-0x1, -0x34(%rbp)
jne 0x4ad6
movl $0x2, -0x48(%rbp)
jmp 0x4b56
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4b87
movq -0x70(%rbp), %rax
leaq 0x1e0f(%rip), %rcx      # 0x68f0
movq %rcx, -0x60(%rbp)
movq $0x0, -0x58(%rbp)
movq %rax, -0x68(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x68(%rbp), %rdx
leaq -0xc(%rbp), %rcx
leaq -0x34(%rbp), %r8
leaq -0x30(%rbp), %r9
callq 0x7500
jmp 0x4b10
leaq -0x50(%rbp), %rdi
callq 0x4630
jmp 0x4b1b
cmpl $0x7fffffff, -0xc(%rbp) # imm = 0x7FFFFFFF
jne 0x4b2e
xorl %eax, %eax
movl %eax, -0x84(%rbp)
jmp 0x4b3d
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %eax
movl %eax, -0xc(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x75e0
movl $0x0, -0x48(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x4250
movl -0x48(%rbp), %eax
testl %eax, %eax
je 0x4b6d
jmp 0x4b68
jmp 0x4a8e
jmp 0x4a8e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x75e0
leaq -0x30(%rbp), %rdi
callq 0x4250
movq -0x40(%rbp), %rdi
callq 0x4640
nopl (%rax)
// File: dentiny[P]HTTP-Cache-Proxy/Proxy.cpp
// Function: Proxy::acceptConnection(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
int acceptConnection(std::string & client_ip)
    {
    	// keep waiting until a client request
        struct sockaddr_storage socket_addr;
        socklen_t socket_addr_len = sizeof(socket_addr);
        int accept_fd = accept(socket_fd, (struct sockaddr *)&socket_addr, &socket_addr_len); // accept() implements blocking accept
        if(accept_fd == -1) 
        {
            return -1;
        }

        // get the client ip
        struct sockaddr_in * temp = (struct sockaddr_in *)&socket_addr;
  		client_ip = inet_ntoa(temp->sin_addr);

        return accept_fd;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl $0x80, -0x9c(%rbp)
movl 0x2b4(%rax), %edi
leaq -0x98(%rbp), %rsi
leaq -0x9c(%rbp), %rdx
callq 0x40e0
movl %eax, -0xa0(%rbp)
cmpl $-0x1, -0xa0(%rbp)
jne 0x68a2
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x68e0
leaq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0xac(%rbp)
movl -0xac(%rbp), %edi
callq 0x4170
movq %rax, %rsi
movq -0x18(%rbp), %rdi
callq 0x4500
movl -0xa0(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax)
// File: dentiny[P]HTTP-Cache-Proxy/./Request.hpp
// Function: Request::operator=(Request const&)
Request & operator=(const Request & rhs)
	{
		if(this != &rhs)
		{
			request_time = rhs.request_time;
			first_line = rhs.first_line;
			httpAction = rhs.httpAction;
			url = rhs.url;
			hostname = rhs.hostname;
			port = rhs.port;
			content = rhs.content;
		}
		return *this;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq -0x10(%rbp), %rax
je 0x7a7f
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x4030
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x20, %rsi
addq $0x20, %rdi
callq 0x4030
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x40, %rsi
addq $0x40, %rdi
callq 0x4030
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x60, %rsi
addq $0x60, %rdi
callq 0x4030
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x80, %rsi
addq $0x80, %rdi
callq 0x4030
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0xa0, %rsi
addq $0xa0, %rdi
callq 0x4030
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0xc0, %rsi
addq $0xc0, %rdi
callq 0xa8b0
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: dentiny[P]HTTP-Cache-Proxy/./Logger.hpp
// Function: Logger::log(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void log(const std::string & content)
	{
		// protect against data race
		std::unique_lock<std::mutex> lck(mtx);

		// open the file in append mode if closed
		if(!out.is_open())
		{
			out.open(path, std::ofstream::out | std::ofstream::app);
		}

		out << content << std::endl;
		out.close();
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x38(%rbp)
leaq -0x20(%rbp), %rdi
callq 0xb0e0
movq -0x38(%rbp), %rdi
addq $0x48, %rdi
callq 0x4300
movb %al, -0x2d(%rbp)
jmp 0x7d03
movb -0x2d(%rbp), %al
testb $0x1, %al
jne 0x7d5c
jmp 0x7d0c
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x48, %rcx
movq %rcx, -0x48(%rbp)
addq $0x28, %rax
movq %rax, -0x40(%rbp)
movl $0x10, %edi
movl $0x1, %esi
callq 0x5340
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl %eax, %edx
callq 0x41a0
jmp 0x7d43
jmp 0x7d5c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0xb120
jmp 0x7da3
movq -0x38(%rbp), %rdi
addq $0x48, %rdi
movq -0x10(%rbp), %rsi
callq 0x4360
movq %rax, -0x50(%rbp)
jmp 0x7d73
movq -0x50(%rbp), %rdi
movq 0x1c21a(%rip), %rsi     # 0x23f98
callq 0x4400
jmp 0x7d85
movq -0x38(%rbp), %rdi
addq $0x48, %rdi
callq 0x4520
jmp 0x7d94
leaq -0x20(%rbp), %rdi
callq 0xb120
addq $0x50, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x4640
nopl (%rax)
// File: dentiny[P]HTTP-Cache-Proxy/./Parser.hpp
// Function: Parser::parseRequest(Request&)
void parseRequest(Request & request)
	{
		bool extractAddrPort_suc = false;
		std::string temp;
		for(char c : request.content)
		{
			// extract the first line of the request
			if(c == '\r') 
			{
				break;
			}
			request.first_line += c;

			// extract http action, hostname, port
			if(!extractAddrPort_suc && c == ' ')
			{
				// get HTTP action and url from request
				if(request.httpAction.empty())
				{
					pushClear(temp, request.httpAction);
				}
				else
				{
					pushClear(temp, request.url);
					extractAddrPort(request.url, request.hostname, request.port);
					extractAddrPort_suc = true;
				}
			}
			else
			{
				temp += c;
			}
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movb $0x0, -0x11(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4510
movq -0x10(%rbp), %rax
addq $0xc0, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0xa150
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0xa650
movq %rax, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xa680
testb $0x1, %al
jne 0x9703
jmp 0x97ee
leaq -0x48(%rbp), %rdi
callq 0xa6c0
movb (%rax), %al
movb %al, -0x51(%rbp)
movsbl -0x51(%rbp), %eax
cmpl $0xd, %eax
jne 0x971f
jmp 0x97ee
movsbl -0x51(%rbp), %esi
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x4260
jmp 0x9732
testb $0x1, -0x11(%rbp)
jne 0x97cd
movsbl -0x51(%rbp), %eax
cmpl $0x20, %eax
jne 0x97cd
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
callq 0x45f0
testb $0x1, %al
jne 0x975c
jmp 0x978c
movq -0x70(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0x40, %rdx
leaq -0x38(%rbp), %rsi
callq 0xa6e0
jmp 0x9773
jmp 0x97cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4250
jmp 0x97fd
movq -0x70(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0x60, %rdx
leaq -0x38(%rbp), %rsi
callq 0xa6e0
jmp 0x97a3
movq -0x70(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq %rcx, %rsi
addq $0x60, %rsi
movq %rcx, %rdx
subq $-0x80, %rdx
addq $0xa0, %rcx
callq 0xa720
jmp 0x97c7
movb $0x1, -0x11(%rbp)
jmp 0x97de
movsbl -0x51(%rbp), %esi
leaq -0x38(%rbp), %rdi
callq 0x4260
jmp 0x97dc
jmp 0x97de
jmp 0x97e0
leaq -0x48(%rbp), %rdi
callq 0xa890
jmp 0x96ed
leaq -0x38(%rbp), %rdi
callq 0x4250
addq $0x70, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x4640
nopw %cs:(%rax,%rax)
// File: dentiny[P]HTTP-Cache-Proxy/./Parser.hpp
// Function: Parser::extractAddrPort(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void extractAddrPort(std::string & url, std::string & hostname, std::string & port)
	{
		// eg: http://people.duke.edu/~bmr23/ece568/
		// url: http://people.duke.edu/~bmr23/ece568/
		// hostname: people.duke.edu
		// port: 80
		if(url.find("http://") == 0)
		{
			// port number
			port = "80";

			// hostname
			int idx = 0;
			int N = url.length();
			int slash = 0;
			for(; idx < N; ++idx)
			{
				slash += url[idx] == '/';
				if(slash == 3) // "http://" has two slash
				{
					break;
				}
			}
			hostname = url.substr(7, idx - 7);
		}

		// eg: github.com:443
		// url: github.com
		// hostname: github.com
		// port: 443
		else
		{
			int idx = url.find_last_of(':');
			hostname = url.substr(0, idx);
			url = url.substr(0, idx);
			port = "443";
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xea81(%rip), %rsi      # 0x191c7
xorl %eax, %eax
movl %eax, %edx
callq 0x46f0
cmpq $0x0, %rax
jne 0xa7f7
movq -0x20(%rbp), %rdi
leaq 0xea6b(%rip), %rsi      # 0x191cf
callq 0x4500
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4580
movl %eax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
jge 0xa7c1
movq -0x10(%rbp), %rdi
movslq -0x24(%rbp), %rsi
callq 0x4700
movsbl (%rax), %eax
cmpl $0x2f, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x3, -0x2c(%rbp)
jne 0xa7b4
jmp 0xa7c1
jmp 0xa7b6
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xa783
movq -0x10(%rbp), %rsi
movl -0x24(%rbp), %eax
subl $0x7, %eax
movslq %eax, %rcx
leaq -0x50(%rbp), %rdi
movl $0x7, %edx
callq 0x43f0
movq -0x18(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x4490
leaq -0x50(%rbp), %rdi
callq 0x4250
jmp 0xa87e
movq -0x10(%rbp), %rdi
movl $0x3a, %esi
movq $-0x1, %rdx
callq 0x46b0
movl %eax, -0x54(%rbp)
movq -0x10(%rbp), %rsi
movslq -0x54(%rbp), %rcx
leaq -0x78(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x43f0
movq -0x18(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x4490
leaq -0x78(%rbp), %rdi
callq 0x4250
movq -0x10(%rbp), %rsi
movslq -0x54(%rbp), %rcx
leaq -0x98(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x43f0
movq -0x10(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x4490
leaq -0x98(%rbp), %rdi
callq 0x4250
movq -0x20(%rbp), %rdi
leaq 0xe959(%rip), %rsi      # 0x191d2
callq 0x4500
addq $0xa0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: dentiny[P]HTTP-Cache-Proxy/./LRUCache.hpp
// Function: LRUCache::get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Response get(const std::string & url) 
    {
        std::unique_lock<std::mutex> lck(mtx1);

        // url doesn't exist in cache
        if(!existsUrl(url))
        {
            throw ProxyException("Url doesn't exist in cache");
        }

        Response ret = kv[url];
        cache.remove(url);
        cache.push_back(url);
        return ret;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x78(%rbp)
movq %rdi, %rax
movq %rax, -0x70(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq 0x19047(%rip), %rsi     # 0x243b8
leaq -0x28(%rbp), %rdi
callq 0xb0e0
movq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xb2a0
movb %al, -0x5c(%rbp)
jmp 0xb38c
movb -0x5c(%rbp), %al
testb $0x1, %al
jne 0xb45c
jmp 0xb399
movb $0x1, -0x5a(%rbp)
movl $0x28, %edi
callq 0x41b0
movq %rax, -0x88(%rbp)
leaq -0x59(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x4650
movq -0x80(%rbp), %rdx
leaq 0xdf87(%rip), %rsi      # 0x1934d
leaq -0x58(%rbp), %rdi
callq 0x4bf0
jmp 0xb3d1
movq -0x88(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x9240
jmp 0xb3e3
movq -0x88(%rbp), %rdi
movb $0x0, -0x5a(%rbp)
leaq 0x18903(%rip), %rsi     # 0x23cf8
leaq -0x214c(%rip), %rdx     # 0x92b0
callq 0x4610
jmp 0xb506
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xb4f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xb43a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x4250
leaq -0x59(%rbp), %rdi
callq 0x4420
testb $0x1, -0x5a(%rbp)
jne 0xb44b
jmp 0xb457
movq -0x88(%rbp), %rdi
callq 0x42d0
jmp 0xb4f4
movq -0x68(%rbp), %rdi
movb $0x0, -0x5b(%rbp)
addq $0x20, %rdi
movq -0x18(%rbp), %rsi
callq 0xcc60
movq %rax, -0x90(%rbp)
jmp 0xb47a
movq -0x90(%rbp), %rsi
movq -0x78(%rbp), %rdi
callq 0xcc90
jmp 0xb48c
movq -0x68(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rsi
callq 0xcdf0
jmp 0xb49f
movq -0x68(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rsi
callq 0xcee0
jmp 0xb4b2
movb $0x1, -0x5b(%rbp)
testb $0x1, -0x5b(%rbp)
jne 0xb4de
jmp 0xb4d5
movq -0x78(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x5970
jmp 0xb4f4
movq -0x78(%rbp), %rdi
callq 0x5970
leaq -0x28(%rbp), %rdi
callq 0xb120
movq -0x70(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0xb120
movq -0x30(%rbp), %rdi
callq 0x4640
nopw %cs:(%rax,%rax)
// File: dentiny[P]HTTP-Cache-Proxy/Proxy.cpp
// Function: Proxy::respondCached(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void respondCached(int client_fd, const std::string & url)
	{
		// send response to the client
		Response response = cache.get(url);
		for(const auto & seg : response.content)
		{
			int sent_length = 0;
			int length_to_be_sent = seg.size();
			while(sent_length < length_to_be_sent)
			{
				int len = send(client_fd, &seg.data()[0] + sent_length, length_to_be_sent - sent_length, 0);
				if(len == -1)
				{
					throw ProxyException("Send with cached response error");
				}
				sent_length += len;
			}
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rsi
addq $0x250, %rsi            # imm = 0x250
movq -0x18(%rbp), %rdx
leaq -0x110(%rbp), %rdi
callq 0xb340
leaq -0x110(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rdi
callq 0xf650
movq %rax, -0x120(%rbp)
movq -0x118(%rbp), %rdi
callq 0xf680
movq %rax, -0x128(%rbp)
leaq -0x120(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0xf6b0
testb $0x1, %al
jne 0xb595
jmp 0xb74f
leaq -0x120(%rbp), %rdi
callq 0xf6f0
movq %rax, -0x130(%rbp)
movl $0x0, -0x134(%rbp)
movq -0x130(%rbp), %rdi
callq 0x9d80
movl %eax, -0x138(%rbp)
movl -0x134(%rbp), %eax
cmpl -0x138(%rbp), %eax
jge 0xb73c
movl -0xc(%rbp), %eax
movl %eax, -0x184(%rbp)
movq -0x130(%rbp), %rdi
callq 0xf710
movl -0x184(%rbp), %edi
movq %rax, %rsi
movslq -0x134(%rbp), %rax
movl %eax, %ecx
addq %rax, %rsi
movl -0x138(%rbp), %eax
subl %ecx, %eax
movslq %eax, %rdx
xorl %ecx, %ecx
callq 0x41c0
movq %rax, -0x180(%rbp)
jmp 0xb61b
movq -0x180(%rbp), %rax
movl %eax, -0x13c(%rbp)
cmpl $-0x1, -0x13c(%rbp)
jne 0xb725
movb $0x1, -0x172(%rbp)
movl $0x28, %edi
callq 0x41b0
movq %rax, -0x198(%rbp)
leaq -0x171(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x4650
movq -0x190(%rbp), %rdx
leaq 0xdcfa(%rip), %rsi      # 0x19368
leaq -0x170(%rbp), %rdi
callq 0x4bf0
jmp 0xb67c
movq -0x198(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x9240
jmp 0xb691
movq -0x198(%rbp), %rdi
movb $0x0, -0x172(%rbp)
leaq 0x18652(%rip), %rsi     # 0x23cf8
leaq -0x23fd(%rip), %rdx     # 0x92b0
callq 0x4610
jmp 0xb77c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x148(%rbp)
movl %eax, -0x14c(%rbp)
jmp 0xb764
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x148(%rbp)
movl %eax, -0x14c(%rbp)
jmp 0xb700
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x148(%rbp)
movl %eax, -0x14c(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x4250
leaq -0x171(%rbp), %rdi
callq 0x4420
testb $0x1, -0x172(%rbp)
jne 0xb717
jmp 0xb723
movq -0x198(%rbp), %rdi
callq 0x42d0
jmp 0xb764
movl -0x13c(%rbp), %eax
addl -0x134(%rbp), %eax
movl %eax, -0x134(%rbp)
jmp 0xb5c4
jmp 0xb73e
leaq -0x120(%rbp), %rdi
callq 0xf730
jmp 0xb579
leaq -0x110(%rbp), %rdi
callq 0x5970
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
leaq -0x110(%rbp), %rdi
callq 0x5970
movq -0x148(%rbp), %rdi
callq 0x4640
nopl (%rax)