#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ stopMoving();
int /*<<< orphan*/ turnLeft();
int /*<<< orphan*/ turnRight();
void turnTo(double angleToSignal) {
  if ((angleToSignal > 90) && (angleToSignal < 180)) {
    turnRight();
    stopMoving();
  } else if (((angleToSignal < 90) && (angleToSignal > 0)) ||
             (angleToSignal > 180)) {
    turnLeft();
    stopMoving();
  }
}


x86 assembly (clang, -O0):
<turnTo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeb6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    117a <turnTo+0x4a>
movsd  0xeac(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    117a <turnTo+0x4a>
mov    $0x0,%al
call   1030 <turnRight@plt>
mov    $0x0,%al
call   1050 <stopMoving@plt>
jmp    11c9 <turnTo+0x99>
movsd  0xe7e(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    119f <turnTo+0x6f>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
ja     11b6 <turnTo+0x86>
movsd  -0x8(%rbp),%xmm0
movsd  0xe5c(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11c4 <turnTo+0x94>
mov    $0x0,%al
call   1040 <turnLeft@plt>
mov    $0x0,%al
call   1050 <stopMoving@plt>
jmp    11c9 <turnTo+0x99>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<turnTo>:
push   %rax
ucomisd 0xec7(%rip),%xmm0
jbe    1152 <turnTo+0x22>
movsd  0xec5(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1152 <turnTo+0x22>
xor    %eax,%eax
call   1030 <turnRight@plt>
jmp    1183 <turnTo+0x53>
movsd  0xea6(%rip),%xmm1
ucomisd %xmm0,%xmm1
seta   %al
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd 0xe94(%rip),%xmm0
ja     117c <turnTo+0x4c>
and    %cl,%al
jne    117c <turnTo+0x4c>
pop    %rax
ret
xor    %eax,%eax
call   1040 <turnLeft@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <stopMoving@plt>

LLVM IR (-O0):
define void @turnTo(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 9.000000e+01
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load double, double* %2
%7 = fcmp olt double %6, 1.800000e+02
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = call i32 (...) @turnRight()
%10 = call i32 (...) @stopMoving()
br label %24
11: ; preds = %5, %1
%12 = load double, double* %2
%13 = fcmp olt double %12, 9.000000e+01
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load double, double* %2
%16 = fcmp ogt double %15, 0.000000e+00
br i1 %16, label %20, label %17
17: ; preds = %14, %11
%18 = load double, double* %2
%19 = fcmp ogt double %18, 1.800000e+02
br i1 %19, label %20, label %23
20: ; preds = %17, %14
%21 = call i32 (...) @turnLeft()
%22 = call i32 (...) @stopMoving()
br label %23
23: ; preds = %20, %17
br label %24
24: ; preds = %23, %8
ret void
}

LLVM IR (-O2):
define void @turnTo(double %0) {
%2 = fcmp ogt double %0, 9.000000e+01
%3 = fcmp olt double %0, 1.800000e+02
%4 = and i1 %2, %3
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (...) @turnRight()
br label %15
7: ; preds = %1
%8 = fcmp olt double %0, 9.000000e+01
%9 = fcmp ogt double %0, 0.000000e+00
%10 = and i1 %8, %9
%11 = fcmp ogt double %0, 1.800000e+02
%12 = or i1 %11, %10
br i1 %12, label %13, label %17
13: ; preds = %7
%14 = tail call i32 (...) @turnLeft()
br label %15
15: ; preds = %5, %13
%16 = tail call i32 (...) @stopMoving()
br label %17
17: ; preds = %15, %7
ret void
}