// File: /workspace/github_c_makefile_star2_O3/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, %r13
movq 0x1fc99(%rip), %rax     # 0x68bd8
movzwl (%rax), %eax
movq 0x58(%rdi), %rdi
movw %ax, 0x9e(%rdi)
movq 0x1faf4(%rip), %rax     # 0x68a48
movzwl (%rax), %eax
movw %ax, 0xa0(%rdi)
movq 0x1fddb(%rip), %r14     # 0x68d40
cmpl $0x0, 0x610(%r14)
jle 0x48fe8
movq %r13, 0x8(%rsp)
movl $0x4a8, %r12d           # imm = 0x4A8
xorl %r13d, %r13d
movq 0x1f5d4(%rip), %rbx     # 0x68558
xorl %r15d, %r15d
xorl %ebp, %ebp
movq (%rbx), %rdi
cmpl $0x0, 0x60(%rdi,%r12)
je 0x48fc7
movq 0x58(%rdi,%r12), %rax
addq %r12, %rdi
movl 0x1100(%rax), %eax
cmpl $0x2, %eax
je 0x48fba
cmpl $0x1, %eax
jne 0x48fc7
movl $0x4, %esi
callq 0x18030
addl %eax, %ebp
jmp 0x48fc7
movl $0x4, %esi
callq 0x18030
addl %eax, %r15d
incq %r13
movslq 0x610(%r14), %rax
addq $0x4a8, %r12            # imm = 0x4A8
cmpq %rax, %r13
jl 0x48f89
movq 0x8(%rsp), %r13
movq 0x58(%r13), %rdi
jmp 0x48fed
xorl %ebp, %ebp
xorl %r15d, %r15d
movw %bp, 0xa8(%rdi)
movw %r15w, 0xaa(%rdi)
movq 0x1fbfd(%rip), %rax     # 0x68c00
movzwl (%rax), %eax
movw %ax, 0xac(%rdi)
addq $0xc0, %rdi
leaq 0x9325(%rip), %rsi      # 0x52340
callq 0x18bb0
movq %rax, %rdi
movl $0x2f, %esi
callq 0x18730
testq %rax, %rax
je 0x49060
cmpb $0x0, (%rax)
je 0x49060
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 0x49076
movabsq $0x5f6e6f696c646572, %rax # imm = 0x5F6E6F696C646572
movq %rax, 0x10(%rsp)
movw $0x69, 0x18(%rsp)
movq 0x58(%r13), %rax
movl 0x1118(%rax), %eax
cmpl $0x1, %eax
je 0x490b9
cmpl $0x2, %eax
je 0x490a4
cmpl $0x3, %eax
jne 0x490d3
movq 0x1f56a(%rip), %rax     # 0x68600
movq 0x50(%rax), %rbx
movq %r13, %rdi
callq 0x19770
jmp 0x490cc
movq 0x1f555(%rip), %rax     # 0x68600
movq 0x50(%rax), %rbx
movq %r13, %rdi
callq 0x18ee0
jmp 0x490cc
movq 0x1f540(%rip), %rax     # 0x68600
movq 0x50(%rax), %rbx
movq %r13, %rdi
callq 0x18a60
movq %rax, %rdi
callq *%rbx
jmp 0x49132
movq 0x1f71e(%rip), %rax     # 0x687f8
movq (%rax), %rax
testq %rax, %rax
je 0x490eb
cmpq %r13, 0x110(%rax)
je 0x49111
movq 0x1f76e(%rip), %rax     # 0x68860
movq (%rax), %rax
testq %rax, %rax
je 0x49103
cmpq %r13, 0x110(%rax)
je 0x49121
movq 0x1f4f6(%rip), %rax     # 0x68600
leaq 0x10(%rsp), %rdi
jmp 0x4912f
movq 0x1f4e8(%rip), %rax     # 0x68600
leaq 0xa72e(%rip), %rdi      # 0x5384d
jmp 0x4912f
movq 0x1f4d8(%rip), %rax     # 0x68600
leaq 0xa711(%rip), %rdi      # 0x53840
callq *0x50(%rax)
movq 0x58(%r13), %rcx
movw %ax, 0x9c(%rcx)
movq 0x1f6b4(%rip), %r14     # 0x687f8
movq (%r14), %rdi
testq %rdi, %rdi
je 0x4919a
cmpq $0x0, 0x110(%rdi)
je 0x49169
movq 0x1f4a3(%rip), %rax     # 0x68600
leaq 0xa6e9(%rip), %rdi      # 0x5384d
callq *0x50(%rax)
jmp 0x4918f
callq 0x19420
movq 0x1f48b(%rip), %rcx     # 0x68600
movq 0x50(%rcx), %rcx
testl %eax, %eax
je 0x49186
leaq 0x1179e(%rip), %rdi     # 0x5a922
jmp 0x4918d
leaq 0x11986(%rip), %rdi     # 0x5ab13
callq *%rcx
movq 0x58(%r13), %rcx
movw %ax, 0xa2(%rcx)
movq 0x1f6bf(%rip), %r15     # 0x68860
movq (%r15), %rdi
testq %rdi, %rdi
je 0x491f7
cmpq $0x0, 0x110(%rdi)
je 0x491c6
movq 0x1f446(%rip), %rax     # 0x68600
leaq 0xa67f(%rip), %rdi      # 0x53840
callq *0x50(%rax)
jmp 0x491ec
callq 0x19420
movq 0x1f42e(%rip), %rcx     # 0x68600
movq 0x50(%rcx), %rcx
testl %eax, %eax
je 0x491e3
leaq 0x1174b(%rip), %rdi     # 0x5a92c
jmp 0x491ea
leaq 0x11935(%rip), %rdi     # 0x5ab1f
callq *%rcx
movq 0x58(%r13), %rcx
movw %ax, 0xa4(%rcx)
movq 0xf68(%rcx), %rax
testq %rax, %rax
je 0x492e1
movl 0x478(%rax), %eax
cmpl $0x1, %eax
jne 0x4923b
movq 0x1f3e7(%rip), %rax     # 0x68600
leaq 0xdf15(%rip), %rdi      # 0x57135
callq *0x50(%rax)
movq 0x58(%r13), %rcx
movw %ax, 0xa6(%rcx)
movq 0xf68(%rcx), %rax
movl 0x478(%rax), %eax
cmpl $0x2, %eax
jne 0x49269
movq 0x1f3b9(%rip), %rax     # 0x68600
leaq 0xdf02(%rip), %rdi      # 0x57150
callq *0x50(%rax)
movq 0x58(%r13), %rcx
movw %ax, 0xa6(%rcx)
movq 0xf68(%rcx), %rax
movl 0x478(%rax), %eax
cmpl $0x4, %eax
jne 0x49297
movq 0x1f38b(%rip), %rax     # 0x68600
leaq 0xdeed(%rip), %rdi      # 0x57169
callq *0x50(%rax)
movq 0x58(%r13), %rcx
movw %ax, 0xa6(%rcx)
movq 0xf68(%rcx), %rax
movl 0x478(%rax), %eax
cmpl $0x8, %eax
jne 0x492c5
movq 0x1f35d(%rip), %rax     # 0x68600
leaq 0xded6(%rip), %rdi      # 0x57180
callq *0x50(%rax)
movq 0x58(%r13), %rcx
movw %ax, 0xa6(%rcx)
movq 0xf68(%rcx), %rax
movl 0x478(%rax), %eax
cmpl $0x10, %eax
jne 0x492ea
movq 0x1f32f(%rip), %rax     # 0x68600
leaq 0xdcab(%rip), %rdi      # 0x56f83
callq *0x50(%rax)
movq 0x58(%r13), %rcx
jmp 0x492e3
xorl %eax, %eax
movw %ax, 0xa6(%rcx)
movq 0x1faaf(%rip), %r12     # 0x68da0
movzwl 0x12c(%r12), %eax
movw %ax, 0x78(%rcx)
movzwl 0x254(%r13), %eax
movw %ax, 0x7a(%rcx)
movslq 0xe38(%rcx), %rax
testq %rax, %rax
je 0x49350
movq 0x1f2e3(%rip), %rcx     # 0x68600
movq %rax, %rdx
shlq $0x7, %rdx
leaq (%rdx,%rax,8), %rax
movq 0x1fb11(%rip), %rdx     # 0x68e40
movq 0x48(%rdx,%rax), %rdi
callq *0x50(%rcx)
movq 0x58(%r13), %rcx
movw %ax, 0x7c(%rcx)
movslq 0xe38(%rcx), %rax
movzwl 0x318(%rcx,%rax,4), %eax
jmp 0x49358
movw $0x0, 0x7c(%rcx)
xorl %eax, %eax
movw %ax, 0x7e(%rcx)
movq %r13, %rdi
callq 0x18ab0
testl %eax, %eax
je 0x4940b
movq 0x58(%r13), %rbx
leaq 0xd780(%rip), %rdi      # 0x56af7
callq 0x189e0
subq 0x1fabd(%rip), %rax     # 0x68e40
sarq $0x3, %rax
movabsq $-0x3c3c3c3c3c3c3c3c, %rcx # imm = 0xC3C3C3C3C3C3C3C4
imulq %rax, %rcx
movl 0x318(%rbx,%rcx), %ebx
testl %ebx, %ebx
je 0x493d4
movq %r13, %rdi
callq 0x18750
testl %eax, %eax
je 0x493b3
testb $0x8, (%r12)
je 0x49417
movq 0x1f246(%rip), %rax     # 0x68600
leaq 0xcebd(%rip), %rdi      # 0x5627e
callq *0x50(%rax)
movq 0x58(%r13), %rcx
movw %ax, 0x80(%rcx)
jmp 0x49455
andb $-0x11, 0x11d(%r13)
movq 0x1f21d(%rip), %rax     # 0x68600
movq 0x20(%rax), %rbx
leaq 0xa000(%rip), %rdi      # 0x533ee
callq *0x48(%rax)
movss 0x9b2f(%rip), %xmm0     # 0x52f28
xorps %xmm2, %xmm2
movq %r13, %rdi
movl $0x3, %esi
movl %eax, %edx
movaps %xmm0, %xmm1
callq *%rbx
movq %r13, %rdi
callq 0x18750
testl %eax, %eax
je 0x49446
movl %eax, %ebp
movl %eax, %edi
callq 0x18c30
movq 0x1f1d9(%rip), %rcx     # 0x68600
movq 0x48(%rax), %rdi
callq *0x50(%rcx)
movq 0x58(%r13), %rcx
movw %ax, 0x80(%rcx)
movslq %ebp, %rax
movzwl 0x318(%rcx,%rax,4), %ebx
jmp 0x49455
movq 0x58(%r13), %rcx
movw $0x0, 0x80(%rcx)
xorl %ebx, %ebx
movw %bx, 0x82(%rcx)
movss 0x4(%r12), %xmm0
ucomiss 0xf24(%rcx), %xmm0
jbe 0x49476
movl $0x0, 0x86(%rcx)
xorps %xmm0, %xmm0
cvtsi2ssl (%r12), %xmm0
movss 0xf04(%rcx), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x494b5
movq 0x1f16d(%rip), %rax     # 0x68600
leaq 0xd70d(%rip), %rdi      # 0x56ba7
callq *0x50(%rax)
movq 0x58(%r13), %rcx
movw %ax, 0x8a(%rcx)
movss 0xf04(%rcx), %xmm0
jmp 0x49550
movss 0xf08(%rcx), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x494e8
movq 0x1f137(%rip), %rax     # 0x68600
leaq 0xd713(%rip), %rdi      # 0x56be3
callq *0x50(%rax)
movq 0x58(%r13), %rcx
movw %ax, 0x8a(%rcx)
movss 0xf08(%rcx), %xmm0
jmp 0x49550
movss 0xf10(%rcx), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x4951b
movq 0x1f104(%rip), %rax     # 0x68600
leaq 0xd7d2(%rip), %rdi      # 0x56cd5
callq *0x50(%rax)
movq 0x58(%r13), %rcx
movw %ax, 0x8a(%rcx)
movss 0xf10(%rcx), %xmm0
jmp 0x49550
movss 0xf0c(%rcx), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x49797
movq 0x1f0cd(%rip), %rax     # 0x68600
leaq 0xd755(%rip), %rdi      # 0x56c8f
callq *0x50(%rax)
movq 0x58(%r13), %rcx
movw %ax, 0x8a(%rcx)
movss 0xf0c(%rcx), %xmm0
xorps %xmm1, %xmm1
cvtsi2ssl (%r12), %xmm1
subss %xmm1, %xmm0
divss 0x99af(%rip), %xmm0     # 0x52f14
cvttss2si %xmm0, %eax
movw %ax, 0x8c(%rcx)
movslq 0x314(%rcx), %rax
cmpq $-0x1, %rax
je 0x495e6
movq (%r15), %rcx
testq %rcx, %rcx
je 0x495a0
movq %rax, %rdx
shlq $0x7, %rdx
leaq (%rdx,%rax,8), %rdx
addq 0x1f8a9(%rip), %rdx     # 0x68e40
cmpq %rdx, 0x330(%rcx)
je 0x495ea
movq (%r14), %rcx
testq %rcx, %rcx
je 0x495c3
movq %rax, %rdx
shlq $0x7, %rdx
leaq (%rdx,%rax,8), %rdx
addq 0x1f886(%rip), %rdx     # 0x68e40
cmpq %rdx, 0x330(%rcx)
je 0x495fa
movq 0x1f036(%rip), %rcx     # 0x68600
movq %rax, %rdx
shlq $0x7, %rdx
leaq (%rdx,%rax,8), %rax
movq 0x1f864(%rip), %rdx     # 0x68e40
movq 0x48(%rdx,%rax), %rdi
callq *0x50(%rcx)
jmp 0x4960b
xorl %eax, %eax
jmp 0x4960f
movq 0x1f00f(%rip), %rax     # 0x68600
leaq 0x11534(%rip), %rdi     # 0x5ab2c
jmp 0x49608
movq 0x1efff(%rip), %rax     # 0x68600
leaq 0xda8a(%rip), %rdi      # 0x57092
callq *0x50(%rax)
movq 0x58(%r13), %rcx
movw %ax, 0x84(%rcx)
movzwl 0x314(%rcx), %eax
movw %ax, 0x90(%rcx)
movq %r13, %rdi
movl $0x3, %esi
callq 0x18030
movq 0x58(%r13), %rcx
movw %ax, 0x94(%rcx)
cmpl $0x0, 0x74c(%rcx)
je 0x4964c
testb $0x8, (%r12)
jne 0x49683
cmpl $0x2, 0x300(%rcx)
je 0x49663
movss 0x70(%rcx), %xmm0
ucomiss 0x10fd7(%rip), %xmm0    # 0x5a638
jbe 0x4967f
movq 0x730(%rcx), %rax
testq %rax, %rax
je 0x4967f
movq 0x1ef8a(%rip), %rcx     # 0x68600
movq 0x48(%rax), %rdi
callq *0x50(%rcx)
jmp 0x49694
xorl %eax, %eax
jmp 0x49698
movq 0x1ef76(%rip), %rax     # 0x68600
leaq 0xf4a1(%rip), %rdi      # 0x58b32
callq *0x50(%rax)
movq 0x58(%r13), %rcx
movw %ax, 0x8e(%rcx)
movw $0x0, 0x92(%rcx)
movq 0x1f811(%rip), %rax     # 0x68ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x496c1
jnp 0x49729
movl 0x308(%rcx), %eax
testl %eax, %eax
jle 0x4970d
movss 0xc8(%r12), %xmm0
ucomiss %xmm1, %xmm0
jne 0x4970d
jp 0x4970d
cmpl $0x0, 0xe24(%rcx)
jne 0x4970d
cmpl $0x0, 0xf78(%rcx)
jne 0x4970d
cmpl $0x0, 0xf74(%rcx)
jne 0x4970d
cmpl $0x0, 0xf80(%rcx)
jne 0x4970d
cmpl $0x0, 0xe34(%rcx)
je 0x497ad
movw $0x1, 0x92(%rcx)
movw $0x3, %dx
testl %eax, %eax
jle 0x4977c
cmpl $0x0, 0xe28(%rcx)
jne 0x49775
jmp 0x4977c
cmpl $0x0, 0xe24(%rcx)
jne 0x49756
cmpl $0x0, 0xe2c(%rcx)
jne 0x49756
cmpl $0x0, 0xf78(%rcx)
jne 0x49756
cmpl $0x0, 0xf74(%rcx)
jne 0x49756
cmpl $0x0, 0xe34(%rcx)
je 0x497a7
movw $0x1, 0x92(%rcx)
movw $0x3, %dx
cmpl $0x0, 0xe28(%rcx)
je 0x4977c
cmpl $0x0, 0x308(%rcx)
jle 0x4977c
movw %dx, 0x92(%rcx)
movw $0x0, 0x9a(%rcx)
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 0x49569
movw $0x2, %dx
jmp 0x49763
movw $0x2, %dx
jmp 0x4971a