// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1078, %rsp           # imm = 0x1078
movb $0x0, 0x829b9e(%rip)    # 0x8314e0
cmpl $0x0, 0x2017b0b(%rip)   # 0x201f454
jle 0x7c9b
leaq 0x1c(%rsp), %rbp
leaq 0x14caf(%rip), %r13     # 0x1c60a
xorl %r12d, %r12d
leaq (%r12,%r12,4), %rax
leaq 0x2017af7(%rip), %rcx   # 0x201f460
leaq (%rcx,%rax,8), %r14
leaq (%rcx,%rax,8), %rbx
addq $0x20, %rbx
movq %rbx, %r15
movq (%r15), %r15
testq %r15, %r15
je 0x7996
movq 0x8(%r15), %rdi
movq %r13, %rsi
callq 0x4450
testl %eax, %eax
jne 0x7978
movq 0x10(%r15), %rdi
jmp 0x799d
leaq 0x1631c(%rip), %rdi     # 0x1dcb9
leaq 0x14d22(%rip), %rsi     # 0x1c6c6
callq 0x4450
testl %eax, %eax
je 0x79e9
movq %rbx, %r15
movq (%r15), %r15
testq %r15, %r15
je 0x79ce
movq 0x8(%r15), %rdi
movq %r13, %rsi
callq 0x4450
testl %eax, %eax
jne 0x79b0
movq 0x10(%r15), %rdi
jmp 0x79d5
leaq 0x162e4(%rip), %rdi     # 0x1dcb9
leaq 0x14cd8(%rip), %rsi     # 0x1c6b4
callq 0x4450
testl %eax, %eax
jne 0x7c88
movl $0x0, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
movq %rbx, %r15
movq (%r15), %r15
testq %r15, %r15
je 0x7a1f
movq 0x8(%r15), %rdi
leaq 0x14cca(%rip), %rsi     # 0x1c6da
callq 0x4450
testl %eax, %eax
jne 0x79fd
movq 0x10(%r15), %rdi
jmp 0x7a26
leaq 0x16293(%rip), %rdi     # 0x1dcb9
leaq 0x14cb4(%rip), %rsi     # 0x1c6e1
leaq 0x18(%rsp), %rdx
movq %rbp, %rcx
leaq 0x20(%rsp), %r8
xorl %eax, %eax
callq 0x42f0
movq %r14, %rdi
leaq 0x14c9f(%rip), %rsi     # 0x1c6ea
callq 0x82ee
cvtsd2ss %xmm0, %xmm0
ucomiss 0x146e9(%rip), %xmm0    # 0x1c144
jne 0x7a5f
jnp 0x7a65
movss %xmm0, 0x18(%rsp)
movq %rbx, %r15
movq (%r15), %r15
testq %r15, %r15
je 0x7a8a
movq 0x8(%r15), %rdi
leaq 0x14c75(%rip), %rsi     # 0x1c6f0
callq 0x4450
testl %eax, %eax
jne 0x7a68
movq 0x10(%r15), %rdi
jmp 0x7a91
leaq 0x16228(%rip), %rdi     # 0x1dcb9
cmpb $0x0, (%rdi)
je 0x7b8d
callq 0x832d
testq %rax, %rax
je 0x7b8d
movq %rax, %r15
xorl %eax, %eax
movl %eax, 0x78(%rsp)
movq %rax, 0x70(%rsp)
movl %eax, 0x30(%rsp)
movq %rax, 0x28(%rsp)
movq %rbx, %rbp
movq (%rbp), %rbp
testq %rbp, %rbp
je 0x7ae5
movq 0x8(%rbp), %rdi
leaq 0x1a022(%rip), %rsi     # 0x21af8
callq 0x4450
testl %eax, %eax
jne 0x7ac2
movq 0x10(%rbp), %rdi
jmp 0x7aec
leaq 0x161cd(%rip), %rdi     # 0x1dcb9
leaq 0x14bee(%rip), %rsi     # 0x1c6e1
leaq 0x70(%rsp), %rdx
leaq 0x74(%rsp), %rcx
leaq 0x78(%rsp), %r8
xorl %eax, %eax
callq 0x42f0
addq $0x20, %r15
leaq 0x1c(%rsp), %rbp
movq (%r15), %r15
testq %r15, %r15
je 0x7b34
movq 0x8(%r15), %rdi
leaq 0x19fd3(%rip), %rsi     # 0x21af8
callq 0x4450
testl %eax, %eax
jne 0x7b12
movq 0x10(%r15), %rdi
jmp 0x7b3b
leaq 0x1617e(%rip), %rdi     # 0x1dcb9
leaq 0x14b9f(%rip), %rsi     # 0x1c6e1
leaq 0x28(%rsp), %rdx
leaq 0x2c(%rsp), %rcx
leaq 0x30(%rsp), %r8
xorl %eax, %eax
callq 0x42f0
movsd 0x28(%rsp), %xmm0
movsd 0x70(%rsp), %xmm1
subps %xmm1, %xmm0
movlps %xmm0, 0x60(%rsp)
movss 0x30(%rsp), %xmm0
subss 0x78(%rsp), %xmm0
movss %xmm0, 0x68(%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x7736
xorps %xmm0, %xmm0
cvtss2sd 0x18(%rsp), %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x1c(%rsp), %xmm1
cvtss2sd 0x20(%rsp), %xmm2
movl $0x400, %esi            # imm = 0x400
leaq 0x70(%rsp), %r15
movq %r15, %rdi
leaq 0x14b3e(%rip), %rdx     # 0x1c6f7
movb $0x3, %al
callq 0x8b7f
movq %r14, %rdi
leaq 0x14b10(%rip), %rsi     # 0x1c6da
movq %r15, %rdx
callq 0x75d4
movq %r14, %rdi
leaq 0x14b0e(%rip), %rsi     # 0x1c6ea
callq 0x767a
movq %rbx, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x7c02
movq 0x8(%r14), %rdi
movq %r13, %rsi
callq 0x4450
testl %eax, %eax
jne 0x7be4
movq 0x10(%r14), %rdi
jmp 0x7c09
leaq 0x160b0(%rip), %rdi     # 0x1dcb9
leaq 0x14ab6(%rip), %rsi     # 0x1c6c6
callq 0x4450
testl %eax, %eax
jne 0x7c88
cmpl $0x4000, 0x2017831(%rip) # imm = 0x4000
jne 0x7c33
leaq 0x14995(%rip), %rdi     # 0x1c5c1
xorl %eax, %eax
callq 0xa2a0
movslq 0x201781a(%rip), %rax   # 0x201f454
leal 0x1(%rax), %ecx
movl %ecx, 0x2017811(%rip)   # 0x201f454
leaq (%rax,%rax,4), %rax
leaq 0x2017812(%rip), %rcx   # 0x201f460
leaq (%rcx,%rax,8), %r14
movq (%rbx), %rax
movq %rax, 0x20(%r14)
movq %r14, %rdi
movq %r13, %rsi
leaq 0x14a4e(%rip), %rdx     # 0x1c6b4
callq 0x75d4
movq %r14, %rdi
leaq 0x14a5f(%rip), %rsi     # 0x1c6d4
leaq 0x18b07(%rip), %rdx     # 0x20783
callq 0x75d4
movq $0x0, (%rbx)
incq %r12
movslq 0x20177c2(%rip), %rax   # 0x201f454
cmpq %rax, %r12
jl 0x795e
cmpl $0x0, 0x20177b2(%rip)   # 0x201f454
jle 0x7e0a
xorl %ebp, %ebp
leaq 0x14959(%rip), %r12     # 0x1c60a
leaq 0x149be(%rip), %r13     # 0x1c676
leaq (,%rbp,4), %rax
addq %rbp, %rax
leaq 0x2017796(%rip), %rcx   # 0x201f460
leaq (%rcx,%rax,8), %r15
leaq (%rcx,%rax,8), %rbx
addq $0x20, %rbx
movq %rbx, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x7cf7
movq 0x8(%r14), %rdi
movq %r12, %rsi
callq 0x4450
testl %eax, %eax
jne 0x7cd9
movq 0x10(%r14), %rdi
jmp 0x7cfe
leaq 0x15fbb(%rip), %rdi     # 0x1dcb9
leaq 0x14995(%rip), %rsi     # 0x1c69a
callq 0x4450
testl %eax, %eax
je 0x7d4a
movq %rbx, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x7d2f
movq 0x8(%r14), %rdi
movq %r12, %rsi
callq 0x4450
testl %eax, %eax
jne 0x7d11
movq 0x10(%r14), %rdi
jmp 0x7d36
leaq 0x15f83(%rip), %rdi     # 0x1dcb9
leaq 0x1496a(%rip), %rsi     # 0x1c6a7
callq 0x4450
testl %eax, %eax
jne 0x7df7
movq %rbx, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x7d6b
movq 0x8(%r14), %rdi
movq %r12, %rsi
callq 0x4450
testl %eax, %eax
jne 0x7d4d
movq 0x10(%r14), %rdx
jmp 0x7d72
leaq 0x15f47(%rip), %rdx     # 0x1dcb9
movq %r15, %rdi
leaq 0x14912(%rip), %rsi     # 0x1c68e
callq 0x75d4
movq %rbx, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x7da2
movq 0x8(%r14), %rdi
movq %r13, %rsi
callq 0x4450
testl %eax, %eax
jne 0x7d84
movq 0x10(%r14), %rax
jmp 0x7da9
leaq 0x15f10(%rip), %rax     # 0x1dcb9
cmpb $0x0, (%rax)
leaq 0x1491b(%rip), %rdx     # 0x1c6ce
je 0x7dda
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x7dd3
movq 0x8(%rbx), %rdi
movq %r13, %rsi
callq 0x4450
testl %eax, %eax
jne 0x7db5
movq 0x10(%rbx), %rdx
jmp 0x7dda
leaq 0x15edf(%rip), %rdx     # 0x1dcb9
movq %r15, %rdi
movq %r12, %rsi
callq 0x75d4
movq %r15, %rdi
movq %r13, %rsi
leaq 0x15ec7(%rip), %rdx     # 0x1dcb9
callq 0x75d4
incq %rbp
movslq 0x2017653(%rip), %rax   # 0x201f454
cmpq %rax, %rbp
jl 0x7cb8
movl 0x2017644(%rip), %eax   # 0x201f454
testl %eax, %eax
jle 0x7f66
leaq 0x14852(%rip), %r15     # 0x1c671
leaq 0x147e4(%rip), %r13     # 0x1c60a
leaq 0x14849(%rip), %r12     # 0x1c676
xorl %r14d, %r14d
leaq (%r14,%r14,4), %rax
leaq 0x2017625(%rip), %rcx   # 0x201f460
leaq (%rcx,%rax,8), %rdx
movq %rdx, 0x8(%rsp)
leaq (%rcx,%rax,8), %rbp
addq $0x20, %rbp
movq %rbp, %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x7e6d
movq 0x8(%rbx), %rdi
movq %r13, %rsi
callq 0x4450
testl %eax, %eax
jne 0x7e4f
movq 0x10(%rbx), %rdi
jmp 0x7e74
leaq 0x15e45(%rip), %rdi     # 0x1dcb9
leaq 0x14805(%rip), %rsi     # 0x1c680
callq 0x4450
testl %eax, %eax
jne 0x7f53
movq %rbp, %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x7ea9
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x4450
testl %eax, %eax
jne 0x7e8b
movq 0x10(%rbx), %rax
jmp 0x7eb0
leaq 0x15e09(%rip), %rax     # 0x1dcb9
cmpb $0x0, (%rax)
jne 0x7ec9
movq 0x8(%rsp), %rdi
movq %r15, %rsi
leaq 0x1483c(%rip), %rdx     # 0x1c700
callq 0x75d4
movq (%rbp), %rbp
testq %rbp, %rbp
je 0x7ee8
movq 0x8(%rbp), %rdi
movq %r12, %rsi
callq 0x4450
testl %eax, %eax
jne 0x7ec9
movq 0x10(%rbp), %rbx
jmp 0x7eef
leaq 0x15dca(%rip), %rbx     # 0x1dcb9
cmpb $0x0, (%rbx)
movq 0x8(%rsp), %rbp
je 0x7f24
movl $0x5, %edx
movq %rbx, %rdi
leaq 0x147c6(%rip), %rsi     # 0x1c6ce
callq 0x41a0
testl %eax, %eax
je 0x7f33
leaq 0x147f9(%rip), %rdi     # 0x1c711
movq %rbx, %rsi
xorl %eax, %eax
callq 0xa2a0
jmp 0x7f41
movq %rbp, %rdi
movq %r13, %rsi
leaq 0x1479d(%rip), %rdx     # 0x1c6ce
jmp 0x7f3c
movq %rbp, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x75d4
movq %rbp, %rdi
movq %r12, %rsi
leaq 0x15d6b(%rip), %rdx     # 0x1dcb9
callq 0x75d4
incq %r14
movslq 0x20174f7(%rip), %rax   # 0x201f454
cmpq %rax, %r14
jl 0x7e30
leaq 0x61c56f5(%rip), %rcx   # 0x61cd662
cmpb $0x0, (%rcx)
jne 0x81ab
movslq %eax, %rdi
callq 0x4430
movq %rax, %rbx
xorl %edi, %edi
testq %rax, %rax
setne %dil
movl $0x1, %esi
callq 0xaa4d
movslq 0x20174b9(%rip), %r15   # 0x201f454
movl $0x0, 0x14(%rsp)
movq %rbx, 0x8(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x41c0
testq %r15, %r15
jle 0x818b
movl $0x0, 0x14(%rsp)
leaq 0x1478b(%rip), %r13     # 0x1c758
leaq 0x14636(%rip), %r12     # 0x1c60a
movq %r15, %rbp
decq %r15
leaq (%r15,%r15,4), %rax
leaq 0x201747b(%rip), %rcx   # 0x201f460
leaq (%rcx,%rax,8), %rdx
movq %rdx, 0x50(%rsp)
leaq (%rcx,%rax,8), %rbx
addq $0x20, %rbx
movq %rbx, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x8017
movq 0x8(%r14), %rdi
movq %r12, %rsi
callq 0x4450
testl %eax, %eax
jne 0x7ff9
movq 0x10(%r14), %r14
jmp 0x801e
leaq 0x15c9b(%rip), %r14     # 0x1dcb9
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x803c
movq 0x8(%rbx), %rdi
movq %r13, %rsi
callq 0x4450
testl %eax, %eax
jne 0x801e
movq 0x10(%rbx), %rbx
jmp 0x8043
leaq 0x15c76(%rip), %rbx     # 0x1dcb9
movq 0x50(%rsp), %rdi
leaq 0x18cfa(%rip), %rsi     # 0x20d49
callq 0x76cf
movl %eax, 0x44(%rsp)
cmpb $0x0, (%rbx)
je 0x8161
movq %r14, %rdi
leaq 0x14663(%rip), %rsi     # 0x1c6ce
callq 0x4450
testl %eax, %eax
je 0x809e
movq %r14, %rdi
leaq 0x146e5(%rip), %rsi     # 0x1c763
callq 0x4450
testl %eax, %eax
je 0x809e
movq %r14, %rdi
leaq 0x14623(%rip), %rsi     # 0x1c6b4
callq 0x4450
testl %eax, %eax
jne 0x8161
movq %rbx, 0x58(%rsp)
movq %r15, 0x48(%rsp)
movslq 0x20173a5(%rip), %r15   # 0x201f454
movq %rbp, 0x38(%rsp)
cmpq %r15, %rbp
setl %r12b
jge 0x8146
movq 0x38(%rsp), %rbp
movq 0x8(%rsp), %rax
cmpb $0x1, (%rax,%rbp)
jne 0x813a
leaq (,%rbp,4), %rax
addq %rbp, %rax
leaq 0x201737d(%rip), %rcx   # 0x201f460
leaq (%rcx,%rax,8), %r14
leaq (%rcx,%rax,8), %rbx
addq $0x20, %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x810d
movq 0x8(%rbx), %rdi
movq %r13, %rsi
callq 0x4450
testl %eax, %eax
jne 0x80ef
movq 0x10(%rbx), %rbx
jmp 0x8114
leaq 0x15ba5(%rip), %rbx     # 0x1dcb9
movq %r14, %rdi
leaq 0x18c2b(%rip), %rsi     # 0x20d49
callq 0x76cf
cmpl %eax, 0x44(%rsp)
jne 0x813a
movq 0x58(%rsp), %rdi
movq %rbx, %rsi
callq 0x4450
testl %eax, %eax
je 0x816d
incq %rbp
cmpl %ebp, %r15d
setg %r12b
jg 0x80c6
movq 0x8(%rsp), %rax
movq 0x48(%rsp), %r15
movb $0x1, (%rax,%r15)
leaq 0x144ae(%rip), %r12     # 0x1c60a
movq 0x38(%rsp), %rbp
cmpq $0x1, %rbp
jg 0x7fd4
jmp 0x818b
testb $0x1, %r12b
je 0x8146
movq 0x50(%rsp), %rdi
movq %r13, %rsi
callq 0x767a
incl 0x14(%rsp)
movq 0x48(%rsp), %r15
jmp 0x8155
movl 0x14(%rsp), %esi
testl %esi, %esi
jle 0x81a1
leaq 0x145d4(%rip), %rdi     # 0x1c76e
xorl %eax, %eax
callq 0x9fb2
movq 0x8(%rsp), %rdi
callq 0x43a0
cmpl $0x0, 0x20172a2(%rip)   # 0x201f454
jle 0x82c1
leaq 0x829321(%rip), %r13    # 0x8314e0
leaq 0x201729a(%rip), %rcx   # 0x201f460
leaq 0x70(%rsp), %r15
xorl %edx, %edx
movq %r13, %r12
xorl %ebp, %ebp
leaq (%rdx,%rdx,4), %rax
cmpq $0x0, 0x20(%rcx,%rax,8)
je 0x82a6
movq %rdx, 0x8(%rsp)
leaq (%rcx,%rax,8), %r14
addq $0x20, %r14
movq %r12, %rdi
callq 0x4180
movw $0xa7b, (%r12,%rax)     # imm = 0xA7B
movb $0x0, 0x2(%r12,%rax)
leaq 0x2(,%r13), %r12
addq %rbp, %r12
addq $0x2, %rbp
movq (%r14), %r14
testq %r14, %r14
je 0x8260
leaq 0x14575(%rip), %r13     # 0x1c797
leaq 0x8292b7(%rip), %rbx    # 0x8314e0
movq 0x8(%r14), %rdx
movq 0x10(%r14), %rcx
movq %r15, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x40c0
movq %r12, %rdi
movq %r15, %rsi
callq 0x4580
movq %r15, %rdi
callq 0x4180
addq %rax, %rbp
leaq (%rbx,%rbp), %r12
movq (%r14), %r14
testq %r14, %r14
jne 0x8229
movq %rbp, %r14
movq %r12, %rdi
callq 0x4180
movw $0xa7d, (%r12,%rax)     # imm = 0xA7D
movb $0x0, 0x2(%r12,%rax)
addq $0x2, %rbp
cmpq $0x1fffff, %r14         # imm = 0x1FFFFF
jl 0x8293
leaq 0x14519(%rip), %rdi     # 0x1c7a5
xorl %eax, %eax
callq 0xa2a0
leaq 0x20171c6(%rip), %rcx   # 0x201f460
leaq 0x82923f(%rip), %r13    # 0x8314e0
movq 0x8(%rsp), %rdx
incq %rdx
movq %r13, %r12
addq %rbp, %r12
movslq 0x201719e(%rip), %rax   # 0x201f454
cmpq %rax, %rdx
jl 0x81d2
jmp 0x82c8
leaq 0x829218(%rip), %r12    # 0x8314e0
leaq 0x829211(%rip), %rax    # 0x8314e0
subl %eax, %r12d
incl %r12d
movl %r12d, 0x8291f8(%rip)   # 0x8314d4
addq $0x1078, %rsp           # imm = 0x1078
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq