// File: FreeSlave[P]vhlt/hlvis/vis.cpp
// Function: LoadPortals(char*)
static void     LoadPortals(char* portal_image)
{
    int             i, j;
    portal_t*       p;
    leaf_t*         l;
    int             numpoints;
    winding_t*      w;
    int             leafnums[2];
    plane_t         plane;
    const char* const seperators = " ()\r\n\t";
    char*           token;

    token = strtok(portal_image, seperators);
    CheckNullToken(token);
    if (!sscanf(token, "%u", &g_portalleafs))
    {
        Error("LoadPortals: failed to read header: number of leafs");
    }

    token = strtok(NULL, seperators);
    CheckNullToken(token);
    if (!sscanf(token, "%i", &g_numportals))
    {
        Error("LoadPortals: failed to read header: number of portals");
    }
    
    Log("%4i portalleafs\n", g_portalleafs);
    Log("%4i numportals\n", g_numportals);

    g_bitbytes = ((g_portalleafs + 63) & ~63) >> 3;
    g_bitlongs = g_bitbytes / sizeof(long);

    // each file portal is split into two memory portals
    g_portals = (portal_t*)calloc(2 * g_numportals, sizeof(portal_t));
    g_leafs = (leaf_t*)calloc(g_portalleafs, sizeof(leaf_t));
#ifdef HLVIS_OVERVIEW
	g_leafinfos = (leafinfo_t*)calloc(g_portalleafs, sizeof(leafinfo_t));
#endif
#ifdef ZHLT_DETAILBRUSH
	g_leafcounts = (int*)calloc(g_portalleafs, sizeof(int));
	g_leafstarts = (int*)calloc(g_portalleafs, sizeof(int));
#endif

    originalvismapsize = g_portalleafs * ((g_portalleafs + 7) / 8);

    vismap = vismap_p = g_dvisdata;
    vismap_end = vismap + MAX_MAP_VISIBILITY;

#ifdef ZHLT_DETAILBRUSH
	if (g_portalleafs > MAX_MAP_LEAFS)
	{ // this may cause hlvis to overflow, because numportalleafs can be larger than g_numleafs in some special cases
		Error ("Too many portalleafs (g_portalleafs(%d) > MAX_MAP_LEAFS(%d)).", g_portalleafs, MAX_MAP_LEAFS);
	}
	g_leafcount_all = 0;
	for (i = 0; i < g_portalleafs; i++)
	{
		unsigned rval = 0;
		token = strtok(NULL, seperators);
		CheckNullToken(token);
		rval += sscanf(token, "%i", &g_leafcounts[i]);
		if (rval != 1)
		{
			Error("LoadPortals: read leaf %i failed", i);
		}
		g_leafstarts[i] = g_leafcount_all;
		g_leafcount_all += g_leafcounts[i];
	}
	if (g_leafcount_all != g_dmodels[0].visleafs)
	{ // internal error (this should never happen)
		Error ("Corrupted leaf mapping (g_leafcount_all(%d) != g_dmodels[0].visleafs(%d)).", g_leafcount_all, g_dmodels[0].visleafs);
	}
#endif
#ifdef HLVIS_OVERVIEW
	for (i = 0; i < g_portalleafs; i++)
	{
		for (j = 0; j < g_overview_count; j++)
		{
#ifdef ZHLT_DETAILBRUSH
			int d = g_overview[j].visleafnum - g_leafstarts[i];
			if (0 <= d && d < g_leafcounts[i])
#else
			if (g_overview[j].visleafnum == i)
#endif
			{
#ifdef HLVIS_SKYBOXMODEL
				if (g_overview[j].reverse)
				{
					g_leafinfos[i].isskyboxpoint = true;
				}
				else
				{
					g_leafinfos[i].isoverviewpoint = true;
				}
#else
				g_leafinfos[i].isoverviewpoint = true;
#endif
			}
		}
	}
#endif
    for (i = 0, p = g_portals; i < g_numportals; i++)
    {
        unsigned rval = 0;

        token = strtok(NULL, seperators);
        CheckNullToken(token);
        rval += sscanf(token, "%i", &numpoints);
        token = strtok(NULL, seperators);
        CheckNullToken(token);
        rval += sscanf(token, "%i", &leafnums[0]);
        token = strtok(NULL, seperators);
        CheckNullToken(token);
        rval += sscanf(token, "%i", &leafnums[1]);

        if (rval != 3)
        {
            Error("LoadPortals: reading portal %i", i);
        }
        if (numpoints > MAX_POINTS_ON_WINDING)
        {
            Error("LoadPortals: portal %i has too many points", i);
        }
        if (((unsigned)leafnums[0] > g_portalleafs) || ((unsigned)leafnums[1] > g_portalleafs))
        {
            Error("LoadPortals: reading portal %i", i);
        }

        w = p->winding = NewWinding(numpoints);
        w->original = true;
        w->numpoints = numpoints;

        for (j = 0; j < numpoints; j++)
        {
            int             k;
            double          v[3];
            unsigned        rval = 0;

            token = strtok(NULL, seperators);
            CheckNullToken(token);
            rval += sscanf(token, "%lf", &v[0]);
            token = strtok(NULL, seperators);
            CheckNullToken(token);
            rval += sscanf(token, "%lf", &v[1]);
            token = strtok(NULL, seperators);
            CheckNullToken(token);
            rval += sscanf(token, "%lf", &v[2]);

            // scanf into double, then assign to vec_t
            if (rval != 3)
            {
                Error("LoadPortals: reading portal %i", i);
            }
            for (k = 0; k < 3; k++)
            {
                w->points[j][k] = v[k];
            }
        }

        // calc plane
        PlaneFromWinding(w, &plane);

        // create forward portal
        l = &g_leafs[leafnums[0]];
        hlassume(l->numportals < MAX_PORTALS_ON_LEAF, assume_MAX_PORTALS_ON_LEAF);
        l->portals[l->numportals] = p;
        l->numportals++;

        p->winding = w;
        VectorSubtract(vec3_origin, plane.normal, p->plane.normal);
        p->plane.dist = -plane.dist;
        p->leaf = leafnums[1];
        p++;

        // create backwards portal
        l = &g_leafs[leafnums[1]];
        hlassume(l->numportals < MAX_PORTALS_ON_LEAF, assume_MAX_PORTALS_ON_LEAF);
        l->portals[l->numportals] = p;
        l->numportals++;

        p->winding = NewWinding(w->numpoints);
        p->winding->numpoints = w->numpoints;
        for (j = 0; j < w->numpoints; j++)
        {
            VectorCopy(w->points[w->numpoints - 1 - j], p->winding->points[j]);
        }

        p->plane = plane;
        p->leaf = leafnums[0];
        p++;

    }
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
leaq 0x6570(%rip), %rax      # 0x1cdc6
movq %rax, 0x48(%rsp)
movq 0x90(%rsp), %rdi
leaq 0x655c(%rip), %rsi      # 0x1cdc6
callq 0x33d0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
callq 0x17270
movq 0x40(%rsp), %rdi
leaq 0x6543(%rip), %rsi      # 0x1cdcd
leaq 0x208eee3(%rip), %rdx   # 0x20a5774
movb $0x0, %al
callq 0x3220
cmpl $0x0, %eax
jne 0x168ab
leaq 0x652c(%rip), %rdi      # 0x1cdd0
movb $0x0, %al
callq 0xa380
xorl %eax, %eax
movl %eax, %edi
leaq 0x6510(%rip), %rsi      # 0x1cdc6
callq 0x33d0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
callq 0x17270
movq 0x40(%rsp), %rdi
leaq 0x664b(%rip), %rsi      # 0x1cf21
leaq 0x208ee93(%rip), %rdx   # 0x20a5770
movb $0x0, %al
callq 0x3220
cmpl $0x0, %eax
jne 0x168f7
leaq 0x6514(%rip), %rdi      # 0x1ce04
movb $0x0, %al
callq 0xa380
movl 0x208ee77(%rip), %esi   # 0x20a5774
leaq 0x6536(%rip), %rdi      # 0x1ce3a
movb $0x0, %al
callq 0x9ed0
movl 0x208ee5f(%rip), %esi   # 0x20a5770
leaq 0x6533(%rip), %rdi      # 0x1ce4b
movb $0x0, %al
callq 0x9ed0
movl 0x208ee4f(%rip), %eax   # 0x20a5774
addl $0x3f, %eax
andl $-0x40, %eax
shrl $0x3, %eax
movl %eax, 0x208ee74(%rip)   # 0x20a57a8
movl 0x208ee6e(%rip), %eax   # 0x20a57a8
shrq $0x3, %rax
movl %eax, 0x208ee68(%rip)   # 0x20a57ac
movl 0x208ee26(%rip), %eax   # 0x20a5770
shll %eax
movslq %eax, %rdi
movl $0x48, %esi
callq 0x3160
movq %rax, 0x208ee18(%rip)   # 0x20a5778
movl 0x208ee0e(%rip), %eax   # 0x20a5774
movl %eax, %edi
movl $0x810, %esi            # imm = 0x810
callq 0x3160
movq %rax, 0x208ee07(%rip)   # 0x20a5780
movl 0x208edf5(%rip), %eax   # 0x20a5774
movl %eax, %edi
movl $0x2, %esi
callq 0x3160
movq %rax, 0x20dee36(%rip)   # 0x20f57c8
movl 0x208eddc(%rip), %eax   # 0x20a5774
movl %eax, %edi
movl $0x4, %esi
callq 0x3160
movq %rax, 0x208ede5(%rip)   # 0x20a5790
movl 0x208edc3(%rip), %eax   # 0x20a5774
movl %eax, %edi
movl $0x4, %esi
callq 0x3160
movq %rax, 0x208edc4(%rip)   # 0x20a5788
movl 0x208edaa(%rip), %eax   # 0x20a5774
movl 0x208eda4(%rip), %ecx   # 0x20a5774
addl $0x7, %ecx
shrl $0x3, %ecx
imull %ecx, %eax
movl %eax, 0x20dedf9(%rip)   # 0x20f57d8
leaq 0x138ea(%rip), %rax     # 0x2a2d0
movq %rax, 0x20dede3(%rip)   # 0x20f57d0
leaq 0x138dc(%rip), %rax     # 0x2a2d0
movq %rax, 0x20dede5(%rip)   # 0x20f57e0
movq 0x20dedde(%rip), %rax   # 0x20f57e0
addq $0x800000, %rax         # imm = 0x800000
movq %rax, 0x20dedd9(%rip)   # 0x20f57e8
cmpl $0x7ff8, 0x208ed5b(%rip) # imm = 0x7FF8
jbe 0x16a34
movl 0x208ed53(%rip), %esi   # 0x20a5774
leaq 0x6433(%rip), %rdi      # 0x1ce5b
movl $0x7ff8, %edx           # imm = 0x7FF8
movb $0x0, %al
callq 0xa380
movl $0x0, 0x208ed5a(%rip)   # 0x20a5798
movl $0x0, 0x8c(%rsp)
movl 0x8c(%rsp), %eax
cmpl 0x208ed1e(%rip), %eax   # 0x20a5774
jae 0x16b1c
movl $0x0, 0x3c(%rsp)
xorl %eax, %eax
movl %eax, %edi
leaq 0x6357(%rip), %rsi      # 0x1cdc6
callq 0x33d0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
callq 0x17270
movq 0x40(%rsp), %rdi
movq 0x208ed01(%rip), %rdx   # 0x20a5790
movslq 0x8c(%rsp), %rax
shlq $0x2, %rax
addq %rax, %rdx
leaq 0x647c(%rip), %rsi      # 0x1cf21
movb $0x0, %al
callq 0x3220
addl 0x3c(%rsp), %eax
movl %eax, 0x3c(%rsp)
cmpl $0x1, 0x3c(%rsp)
je 0x16ad0
movl 0x8c(%rsp), %esi
leaq 0x63d0(%rip), %rdi      # 0x1ce99
movb $0x0, %al
callq 0xa380
movl 0x208ecc2(%rip), %edx   # 0x20a5798
movq 0x208ecab(%rip), %rax   # 0x20a5788
movslq 0x8c(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x208eca1(%rip), %rax   # 0x20a5790
movslq 0x8c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
addl 0x208ec98(%rip), %eax   # 0x20a5798
movl %eax, 0x208ec92(%rip)   # 0x20a5798
movl 0x8c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8c(%rsp)
jmp 0x16a49
movl 0x208ec76(%rip), %eax   # 0x20a5798
leaq 0xb797(%rip), %rcx      # 0x222c0
cmpl 0x34(%rcx), %eax
je 0x16b4c
movl 0x208ec64(%rip), %esi   # 0x20a5798
leaq 0xb785(%rip), %rax      # 0x222c0
movl 0x34(%rax), %edx
leaq 0x6375(%rip), %rdi      # 0x1ceba
movb $0x0, %al
callq 0xa380
movl $0x0, 0x8c(%rsp)
movl 0x8c(%rsp), %eax
cmpl 0x208ec10(%rip), %eax   # 0x20a5774
jae 0x16c4e
movl $0x0, 0x88(%rsp)
movl 0x88(%rsp), %eax
cmpl 0x20dec3e(%rip), %eax   # 0x20f57c0
jge 0x16c36
movslq 0x88(%rsp), %rcx
leaq 0x208ec29(%rip), %rax   # 0x20a57c0
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movq 0x208ebe0(%rip), %rcx   # 0x20a5788
movslq 0x8c(%rsp), %rdx
subl (%rcx,%rdx,4), %eax
movl %eax, 0x38(%rsp)
xorl %eax, %eax
cmpl 0x38(%rsp), %eax
jg 0x16c1e
movl 0x38(%rsp), %eax
movq 0x208ebc6(%rip), %rcx   # 0x20a5790
movslq 0x8c(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x16c1e
movslq 0x88(%rsp), %rcx
leaq 0x208ebda(%rip), %rax   # 0x20a57c0
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x10(%rax)
je 0x16c09
movq 0x20debce(%rip), %rax   # 0x20f57c8
movslq 0x8c(%rsp), %rcx
movb $0x1, 0x1(%rax,%rcx,2)
jmp 0x16c1c
movq 0x20debb8(%rip), %rax   # 0x20f57c8
movslq 0x8c(%rsp), %rcx
movb $0x1, (%rax,%rcx,2)
jmp 0x16c1e
jmp 0x16c20
movl 0x88(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x88(%rsp)
jmp 0x16b75
jmp 0x16c38
movl 0x8c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8c(%rsp)
jmp 0x16b57
movl $0x0, 0x8c(%rsp)
movq 0x208eb18(%rip), %rax   # 0x20a5778
movq %rax, 0x80(%rsp)
movl 0x8c(%rsp), %eax
cmpl 0x208eafb(%rip), %eax   # 0x20a5770
jge 0x17261
movl $0x0, 0x34(%rsp)
xorl %eax, %eax
movl %eax, %edi
leaq 0x6138(%rip), %rsi      # 0x1cdc6
callq 0x33d0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
callq 0x17270
movq 0x40(%rsp), %rdi
leaq 0x6273(%rip), %rsi      # 0x1cf21
leaq 0x74(%rsp), %rdx
movb $0x0, %al
callq 0x3220
addl 0x34(%rsp), %eax
movl %eax, 0x34(%rsp)
xorl %eax, %eax
movl %eax, %edi
leaq 0x60f9(%rip), %rsi      # 0x1cdc6
callq 0x33d0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
callq 0x17270
movq 0x40(%rsp), %rdi
leaq 0x60(%rsp), %rdx
leaq 0x622f(%rip), %rsi      # 0x1cf21
movb $0x0, %al
callq 0x3220
addl 0x34(%rsp), %eax
movl %eax, 0x34(%rsp)
xorl %eax, %eax
movl %eax, %edi
leaq 0x60ba(%rip), %rsi      # 0x1cdc6
callq 0x33d0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
callq 0x17270
movq 0x40(%rsp), %rdi
leaq 0x60(%rsp), %rdx
addq $0x4, %rdx
leaq 0x61ec(%rip), %rsi      # 0x1cf21
movb $0x0, %al
callq 0x3220
addl 0x34(%rsp), %eax
movl %eax, 0x34(%rsp)
cmpl $0x3, 0x34(%rsp)
je 0x16d60
movl 0x8c(%rsp), %esi
leaq 0x61ac(%rip), %rdi      # 0x1cf05
movb $0x0, %al
callq 0xa380
cmpl $0x80, 0x74(%rsp)
jle 0x16d7f
movl 0x8c(%rsp), %esi
leaq 0x61ac(%rip), %rdi      # 0x1cf24
movb $0x0, %al
callq 0xa380
movl 0x60(%rsp), %eax
cmpl 0x208e9eb(%rip), %eax   # 0x20a5774
ja 0x16d97
movl 0x64(%rsp), %eax
cmpl 0x208e9df(%rip), %eax   # 0x20a5774
jbe 0x16dac
movl 0x8c(%rsp), %esi
leaq 0x6160(%rip), %rdi      # 0x1cf05
movb $0x0, %al
callq 0xa380
movl 0x74(%rsp), %edi
callq 0x17290
movq 0x80(%rsp), %rcx
movq %rax, 0x18(%rcx)
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movb $0x1, (%rax)
movl 0x74(%rsp), %ecx
movq 0x68(%rsp), %rax
movl %ecx, 0x4(%rax)
movl $0x0, 0x88(%rsp)
movl 0x88(%rsp), %eax
cmpl 0x74(%rsp), %eax
jge 0x16f44
movl $0x0, 0xc(%rsp)
xorl %eax, %eax
movl %eax, %edi
leaq 0x5fbd(%rip), %rsi      # 0x1cdc6
callq 0x33d0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
callq 0x17270
movq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rdx
leaq 0x28b9(%rip), %rsi      # 0x196e7
movb $0x0, %al
callq 0x3220
addl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
xorl %eax, %eax
movl %eax, %edi
leaq 0x5f7e(%rip), %rsi      # 0x1cdc6
callq 0x33d0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
callq 0x17270
movq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rdx
addq $0x8, %rdx
leaq 0x2876(%rip), %rsi      # 0x196e7
movb $0x0, %al
callq 0x3220
addl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
xorl %eax, %eax
movl %eax, %edi
leaq 0x5f3b(%rip), %rsi      # 0x1cdc6
callq 0x33d0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
callq 0x17270
movq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rdx
addq $0x10, %rdx
leaq 0x2833(%rip), %rsi      # 0x196e7
movb $0x0, %al
callq 0x3220
addl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
cmpl $0x3, 0xc(%rsp)
je 0x16edf
movl 0x8c(%rsp), %esi
leaq 0x602d(%rip), %rdi      # 0x1cf05
movb $0x0, %al
callq 0xa380
movl $0x0, 0x30(%rsp)
cmpl $0x3, 0x30(%rsp)
jge 0x16f2c
movslq 0x30(%rsp), %rax
movsd 0x10(%rsp,%rax,8), %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x68(%rsp), %rax
addq $0x8, %rax
movslq 0x88(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movslq 0x30(%rsp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0x16ee7
jmp 0x16f2e
movl 0x88(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x88(%rsp)
jmp 0x16de5
movq 0x68(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x172f0
movq 0x208e826(%rip), %rax   # 0x20a5780
movslq 0x60(%rsp), %rcx
imulq $0x810, %rcx, %rcx      # imm = 0x810
addq %rcx, %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rax
cmpl $0x100, (%rax)          # imm = 0x100
setb %al
movzbl %al, %edi
andl $0x1, %edi
movl $0x18, %esi
callq 0xad00
movq 0x80(%rsp), %rdx
movq 0x78(%rsp), %rax
movq 0x78(%rsp), %rcx
movl (%rcx), %ecx
movq %rdx, 0x10(%rax,%rcx,8)
movq 0x78(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq 0x68(%rsp), %rcx
movq 0x80(%rsp), %rax
movq %rcx, 0x18(%rax)
leaq 0x3eb7(%rip), %rax      # 0x1ae80
movss (%rax), %xmm0
subss 0x50(%rsp), %xmm0
movq 0x80(%rsp), %rax
movss %xmm0, (%rax)
leaq 0x3e9a(%rip), %rax      # 0x1ae80
movss 0x4(%rax), %xmm0
subss 0x54(%rsp), %xmm0
movq 0x80(%rsp), %rax
movss %xmm0, 0x4(%rax)
leaq 0x3e7b(%rip), %rax      # 0x1ae80
movss 0x8(%rax), %xmm0
subss 0x58(%rsp), %xmm0
movq 0x80(%rsp), %rax
movss %xmm0, 0x8(%rax)
movss 0x5c(%rsp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movq 0x80(%rsp), %rax
movss %xmm0, 0xc(%rax)
movl 0x64(%rsp), %ecx
movq 0x80(%rsp), %rax
movl %ecx, 0x10(%rax)
movq 0x80(%rsp), %rax
addq $0x48, %rax
movq %rax, 0x80(%rsp)
movq 0x208e719(%rip), %rax   # 0x20a5780
movslq 0x64(%rsp), %rcx
imulq $0x810, %rcx, %rcx      # imm = 0x810
addq %rcx, %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rax
cmpl $0x100, (%rax)          # imm = 0x100
setb %al
movzbl %al, %edi
andl $0x1, %edi
movl $0x18, %esi
callq 0xad00
movq 0x80(%rsp), %rdx
movq 0x78(%rsp), %rax
movq 0x78(%rsp), %rcx
movl (%rcx), %ecx
movq %rdx, 0x10(%rax,%rcx,8)
movq 0x78(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq 0x68(%rsp), %rax
movl 0x4(%rax), %edi
callq 0x17290
movq %rax, %rcx
movq 0x80(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x68(%rsp), %rax
movl 0x4(%rax), %ecx
movq 0x80(%rsp), %rax
movq 0x18(%rax), %rax
movl %ecx, 0x4(%rax)
movl $0x0, 0x88(%rsp)
movl 0x88(%rsp), %eax
movq 0x68(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x1720f
movq 0x68(%rsp), %rax
addq $0x8, %rax
movq 0x68(%rsp), %rcx
movl 0x4(%rcx), %ecx
subl $0x1, %ecx
subl 0x88(%rsp), %ecx
movslq %ecx, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movss (%rax), %xmm0
movq 0x80(%rsp), %rax
movq 0x18(%rax), %rax
addq $0x8, %rax
movslq 0x88(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, (%rax)
movq 0x68(%rsp), %rax
addq $0x8, %rax
movq 0x68(%rsp), %rcx
movl 0x4(%rcx), %ecx
subl $0x1, %ecx
subl 0x88(%rsp), %ecx
movslq %ecx, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movss 0x4(%rax), %xmm0
movq 0x80(%rsp), %rax
movq 0x18(%rax), %rax
addq $0x8, %rax
movslq 0x88(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x4(%rax)
movq 0x68(%rsp), %rax
addq $0x8, %rax
movq 0x68(%rsp), %rcx
movl 0x4(%rcx), %ecx
subl $0x1, %ecx
subl 0x88(%rsp), %ecx
movslq %ecx, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movss 0x8(%rax), %xmm0
movq 0x80(%rsp), %rax
movq 0x18(%rax), %rax
addq $0x8, %rax
movslq 0x88(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x8(%rax)
movl 0x88(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x88(%rsp)
jmp 0x170fc
movq 0x80(%rsp), %rax
movq 0x50(%rsp), %rcx
movq %rcx, (%rax)
movq 0x58(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl 0x60(%rsp), %ecx
movq 0x80(%rsp), %rax
movl %ecx, 0x10(%rax)
movq 0x80(%rsp), %rax
addq $0x48, %rax
movq %rax, 0x80(%rsp)
movl 0x8c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8c(%rsp)
jmp 0x16c68
addq $0x98, %rsp
retq
nopl (%rax)