// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_target.c
// Function: use_target_changelevel
void use_target_changelevel (edict_t *self, edict_t *other, edict_t *activator)
{
	char message[MAX_INFO_STRING];

	if (level.intermissiontime)
		return;		// already activated

	if (!deathmatch->value && !coop->value)
	{
		if (g_edicts[1].health <= 0)
			return;
	}

	// if noexit, do a ton of damage to other
	if (deathmatch->value && !( (int)dmflags->value & DF_ALLOW_EXIT) && other != world)
	{
		T_Damage (other, self, self, vec3_origin, other->s.origin, vec3_origin, 10 * other->max_health, 1000, 0, MOD_EXIT);
		return;
	}

	// if multiplayer, let everyone know who hit the exit
	if (deathmatch->value)
	{
		if (activator && activator->client)
		{
			sprintf(message, "%s exited the level.\n", activator->client->pers.netname);
			ctf_BSafePrint(PRINT_HIGH, message);
		}
	}

	// if going to a new unit, clear cross triggers
	if (strstr(self->map, "*"))	
		game.serverflags &= ~(SFL_CROSS_TRIGGER_MASK);

	BeginIntermission (self);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq 0x35a92(%rip), %rax     # 0x82da0
movss 0xc8(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x4d322
jp 0x4d322
jmp 0x4d327
jmp 0x4d4bb
movq 0x35b92(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x4d373
jp 0x4d373
movq 0x35c19(%rip), %rax     # 0x82f60
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x4d373
jp 0x4d373
movq 0x351f8(%rip), %rax     # 0x82558
movq (%rax), %rax
cmpl $0x0, 0x6fc(%rax)
jg 0x4d371
jmp 0x4d4bb
jmp 0x4d373
movq 0x35b46(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x4d38e
jp 0x4d38e
jmp 0x4d40a
movq 0x35283(%rip), %rax     # 0x82618
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
jne 0x4d40a
movq -0x10(%rbp), %rax
movq 0x351a6(%rip), %rcx     # 0x82558
movq (%rcx), %rcx
cmpq %rcx, %rax
je 0x4d40a
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x8(%rbp), %rdx
movq -0x10(%rbp), %r8
addq $0x4, %r8
movq -0x10(%rbp), %rax
imull $0xa, 0x258(%rax), %eax
movq 0x35388(%rip), %r9      # 0x82768
xorl %ecx, %ecx
movq %r9, %rcx
movl %eax, (%rsp)
movl $0x3e8, 0x8(%rsp)       # imm = 0x3E8
movl $0x0, 0x10(%rsp)
movl $0x1c, 0x18(%rsp)
callq 0x192c0
jmp 0x4d4bb
movq 0x35aaf(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x4d425
jp 0x4d425
jmp 0x4d475
cmpq $0x0, -0x18(%rbp)
je 0x4d473
movq -0x18(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x4d473
leaq -0x220(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rdx
addq $0xc0, %rdx
addq $0x200, %rdx            # imm = 0x200
leaq 0x28a53(%rip), %rsi     # 0x75eae
movb $0x0, %al
callq 0x19940
leaq -0x220(%rbp), %rsi
movl $0x2, %edi
callq 0x19470
jmp 0x4d475
movq -0x8(%rbp), %rax
movq 0x270(%rax), %rdi
leaq 0x2a026(%rip), %rsi     # 0x774ad
callq 0x19bf0
cmpq $0x0, %rax
je 0x4d4b2
movq 0x358a7(%rip), %rax     # 0x82d40
movl 0x618(%rax), %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
movq 0x35894(%rip), %rax     # 0x82d40
movl %ecx, 0x618(%rax)
movq -0x8(%rbp), %rdi
callq 0x18fd0
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
nopw %cs:(%rax,%rax)