// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x280, %rsp            # imm = 0x280
movq %rdi, -0x8(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x234(%rbp)
movl $0x0, -0x238(%rbp)
movq 0x223e7(%rip), %rax     # 0x82bd8
movl (%rax), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x9e(%rax)
movq 0x2223c(%rip), %rax     # 0x82a48
movl (%rax), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0xa0(%rax)
movl $0x0, -0x23c(%rbp)
movl -0x23c(%rbp), %eax
movq 0x22509(%rip), %rcx     # 0x82d40
cmpl 0x610(%rcx), %eax
jge 0x60904
movq 0x21d0e(%rip), %rax     # 0x82558
movq (%rax), %rax
addq $0x4a8, %rax            # imm = 0x4A8
movslq -0x23c(%rbp), %rcx
imulq $0x4a8, %rcx, %rcx      # imm = 0x4A8
addq %rcx, %rax
movq %rax, -0x248(%rbp)
movq -0x248(%rbp), %rax
cmpl $0x0, 0x60(%rax)
jne 0x6087a
jmp 0x608f0
movq -0x248(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x1, 0x1100(%rax)
jne 0x608b4
movq -0x248(%rbp), %rdi
movl $0x4, %esi
callq 0x18030
movq %rax, %rcx
movslq -0x234(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x234(%rbp)
jmp 0x608ee
movq -0x248(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x2, 0x1100(%rax)
jne 0x608ec
movq -0x248(%rbp), %rdi
movl $0x4, %esi
callq 0x18030
movq %rax, %rcx
movslq -0x238(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x238(%rbp)
jmp 0x608ee
jmp 0x608f0
movl -0x23c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x23c(%rbp)
jmp 0x6082a
movl -0x234(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0xa8(%rax)
movl -0x238(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0xaa(%rax)
movq 0x222c5(%rip), %rax     # 0x82c00
movl (%rax), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0xac(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
addq $0xc0, %rdi
leaq 0xe9cb(%rip), %rsi      # 0x6f330
callq 0x18cb0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movl $0x2f, %esi
callq 0x187a0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x609c7
movq -0x28(%rbp), %rdi
callq 0x186e0
cmpq $0x0, %rax
jbe 0x609c7
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
leaq -0x230(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x182c0
leaq -0x230(%rbp), %rdi
leaq 0x16c34(%rip), %rsi     # 0x775f4
callq 0x19880
jmp 0x609da
leaq -0x230(%rbp), %rdi
leaq 0x16c0d(%rip), %rsi     # 0x775e2
callq 0x182c0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x1118(%rax), %eax
movq %rax, -0x250(%rbp)
subq $0x3, %rax
ja 0x60a0c
movq -0x250(%rbp), %rax
leaq 0x1690d(%rip), %rcx     # 0x77310
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x60a0e
movq 0x21de3(%rip), %rax     # 0x827f8
cmpq $0x0, (%rax)
je 0x60a57
movq 0x21dd6(%rip), %rax     # 0x827f8
movq (%rax), %rax
movq 0x110(%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x60a57
leaq 0xfdf4(%rip), %rdi      # 0x7082d
movq 0x21bc0(%rip), %rax     # 0x82600
callq *0x50(%rax)
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x9c(%rax)
jmp 0x60ac8
movq 0x21e02(%rip), %rax     # 0x82860
cmpq $0x0, (%rax)
je 0x60aa0
movq 0x21df5(%rip), %rax     # 0x82860
movq (%rax), %rax
movq 0x110(%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x60aa0
leaq 0xfd9e(%rip), %rdi      # 0x70820
movq 0x21b77(%rip), %rax     # 0x82600
callq *0x50(%rax)
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x9c(%rax)
jmp 0x60ac6
movq 0x21b59(%rip), %rax     # 0x82600
movq 0x50(%rax), %rax
leaq -0x230(%rbp), %rdi
callq *%rax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x9c(%rax)
jmp 0x60ac8
jmp 0x60b7c
movq 0x21b2c(%rip), %rax     # 0x82600
movq 0x50(%rax), %rax
movq %rax, -0x258(%rbp)
movq -0x8(%rbp), %rdi
callq 0x18b30
movq %rax, %rdi
movq -0x258(%rbp), %rax
callq *%rax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x9c(%rax)
jmp 0x60b7c
movq 0x21af1(%rip), %rax     # 0x82600
movq 0x50(%rax), %rax
movq %rax, -0x260(%rbp)
movq -0x8(%rbp), %rdi
callq 0x19060
movq %rax, %rdi
movq -0x260(%rbp), %rax
callq *%rax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x9c(%rax)
jmp 0x60b7c
movq 0x21ab6(%rip), %rax     # 0x82600
movq 0x50(%rax), %rax
movq %rax, -0x268(%rbp)
movq -0x8(%rbp), %rdi
callq 0x199d0
movq %rax, %rdi
movq -0x268(%rbp), %rax
callq *%rax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x9c(%rax)
movq 0x21c75(%rip), %rax     # 0x827f8
cmpq $0x0, (%rax)
je 0x60c26
movq 0x21c64(%rip), %rax     # 0x827f8
movq (%rax), %rax
cmpq $0x0, 0x110(%rax)
je 0x60bc6
leaq 0xfc85(%rip), %rdi      # 0x7082d
movq 0x21a51(%rip), %rax     # 0x82600
callq *0x50(%rax)
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0xa2(%rax)
jmp 0x60c24
movq 0x21c2b(%rip), %rax     # 0x827f8
movq (%rax), %rdi
callq 0x19650
cmpl $0x0, %eax
jne 0x60bff
leaq 0x16bfa(%rip), %rdi     # 0x777db
movq 0x21a18(%rip), %rax     # 0x82600
callq *0x50(%rax)
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0xa2(%rax)
jmp 0x60c22
leaq 0x169dc(%rip), %rdi     # 0x775e2
movq 0x219f3(%rip), %rax     # 0x82600
callq *0x50(%rax)
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0xa2(%rax)
jmp 0x60c24
jmp 0x60c26
movq 0x21c33(%rip), %rax     # 0x82860
cmpq $0x0, (%rax)
je 0x60cd0
movq 0x21c22(%rip), %rax     # 0x82860
movq (%rax), %rax
cmpq $0x0, 0x110(%rax)
je 0x60c70
leaq 0xfbce(%rip), %rdi      # 0x70820
movq 0x219a7(%rip), %rax     # 0x82600
callq *0x50(%rax)
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0xa4(%rax)
jmp 0x60cce
movq 0x21be9(%rip), %rax     # 0x82860
movq (%rax), %rdi
callq 0x19650
cmpl $0x0, %eax
jne 0x60ca9
leaq 0x16b5c(%rip), %rdi     # 0x777e7
movq 0x2196e(%rip), %rax     # 0x82600
callq *0x50(%rax)
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0xa4(%rax)
jmp 0x60ccc
leaq 0x1693c(%rip), %rdi     # 0x775ec
movq 0x21949(%rip), %rax     # 0x82600
callq *0x50(%rax)
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0xa4(%rax)
jmp 0x60cce
jmp 0x60cd0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $0x0, 0xf68(%rax)
je 0x60e0f
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0xf68(%rax), %rax
cmpl $0x1, 0x478(%rax)
jne 0x60d21
leaq 0x132c4(%rip), %rdi     # 0x73fc9
movq 0x218f4(%rip), %rax     # 0x82600
callq *0x50(%rax)
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0xa6(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0xf68(%rax), %rax
cmpl $0x2, 0x478(%rax)
jne 0x60d5c
leaq 0x132a4(%rip), %rdi     # 0x73fe4
movq 0x218b9(%rip), %rax     # 0x82600
callq *0x50(%rax)
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0xa6(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0xf68(%rax), %rax
cmpl $0x4, 0x478(%rax)
jne 0x60d97
leaq 0x13282(%rip), %rdi     # 0x73ffd
movq 0x2187e(%rip), %rax     # 0x82600
callq *0x50(%rax)
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0xa6(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0xf68(%rax), %rax
cmpl $0x8, 0x478(%rax)
jne 0x60dd2
leaq 0x1325e(%rip), %rdi     # 0x74014
movq 0x21843(%rip), %rax     # 0x82600
callq *0x50(%rax)
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0xa6(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0xf68(%rax), %rax
cmpl $0x10, 0x478(%rax)
jne 0x60e0d
leaq 0x13026(%rip), %rdi     # 0x73e17
movq 0x21808(%rip), %rax     # 0x82600
callq *0x50(%rax)
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0xa6(%rax)
jmp 0x60e20
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw $0x0, 0xa6(%rax)
movq 0x21f79(%rip), %rax     # 0x82da0
movl 0x12c(%rax), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x78(%rax)
movq -0x8(%rbp), %rax
movl 0x254(%rax), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x7a(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0xe38(%rax)
jne 0x60e84
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw $0x0, 0x7c(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw $0x0, 0x7e(%rax)
jmp 0x60ef9
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movslq 0xe38(%rax), %rcx
movq 0x21fa6(%rip), %rax     # 0x82e40
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq 0x21751(%rip), %rax     # 0x82600
movq 0x50(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x48(%rcx), %rdi
callq *%rax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x7c(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x58(%rcx), %rcx
movslq 0xe38(%rcx), %rcx
movl 0x318(%rax,%rcx,4), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x7e(%rax)
movq -0x8(%rbp), %rdi
callq 0x18b80
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x60fca
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x270(%rbp)
leaq 0x12a66(%rip), %rdi     # 0x7398b
callq 0x18a90
movq 0x21f0f(%rip), %rcx     # 0x82e40
subq %rcx, %rax
movl $0x88, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x270(%rbp), %rax
movl 0x318(%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jne 0x60fc8
movq -0x8(%rbp), %rax
movl 0x11c(%rax), %ecx
andl $0xffffefff, %ecx       # imm = 0xFFFFEFFF
movl %ecx, 0x11c(%rax)
movq 0x2168b(%rip), %rax     # 0x82600
movq 0x20(%rax), %rax
movq %rax, -0x278(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x280(%rbp)
leaq 0xf484(%rip), %rdi      # 0x70416
movq 0x21667(%rip), %rax     # 0x82600
callq *0x48(%rax)
movq -0x280(%rbp), %rdi
movl %eax, %edx
movq -0x278(%rbp), %rax
movl $0x3, %esi
movss 0xef33(%rip), %xmm1     # 0x6feec
xorps %xmm2, %xmm2
movaps %xmm1, %xmm0
callq *%rax
movl $0x0, -0x1c(%rbp)
jmp 0x60fca
movq -0x8(%rbp), %rdi
callq 0x187c0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x61030
cmpl $0x0, -0x14(%rbp)
je 0x60ff3
movq 0x21db7(%rip), %rax     # 0x82da0
movl (%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x61030
leaq 0x12118(%rip), %rdi     # 0x73112
movq 0x215ff(%rip), %rax     # 0x82600
callq *0x50(%rax)
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x80(%rax)
movl -0x18(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x82(%rax)
jmp 0x610b4
cmpl $0x0, -0x14(%rbp)
je 0x61090
movl -0x14(%rbp), %edi
callq 0x18d70
movq %rax, -0x10(%rbp)
movq 0x215b7(%rip), %rax     # 0x82600
movq 0x50(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x48(%rcx), %rdi
callq *%rax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x80(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x14(%rbp), %rcx
movl 0x318(%rax,%rcx,4), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x82(%rax)
jmp 0x610b2
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw $0x0, 0x80(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw $0x0, 0x82(%rax)
jmp 0x610b4
movq 0x21ce5(%rip), %rax     # 0x82da0
movss 0x4(%rax), %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
ucomiss 0xf24(%rax), %xmm0
jbe 0x610f3
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw $0x0, 0x86(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw $0x0, 0x88(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0xf04(%rax), %xmm0
movq 0x21c96(%rip), %rax     # 0x82da0
cvtsi2ssl (%rax), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x6117f
movq 0x214e6(%rip), %rax     # 0x82600
movq 0x50(%rax), %rax
leaq 0x12916(%rip), %rdi     # 0x73a3b
callq *%rax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x8a(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0xf04(%rax), %xmm0
movq 0x21c50(%rip), %rax     # 0x82da0
cvtsi2ssl (%rax), %xmm1
subss %xmm1, %xmm0
movss 0xed90(%rip), %xmm1     # 0x6fef0
divss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x8c(%rax)
jmp 0x61348
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0xf08(%rax), %xmm0
movq 0x21c0a(%rip), %rax     # 0x82da0
cvtsi2ssl (%rax), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x6120b
movq 0x2145a(%rip), %rax     # 0x82600
movq 0x50(%rax), %rax
leaq 0x128c6(%rip), %rdi     # 0x73a77
callq *%rax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x8a(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0xf08(%rax), %xmm0
movq 0x21bc4(%rip), %rax     # 0x82da0
cvtsi2ssl (%rax), %xmm1
subss %xmm1, %xmm0
movss 0xed04(%rip), %xmm1     # 0x6fef0
divss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x8c(%rax)
jmp 0x61346
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0xf10(%rax), %xmm0
movq 0x21b7e(%rip), %rax     # 0x82da0
cvtsi2ssl (%rax), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x61297
movq 0x213ce(%rip), %rax     # 0x82600
movq 0x50(%rax), %rax
leaq 0x1292c(%rip), %rdi     # 0x73b69
callq *%rax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x8a(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0xf10(%rax), %xmm0
movq 0x21b38(%rip), %rax     # 0x82da0
cvtsi2ssl (%rax), %xmm1
subss %xmm1, %xmm0
movss 0xec78(%rip), %xmm1     # 0x6fef0
divss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x8c(%rax)
jmp 0x61344
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0xf0c(%rax), %xmm0
movq 0x21af2(%rip), %rax     # 0x82da0
cvtsi2ssl (%rax), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x61320
movq 0x21342(%rip), %rax     # 0x82600
movq 0x50(%rax), %rax
leaq 0x1285a(%rip), %rdi     # 0x73b23
callq *%rax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x8a(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0xf0c(%rax), %xmm0
movq 0x21aac(%rip), %rax     # 0x82da0
cvtsi2ssl (%rax), %xmm1
subss %xmm1, %xmm0
movss 0xebec(%rip), %xmm1     # 0x6fef0
divss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x8c(%rax)
jmp 0x61342
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw $0x0, 0x8a(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw $0x0, 0x8c(%rax)
jmp 0x61344
jmp 0x61346
jmp 0x61348
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $-0x1, 0x314(%rax)
jne 0x6136f
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw $0x0, 0x84(%rax)
jmp 0x61489
movq 0x214ea(%rip), %rax     # 0x82860
cmpq $0x0, (%rax)
je 0x613da
movq 0x214dd(%rip), %rax     # 0x82860
movq (%rax), %rax
movq 0x330(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x58(%rcx), %rcx
movslq 0x314(%rcx), %rdx
movq 0x21a9d(%rip), %rcx     # 0x82e40
imulq $0x88, %rdx, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jne 0x613da
leaq 0x1643b(%rip), %rdi     # 0x777f4
movq 0x21240(%rip), %rax     # 0x82600
callq *0x50(%rax)
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x84(%rax)
jmp 0x61487
movq 0x21417(%rip), %rax     # 0x827f8
cmpq $0x0, (%rax)
je 0x61442
movq 0x2140a(%rip), %rax     # 0x827f8
movq (%rax), %rax
movq 0x330(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x58(%rcx), %rcx
movslq 0x314(%rcx), %rdx
movq 0x21a32(%rip), %rcx     # 0x82e40
imulq $0x88, %rdx, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jne 0x61442
leaq 0x12b02(%rip), %rdi     # 0x73f26
movq 0x211d5(%rip), %rax     # 0x82600
callq *0x50(%rax)
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x84(%rax)
jmp 0x61485
movq 0x211b7(%rip), %rax     # 0x82600
movq 0x50(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x58(%rcx), %rcx
movslq 0x314(%rcx), %rdx
movq 0x219dd(%rip), %rcx     # 0x82e40
imulq $0x88, %rdx, %rdx
addq %rdx, %rcx
movq 0x48(%rcx), %rdi
callq *%rax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x84(%rax)
jmp 0x61487
jmp 0x61489
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x314(%rax), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x90(%rax)
movq -0x8(%rbp), %rdi
movl $0x3, %esi
callq 0x18030
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x94(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0x74c(%rax)
je 0x61513
movq 0x218bf(%rip), %rax     # 0x82da0
movl (%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x61513
leaq 0x14340(%rip), %rdi     # 0x75832
movq 0x21107(%rip), %rax     # 0x82600
callq *0x50(%rax)
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x8e(%rax)
jmp 0x61597
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x2, 0x300(%rax)
je 0x6153e
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0x70(%rax), %xmm0
movss 0x15dd3(%rip), %xmm1    # 0x7730c
ucomiss %xmm1, %xmm0
jbe 0x61584
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $0x0, 0x730(%rax)
je 0x61584
movq 0x210a9(%rip), %rax     # 0x82600
movq 0x50(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x58(%rcx), %rcx
movq 0x730(%rcx), %rcx
movq 0x48(%rcx), %rdi
callq *%rax
movw %ax, %cx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw %cx, 0x8e(%rax)
jmp 0x61595
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw $0x0, 0x8e(%rax)
jmp 0x61597
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw $0x0, 0x92(%rax)
movq 0x21911(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x615c6
jp 0x615c6
jmp 0x6169e
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0x308(%rax)
jle 0x61645
movq 0x217c2(%rip), %rax     # 0x82da0
movss 0xc8(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x61645
jp 0x61645
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0xe24(%rax)
jne 0x61645
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0xf78(%rax)
jne 0x61645
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0xf74(%rax)
jne 0x61645
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0xf80(%rax)
jne 0x61645
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0xe34(%rax)
je 0x6165e
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movswl 0x92(%rax), %ecx
orl $0x1, %ecx
movw %cx, 0x92(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0xe28(%rax)
je 0x61699
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0x308(%rax)
jle 0x61699
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movswl 0x92(%rax), %ecx
orl $0x2, %ecx
movw %cx, 0x92(%rax)
jmp 0x61749
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0xe24(%rax)
jne 0x616f3
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0xe2c(%rax)
jne 0x616f3
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0xf78(%rax)
jne 0x616f3
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0xf74(%rax)
jne 0x616f3
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0xe34(%rax)
je 0x6170c
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movswl 0x92(%rax), %ecx
orl $0x1, %ecx
movw %cx, 0x92(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0xe28(%rax)
je 0x61747
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0x308(%rax)
jle 0x61747
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movswl 0x92(%rax), %ecx
orl $0x2, %ecx
movw %cx, 0x92(%rax)
jmp 0x61749
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movw $0x0, 0x9a(%rax)
addq $0x280, %rsp            # imm = 0x280
popq %rbp
retq
nopw %cs:(%rax,%rax)