// File: /workspace/github_c_makefile_star2_O3/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 0x2b272
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 0x291ed(%rip), %xmm0    # 0x54400
movq %r15, %rdi
movq %r15, %rsi
callq 0x189d0
movq 0x3d3db(%rip), %rax     # 0x68600
leaq 0x4(%rbx), %rsi
movl $0x3, (%rsp)
movq 0x3d531(%rip), %rcx     # 0x68768
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 0x27ccc(%rip), %xmm0    # 0x52f28
jne 0x2b264
jnp 0x2b425
cmpq %r14, 0x60(%rsp)
sete %bpl
jmp 0x2b425
movq 0x3d387(%rip), %r13     # 0x68600
leaq 0x4(%rbx), %r15
leaq 0x4(%r14), %r8
movl $0x3, (%rsp)
movq 0x3d4d9(%rip), %rcx     # 0x68768
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 0x27c73(%rip), %xmm0    # 0x52f28
jne 0x2b2bd
jnp 0x2b425
movss 0xc(%r14), %xmm0
leaq 0x10(%rsp), %r8
movss %xmm0, 0x8(%r8)
movsd 0x4(%r14), %xmm0
addps 0x28025(%rip), %xmm0    # 0x53300
movlps %xmm0, (%r8)
movl $0x3, (%rsp)
movq 0x3d47b(%rip), %rcx     # 0x68768
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %rcx, %rdx
movq %rbx, %r9
callq *0x60(%r13)
movss 0x8(%r12), %xmm0
ucomiss 0x27c18(%rip), %xmm0    # 0x52f28
jne 0x2b318
jnp 0x2b425
movss 0xc(%r14), %xmm0
leaq 0x10(%rsp), %r8
movss %xmm0, 0x8(%r8)
movsd 0x4(%r14), %xmm0
addps 0x2a87a(%rip), %xmm0    # 0x55bb0
movlps %xmm0, (%r8)
movl $0x3, (%rsp)
movq 0x3d420(%rip), %rcx     # 0x68768
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %rcx, %rdx
movq %rbx, %r9
callq *0x60(%r13)
movss 0x8(%r12), %xmm0
ucomiss 0x27bbd(%rip), %xmm0    # 0x52f28
jne 0x2b373
jnp 0x2b425
movss 0xc(%r14), %xmm0
leaq 0x10(%rsp), %r8
movss %xmm0, 0x8(%r8)
movsd 0x4(%r14), %xmm0
addps 0x2a82f(%rip), %xmm0    # 0x55bc0
movlps %xmm0, (%r8)
movl $0x3, (%rsp)
movq 0x3d3c5(%rip), %rcx     # 0x68768
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %rcx, %rdx
movq %rbx, %r9
callq *0x60(%r13)
movss 0x8(%r12), %xmm0
ucomiss 0x27b62(%rip), %xmm0    # 0x52f28
jne 0x2b3ca
jnp 0x2b425
movss 0xc(%r14), %xmm0
leaq 0x10(%rsp), %r8
movss %xmm0, 0x8(%r8)
movsd 0x4(%r14), %xmm0
addps 0x2a7e8(%rip), %xmm0    # 0x55bd0
movlps %xmm0, (%r8)
movl $0x3, (%rsp)
movq 0x3d36e(%rip), %rcx     # 0x68768
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %rcx, %rdx
movq %rbx, %r9
callq *0x60(%r13)
movss 0x27b11(%rip), %xmm0    # 0x52f28
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