// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_misc.c
// Function: func_clock_think
void func_clock_think (edict_t *self)
{
	if (!self->enemy)
	{
		self->enemy = G_Find (NULL, FOFS(targetname), self->target);
		if (!self->enemy)
			return;
	}

	if (self->spawnflags & 1)
	{
		func_clock_format_countdown (self);
		self->health++;
	}
	else if (self->spawnflags & 2)
	{
		func_clock_format_countdown (self);
		self->health--;
	}
	else
	{
		struct tm	*ltime;
		time_t		gmtime;

		time(&gmtime);
		ltime = localtime(&gmtime);
		Com_sprintf (self->message, CLOCK_MESSAGE_SIZE, "%2i:%2i:%2i", ltime->tm_hour, ltime->tm_min, ltime->tm_sec);
		if (self->message[3] == ' ')
			self->message[3] = '0';
		if (self->message[6] == ' ')
			self->message[6] = '0';
	}

	self->enemy->message = self->message;
	self->enemy->use (self->enemy, self, self);

	if (((self->spawnflags & 1) && (self->health > self->wait)) ||
		((self->spawnflags & 2) && (self->health < self->wait)))
	{
		if (self->pathtarget)
		{
			char *savetarget;
			char *savemessage;

			savetarget = self->target;
			savemessage = self->message;
			self->target = self->pathtarget;
			self->message = NULL;
			G_UseTargets (self, self->activator);
			self->target = savetarget;
			self->message = savemessage;
		}

		if (!(self->spawnflags & 8))
			return;

		func_clock_reset (self);

		if (self->spawnflags & 4)
			return;
	}

	self->nextthink = level.time + 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2a0(%rax)
jne 0x44efc
movq -0x8(%rbp), %rax
movq 0x150(%rax), %rdx
xorl %eax, %eax
movl %eax, %edi
movq %rdi, %rax
addq $0x158, %rax            # imm = 0x158
movl %eax, %esi
callq 0x19660
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2a0(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2a0(%rax)
jne 0x44efa
jmp 0x45172
jmp 0x44efc
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x44f2f
movq -0x8(%rbp), %rdi
callq 0x45180
movq -0x8(%rbp), %rax
movl 0x254(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x254(%rax)
jmp 0x44ff6
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x44f62
movq -0x8(%rbp), %rdi
callq 0x45180
movq -0x8(%rbp), %rax
movl 0x254(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x254(%rax)
jmp 0x44ff4
leaq -0x18(%rbp), %rdi
callq 0x18f70
leaq -0x18(%rbp), %rdi
callq 0x181a0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %r8d
movq -0x10(%rbp), %rax
movl (%rax), %r9d
movl $0x10, %esi
leaq 0x2f689(%rip), %rdx     # 0x7462e
movb $0x0, %al
callq 0x18f90
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movsbl 0x3(%rax), %eax
cmpl $0x20, %eax
jne 0x44fcf
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movb $0x30, 0x3(%rax)
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movsbl 0x6(%rax), %eax
cmpl $0x20, %eax
jne 0x44ff2
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movb $0x30, 0x6(%rax)
jmp 0x44ff4
jmp 0x44ff6
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x2a0(%rax), %rax
movq %rcx, 0x130(%rax)
movq -0x8(%rbp), %rax
movq 0x2a0(%rax), %rax
movq 0x228(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x2a0(%rcx), %rdi
movq -0x8(%rbp), %rsi
movq -0x8(%rbp), %rdx
callq *%rax
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x45065
movq -0x8(%rbp), %rax
cvtsi2ssl 0x254(%rax), %xmm0
movq -0x8(%rbp), %rax
ucomiss 0x2f8(%rax), %xmm0
ja 0x4509c
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x45152
movq -0x8(%rbp), %rax
cvtsi2ssl 0x254(%rax), %xmm1
movq -0x8(%rbp), %rax
movss 0x2f8(%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x45152
movq -0x8(%rbp), %rax
cmpq $0x0, 0x170(%rax)
je 0x4511f
movq -0x8(%rbp), %rax
movq 0x150(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x170(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x150(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x130(%rax)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x2b0(%rax), %rsi
callq 0x19b50
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x150(%rax)
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x130(%rax)
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x45133
jmp 0x45172
movq -0x8(%rbp), %rdi
callq 0x45320
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x45150
jmp 0x45172
jmp 0x45152
movss 0x2ad92(%rip), %xmm0    # 0x6feec
movq 0x3dc3f(%rip), %rax     # 0x82da0
addss 0x4(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x200(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)