// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: UnparseEntities()
void            UnparseEntities()
{
    char*           buf;
    char*           end;
    epair_t*        ep;
    char            line[MAXTOKEN];
    int             i;

    buf = g_dentdata;
    end = buf;
    *end = 0;

#ifdef ZHLT_ENTITY_INFOSUNLIGHT
	for (i = 0; i < g_numentities; i++)
	{
		entity_t *mapent = &g_entities[i];
		if (!strcmp (ValueForKey (mapent, "classname"), "info_sunlight") ||
			!strcmp (ValueForKey (mapent, "classname"), "light_environment") )
		{
			float vec[3] = {0,0,0};
			{
				sscanf (ValueForKey (mapent, "angles"), "%f %f %f", &vec[0], &vec[1], &vec[2]);
				float pitch = FloatForKey(mapent, "pitch");
				if (pitch)
					vec[0] = pitch;

				const char *target = ValueForKey (mapent, "target");
				if (target[0])
				{
					entity_t *targetent = FindTargetEntity (target);
					if (targetent)
					{
						float origin1[3] = {0,0,0}, origin2[3] = {0,0,0}, normal[3];
						sscanf (ValueForKey (mapent, "origin"), "%f %f %f", &origin1[0], &origin1[1], &origin1[2]);
						sscanf (ValueForKey (targetent, "origin"), "%f %f %f", &origin2[0], &origin2[1], &origin2[2]);
						VectorSubtract (origin2, origin1, normal);
						anglesforvector (vec, normal);
					}
				}
			}
			char stmp[1024];
			safe_snprintf (stmp, 1024, "%g %g %g", vec[0], vec[1], vec[2]);
			SetKeyValue (mapent, "angles", stmp);
			DeleteKey (mapent, "pitch");

			if (!strcmp (ValueForKey (mapent, "classname"), "info_sunlight"))
			{
				if (g_numentities == MAX_MAP_ENTITIES)
				{
					Error("g_numentities == MAX_MAP_ENTITIES");
				}
				entity_t *newent = &g_entities[g_numentities++];
				newent->epairs = mapent->epairs;
				SetKeyValue (newent, "classname", "light_environment");
				SetKeyValue (newent, "_fake", "1");
				mapent->epairs = NULL;
			}
		}
	}
#endif
#ifdef ZHLT_ENTITY_LIGHTSHADOW
    for (i = 0; i < g_numentities; i++)
	{
		entity_t *mapent = &g_entities[i];
		if (!strcmp (ValueForKey (mapent, "classname"), "light_shadow")
	#ifdef ZHLT_ENTITY_LIGHTBOUNCE
			|| !strcmp (ValueForKey (mapent, "classname"), "light_bounce")
	#endif
			)
		{
			SetKeyValue (mapent, "convertfrom", ValueForKey (mapent, "classname"));
			SetKeyValue (mapent, "classname", (*ValueForKey (mapent, "convertto")? ValueForKey (mapent, "convertto"): "light"));
			SetKeyValue (mapent, "convertto", "");
		}
	}
#endif
#ifdef ZHLT_ENTITY_LIGHTSURFACE
	// ugly code
	for (i = 0; i < g_numentities; i++)
	{
		entity_t *mapent = &g_entities[i];
		if (!strcmp (ValueForKey (mapent, "classname"), "light_surface"))
		{
			if (!*ValueForKey (mapent, "_tex"))
			{
				SetKeyValue (mapent, "_tex", "                ");
			}
			const char *newclassname = ValueForKey (mapent, "convertto");
			if (!*newclassname)
			{
				SetKeyValue (mapent, "classname", "light");
			}
			else if (strncmp (newclassname, "light", 5))
			{
				Error ("New classname for 'light_surface' should begin with 'light' not '%s'.\n", newclassname);
			}
			else
			{
				SetKeyValue (mapent, "classname", newclassname);
			}
			SetKeyValue (mapent, "convertto", "");
		}
	}
#endif
#ifdef HLCSG_OPTIMIZELIGHTENTITY
#ifdef HLCSG
	extern bool g_nolightopt;
	if (!g_nolightopt)
	{
		int i, j;
		int count = 0;
		bool *lightneedcompare = (bool *)malloc (g_numentities * sizeof (bool));
		hlassume (lightneedcompare != NULL, assume_NoMemory);
		memset (lightneedcompare, 0, g_numentities * sizeof(bool));
		for (i = g_numentities - 1; i > -1; i--)
		{
			entity_t *ent = &g_entities[i];
			const char *classname = ValueForKey (ent, "classname");
			const char *targetname = ValueForKey (ent, "targetname");
			int style = IntForKey (ent, "style");
			if (!targetname[0] || strcmp (classname, "light") && strcmp (classname, "light_spot") && strcmp (classname, "light_environment"))
				continue;
			for (j = i + 1; j < g_numentities; j++)
			{
				if (!lightneedcompare[j])
					continue;
				entity_t *ent2 = &g_entities[j];
				const char *targetname2 = ValueForKey (ent2, "targetname");
				int style2 = IntForKey (ent2, "style");
				if (style == style2 && !strcmp (targetname, targetname2))
					break;
			}
			if (j < g_numentities)
			{
				DeleteKey (ent, "targetname");
				count++;
			}
			else
			{
				lightneedcompare[i] = true;
			}
		}
		if (count > 0)
		{
			Log ("%d redundant named lights optimized.\n", count);
		}
		free (lightneedcompare);
	}
#endif
#endif
    for (i = 0; i < g_numentities; i++)
    {
        ep = g_entities[i].epairs;
        if (!ep)
        {
            continue;                                      // ent got removed
        }

        strcat(end, "{\n");
        end += 2;

        for (ep = g_entities[i].epairs; ep; ep = ep->next)
        {
            sprintf(line, "\"%s\" \"%s\"\n", ep->key, ep->value);
            strcat(end, line);
            end += strlen(line);
        }
        strcat(end, "}\n");
        end += 2;

        if (end > buf + MAX_MAP_ENTSTRING)
        {
            Error("Entity text too long");
        }
    }
    g_entdatasize = end - buf + 1;
}

// Assembly:
subq $0x1508, %rsp           # imm = 0x1508
leaq 0x836f82(%rip), %rax    # 0x83f530
movq %rax, 0x1500(%rsp)
movq 0x1500(%rsp), %rax
movq %rax, 0x14f8(%rsp)
movq 0x14f8(%rsp), %rax
movb $0x0, (%rax)
movl $0x0, 0x4ec(%rsp)
movl 0x4ec(%rsp), %eax
cmpl 0x2024ebb(%rip), %eax   # 0x202d4a4
jge 0x89c7
movslq 0x4ec(%rsp), %rcx
leaq 0x2024eb2(%rip), %rax   # 0x202d4b0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x4e0(%rsp)
movq 0x4e0(%rsp), %rdi
leaq 0x21f3a(%rip), %rsi     # 0x2a556
callq 0x7ff0
movq %rax, %rdi
leaq 0x21fe7(%rip), %rsi     # 0x2a612
callq 0x4530
cmpl $0x0, %eax
je 0x8661
movq 0x4e0(%rsp), %rdi
leaq 0x21f12(%rip), %rsi     # 0x2a556
callq 0x7ff0
movq %rax, %rdi
leaq 0x21fad(%rip), %rsi     # 0x2a600
callq 0x4530
cmpl $0x0, %eax
jne 0x89af
leaq 0x4d4(%rsp), %rdi
xorl %esi, %esi
movl $0xc, %edx
callq 0x4210
movq 0x4e0(%rsp), %rdi
leaq 0x21fa2(%rip), %rsi     # 0x2a626
callq 0x7ff0
movq %rax, %rdi
leaq 0x4d4(%rsp), %rdx
leaq 0x4d4(%rsp), %rcx
addq $0x4, %rcx
leaq 0x4d4(%rsp), %r8
addq $0x8, %r8
leaq 0x21f7a(%rip), %rsi     # 0x2a62d
movb $0x0, %al
callq 0x4390
movq 0x4e0(%rsp), %rdi
leaq 0x21f6d(%rip), %rsi     # 0x2a636
callq 0x9040
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4d0(%rsp)
movss 0x4d0(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x86f0
jp 0x86f0
jmp 0x8702
movss 0x4d0(%rsp), %xmm0
movss %xmm0, 0x4d4(%rsp)
movq 0x4e0(%rsp), %rdi
leaq 0x21f2b(%rip), %rsi     # 0x2a63c
callq 0x7ff0
movq %rax, 0x4c8(%rsp)
movq 0x4c8(%rsp), %rax
cmpb $0x0, (%rax)
je 0x886d
movq 0x4c8(%rsp), %rdi
callq 0x9070
movq %rax, 0x4c0(%rsp)
cmpq $0x0, 0x4c0(%rsp)
je 0x886b
leaq 0x4b4(%rsp), %rdi
xorl %esi, %esi
movl $0xc, %edx
callq 0x4210
leaq 0x4a8(%rsp), %rdi
xorl %esi, %esi
movl $0xc, %edx
callq 0x4210
movq 0x4e0(%rsp), %rdi
leaq 0x27436(%rip), %rsi     # 0x2fbc0
callq 0x7ff0
movq %rax, %rdi
leaq 0x4b4(%rsp), %rdx
leaq 0x4b4(%rsp), %rcx
addq $0x4, %rcx
leaq 0x4b4(%rsp), %r8
addq $0x8, %r8
leaq 0x21e74(%rip), %rsi     # 0x2a62d
movb $0x0, %al
callq 0x4390
movq 0x4c0(%rsp), %rdi
leaq 0x273f1(%rip), %rsi     # 0x2fbc0
callq 0x7ff0
movq %rax, %rdi
leaq 0x4a8(%rsp), %rdx
leaq 0x4a8(%rsp), %rcx
addq $0x4, %rcx
leaq 0x4a8(%rsp), %r8
addq $0x8, %r8
leaq 0x21e2f(%rip), %rsi     # 0x2a62d
movb $0x0, %al
callq 0x4390
movss 0x4a8(%rsp), %xmm0
subss 0x4b4(%rsp), %xmm0
movss %xmm0, 0x49c(%rsp)
movss 0x4ac(%rsp), %xmm0
subss 0x4b8(%rsp), %xmm0
movss %xmm0, 0x4a0(%rsp)
movss 0x4b0(%rsp), %xmm0
subss 0x4bc(%rsp), %xmm0
movss %xmm0, 0x4a4(%rsp)
leaq 0x4d4(%rsp), %rdi
leaq 0x49c(%rsp), %rsi
callq 0x8270
jmp 0x886d
leaq 0x90(%rsp), %rdi
movss 0x4d4(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movss 0x4d8(%rsp), %xmm1
cvtss2sd %xmm1, %xmm1
movss 0x4dc(%rsp), %xmm2
cvtss2sd %xmm2, %xmm2
movl $0x400, %esi            # imm = 0x400
leaq 0x21d9b(%rip), %rdx     # 0x2a643
movb $0x3, %al
callq 0x99e0
movq 0x4e0(%rsp), %rdi
leaq 0x90(%rsp), %rdx
leaq 0x21d60(%rip), %rsi     # 0x2a626
callq 0x8070
movq 0x4e0(%rsp), %rdi
leaq 0x21d5c(%rip), %rsi     # 0x2a636
callq 0x8170
movq 0x4e0(%rsp), %rdi
leaq 0x21c68(%rip), %rsi     # 0x2a556
callq 0x7ff0
movq %rax, %rdi
leaq 0x21d15(%rip), %rsi     # 0x2a612
callq 0x4530
cmpl $0x0, %eax
jne 0x89ad
cmpl $0x4000, 0x2024b8f(%rip) # imm = 0x4000
jne 0x8925
leaq 0x21bed(%rip), %rdi     # 0x2a50b
movb $0x0, %al
callq 0xba80
movl 0x2024b79(%rip), %eax   # 0x202d4a4
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x2024b6e(%rip)   # 0x202d4a4
movslq %eax, %rcx
leaq 0x2024b70(%rip), %rax   # 0x202d4b0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x88(%rsp)
movq 0x4e0(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0x88(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x88(%rsp), %rdi
leaq 0x21be0(%rip), %rsi     # 0x2a556
leaq 0x21c83(%rip), %rdx     # 0x2a600
callq 0x8070
movq 0x88(%rsp), %rdi
leaq 0x21c8f(%rip), %rsi     # 0x2a620
leaq 0x25eb3(%rip), %rdx     # 0x2e84b
callq 0x8070
movq 0x4e0(%rsp), %rax
movq $0x0, 0x20(%rax)
jmp 0x89af
jmp 0x89b1
movl 0x4ec(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4ec(%rsp)
jmp 0x85dc
movl $0x0, 0x4ec(%rsp)
movl 0x4ec(%rsp), %eax
cmpl 0x2024ac5(%rip), %eax   # 0x202d4a4
jge 0x8b24
movslq 0x4ec(%rsp), %rcx
leaq 0x2024abc(%rip), %rax   # 0x202d4b0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rdi
leaq 0x21b44(%rip), %rsi     # 0x2a556
callq 0x7ff0
movq %rax, %rdi
leaq 0x21bc5(%rip), %rsi     # 0x2a5e6
callq 0x4530
cmpl $0x0, %eax
je 0x8a57
movq 0x80(%rsp), %rdi
leaq 0x21b1c(%rip), %rsi     # 0x2a556
callq 0x7ff0
movq %rax, %rdi
leaq 0x21baa(%rip), %rsi     # 0x2a5f3
callq 0x4530
cmpl $0x0, %eax
jne 0x8b0c
movq 0x80(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x80(%rsp), %rdi
leaq 0x21ae3(%rip), %rsi     # 0x2a556
callq 0x7ff0
movq 0x10(%rsp), %rdi
movq %rax, %rdx
leaq 0x21b53(%rip), %rsi     # 0x2a5da
callq 0x8070
movq 0x80(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x80(%rsp), %rdi
leaq 0x21b1a(%rip), %rsi     # 0x2a5c2
callq 0x7ff0
cmpb $0x0, (%rax)
je 0x8acd
movq 0x80(%rsp), %rdi
leaq 0x21b01(%rip), %rsi     # 0x2a5c2
callq 0x7ff0
movq %rax, 0x8(%rsp)
jmp 0x8adb
leaq 0x21b46(%rip), %rax     # 0x2a61a
movq %rax, 0x8(%rsp)
jmp 0x8adb
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rdx
leaq 0x21a6a(%rip), %rsi     # 0x2a556
callq 0x8070
movq 0x80(%rsp), %rdi
leaq 0x21ac2(%rip), %rsi     # 0x2a5c2
leaq 0x23232(%rip), %rdx     # 0x2bd39
callq 0x8070
jmp 0x8b0e
movl 0x4ec(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4ec(%rsp)
jmp 0x89d2
movl $0x0, 0x4ec(%rsp)
movl 0x4ec(%rsp), %eax
cmpl 0x2024968(%rip), %eax   # 0x202d4a4
jge 0x8c66
movslq 0x4ec(%rsp), %rcx
leaq 0x202495f(%rip), %rax   # 0x202d4b0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rdi
leaq 0x219ed(%rip), %rsi     # 0x2a556
callq 0x7ff0
movq %rax, %rdi
leaq 0x21a54(%rip), %rsi     # 0x2a5cc
callq 0x4530
cmpl $0x0, %eax
jne 0x8c4e
movq 0x78(%rsp), %rdi
leaq 0x21a2b(%rip), %rsi     # 0x2a5bd
callq 0x7ff0
cmpb $0x0, (%rax)
jne 0x8bb4
movq 0x78(%rsp), %rdi
leaq 0x21a15(%rip), %rsi     # 0x2a5bd
leaq 0x21a9d(%rip), %rdx     # 0x2a64c
callq 0x8070
movq 0x78(%rsp), %rdi
leaq 0x21a02(%rip), %rsi     # 0x2a5c2
callq 0x7ff0
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
cmpb $0x0, (%rax)
jne 0x8bee
movq 0x78(%rsp), %rdi
leaq 0x21976(%rip), %rsi     # 0x2a556
leaq 0x21a33(%rip), %rdx     # 0x2a61a
callq 0x8070
jmp 0x8c36
movq 0x70(%rsp), %rdi
leaq 0x21a20(%rip), %rsi     # 0x2a61a
movl $0x5, %edx
callq 0x41f0
cmpl $0x0, %eax
je 0x8c1e
movq 0x70(%rsp), %rsi
leaq 0x21a48(%rip), %rdi     # 0x2a65d
movb $0x0, %al
callq 0xba80
jmp 0x8c34
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %rdx
leaq 0x21927(%rip), %rsi     # 0x2a556
callq 0x8070
jmp 0x8c36
movq 0x78(%rsp), %rdi
leaq 0x21980(%rip), %rsi     # 0x2a5c2
leaq 0x230f0(%rip), %rdx     # 0x2bd39
callq 0x8070
jmp 0x8c50
movl 0x4ec(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4ec(%rsp)
jmp 0x8b2f
leaq 0x61d2a85(%rip), %rax   # 0x61db6f2
testb $0x1, (%rax)
jne 0x8e94
movl $0x0, 0x64(%rsp)
movslq 0x202481f(%rip), %rdi   # 0x202d4a4
shlq $0x0, %rdi
callq 0x4500
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x58(%rsp)
setne %al
movzbl %al, %edi
andl $0x1, %edi
movl $0x1, %esi
callq 0xc400
movq 0x58(%rsp), %rdi
movslq 0x20247ec(%rip), %rdx   # 0x202d4a4
shlq $0x0, %rdx
xorl %esi, %esi
callq 0x4210
movl 0x20247db(%rip), %eax   # 0x202d4a4
subl $0x1, %eax
movl %eax, 0x6c(%rsp)
cmpl $-0x1, 0x6c(%rsp)
jle 0x8e71
movslq 0x6c(%rsp), %rcx
leaq 0x20247c9(%rip), %rax   # 0x202d4b0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rdi
leaq 0x21857(%rip), %rsi     # 0x2a556
callq 0x7ff0
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rdi
leaq 0x2198f(%rip), %rsi     # 0x2a6a4
callq 0x7ff0
movq %rax, 0x40(%rsp)
movq 0x50(%rsp), %rdi
leaq 0x260e6(%rip), %rsi     # 0x2ee11
callq 0x8210
movl %eax, 0x3c(%rsp)
movq 0x40(%rsp), %rax
cmpb $0x0, (%rax)
je 0x8d80
movq 0x48(%rsp), %rdi
leaq 0x218d0(%rip), %rsi     # 0x2a61a
callq 0x4530
cmpl $0x0, %eax
je 0x8d85
movq 0x48(%rsp), %rdi
leaq 0x2194f(%rip), %rsi     # 0x2a6af
callq 0x4530
cmpl $0x0, %eax
je 0x8d85
movq 0x48(%rsp), %rdi
leaq 0x2188a(%rip), %rsi     # 0x2a600
callq 0x4530
cmpl $0x0, %eax
je 0x8d85
jmp 0x8e61
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
movl 0x68(%rsp), %eax
cmpl 0x202470a(%rip), %eax   # 0x202d4a4
jge 0x8e27
movq 0x58(%rsp), %rax
movslq 0x68(%rsp), %rcx
testb $0x1, (%rax,%rcx)
jne 0x8db2
jmp 0x8e17
movslq 0x68(%rsp), %rcx
leaq 0x20246f2(%rip), %rax   # 0x202d4b0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x218ce(%rip), %rsi     # 0x2a6a4
callq 0x7ff0
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x26025(%rip), %rsi     # 0x2ee11
callq 0x8210
movl %eax, 0x24(%rsp)
movl 0x3c(%rsp), %eax
cmpl 0x24(%rsp), %eax
jne 0x8e15
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x4530
cmpl $0x0, %eax
jne 0x8e15
jmp 0x8e27
jmp 0x8e17
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x8d90
movl 0x68(%rsp), %eax
cmpl 0x2024673(%rip), %eax   # 0x202d4a4
jge 0x8e51
movq 0x50(%rsp), %rdi
leaq 0x21865(%rip), %rsi     # 0x2a6a4
callq 0x8170
movl 0x64(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x64(%rsp)
jmp 0x8e5f
movq 0x58(%rsp), %rax
movslq 0x6c(%rsp), %rcx
movb $0x1, (%rax,%rcx)
jmp 0x8e61
movl 0x6c(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x8cd0
cmpl $0x0, 0x64(%rsp)
jle 0x8e8a
movl 0x64(%rsp), %esi
leaq 0x21837(%rip), %rdi     # 0x2a6ba
movb $0x0, %al
callq 0xb5d0
movq 0x58(%rsp), %rdi
callq 0x4470
movl $0x0, 0x4ec(%rsp)
movl 0x4ec(%rsp), %eax
cmpl 0x20245f8(%rip), %eax   # 0x202d4a4
jge 0x9018
movslq 0x4ec(%rsp), %rcx
leaq 0x20245ef(%rip), %rax   # 0x202d4b0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rax
movq %rax, 0x14f0(%rsp)
cmpq $0x0, 0x14f0(%rsp)
jne 0x8ee4
jmp 0x9002
movq 0x14f8(%rsp), %rdi
leaq 0x217ed(%rip), %rsi     # 0x2a6e0
callq 0x4670
movq 0x14f8(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x14f8(%rsp)
movslq 0x4ec(%rsp), %rcx
leaq 0x2024595(%rip), %rax   # 0x202d4b0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rax
movq %rax, 0x14f0(%rsp)
cmpq $0x0, 0x14f0(%rsp)
je 0x8fae
leaq 0x4f0(%rsp), %rdi
movq 0x14f0(%rsp), %rax
movq 0x8(%rax), %rdx
movq 0x14f0(%rsp), %rax
movq 0x10(%rax), %rcx
leaq 0x21783(%rip), %rsi     # 0x2a6e3
movb $0x0, %al
callq 0x40d0
movq 0x14f8(%rsp), %rdi
leaq 0x4f0(%rsp), %rsi
callq 0x4670
leaq 0x4f0(%rsp), %rdi
callq 0x41c0
addq 0x14f8(%rsp), %rax
movq %rax, 0x14f8(%rsp)
movq 0x14f0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x14f0(%rsp)
jmp 0x8f2e
movq 0x14f8(%rsp), %rdi
leaq 0x21731(%rip), %rsi     # 0x2a6ee
callq 0x4670
movq 0x14f8(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x14f8(%rsp)
movq 0x14f8(%rsp), %rax
movq 0x1500(%rsp), %rcx
addq $0x200000, %rcx         # imm = 0x200000
cmpq %rcx, %rax
jbe 0x9000
leaq 0x216f8(%rip), %rdi     # 0x2a6f1
movb $0x0, %al
callq 0xba80
jmp 0x9002
movl 0x4ec(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4ec(%rsp)
jmp 0x8e9f
movq 0x14f8(%rsp), %rax
movq 0x1500(%rsp), %rcx
subq %rcx, %rax
addq $0x1, %rax
movl %eax, 0x8364ef(%rip)    # 0x83f524
addq $0x1508, %rsp           # imm = 0x1508
retq
nopl (%rax)