// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: SP_func_rotating
void SP_func_rotating (edict_t *ent)
{
	ent->solid = SOLID_BSP;
	if (ent->spawnflags & 32)
		ent->movetype = MOVETYPE_STOP;
	else
		ent->movetype = MOVETYPE_PUSH;

	// set the axis of rotation
	VectorClear(ent->movedir);
	if (ent->spawnflags & 4)
		ent->movedir[2] = 1.0;
	else if (ent->spawnflags & 8)
		ent->movedir[0] = 1.0;
	else // Z_AXIS
		ent->movedir[1] = 1.0;

	// check for reverse rotation
	if (ent->spawnflags & 2)
		VectorNegate (ent->movedir, ent->movedir);

	if (!ent->speed)
		ent->speed = 100;
	if (!ent->dmg)
		ent->dmg = 2;

//	ent->moveinfo.sound_middle = "doors/hydro1.wav";

	ent->use = rotating_use;
	if (ent->dmg)
		ent->blocked = rotating_blocked;

	if (ent->spawnflags & 1)
		ent->use (ent, NULL, NULL);

	if (ent->spawnflags & 64)
		ent->s.effects |= EF_ANIM_ALL;
	if (ent->spawnflags & 128)
		ent->s.effects |= EF_ANIM_ALLFAST;

	gi.setmodel (ent, ent->model);
	gi.linkentity (ent);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x3, 0x108(%rax)
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x3500c
movq -0x8(%rbp), %rax
movl $0x3, 0x118(%rax)
jmp 0x3501a
movq -0x8(%rbp), %rax
movl $0x2, 0x118(%rax)
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x1a4(%rax)
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x1a0(%rax)
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x19c(%rax)
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x3506f
movq -0x8(%rbp), %rax
movss 0x3ae87(%rip), %xmm0    # 0x6feec
movss %xmm0, 0x1a4(%rax)
jmp 0x350ad
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x35097
movq -0x8(%rbp), %rax
movss 0x3ae5f(%rip), %xmm0    # 0x6feec
movss %xmm0, 0x19c(%rax)
jmp 0x350ab
movq -0x8(%rbp), %rax
movss 0x3ae49(%rip), %xmm0    # 0x6feec
movss %xmm0, 0x1a0(%rax)
jmp 0x350ad
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x3512e
movq -0x8(%rbp), %rax
movss 0x19c(%rax), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x19c(%rax)
movq -0x8(%rbp), %rax
movss 0x1a0(%rax), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x1a0(%rax)
movq -0x8(%rbp), %rax
movss 0x1a4(%rax), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x1a4(%rax)
movq -0x8(%rbp), %rax
movss 0x190(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x35158
jp 0x35158
movq -0x8(%rbp), %rax
movss 0x3da30(%rip), %xmm0    # 0x72b80
movss %xmm0, 0x190(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x280(%rax)
jne 0x35173
movq -0x8(%rbp), %rax
movl $0x2, 0x280(%rax)
movq -0x8(%rbp), %rax
movq 0x4d2d2(%rip), %rcx     # 0x82450
movq %rcx, 0x228(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x280(%rax)
je 0x351a4
movq -0x8(%rbp), %rax
movq 0x4d3cb(%rip), %rcx     # 0x82568
movq %rcx, 0x218(%rax)
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x351ce
movq -0x8(%rbp), %rax
movq 0x228(%rax), %rax
movq -0x8(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %edx
movq %rdx, %rsi
callq *%rax
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x351f0
movq -0x8(%rbp), %rax
movl 0x40(%rax), %ecx
orl $0x1000, %ecx           # imm = 0x1000
movl %ecx, 0x40(%rax)
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x35214
movq -0x8(%rbp), %rax
movl 0x40(%rax), %ecx
orl $0x2000, %ecx           # imm = 0x2000
movl %ecx, 0x40(%rax)
movq 0x4d3e5(%rip), %rax     # 0x82600
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq 0x120(%rcx), %rsi
callq *%rax
movq 0x4d3c9(%rip), %rax     # 0x82600
movq 0x90(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)