// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_hud.c
// Function: G_SetStats
void G_SetStats (edict_t *ent)
{
    gitem_t     *item;
    int         index, cells=0;
    int         power_armor_type;

    // TEAM PLAY -- LM_JORM
    char        *s;
    char        portrait[MAX_INFO_STRING];

int Red_Caps = 0;
int Blue_Caps = 0;
int i;
edict_t     *cl_ent;

#ifdef OLDOBSERVERCODE   
    if (ent->client->camera_target &&
        ent->client->camera_target->client)
    {
        memcpy(&ent->client->ps.stats, &ent->client->camera_target->client->ps.stats, sizeof(short)*MAX_STATS);
        ent->client->ps.stats[STAT_FRAGS] = 0;
    }
    else
#endif
    {
        ent->client->ps.stats[STAT_RED_FRAGS] = redscore;
        ent->client->ps.stats[STAT_BLUE_FRAGS] = bluescore;
		
		//bat - This should be global. :/
		for(i = 0 ; i < game.maxclients; i++)
		{
	        cl_ent = g_edicts + 1 + i;
			if(!cl_ent->inuse)
			    continue;

			if(cl_ent->client->ctf.teamnum == CTF_TEAM_RED)
				Red_Caps  += stats_get(cl_ent, STATS_CAPTURES);
	        else if(cl_ent->client->ctf.teamnum == CTF_TEAM_BLUE)
				Blue_Caps  += stats_get(cl_ent, STATS_CAPTURES);
		}
        
		ent->client->ps.stats[STAT_RED_CAPS] = Red_Caps;
		ent->client->ps.stats[STAT_BLUE_CAPS] = Blue_Caps;
		ent->client->ps.stats[STAT_MATCH_TIME] = Time_Left;
        


        //s = Info_ValueForKey (ent->client->pers.userinfo, "skin");
        
        // decide gender
        
        /*
        if (s[0] == 'f' || s[0] == 'F') // Female
        {
        if (ent->client->teamnum == 1)
        ent->client->ps.stats[STAT_TEAM_ICON] = gi.imageindex ("../players/female/red_i");
        
         if (ent->client->teamnum == 2)
         ent->client->ps.stats[STAT_TEAM_ICON] = gi.imageindex ("../players/female/blue_i");
         }
         else // male
         {
         if (ent->client->teamnum == 1)
         ent->client->ps.stats[STAT_TEAM_ICON] = gi.imageindex ("../players/male/red_i");
         
          if (ent->client->teamnum == 2)
          ent->client->ps.stats[STAT_TEAM_ICON] = gi.imageindex ("../players/male/blue_i");
          }
        */
        
        
        s = Info_ValueForKey (ent->client->pers.userinfo, "skin");
        s = strchr(s, '/');
        if (s && strlen(s) > 0)
        {
            s++;
            strcpy(portrait, s);
            strcat(portrait, "_i");
        }
        else
        {
            strcpy(portrait, "redlion_i");
        }
        
        
        switch (ent->client->ctf.compass)
        {
        default:
        case 0:
            if (redflag && (redflag->owner == ent))
                ent->client->ps.stats[STAT_TEAM_ICON] = gi.imageindex ("redflaggone");
            else if (blueflag && (blueflag->owner == ent))
                ent->client->ps.stats[STAT_TEAM_ICON] = gi.imageindex ("blueflaggone");
            else
                ent->client->ps.stats[STAT_TEAM_ICON] = gi.imageindex (portrait);
            break;
        case 1:
            ent->client->ps.stats[STAT_TEAM_ICON] = gi.imageindex (ctf_facing(ent));
            break;
        case 2:
            ent->client->ps.stats[STAT_TEAM_ICON] = gi.imageindex (ctf_faceNorth(ent));
            break;
        case 3:
            ent->client->ps.stats[STAT_TEAM_ICON] = gi.imageindex (ctf_faceEnemyFlag(ent));
            break;
        }
        
        
        // Show status of the red flag
        if (redflag)
        {
            if (redflag->owner)
                ent->client->ps.stats[STAT_RED_ICON] = gi.imageindex ("redflaggone");
            else if (!ctf_flagathome(redflag))
                ent->client->ps.stats[STAT_RED_ICON] = gi.imageindex ("redflagdown");
            else
                ent->client->ps.stats[STAT_RED_ICON] = gi.imageindex ("redlion_i");
        }
        
        if (blueflag)
        {
            if (blueflag->owner)
                ent->client->ps.stats[STAT_BLUE_ICON] = gi.imageindex ("blueflaggone");
            else if (!ctf_flagathome(blueflag))
                ent->client->ps.stats[STAT_BLUE_ICON] = gi.imageindex ("blueflagdown");
            else
                ent->client->ps.stats[STAT_BLUE_ICON] = gi.imageindex ("bluewolf_i");
        }
        
        if (ent->client->rune)
        {
            if (ent->client->rune->runetype == RUNE_DAMAGE)
                ent->client->ps.stats[STAT_RUNE_ICON] = gi.imageindex ("strength");
            if (ent->client->rune->runetype == RUNE_RESIST)
                ent->client->ps.stats[STAT_RUNE_ICON] = gi.imageindex ("resist");
            if (ent->client->rune->runetype == RUNE_HASTE)
                ent->client->ps.stats[STAT_RUNE_ICON] = gi.imageindex ("haste");
            if (ent->client->rune->runetype == RUNE_REGEN)
                ent->client->ps.stats[STAT_RUNE_ICON] = gi.imageindex ("regen");
			if (ent->client->rune->runetype == RUNE_VAMP)                          //added by Vampire
                ent->client->ps.stats[STAT_RUNE_ICON] = gi.imageindex ("k_redkey");
                //ent->client->ps.stats[STAT_RUNE_ICON] = gi.imageindex ("resist");    
        }
        else
            ent->client->ps.stats[STAT_RUNE_ICON] = 0;
        
        // END CTF CODE -- LM_JORM
        
        //
        // health
        //
        ent->client->ps.stats[STAT_HEALTH_ICON] = level.pic_health;
        ent->client->ps.stats[STAT_HEALTH] = ent->health;
        
        //
        // ammo
        //
        if (!ent->client->ammo_index /* || !ent->client->pers.inventory[ent->client->ammo_index] */)
        {
            ent->client->ps.stats[STAT_AMMO_ICON] = 0;
            ent->client->ps.stats[STAT_AMMO] = 0;
        }
        else
        {
            item = &itemlist[ent->client->ammo_index];
            ent->client->ps.stats[STAT_AMMO_ICON] = gi.imageindex (item->icon);
            ent->client->ps.stats[STAT_AMMO] = ent->client->pers.inventory[ent->client->ammo_index];
        }
        
        //
        // armor
        //
        power_armor_type = PowerArmorType (ent);
        if (power_armor_type)
        {
            cells = ent->client->pers.inventory[ITEM_INDEX(FindItem ("cells"))];
            if (cells == 0)
            {   // ran out of cells for power armor
                ent->flags &= ~FL_POWER_ARMOR;
                gi.sound(ent, CHAN_ITEM, gi.soundindex("misc/power2.wav"), 1, ATTN_NORM, 0);
                power_armor_type = 0;;
            }
        }
        
        index = ArmorIndex (ent);
        if (power_armor_type && (!index || (level.framenum & 8) ) )
        {   // flash between power armor and other armor icon
            ent->client->ps.stats[STAT_ARMOR_ICON] = gi.imageindex ("i_powershield");
            ent->client->ps.stats[STAT_ARMOR] = cells;
        }
        else if (index)
        {
            item = GetItemByIndex (index);
            ent->client->ps.stats[STAT_ARMOR_ICON] = gi.imageindex (item->icon);
            ent->client->ps.stats[STAT_ARMOR] = ent->client->pers.inventory[index];
        }
        else
        {
            ent->client->ps.stats[STAT_ARMOR_ICON] = 0;
            ent->client->ps.stats[STAT_ARMOR] = 0;
        }
        
        //
        // pickup message
        //
        if (level.time > ent->client->pickup_msg_time)
        {
            ent->client->ps.stats[STAT_PICKUP_ICON] = 0;
            ent->client->ps.stats[STAT_PICKUP_STRING] = 0;
        }
        
        //
        // timers
        //
        if (ent->client->quad_framenum > level.framenum)
        {
            ent->client->ps.stats[STAT_TIMER_ICON] = gi.imageindex ("p_quad");
            ent->client->ps.stats[STAT_TIMER] = (ent->client->quad_framenum - level.framenum)/10;
        }
        else if (ent->client->invincible_framenum > level.framenum)
        {
            ent->client->ps.stats[STAT_TIMER_ICON] = gi.imageindex ("p_invulnerability");
            ent->client->ps.stats[STAT_TIMER] = (ent->client->invincible_framenum - level.framenum)/10;
        }
        else if (ent->client->enviro_framenum > level.framenum)
        {
            ent->client->ps.stats[STAT_TIMER_ICON] = gi.imageindex ("p_envirosuit");
            ent->client->ps.stats[STAT_TIMER] = (ent->client->enviro_framenum - level.framenum)/10;
        }
        else if (ent->client->breather_framenum > level.framenum)
        {
            ent->client->ps.stats[STAT_TIMER_ICON] = gi.imageindex ("p_rebreather");
            ent->client->ps.stats[STAT_TIMER] = (ent->client->breather_framenum - level.framenum)/10;
        }
        else
        {
            ent->client->ps.stats[STAT_TIMER_ICON] = 0;
            ent->client->ps.stats[STAT_TIMER] = 0;
        }
        
        //
        // selected item
        //
        
        // Show proper flag item
        if (ent->client->pers.selected_item == -1)
            ent->client->ps.stats[STAT_SELECTED_ICON] = 0;
        else
        {
            if (blueflag && blueflag->item == &itemlist[ent->client->pers.selected_item])
            {
                ent->client->ps.stats[STAT_SELECTED_ICON] = gi.imageindex ("a_blueflag");
            }
            else if (redflag && redflag->item == &itemlist[ent->client->pers.selected_item])
            {
                ent->client->ps.stats[STAT_SELECTED_ICON] = gi.imageindex ("a_redflag");            
            }
            else
            {
                ent->client->ps.stats[STAT_SELECTED_ICON] = gi.imageindex (itemlist[ent->client->pers.selected_item].icon);
                
            }
        }
        
        ent->client->ps.stats[STAT_SELECTED_ITEM] = ent->client->pers.selected_item;
        
        //
        // frags
        //
        ent->client->ps.stats[STAT_FRAGS] = stats_get(ent, STATS_SCORE);
        
        //
        // help icon / current weapon if not shown
        //
        if (ent->client->pers.helpchanged && (level.framenum&8) )
            ent->client->ps.stats[STAT_HELPICON] = gi.imageindex ("i_help");
        else if ( (ent->client->pers.hand == CENTER_HANDED || ent->client->ps.fov > 91)
            && ent->client->pers.weapon)
            ent->client->ps.stats[STAT_HELPICON] = gi.imageindex (ent->client->pers.weapon->icon);
        else
            ent->client->ps.stats[STAT_HELPICON] = 0;
    }

    //
    // layouts
    //
    ent->client->ps.stats[STAT_LAYOUTS] = 0;

    if (deathmatch->value)
    {
        if (ent->client->pers.health <= 0 || level.intermissiontime
            || ent->client->showscores || ent->client->showctfhud 
            || ent->client->showmod || ent->client->showmenu
			|| ent->client->showsquadboard) // ADC
            ent->client->ps.stats[STAT_LAYOUTS] |= 1;
        if (ent->client->showinventory && ent->client->pers.health > 0)
            ent->client->ps.stats[STAT_LAYOUTS] |= 2;
    }
    else
    {
        if (ent->client->showscores || ent->client->showhelp
            || ent->client->showctfhud || ent->client->showmod
			|| ent->client->showsquadboard) // ADC
            ent->client->ps.stats[STAT_LAYOUTS] |= 1;
        if (ent->client->showinventory && ent->client->pers.health > 0)
            ent->client->ps.stats[STAT_LAYOUTS] |= 2;
    }

    // LM_JORM -- Turn CTF HUD back on automatically
    /*
    if ((level.framenum - ent->client->awayframe > 10) &&
        !ent->client->showmenu)
        ent->client->showctfhud = true;
    */

	ent->client->ps.stats[STAT_SPECTATOR] = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rdi, %rbp
movq 0x2009f(%rip), %rax     # 0x69bd8
movzwl (%rax), %eax
movq 0x58(%rdi), %rcx
movw %ax, 0x9e(%rcx)
movq 0x1fefa(%rip), %rax     # 0x69a48
movzwl (%rax), %eax
movw %ax, 0xa0(%rcx)
movq 0x201e1(%rip), %r15     # 0x69d40
xorl %r14d, %r14d
cmpl $0x0, 0x610(%r15)
jle 0x49be4
movq %rbp, 0x8(%rsp)
movl $0x4a8, %r12d           # imm = 0x4A8
movq 0x1f9da(%rip), %r13     # 0x69558
xorl %ebx, %ebx
xorl %ebp, %ebp
movq (%r13), %rdi
cmpl $0x0, 0x60(%rdi,%r12)
je 0x49bc1
movq 0x58(%rdi,%r12), %rax
addq %r12, %rdi
movl 0x1100(%rax), %eax
cmpl $0x2, %eax
je 0x49bb4
cmpl $0x1, %eax
jne 0x49bc1
movl $0x4, %esi
callq 0x18030
addl %eax, %ebp
jmp 0x49bc1
movl $0x4, %esi
callq 0x18030
addl %eax, %r14d
incq %rbx
movslq 0x610(%r15), %rax
addq $0x4a8, %r12            # imm = 0x4A8
cmpq %rax, %rbx
jl 0x49b82
movl %r14d, %eax
movl %ebp, %r14d
movq 0x8(%rsp), %rbp
jmp 0x49be6
xorl %eax, %eax
movq 0x58(%rbp), %rdi
movw %r14w, 0xa8(%rdi)
movw %ax, 0xaa(%rdi)
movq 0x20000(%rip), %rax     # 0x69c00
movzwl (%rax), %eax
movw %ax, 0xac(%rdi)
addq $0xc0, %rdi
leaq 0x9728(%rip), %rsi      # 0x53340
callq 0x18bb0
movq %rax, %rdi
movl $0x2f, %esi
callq 0x18730
testq %rax, %rax
je 0x49c5d
cmpb $0x0, (%rax)
je 0x49c5d
incq %rax
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x182a0
movq %r14, %rdi
callq 0x18680
movw $0x695f, 0x10(%rsp,%rax) # imm = 0x695F
movb $0x0, 0x12(%rsp,%rax)
jmp 0x49c73
movabsq $0x5f6e6f696c646572, %rax # imm = 0x5F6E6F696C646572
movq %rax, 0x10(%rsp)
movw $0x69, 0x18(%rsp)
movq 0x58(%rbp), %rax
movl 0x1118(%rax), %eax
cmpl $0x1, %eax
je 0x49cb6
cmpl $0x2, %eax
je 0x49ca1
cmpl $0x3, %eax
jne 0x49cd0
movq 0x1f96d(%rip), %rax     # 0x69600
movq 0x50(%rax), %rbx
movq %rbp, %rdi
callq 0x19780
jmp 0x49cc9
movq 0x1f958(%rip), %rax     # 0x69600
movq 0x50(%rax), %rbx
movq %rbp, %rdi
callq 0x18ee0
jmp 0x49cc9
movq 0x1f943(%rip), %rax     # 0x69600
movq 0x50(%rax), %rbx
movq %rbp, %rdi
callq 0x18a60
movq %rax, %rdi
callq *%rbx
jmp 0x49d2f
movq 0x1fb21(%rip), %rax     # 0x697f8
movq (%rax), %rax
testq %rax, %rax
je 0x49ce8
cmpq %rbp, 0x110(%rax)
je 0x49d0e
movq 0x1fb71(%rip), %rax     # 0x69860
movq (%rax), %rax
testq %rax, %rax
je 0x49d00
cmpq %rbp, 0x110(%rax)
je 0x49d1e
movq 0x1f8f9(%rip), %rax     # 0x69600
leaq 0x10(%rsp), %rdi
jmp 0x49d2c
movq 0x1f8eb(%rip), %rax     # 0x69600
leaq 0xab01(%rip), %rdi      # 0x5481d
jmp 0x49d2c
movq 0x1f8db(%rip), %rax     # 0x69600
leaq 0xaae4(%rip), %rdi      # 0x54810
callq *0x50(%rax)
movq 0x58(%rbp), %rcx
movw %ax, 0x9c(%rcx)
movq 0x1fab7(%rip), %rax     # 0x697f8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x49d97
cmpq $0x0, 0x110(%rdi)
je 0x49d66
movq 0x1f8a6(%rip), %rax     # 0x69600
leaq 0xaabc(%rip), %rdi      # 0x5481d
callq *0x50(%rax)
jmp 0x49d8c
callq 0x19420
movq 0x1f88e(%rip), %rcx     # 0x69600
movq 0x50(%rcx), %rcx
testl %eax, %eax
je 0x49d83
leaq 0x118e1(%rip), %rdi     # 0x5b662
jmp 0x49d8a
leaq 0x11ac9(%rip), %rdi     # 0x5b853
callq *%rcx
movq 0x58(%rbp), %rcx
movw %ax, 0xa2(%rcx)
movq 0x1fac2(%rip), %r12     # 0x69860
movq (%r12), %rdi
testq %rdi, %rdi
je 0x49df5
cmpq $0x0, 0x110(%rdi)
je 0x49dc4
movq 0x1f848(%rip), %rax     # 0x69600
leaq 0xaa51(%rip), %rdi      # 0x54810
callq *0x50(%rax)
jmp 0x49dea
callq 0x19420
movq 0x1f830(%rip), %rcx     # 0x69600
movq 0x50(%rcx), %rcx
testl %eax, %eax
je 0x49de1
leaq 0x1188d(%rip), %rdi     # 0x5b66c
jmp 0x49de8
leaq 0x11a77(%rip), %rdi     # 0x5b85f
callq *%rcx
movq 0x58(%rbp), %rcx
movw %ax, 0xa4(%rcx)
movq 0x58(%rbp), %rcx
movq 0xf68(%rcx), %rax
testq %rax, %rax
je 0x49ee9
cmpl $0x1, 0x478(%rax)
jne 0x49e2e
movq 0x1f7e7(%rip), %rax     # 0x69600
leaq 0xe221(%rip), %rdi      # 0x58041
callq *0x50(%rax)
movq 0x58(%rbp), %rcx
movw %ax, 0xa6(%rcx)
movq 0x58(%rbp), %rax
movq 0xf68(%rax), %rax
cmpl $0x2, 0x478(%rax)
jne 0x49e5e
movq 0x1f7b7(%rip), %rax     # 0x69600
leaq 0xe20c(%rip), %rdi      # 0x5805c
callq *0x50(%rax)
movq 0x58(%rbp), %rcx
movw %ax, 0xa6(%rcx)
movq 0x58(%rbp), %rax
movq 0xf68(%rax), %rax
cmpl $0x4, 0x478(%rax)
jne 0x49e8e
movq 0x1f787(%rip), %rax     # 0x69600
leaq 0xe1f5(%rip), %rdi      # 0x58075
callq *0x50(%rax)
movq 0x58(%rbp), %rcx
movw %ax, 0xa6(%rcx)
movq 0x58(%rbp), %rax
movq 0xf68(%rax), %rax
cmpl $0x8, 0x478(%rax)
jne 0x49ebe
movq 0x1f757(%rip), %rax     # 0x69600
leaq 0xe1dc(%rip), %rdi      # 0x5808c
callq *0x50(%rax)
movq 0x58(%rbp), %rcx
movw %ax, 0xa6(%rcx)
movq 0x58(%rbp), %rax
movq 0xf68(%rax), %rax
cmpl $0x10, 0x478(%rax)
jne 0x49ef2
movq 0x1f727(%rip), %rax     # 0x69600
leaq 0xdfaf(%rip), %rdi      # 0x57e8f
callq *0x50(%rax)
movq 0x58(%rbp), %rcx
jmp 0x49eeb
xorl %eax, %eax
movw %ax, 0xa6(%rcx)
movq 0x1fea7(%rip), %r15     # 0x69da0
movzwl 0x12c(%r15), %eax
movq 0x58(%rbp), %rcx
movw %ax, 0x78(%rcx)
movzwl 0x254(%rbp), %eax
movw %ax, 0x7a(%rcx)
movslq 0xe38(%rcx), %rax
testq %rax, %rax
je 0x49f5a
movq 0x1f6d9(%rip), %rcx     # 0x69600
movq %rax, %rdx
shlq $0x7, %rdx
leaq (%rdx,%rax,8), %rax
movq 0x1ff07(%rip), %rdx     # 0x69e40
movq 0x48(%rdx,%rax), %rdi
callq *0x50(%rcx)
movq 0x58(%rbp), %rcx
movw %ax, 0x7c(%rcx)
movslq 0xe38(%rcx), %rax
movzwl 0x318(%rcx,%rax,4), %eax
jmp 0x49f62
movw $0x0, 0x7c(%rcx)
xorl %eax, %eax
movw %ax, 0x7e(%rcx)
movq %rbp, %rdi
callq 0x18ab0
testl %eax, %eax
je 0x49fdf
movq 0x58(%rbp), %rbx
leaq 0xda86(%rip), %rdi      # 0x57a03
callq 0x189e0
subq 0x1feb7(%rip), %rax     # 0x69e40
sarq $0x3, %rax
movabsq $-0x3c3c3c3c3c3c3c3c, %rcx # imm = 0xC3C3C3C3C3C3C3C4
imulq %rax, %rcx
movl 0x318(%rbx,%rcx), %ebx
xorl %r13d, %r13d
testl %ebx, %ebx
jne 0x49fe4
andb $-0x11, 0x11d(%rbp)
movq 0x1f649(%rip), %rax     # 0x69600
movq 0x20(%rax), %rbx
leaq 0xa41c(%rip), %rdi      # 0x543de
callq *0x48(%rax)
movss 0x9f5b(%rip), %xmm0     # 0x53f28
xorps %xmm2, %xmm2
movq %rbp, %rdi
movl $0x3, %esi
movl %eax, %edx
movaps %xmm0, %xmm1
callq *%rbx
xorl %ebx, %ebx
movb $0x1, %r13b
movq %rbp, %r14
movq %rbp, %rdi
callq 0x18750
movl %eax, %ebp
testb %r13b, %r13b
jne 0x4a000
testl %ebp, %ebp
je 0x4a031
testb $0x8, (%r15)
jne 0x4a031
testl %ebp, %ebp
je 0x4a04f
movl %ebp, %edi
callq 0x18c30
movq 0x1f5ee(%rip), %rcx     # 0x69600
movq 0x48(%rax), %rdi
callq *0x50(%rcx)
movq 0x58(%r14), %rcx
movw %ax, 0x80(%rcx)
movslq %ebp, %rax
movzwl 0x318(%rcx,%rax,4), %ebx
jmp 0x4a05e
movq 0x1f5c8(%rip), %rax     # 0x69600
leaq 0xd14b(%rip), %rdi      # 0x5718a
callq *0x50(%rax)
movq 0x58(%r14), %rcx
movw %ax, 0x80(%rcx)
jmp 0x4a05e
movq 0x58(%r14), %rcx
movw $0x0, 0x80(%rcx)
xorl %ebx, %ebx
movw %bx, 0x82(%rcx)
movss 0x4(%r15), %xmm0
movq 0x58(%r14), %rcx
ucomiss 0xf24(%rcx), %xmm0
jbe 0x4a082
movl $0x0, 0x86(%rcx)
xorps %xmm0, %xmm0
cvtsi2ssl (%r15), %xmm0
movss 0xf04(%rcx), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x4a0c0
movq 0x1f562(%rip), %rax     # 0x69600
leaq 0xda0e(%rip), %rdi      # 0x57ab3
callq *0x50(%rax)
movq 0x58(%r14), %rcx
movw %ax, 0x8a(%rcx)
movss 0xf04(%rcx), %xmm0
jmp 0x4a15b
movss 0xf08(%rcx), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x4a0f3
movq 0x1f52c(%rip), %rax     # 0x69600
leaq 0xda14(%rip), %rdi      # 0x57aef
callq *0x50(%rax)
movq 0x58(%r14), %rcx
movw %ax, 0x8a(%rcx)
movss 0xf08(%rcx), %xmm0
jmp 0x4a15b
movss 0xf10(%rcx), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x4a126
movq 0x1f4f9(%rip), %rax     # 0x69600
leaq 0xdad3(%rip), %rdi      # 0x57be1
callq *0x50(%rax)
movq 0x58(%r14), %rcx
movw %ax, 0x8a(%rcx)
movss 0xf10(%rcx), %xmm0
jmp 0x4a15b
movss 0xf0c(%rcx), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x4a3a7
movq 0x1f4c2(%rip), %rax     # 0x69600
leaq 0xda56(%rip), %rdi      # 0x57b9b
callq *0x50(%rax)
movq 0x58(%r14), %rcx
movw %ax, 0x8a(%rcx)
movss 0xf0c(%rcx), %xmm0
xorps %xmm1, %xmm1
cvtsi2ssl (%r15), %xmm1
subss %xmm1, %xmm0
divss 0x9da5(%rip), %xmm0     # 0x53f14
cvttss2si %xmm0, %eax
movw %ax, 0x8c(%rcx)
movq 0x58(%r14), %rcx
movslq 0x314(%rcx), %rax
cmpq $-0x1, %rax
je 0x4a1fc
movq (%r12), %rcx
testq %rcx, %rcx
je 0x4a1af
movq %rax, %rdx
shlq $0x7, %rdx
leaq (%rdx,%rax,8), %rdx
addq 0x1fc9a(%rip), %rdx     # 0x69e40
cmpq %rdx, 0x330(%rcx)
je 0x4a200
movq 0x1f642(%rip), %rcx     # 0x697f8
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x4a1d9
movq %rax, %rdx
shlq $0x7, %rdx
leaq (%rdx,%rax,8), %rdx
addq 0x1fc70(%rip), %rdx     # 0x69e40
cmpq %rdx, 0x330(%rcx)
je 0x4a210
movq 0x1f420(%rip), %rcx     # 0x69600
movq %rax, %rdx
shlq $0x7, %rdx
leaq (%rdx,%rax,8), %rax
movq 0x1fc4e(%rip), %rdx     # 0x69e40
movq 0x48(%rdx,%rax), %rdi
callq *0x50(%rcx)
jmp 0x4a221
xorl %eax, %eax
jmp 0x4a225
movq 0x1f3f9(%rip), %rax     # 0x69600
leaq 0x1165e(%rip), %rdi     # 0x5b86c
jmp 0x4a21e
movq 0x1f3e9(%rip), %rax     # 0x69600
leaq 0xdd80(%rip), %rdi      # 0x57f9e
callq *0x50(%rax)
movq 0x58(%r14), %rcx
movw %ax, 0x84(%rcx)
movq 0x58(%r14), %rax
movzwl 0x314(%rax), %ecx
movw %cx, 0x90(%rax)
movq %r14, %rdi
movl $0x3, %esi
callq 0x18030
movq 0x58(%r14), %rcx
movw %ax, 0x94(%rcx)
cmpl $0x0, 0x74c(%rcx)
je 0x4a265
testb $0x8, (%r15)
jne 0x4a29c
cmpl $0x2, 0x300(%rcx)
je 0x4a27c
movss 0x70(%rcx), %xmm0
ucomiss 0x110fe(%rip), %xmm0    # 0x5b378
jbe 0x4a298
movq 0x730(%rcx), %rax
testq %rax, %rax
je 0x4a298
movq 0x1f371(%rip), %rcx     # 0x69600
movq 0x48(%rax), %rdi
callq *0x50(%rcx)
jmp 0x4a2ad
xorl %eax, %eax
jmp 0x4a2b1
movq 0x1f35d(%rip), %rax     # 0x69600
leaq 0xf674(%rip), %rdi      # 0x5991e
callq *0x50(%rax)
movq 0x58(%r14), %rcx
movw %ax, 0x8e(%rcx)
movq 0x58(%r14), %rax
movw $0x0, 0x92(%rax)
movq 0x1fbf4(%rip), %rcx     # 0x69ec0
movq (%rcx), %rcx
movss 0x20(%rcx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x4a2de
jnp 0x4a33d
movl 0x308(%rax), %ecx
testl %ecx, %ecx
jle 0x4a325
movss 0xc8(%r15), %xmm0
ucomiss %xmm1, %xmm0
jne 0x4a325
jp 0x4a325
cmpl $0x0, 0xe24(%rax)
jne 0x4a325
cmpl $0x0, 0xf78(%rax)
jne 0x4a325
cmpl $0x0, 0xf74(%rax)
jne 0x4a325
cmpl $0x0, 0xf80(%rax)
jne 0x4a325
cmpl $0x0, 0xe34(%rax)
je 0x4a32e
movw $0x1, 0x92(%rax)
testl %ecx, %ecx
jle 0x4a38c
cmpl $0x0, 0xe28(%rax)
jne 0x4a385
jmp 0x4a38c
cmpl $0x0, 0xe24(%rax)
jne 0x4a36a
cmpl $0x0, 0xe2c(%rax)
jne 0x4a36a
cmpl $0x0, 0xf78(%rax)
jne 0x4a36a
cmpl $0x0, 0xf74(%rax)
jne 0x4a36a
cmpl $0x0, 0xe34(%rax)
je 0x4a373
movw $0x1, 0x92(%rax)
cmpl $0x0, 0xe28(%rax)
je 0x4a38c
cmpl $0x0, 0x308(%rax)
jle 0x4a38c
orb $0x2, 0x92(%rax)
movw $0x0, 0x9a(%rax)
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movw $0x0, 0x8a(%rcx)
xorl %eax, %eax
jmp 0x4a173