// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_combat.c
// Function: CanDamage
qboolean CanDamage (edict_t *targ, edict_t *inflictor)
{
	vec3_t	dest;
	trace_t	trace;

// bmodels need special checking because their origin is 0,0,0
	if (targ->movetype == MOVETYPE_PUSH)
	{
		VectorAdd (targ->absmin, targ->absmax, dest);
		VectorScale (dest, 0.5, dest);
		trace = gi.trace (inflictor->s.origin, vec3_origin, vec3_origin, dest, inflictor, MASK_SOLID);
		if (trace.fraction == 1.0)
			return true;
		if (trace.ent == targ)
			return true;
		return false;
	}
	
	trace = gi.trace (inflictor->s.origin, vec3_origin, vec3_origin, targ->s.origin, inflictor, MASK_SOLID);
	if (trace.fraction == 1.0)
		return true;

	VectorCopy (targ->s.origin, dest);
	dest[0] += 15.0;
	dest[1] += 15.0;
	trace = gi.trace (inflictor->s.origin, vec3_origin, vec3_origin, dest, inflictor, MASK_SOLID);
	if (trace.fraction == 1.0)
		return true;

	VectorCopy (targ->s.origin, dest);
	dest[0] += 15.0;
	dest[1] -= 15.0;
	trace = gi.trace (inflictor->s.origin, vec3_origin, vec3_origin, dest, inflictor, MASK_SOLID);
	if (trace.fraction == 1.0)
		return true;

	VectorCopy (targ->s.origin, dest);
	dest[0] -= 15.0;
	dest[1] += 15.0;
	trace = gi.trace (inflictor->s.origin, vec3_origin, vec3_origin, dest, inflictor, MASK_SOLID);
	if (trace.fraction == 1.0)
		return true;

	VectorCopy (targ->s.origin, dest);
	dest[0] -= 15.0;
	dest[1] -= 15.0;
	trace = gi.trace (inflictor->s.origin, vec3_origin, vec3_origin, dest, inflictor, MASK_SOLID);
	if (trace.fraction == 1.0)
		return true;


	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x2, 0x118(%rdi)
jne 0x28e06
movsd 0xe4(%r14), %xmm0
movsd 0xf0(%r14), %xmm1
addps %xmm0, %xmm1
leaq 0x10(%rsp), %r15
movlps %xmm1, (%r15)
movss 0xec(%r14), %xmm0
addss 0xf8(%r14), %xmm0
movss %xmm0, 0x8(%r15)
movss 0x27659(%rip), %xmm0    # 0x50400
movq %r15, %rdi
movq %r15, %rsi
callq 0x18a70
movq 0x3d847(%rip), %rax     # 0x66600
leaq 0x4(%rbx), %rsi
movl $0x3, (%rsp)
movq 0x3d99d(%rip), %rcx     # 0x66768
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %rcx, %rdx
movq %r15, %r8
movq %rbx, %r9
callq *0x60(%rax)
movss 0x8(%r12), %xmm0
movb $0x1, %bpl
ucomiss 0x26138(%rip), %xmm0    # 0x4ef28
jne 0x28df8
jnp 0x28fb9
cmpq %r14, 0x60(%rsp)
sete %bpl
jmp 0x28fb9
movq 0x3d7f3(%rip), %r13     # 0x66600
leaq 0x4(%rbx), %r15
leaq 0x4(%r14), %r8
movl $0x3, (%rsp)
movq 0x3d945(%rip), %rcx     # 0x66768
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %rcx, %rdx
movq %rbx, %r9
callq *0x60(%r13)
movss 0x8(%r12), %xmm0
movb $0x1, %bpl
ucomiss 0x260df(%rip), %xmm0    # 0x4ef28
jne 0x28e51
jnp 0x28fb9
movss 0xc(%r14), %xmm0
leaq 0x10(%rsp), %r8
movss %xmm0, 0x8(%r8)
movsd 0x4(%r14), %xmm0
addps 0x26491(%rip), %xmm0    # 0x4f300
movlps %xmm0, (%r8)
movl $0x3, (%rsp)
movq 0x3d8e7(%rip), %rcx     # 0x66768
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %rcx, %rdx
movq %rbx, %r9
callq *0x60(%r13)
movss 0x8(%r12), %xmm0
ucomiss 0x26084(%rip), %xmm0    # 0x4ef28
jne 0x28eac
jnp 0x28fb9
movss 0xc(%r14), %xmm0
leaq 0x10(%rsp), %r8
movss %xmm0, 0x8(%r8)
movsd 0x4(%r14), %xmm0
addps 0x28cc6(%rip), %xmm0    # 0x51b90
movlps %xmm0, (%r8)
movl $0x3, (%rsp)
movq 0x3d88c(%rip), %rcx     # 0x66768
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %rcx, %rdx
movq %rbx, %r9
callq *0x60(%r13)
movss 0x8(%r12), %xmm0
ucomiss 0x26029(%rip), %xmm0    # 0x4ef28
jne 0x28f07
jnp 0x28fb9
movss 0xc(%r14), %xmm0
leaq 0x10(%rsp), %r8
movss %xmm0, 0x8(%r8)
movsd 0x4(%r14), %xmm0
addps 0x28c7b(%rip), %xmm0    # 0x51ba0
movlps %xmm0, (%r8)
movl $0x3, (%rsp)
movq 0x3d831(%rip), %rcx     # 0x66768
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %rcx, %rdx
movq %rbx, %r9
callq *0x60(%r13)
movss 0x8(%r12), %xmm0
ucomiss 0x25fce(%rip), %xmm0    # 0x4ef28
jne 0x28f5e
jnp 0x28fb9
movss 0xc(%r14), %xmm0
leaq 0x10(%rsp), %r8
movss %xmm0, 0x8(%r8)
movsd 0x4(%r14), %xmm0
addps 0x28c34(%rip), %xmm0    # 0x51bb0
movlps %xmm0, (%r8)
movl $0x3, (%rsp)
movq 0x3d7da(%rip), %rcx     # 0x66768
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %rcx, %rdx
movq %rbx, %r9
callq *0x60(%r13)
movss 0x25f7d(%rip), %xmm0    # 0x4ef28
cmpeqss 0x8(%r14), %xmm0
movd %xmm0, %ebp
andl $0x1, %ebp
movzbl %bpl, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq