// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_replace.c
// Function: replace_location
void replace_location(edict_t *person, char *temp, 
									  qboolean positionvalid, qboolean lineofsight)
{
	edict_t *cur = NULL;
	edict_t *fav = NULL;
	float favrating = 0;
	float currating;
	vec3_t distvector;
	float curdist, reddist, bluedist;
	char *name, *showname, *favname = NULL ; //MJD Uninitilized - Might
	                                          //be used this way. This
	qboolean	noprefix = false;
	strcpy(temp,"");

	while ((cur = findallradius(cur, person->s.origin, 1024)) != NULL)
	{
		if 	(cur->item && cur->item->classname)
			name = cur->item->classname;
		else
			name = cur->classname;
		
		currating = 1;
		showname = NULL;

		if (!strcmp(name, "flag"))
		{
			if ((redflag && (cur == redflag) && (person == redflag->owner)) ||
				(blueflag && (cur == blueflag) && (person == blueflag->owner)))
				continue;
			showname = "Flag";
			currating *= 10;
		}
		else if ((!strcmp(name, "info_flag_red") ||
				 !strcmp(name, "info_flag_blue")) && positionvalid) 
		{
			showname = "Base";
			currating *= 12;
		}
		else if (!strcmp(name, "info_position") && positionvalid)
		{
			// Skip this if spawnflags is 1, and it is not visible.
			if (!visibility_test(person,cur) && (cur->spawnflags & 1))
				continue;
			showname = cur->message;
			currating *= 1000;
			if (cur->spawnflags & 2)
				noprefix = true;
		}

		else if (!strcmp(name, "item_quad") ||
			!strcmp(name, "item_invulnerability") )
		{
			currating *= 8;
		}
		else if (!strcmp(name, "item_health_mega") )
		{
			showname = "Mega Health";
			currating *= 7;
		}
		else if (!strcmp(name, "weapon_bfg") ||
			!strcmp(name, "weapon_railgun") ||
			!strcmp(name, "weapon_rocketlauncher") ||
			!strcmp(name, "weapon_hyperblaster") )
		{
			currating *= 6;
		}
		else if (!strcmp(name, "weapon_chaingun") ||
			!strcmp(name, "weapon_grenadelauncher") )
		{
			currating *= 5;
		}
		else if (!strcmp(name, "weapon_machinegun") ||
			!strcmp(name, "weapon_supershotgun") ||
			!strcmp(name, "weapon_shotgun") )
		{
			currating *= 4;
		}
		else if (!strcmp(name, "item_power_screen") ||
			!strcmp(name, "item_power_shield") )
		{
			currating *= 5;
		}
		else if (!strcmp(name, "item_armor_body") ||
			!strcmp(name, "item_armor_combat") ||
			!strcmp(name, "item_armor_jacket") )
		{
			currating *= 4;
		}
		else if (!strcmp(name, "item_silencer") ||
			!strcmp(name, "item_breather") ||
			!strcmp(name, "item_enviro") ||
			!strcmp(name, "item_adrenaline") ||
			!strcmp(name, "item_bandolier") ||
			!strcmp(name, "item_pack") )
		{
			currating *= 3;
		}
		else if (!cur->item)
			continue;
		else
			currating *= 1;
		//ok, we now have a preliminary rating based on the type of object.
		//now lets decide a bit based on the distance to the ob
	
		VectorSubtract(person->s.origin, cur->s.origin, distvector);
		curdist = VectorLength(distvector);
	
		if (curdist < 64)
			curdist = 64; 
		//don't count distances less than a playerwidth away
		//as being significantly different
	
		currating *= (12000/curdist); //score increases for small distances
	
		//and lets adjust the rating further by whether or not we 
		//have line of sight to the object in question.

		// Don't tell us about powerup if they are not in sight
		if ( !visibility_test(person,cur) && lineofsight)
			continue;
	
		if (currating > favrating) //new winner
		{
			fav = cur;
			favrating = currating;
			favname = showname;  // MJD If you fail this test,
			                     // favname may stay uninitilized!
		}
	}
	
	//test distances to the flags
	if (fav == NULL)
		strcpy(temp, "");
	else if (noprefix)
	{
		if (favname != NULL) // MJD Because of this line, favname should
		             // be null, I think... (surt agrees ... initialized above now)
		{
			strcat(temp, favname);
		}
		else if (fav->item)
		{
			if (fav->item->pickup_name)
				strcat(temp, fav->item->pickup_name);
			else if (fav->item->classname)
				strcat(temp, fav->item->classname);
		}
		else
			strcat(temp, fav->classname);
	}
	else
	{
		VectorSubtract(fav->s.origin, person->s.origin, distvector);
		if (VectorLength(distvector) < 128)
			strcpy(temp, "at ");
		else
		{
			if (fabsf(distvector[0]) > fabsf(distvector[1]) &&		// 0 Biggest
				fabsf(distvector[0]) > fabsf(distvector[2]))
			{
				if (distvector[0] > 0)
					strcpy(temp, "north of ");
				else
					strcpy(temp, "south of ");
			}
			else if (fabsf(distvector[1]) > fabsf(distvector[2]))	// 1 biggest
			{
				if (distvector[1] > 0)
					strcpy(temp, "west of ");
				else
					strcpy(temp, "east of ");
			}
			else												// 2 biggest
			{
				if (distvector[2] > 0)
					strcpy(temp, "below ");
				else
					strcpy(temp, "above ");
			}

		}
		

		if (!positionvalid)
			strcat(temp, "the ");

		cur = G_Find(NULL, FOFS(classname), "info_flag_red");
		VectorSubtract(fav->s.origin, cur->s.origin, distvector);
		reddist = VectorLength(distvector);
		cur = G_Find(NULL, FOFS(classname), "info_flag_blue");
		VectorSubtract(fav->s.origin, cur->s.origin, distvector);
		bluedist = VectorLength(distvector);
		
		if (!positionvalid)
		{
			if (reddist > 2 * bluedist ) //closer to blue
				strcat(temp, "blue ");
			else if (bluedist > 2 * reddist ) //closer to red
				strcat(temp, "red ");
		}

		if (favname)
		{
			strcat(temp, favname);
		}
		else if (fav->item)
		{
			if (fav->item->pickup_name)
				strcat(temp, fav->item->pickup_name);
			else if (fav->item->classname)
				strcat(temp, fav->item->classname);
		}
		else
			strcat(temp, fav->classname);

	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x2c(%rbp)
movq $0x0, -0x60(%rbp)
movl $0x0, -0x64(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x523c8(%rip), %rsi     # 0x70f80
callq 0x182c0
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x4, %rsi
movss 0x5130f(%rip), %xmm0    # 0x6fee0
callq 0x199e0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x1f162
movq -0x20(%rbp), %rax
cmpq $0x0, 0x330(%rax)
je 0x1ec17
movq -0x20(%rbp), %rax
movq 0x330(%rax), %rax
cmpq $0x0, (%rax)
je 0x1ec17
movq -0x20(%rbp), %rax
movq 0x330(%rax), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x1ec26
movq -0x20(%rbp), %rax
movq 0x138(%rax), %rax
movq %rax, -0x50(%rbp)
movss 0x512be(%rip), %xmm0    # 0x6feec
movss %xmm0, -0x30(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x50(%rbp), %rdi
leaq 0x58ed5(%rip), %rsi     # 0x77b1b
callq 0x18bf0
cmpl $0x0, %eax
jne 0x1ece3
movq 0x63b9d(%rip), %rax     # 0x827f8
cmpq $0x0, (%rax)
je 0x1ec88
movq -0x20(%rbp), %rax
movq 0x63b8c(%rip), %rcx     # 0x827f8
cmpq (%rcx), %rax
jne 0x1ec88
movq -0x8(%rbp), %rax
movq 0x63b7c(%rip), %rcx     # 0x827f8
movq (%rcx), %rcx
cmpq 0x110(%rcx), %rax
je 0x1ecbc
movq 0x63bd1(%rip), %rax     # 0x82860
cmpq $0x0, (%rax)
je 0x1ecc1
movq -0x20(%rbp), %rax
movq 0x63bc0(%rip), %rcx     # 0x82860
cmpq (%rcx), %rax
jne 0x1ecc1
movq -0x8(%rbp), %rax
movq 0x63bb0(%rip), %rcx     # 0x82860
movq (%rcx), %rcx
cmpq 0x110(%rcx), %rax
jne 0x1ecc1
jmp 0x1ebbd
leaq 0x52a07(%rip), %rax     # 0x716cf
movq %rax, -0x58(%rbp)
movss 0x5121c(%rip), %xmm0    # 0x6fef0
mulss -0x30(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
jmp 0x1f096
movq -0x50(%rbp), %rdi
leaq 0x5125a(%rip), %rsi     # 0x6ff48
callq 0x18bf0
cmpl $0x0, %eax
je 0x1ed0d
movq -0x50(%rbp), %rdi
leaq 0x51253(%rip), %rsi     # 0x6ff56
callq 0x18bf0
cmpl $0x0, %eax
jne 0x1ed35
cmpl $0x0, -0x14(%rbp)
je 0x1ed35
leaq 0x5124b(%rip), %rax     # 0x6ff65
movq %rax, -0x58(%rbp)
movss 0x511ce(%rip), %xmm0    # 0x6fef4
mulss -0x30(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
jmp 0x1f094
movq -0x50(%rbp), %rdi
leaq 0x5122a(%rip), %rsi     # 0x6ff6a
callq 0x18bf0
cmpl $0x0, %eax
jne 0x1edb8
cmpl $0x0, -0x14(%rbp)
je 0x1edb8
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x18440
cmpl $0x0, %eax
jne 0x1ed79
movq -0x20(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1ed79
jmp 0x1ebbd
movq -0x20(%rbp), %rax
movq 0x130(%rax), %rax
movq %rax, -0x58(%rbp)
movss 0x51168(%rip), %xmm0    # 0x6fef8
mulss -0x30(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
movq -0x20(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x1edb3
movl $0x1, -0x64(%rbp)
jmp 0x1f092
movq -0x50(%rbp), %rdi
leaq 0x511b5(%rip), %rsi     # 0x6ff78
callq 0x18bf0
cmpl $0x0, %eax
je 0x1ede2
movq -0x50(%rbp), %rdi
leaq 0x511aa(%rip), %rsi     # 0x6ff82
callq 0x18bf0
cmpl $0x0, %eax
jne 0x1edf9
movss 0x51112(%rip), %xmm0    # 0x6fefc
mulss -0x30(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
jmp 0x1f090
movq -0x50(%rbp), %rdi
leaq 0x51193(%rip), %rsi     # 0x6ff97
callq 0x18bf0
cmpl $0x0, %eax
jne 0x1ee30
leaq 0x51193(%rip), %rax     # 0x6ffa8
movq %rax, -0x58(%rbp)
movss 0x510df(%rip), %xmm0    # 0x6ff00
mulss -0x30(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
jmp 0x1f08e
movq -0x50(%rbp), %rdi
leaq 0x51179(%rip), %rsi     # 0x6ffb4
callq 0x18bf0
cmpl $0x0, %eax
je 0x1ee84
movq -0x50(%rbp), %rdi
leaq 0x5116f(%rip), %rsi     # 0x6ffbf
callq 0x18bf0
cmpl $0x0, %eax
je 0x1ee84
movq -0x50(%rbp), %rdi
leaq 0x51169(%rip), %rsi     # 0x6ffce
callq 0x18bf0
cmpl $0x0, %eax
je 0x1ee84
movq -0x50(%rbp), %rdi
leaq 0x5116a(%rip), %rsi     # 0x6ffe4
callq 0x18bf0
cmpl $0x0, %eax
jne 0x1ee9b
movss 0x51078(%rip), %xmm0    # 0x6ff04
mulss -0x30(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
jmp 0x1f08c
movq -0x50(%rbp), %rdi
leaq 0x51152(%rip), %rsi     # 0x6fff8
callq 0x18bf0
cmpl $0x0, %eax
je 0x1eec5
movq -0x50(%rbp), %rdi
leaq 0x5114d(%rip), %rsi     # 0x70008
callq 0x18bf0
cmpl $0x0, %eax
jne 0x1eedc
movss 0x5103b(%rip), %xmm0    # 0x6ff08
mulss -0x30(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
jmp 0x1f08a
movq -0x50(%rbp), %rdi
leaq 0x51138(%rip), %rsi     # 0x7001f
callq 0x18bf0
cmpl $0x0, %eax
je 0x1ef1b
movq -0x50(%rbp), %rdi
leaq 0x51135(%rip), %rsi     # 0x70031
callq 0x18bf0
cmpl $0x0, %eax
je 0x1ef1b
movq -0x50(%rbp), %rdi
leaq 0x51134(%rip), %rsi     # 0x70045
callq 0x18bf0
cmpl $0x0, %eax
jne 0x1ef32
movss 0x50fe9(%rip), %xmm0    # 0x6ff0c
mulss -0x30(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
jmp 0x1f088
movq -0x50(%rbp), %rdi
leaq 0x51117(%rip), %rsi     # 0x70054
callq 0x18bf0
cmpl $0x0, %eax
je 0x1ef5c
movq -0x50(%rbp), %rdi
leaq 0x51114(%rip), %rsi     # 0x70066
callq 0x18bf0
cmpl $0x0, %eax
jne 0x1ef73
movss 0x50fa4(%rip), %xmm0    # 0x6ff08
mulss -0x30(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
jmp 0x1f086
movq -0x50(%rbp), %rdi
leaq 0x510fa(%rip), %rsi     # 0x70078
callq 0x18bf0
cmpl $0x0, %eax
je 0x1efb2
movq -0x50(%rbp), %rdi
leaq 0x510f5(%rip), %rsi     # 0x70088
callq 0x18bf0
cmpl $0x0, %eax
je 0x1efb2
movq -0x50(%rbp), %rdi
leaq 0x510f2(%rip), %rsi     # 0x7009a
callq 0x18bf0
cmpl $0x0, %eax
jne 0x1efc9
movss 0x50f52(%rip), %xmm0    # 0x6ff0c
mulss -0x30(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
jmp 0x1f084
movq -0x50(%rbp), %rdi
leaq 0x510d8(%rip), %rsi     # 0x700ac
callq 0x18bf0
cmpl $0x0, %eax
je 0x1f047
movq -0x50(%rbp), %rdi
leaq 0x510d1(%rip), %rsi     # 0x700ba
callq 0x18bf0
cmpl $0x0, %eax
je 0x1f047
movq -0x50(%rbp), %rdi
leaq 0x510ca(%rip), %rsi     # 0x700c8
callq 0x18bf0
cmpl $0x0, %eax
je 0x1f047
movq -0x50(%rbp), %rdi
leaq 0x510c1(%rip), %rsi     # 0x700d4
callq 0x18bf0
cmpl $0x0, %eax
je 0x1f047
movq -0x50(%rbp), %rdi
leaq 0x510bc(%rip), %rsi     # 0x700e4
callq 0x18bf0
cmpl $0x0, %eax
je 0x1f047
movq -0x50(%rbp), %rdi
leaq 0x510b6(%rip), %rsi     # 0x700f3
callq 0x18bf0
cmpl $0x0, %eax
jne 0x1f05b
movss 0x50ec1(%rip), %xmm0    # 0x6ff10
mulss -0x30(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
jmp 0x1f082
movq -0x20(%rbp), %rax
cmpq $0x0, 0x330(%rax)
jne 0x1f06e
jmp 0x1ebbd
movss 0x50e76(%rip), %xmm0    # 0x6feec
mulss -0x30(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
jmp 0x1f082
jmp 0x1f084
jmp 0x1f086
jmp 0x1f088
jmp 0x1f08a
jmp 0x1f08c
jmp 0x1f08e
jmp 0x1f090
jmp 0x1f092
jmp 0x1f094
jmp 0x1f096
movq -0x8(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x20(%rbp), %rax
subss 0x4(%rax), %xmm0
movss %xmm0, -0x3c(%rbp)
movq -0x8(%rbp), %rax
movss 0x8(%rax), %xmm0
movq -0x20(%rbp), %rax
subss 0x8(%rax), %xmm0
movss %xmm0, -0x38(%rbp)
movq -0x8(%rbp), %rax
movss 0xc(%rax), %xmm0
movq -0x20(%rbp), %rax
subss 0xc(%rax), %xmm0
movss %xmm0, -0x34(%rbp)
leaq -0x3c(%rbp), %rdi
callq 0x194e0
movss %xmm0, -0x40(%rbp)
movss 0x50e23(%rip), %xmm0    # 0x6ff14
ucomiss -0x40(%rbp), %xmm0
jbe 0x1f104
movss 0x50e15(%rip), %xmm0    # 0x6ff14
movss %xmm0, -0x40(%rbp)
movss 0x50e0c(%rip), %xmm0    # 0x6ff18
divss -0x40(%rbp), %xmm0
mulss -0x30(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x18440
cmpl $0x0, %eax
jne 0x1f138
cmpl $0x0, -0x18(%rbp)
je 0x1f138
jmp 0x1ebbd
movss -0x30(%rbp), %xmm0
ucomiss -0x2c(%rbp), %xmm0
jbe 0x1f15d
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movss -0x30(%rbp), %xmm0
movss %xmm0, -0x2c(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x1ebbd
cmpq $0x0, -0x28(%rbp)
jne 0x1f17e
movq -0x10(%rbp), %rdi
leaq 0x51e0c(%rip), %rsi     # 0x70f80
callq 0x182c0
jmp 0x1f585
cmpl $0x0, -0x64(%rbp)
je 0x1f21f
cmpq $0x0, -0x60(%rbp)
je 0x1f19e
movq -0x10(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x19880
jmp 0x1f21a
movq -0x28(%rbp), %rax
cmpq $0x0, 0x330(%rax)
je 0x1f204
movq -0x28(%rbp), %rax
movq 0x330(%rax), %rax
cmpq $0x0, 0x50(%rax)
je 0x1f1d8
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x330(%rax), %rax
movq 0x50(%rax), %rsi
callq 0x19880
jmp 0x1f202
movq -0x28(%rbp), %rax
movq 0x330(%rax), %rax
cmpq $0x0, (%rax)
je 0x1f200
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x330(%rax), %rax
movq (%rax), %rsi
callq 0x19880
jmp 0x1f202
jmp 0x1f218
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x138(%rax), %rsi
callq 0x19880
jmp 0x1f21a
jmp 0x1f583
movq -0x28(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x8(%rbp), %rax
subss 0x4(%rax), %xmm0
movss %xmm0, -0x3c(%rbp)
movq -0x28(%rbp), %rax
movss 0x8(%rax), %xmm0
movq -0x8(%rbp), %rax
subss 0x8(%rax), %xmm0
movss %xmm0, -0x38(%rbp)
movq -0x28(%rbp), %rax
movss 0xc(%rax), %xmm0
movq -0x8(%rbp), %rax
subss 0xc(%rax), %xmm0
movss %xmm0, -0x34(%rbp)
leaq -0x3c(%rbp), %rdi
callq 0x194e0
movaps %xmm0, %xmm1
movss 0x50c6c(%rip), %xmm0    # 0x6fee4
ucomiss %xmm1, %xmm0
jbe 0x1f292
movq -0x10(%rbp), %rdi
leaq 0x50fef(%rip), %rsi     # 0x70277
callq 0x182c0
jmp 0x1f39b
movss -0x3c(%rbp), %xmm0
movaps 0x50c92(%rip), %xmm1    # 0x6ff30
pand %xmm1, %xmm0
movss -0x38(%rbp), %xmm1
movaps 0x50c82(%rip), %xmm2    # 0x6ff30
pand %xmm2, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x1f310
movss -0x3c(%rbp), %xmm0
movaps 0x50c6d(%rip), %xmm1    # 0x6ff30
pand %xmm1, %xmm0
movss -0x34(%rbp), %xmm1
movaps 0x50c5d(%rip), %xmm2    # 0x6ff30
pand %xmm2, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x1f310
movss -0x3c(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x1f2fb
movq -0x10(%rbp), %rdi
leaq 0x50e09(%rip), %rsi     # 0x700fd
callq 0x182c0
jmp 0x1f30b
movq -0x10(%rbp), %rdi
leaq 0x50e01(%rip), %rsi     # 0x70107
callq 0x182c0
jmp 0x1f399
movss -0x38(%rbp), %xmm0
movaps 0x50c14(%rip), %xmm1    # 0x6ff30
pand %xmm1, %xmm0
movss -0x34(%rbp), %xmm1
movaps 0x50c04(%rip), %xmm2    # 0x6ff30
pand %xmm2, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x1f366
movss -0x38(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x1f354
movq -0x10(%rbp), %rdi
leaq 0x50dc4(%rip), %rsi     # 0x70111
callq 0x182c0
jmp 0x1f364
movq -0x10(%rbp), %rdi
leaq 0x50dbb(%rip), %rsi     # 0x7011a
callq 0x182c0
jmp 0x1f397
movss -0x34(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x1f385
movq -0x10(%rbp), %rdi
leaq 0x50da5(%rip), %rsi     # 0x70123
callq 0x182c0
jmp 0x1f395
movq -0x10(%rbp), %rdi
leaq 0x50d9a(%rip), %rsi     # 0x7012a
callq 0x182c0
jmp 0x1f397
jmp 0x1f399
jmp 0x1f39b
cmpl $0x0, -0x14(%rbp)
jne 0x1f3b1
movq -0x10(%rbp), %rdi
leaq 0x50d85(%rip), %rsi     # 0x70131
callq 0x19880
xorl %eax, %eax
movl %eax, %edi
movq %rdi, %rax
addq $0x138, %rax            # imm = 0x138
movl %eax, %esi
leaq 0x50b81(%rip), %rdx     # 0x6ff48
callq 0x19660
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x20(%rbp), %rax
subss 0x4(%rax), %xmm0
movss %xmm0, -0x3c(%rbp)
movq -0x28(%rbp), %rax
movss 0x8(%rax), %xmm0
movq -0x20(%rbp), %rax
subss 0x8(%rax), %xmm0
movss %xmm0, -0x38(%rbp)
movq -0x28(%rbp), %rax
movss 0xc(%rax), %xmm0
movq -0x20(%rbp), %rax
subss 0xc(%rax), %xmm0
movss %xmm0, -0x34(%rbp)
leaq -0x3c(%rbp), %rdi
callq 0x194e0
movss %xmm0, -0x44(%rbp)
xorl %eax, %eax
movl %eax, %edi
movq %rdi, %rax
addq $0x138, %rax            # imm = 0x138
movl %eax, %esi
leaq 0x50b1d(%rip), %rdx     # 0x6ff56
callq 0x19660
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x20(%rbp), %rax
subss 0x4(%rax), %xmm0
movss %xmm0, -0x3c(%rbp)
movq -0x28(%rbp), %rax
movss 0x8(%rax), %xmm0
movq -0x20(%rbp), %rax
subss 0x8(%rax), %xmm0
movss %xmm0, -0x38(%rbp)
movq -0x28(%rbp), %rax
movss 0xc(%rax), %xmm0
movq -0x20(%rbp), %rax
subss 0xc(%rax), %xmm0
movss %xmm0, -0x34(%rbp)
leaq -0x3c(%rbp), %rdi
callq 0x194e0
movss %xmm0, -0x48(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x1f4ef
movss -0x44(%rbp), %xmm0
movss 0x50a40(%rip), %xmm1    # 0x6fee8
mulss -0x48(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x1f4c4
movq -0x10(%rbp), %rdi
leaq 0x50c79(%rip), %rsi     # 0x70136
callq 0x19880
jmp 0x1f4ed
movss -0x48(%rbp), %xmm0
movss 0x50a17(%rip), %xmm1    # 0x6fee8
mulss -0x44(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x1f4eb
movq -0x10(%rbp), %rdi
leaq 0x50c56(%rip), %rsi     # 0x7013c
callq 0x19880
jmp 0x1f4ed
jmp 0x1f4ef
cmpq $0x0, -0x60(%rbp)
je 0x1f505
movq -0x10(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x19880
jmp 0x1f581
movq -0x28(%rbp), %rax
cmpq $0x0, 0x330(%rax)
je 0x1f56b
movq -0x28(%rbp), %rax
movq 0x330(%rax), %rax
cmpq $0x0, 0x50(%rax)
je 0x1f53f
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x330(%rax), %rax
movq 0x50(%rax), %rsi
callq 0x19880
jmp 0x1f569
movq -0x28(%rbp), %rax
movq 0x330(%rax), %rax
cmpq $0x0, (%rax)
je 0x1f567
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x330(%rax), %rax
movq (%rax), %rsi
callq 0x19880
jmp 0x1f569
jmp 0x1f57f
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x138(%rax), %rsi
callq 0x19880
jmp 0x1f581
jmp 0x1f583
jmp 0x1f585
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)