#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 */
scalar_t__ FP_Cmp(float, float);
float __addsf3(float const, float);
float __divsf3(float, float);
float __floatsisf(int);
float __mulsf3(float, float const);
float __negsf2(float);
float __subsf3(float, float const);
float FP_Atan(float x) {
  const float b = (float)(((float)3.1415926) / 8.0);
  const float atan_b = (float)0.37419668;
  int n;
  float answer, x2, top;
  if (FP_Cmp(x, (float)0.0) >= 0) {
    if (FP_Cmp(x, (float)1.0) > 0)
      return __subsf3(((float)(((float)3.1415926) / 2.0)),
                      FP_Atan(__divsf3((float)1.0, x)));
  } else {
    if (FP_Cmp(x, (float)-1.0) > 0)
      return __subsf3(-((float)(((float)3.1415926) / 2.0)),
                      FP_Atan(__divsf3((float)1.0, x)));
  }
  if (FP_Cmp(x, (float)0.45) > 0) {
    answer = __divsf3(__subsf3(x, atan_b), __addsf3(1.0, __mulsf3(x, atan_b)));
    answer = __subsf3(__addsf3(b, FP_Atan(answer)), (float)0.034633);
    return answer;
  }
  if (FP_Cmp(x, (float)-0.45) < 0) {
    x = __negsf2(x);
    answer = __divsf3(__subsf3(x, atan_b), __addsf3(1.0, __mulsf3(x, atan_b)));
    answer = __subsf3(__addsf3(b, FP_Atan(answer)), (float)0.034633);
    return __negsf2(answer);
  }
  answer = x;
  x2 = __mulsf3(__negsf2(x), x);
  top = x;
  for (n = 3; n < 14; n += 2) {
    top = __mulsf3(top, x2);
    answer = __addsf3(answer, __divsf3(top, __floatsisf(n)));
  }
  return answer;
}


x86 assembly (clang, -O0):
<FP_Atan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x8(%rbp)
movss  0xe6f(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xe5e(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
call   1080 <FP_Cmp@plt>
cmp    $0x0,%rax
jl     1210 <FP_Atan+0x90>
movss  -0x8(%rbp),%xmm0
movss  0xe45(%rip),%xmm1
call   1080 <FP_Cmp@plt>
cmp    $0x0,%rax
jle    120b <FP_Atan+0x8b>
movss  -0x8(%rbp),%xmm1
movss  0xe29(%rip),%xmm0
call   1040 <__divsf3@plt>
call   1030 <FP_Atan@plt>
movaps %xmm0,%xmm1
movss  0xe24(%rip),%xmm0
call   1060 <__subsf3@plt>
movss  %xmm0,-0x4(%rbp)
jmp    145f <FP_Atan+0x2df>
jmp    1262 <FP_Atan+0xe2>
movss  -0x8(%rbp),%xmm0
movss  0xdeb(%rip),%xmm1
call   1080 <FP_Cmp@plt>
cmp    $0x0,%rax
jle    125d <FP_Atan+0xdd>
movss  -0x8(%rbp),%xmm1
movss  0xdd7(%rip),%xmm0
call   1040 <__divsf3@plt>
call   1030 <FP_Atan@plt>
movaps %xmm0,%xmm1
movss  0xdbe(%rip),%xmm0
call   1060 <__subsf3@plt>
movss  %xmm0,-0x4(%rbp)
jmp    145f <FP_Atan+0x2df>
jmp    1262 <FP_Atan+0xe2>
movss  -0x8(%rbp),%xmm0
movss  0xda5(%rip),%xmm1
call   1080 <FP_Cmp@plt>
cmp    $0x0,%rax
jle    1304 <FP_Atan+0x184>
movss  -0x8(%rbp),%xmm0
movss  0xd75(%rip),%xmm1
call   1060 <__subsf3@plt>
movss  %xmm0,-0x24(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xd5e(%rip),%xmm1
call   1070 <__mulsf3@plt>
movaps %xmm0,%xmm1
movss  0xd5e(%rip),%xmm0
call   10a0 <__addsf3@plt>
movaps %xmm0,%xmm1
movss  -0x24(%rbp),%xmm0
call   1040 <__divsf3@plt>
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
call   1030 <FP_Atan@plt>
movaps %xmm0,%xmm1
movss  0xd26(%rip),%xmm0
call   10a0 <__addsf3@plt>
movss  0xd31(%rip),%xmm1
call   1060 <__subsf3@plt>
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    145f <FP_Atan+0x2df>
movss  -0x8(%rbp),%xmm0
movss  0xd07(%rip),%xmm1
call   1080 <FP_Cmp@plt>
cmp    $0x0,%rax
jge    13ba <FP_Atan+0x23a>
movss  -0x8(%rbp),%xmm0
call   1090 <__negsf2@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xcc4(%rip),%xmm1
call   1060 <__subsf3@plt>
movss  %xmm0,-0x28(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xcad(%rip),%xmm1
call   1070 <__mulsf3@plt>
movaps %xmm0,%xmm1
movss  0xcad(%rip),%xmm0
call   10a0 <__addsf3@plt>
movaps %xmm0,%xmm1
movss  -0x28(%rbp),%xmm0
call   1040 <__divsf3@plt>
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
call   1030 <FP_Atan@plt>
movaps %xmm0,%xmm1
movss  0xc75(%rip),%xmm0
call   10a0 <__addsf3@plt>
movss  0xc80(%rip),%xmm1
call   1060 <__subsf3@plt>
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
call   1090 <__negsf2@plt>
movss  %xmm0,-0x4(%rbp)
jmp    145f <FP_Atan+0x2df>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
call   1090 <__negsf2@plt>
movss  -0x8(%rbp),%xmm1
call   1070 <__mulsf3@plt>
movss  %xmm0,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movl   $0x3,-0x14(%rbp)
cmpl   $0xe,-0x14(%rbp)
jge    1455 <FP_Atan+0x2d5>
movss  -0x20(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm1
call   1070 <__mulsf3@plt>
movss  %xmm0,-0x20(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <__floatsisf@plt>
movaps %xmm0,%xmm1
movss  -0x30(%rbp),%xmm0
call   1040 <__divsf3@plt>
movaps %xmm0,%xmm1
movss  -0x2c(%rbp),%xmm0
call   10a0 <__addsf3@plt>
movss  %xmm0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x14(%rbp)
jmp    13ee <FP_Atan+0x26e>
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FP_Atan>:
push   %rbx
sub    $0x10,%rsp
xorps  %xmm1,%xmm1
movss  %xmm0,(%rsp)
call   1080 <FP_Cmp@plt>
test   %rax,%rax
js     11d5 <FP_Atan+0x55>
movss  0xe65(%rip),%xmm1
movss  (%rsp),%xmm0
call   1080 <FP_Cmp@plt>
test   %rax,%rax
jle    1210 <FP_Atan+0x90>
movss  0xe4e(%rip),%xmm0
movss  (%rsp),%xmm1
call   1040 <__divsf3@plt>
call   1030 <FP_Atan@plt>
movaps %xmm0,%xmm1
movss  0xe50(%rip),%xmm0
jmp    128c <FP_Atan+0x10c>
movss  0xe23(%rip),%xmm1
movss  (%rsp),%xmm0
call   1080 <FP_Cmp@plt>
test   %rax,%rax
jle    1210 <FP_Atan+0x90>
movss  0xe10(%rip),%xmm0
movss  (%rsp),%xmm1
call   1040 <__divsf3@plt>
call   1030 <FP_Atan@plt>
movaps %xmm0,%xmm1
movss  0xdfa(%rip),%xmm0
jmp    128c <FP_Atan+0x10c>
movss  0xdf4(%rip),%xmm1
movss  (%rsp),%xmm0
call   1080 <FP_Cmp@plt>
test   %rax,%rax
jle    1296 <FP_Atan+0x116>
movss  0xde5(%rip),%xmm1
movss  (%rsp),%xmm0
call   1060 <__subsf3@plt>
movss  %xmm0,0x8(%rsp)
movss  (%rsp),%xmm0
movss  0xdc8(%rip),%xmm1
call   1070 <__mulsf3@plt>
movaps %xmm0,%xmm1
movss  0xda8(%rip),%xmm0
call   10a0 <__addsf3@plt>
movaps %xmm0,%xmm1
movss  0x8(%rsp),%xmm0
call   1040 <__divsf3@plt>
call   1030 <FP_Atan@plt>
movaps %xmm0,%xmm1
movss  0xd99(%rip),%xmm0
call   10a0 <__addsf3@plt>
movss  0xd90(%rip),%xmm1
add    $0x10,%rsp
pop    %rbx
jmp    1060 <__subsf3@plt>
movss  0xd72(%rip),%xmm1
movss  (%rsp),%xmm0
call   1080 <FP_Cmp@plt>
mov    %rax,%rbx
movss  (%rsp),%xmm0
call   1090 <__negsf2@plt>
test   %rbx,%rbx
js     144c <FP_Atan+0x2cc>
movss  (%rsp),%xmm1
call   1070 <__mulsf3@plt>
movaps %xmm0,%xmm1
movss  %xmm0,0x8(%rsp)
movss  (%rsp),%xmm0
call   1070 <__mulsf3@plt>
movss  %xmm0,0x4(%rsp)
mov    $0x3,%edi
call   1050 <__floatsisf@plt>
movaps %xmm0,%xmm1
movss  0x4(%rsp),%xmm0
call   1040 <__divsf3@plt>
movaps %xmm0,%xmm1
movss  (%rsp),%xmm0
call   10a0 <__addsf3@plt>
movss  %xmm0,0xc(%rsp)
movss  0x4(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
call   1070 <__mulsf3@plt>
movss  %xmm0,(%rsp)
mov    $0x5,%edi
call   1050 <__floatsisf@plt>
movaps %xmm0,%xmm1
movss  (%rsp),%xmm0
call   1040 <__divsf3@plt>
movaps %xmm0,%xmm1
movss  0xc(%rsp),%xmm0
call   10a0 <__addsf3@plt>
movss  %xmm0,0x4(%rsp)
movss  (%rsp),%xmm0
movss  0x8(%rsp),%xmm1
call   1070 <__mulsf3@plt>
movss  %xmm0,(%rsp)
mov    $0x7,%edi
call   1050 <__floatsisf@plt>
movaps %xmm0,%xmm1
movss  (%rsp),%xmm0
call   1040 <__divsf3@plt>
movaps %xmm0,%xmm1
movss  0x4(%rsp),%xmm0
call   10a0 <__addsf3@plt>
movss  %xmm0,0x4(%rsp)
movss  (%rsp),%xmm0
movss  0x8(%rsp),%xmm1
call   1070 <__mulsf3@plt>
movss  %xmm0,(%rsp)
mov    $0x9,%edi
call   1050 <__floatsisf@plt>
movaps %xmm0,%xmm1
movss  (%rsp),%xmm0
call   1040 <__divsf3@plt>
movaps %xmm0,%xmm1
movss  0x4(%rsp),%xmm0
call   10a0 <__addsf3@plt>
movss  %xmm0,0x4(%rsp)
movss  (%rsp),%xmm0
movss  0x8(%rsp),%xmm1
call   1070 <__mulsf3@plt>
movss  %xmm0,(%rsp)
mov    $0xb,%edi
call   1050 <__floatsisf@plt>
movaps %xmm0,%xmm1
movss  (%rsp),%xmm0
call   1040 <__divsf3@plt>
movaps %xmm0,%xmm1
movss  0x4(%rsp),%xmm0
call   10a0 <__addsf3@plt>
movss  %xmm0,0x4(%rsp)
movss  (%rsp),%xmm0
movss  0x8(%rsp),%xmm1
call   1070 <__mulsf3@plt>
movss  %xmm0,(%rsp)
mov    $0xd,%edi
call   1050 <__floatsisf@plt>
movaps %xmm0,%xmm1
movss  (%rsp),%xmm0
call   1040 <__divsf3@plt>
movaps %xmm0,%xmm1
movss  0x4(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
jmp    10a0 <__addsf3@plt>
movss  0xbc0(%rip),%xmm1
movss  %xmm0,0x8(%rsp)
call   1060 <__subsf3@plt>
movss  %xmm0,(%rsp)
movss  0x8(%rsp),%xmm0
movss  0xba2(%rip),%xmm1
call   1070 <__mulsf3@plt>
movaps %xmm0,%xmm1
movss  0xb82(%rip),%xmm0
call   10a0 <__addsf3@plt>
movaps %xmm0,%xmm1
movss  (%rsp),%xmm0
call   1040 <__divsf3@plt>
call   1030 <FP_Atan@plt>
movaps %xmm0,%xmm1
movss  0xb74(%rip),%xmm0
call   10a0 <__addsf3@plt>
movss  0xb6b(%rip),%xmm1
call   1060 <__subsf3@plt>
add    $0x10,%rsp
pop    %rbx
jmp    1090 <__negsf2@plt>

LLVM IR (-O0):
define float @FP_Atan(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca i32
%7 = alloca float
%8 = alloca float
%9 = alloca float
store float %0, float* %3
store float 0x3FD921FB40000000, float* %4
store float 0x3FD7F2D6A0000000, float* %5
%10 = load float, float* %3
%11 = call i64 @FP_Cmp(float %10, float 0.000000e+00)
%12 = icmp sge i64 %11, 0
br i1 %12, label %13, label %23
13: ; preds = %1
%14 = load float, float* %3
%15 = call i64 @FP_Cmp(float %14, float 1.000000e+00)
%16 = icmp sgt i64 %15, 0
br i1 %16, label %17, label %22
17: ; preds = %13
%18 = load float, float* %3
%19 = call float @__divsf3(float 1.000000e+00, float %18)
%20 = call float @FP_Atan(float %19)
%21 = call float @__subsf3(float 0x3FF921FB40000000, float %20)
store float %21, float* %2
br label %93
22: ; preds = %13
br label %33
23: ; preds = %1
%24 = load float, float* %3
%25 = call i64 @FP_Cmp(float %24, float -1.000000e+00)
%26 = icmp sgt i64 %25, 0
br i1 %26, label %27, label %32
27: ; preds = %23
%28 = load float, float* %3
%29 = call float @__divsf3(float 1.000000e+00, float %28)
%30 = call float @FP_Atan(float %29)
%31 = call float @__subsf3(float 0xBFF921FB40000000, float %30)
store float %31, float* %2
br label %93
32: ; preds = %23
br label %33
33: ; preds = %32, %22
%34 = load float, float* %3
%35 = call i64 @FP_Cmp(float %34, float 0x3FDCCCCCC0000000)
%36 = icmp sgt i64 %35, 0
br i1 %36, label %37, label %49
37: ; preds = %33
%38 = load float, float* %3
%39 = call float @__subsf3(float %38, float 0x3FD7F2D6A0000000)
%40 = load float, float* %3
%41 = call float @__mulsf3(float %40, float 0x3FD7F2D6A0000000)
%42 = call float @__addsf3(float 1.000000e+00, float %41)
%43 = call float @__divsf3(float %39, float %42)
store float %43, float* %7
%44 = load float, float* %7
%45 = call float @FP_Atan(float %44)
%46 = call float @__addsf3(float 0x3FD921FB40000000, float %45)
%47 = call float @__subsf3(float %46, float 0x3FA1BB6AA0000000)
store float %47, float* %7
%48 = load float, float* %7
store float %48, float* %2
br label %93
49: ; preds = %33
%50 = load float, float* %3
%51 = call i64 @FP_Cmp(float %50, float 0xBFDCCCCCC0000000)
%52 = icmp slt i64 %51, 0
br i1 %52, label %53, label %68
53: ; preds = %49
%54 = load float, float* %3
%55 = call float @__negsf2(float %54)
store float %55, float* %3
%56 = load float, float* %3
%57 = call float @__subsf3(float %56, float 0x3FD7F2D6A0000000)
%58 = load float, float* %3
%59 = call float @__mulsf3(float %58, float 0x3FD7F2D6A0000000)
%60 = call float @__addsf3(float 1.000000e+00, float %59)
%61 = call float @__divsf3(float %57, float %60)
store float %61, float* %7
%62 = load float, float* %7
%63 = call float @FP_Atan(float %62)
%64 = call float @__addsf3(float 0x3FD921FB40000000, float %63)
%65 = call float @__subsf3(float %64, float 0x3FA1BB6AA0000000)
store float %65, float* %7
%66 = load float, float* %7
%67 = call float @__negsf2(float %66)
store float %67, float* %2
br label %93
68: ; preds = %49
%69 = load float, float* %3
store float %69, float* %7
%70 = load float, float* %3
%71 = call float @__negsf2(float %70)
%72 = load float, float* %3
%73 = call float @__mulsf3(float %71, float %72)
store float %73, float* %8
%74 = load float, float* %3
store float %74, float* %9
store i32 3, i32* %6
br label %75
75: ; preds = %88, %68
%76 = load i32, i32* %6
%77 = icmp slt i32 %76, 14
br i1 %77, label %78, label %91
78: ; preds = %75
%79 = load float, float* %9
%80 = load float, float* %8
%81 = call float @__mulsf3(float %79, float %80)
store float %81, float* %9
%82 = load float, float* %7
%83 = load float, float* %9
%84 = load i32, i32* %6
%85 = call float @__floatsisf(i32 %84)
%86 = call float @__divsf3(float %83, float %85)
%87 = call float @__addsf3(float %82, float %86)
store float %87, float* %7
br label %88
88: ; preds = %78
%89 = load i32, i32* %6
%90 = add nsw i32 %89, 2
store i32 %90, i32* %6
br label %75
91: ; preds = %75
%92 = load float, float* %7
store float %92, float* %2
br label %93
93: ; preds = %91, %53, %37, %27, %17
%94 = load float, float* %2
ret float %94
}

LLVM IR (-O2):
define float @FP_Atan(float %0) {
%2 = tail call i64 @FP_Cmp(float %0, float 0.000000e+00)
%3 = icmp sgt i64 %2, -1
br i1 %3, label %4, label %13
4: ; preds = %1
%5 = tail call i64 @FP_Cmp(float %0, float 1.000000e+00)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %9, label %20
7: ; preds = %44, %35, %23, %16, %9
%8 = phi float [ %12, %9 ], [ %19, %16 ], [ %30, %23 ], [ %43, %35 ], [ %69, %44 ]
ret float %8
9: ; preds = %4
%10 = tail call float @__divsf3(float 1.000000e+00, float %0)
%11 = tail call float @FP_Atan(float %10)
%12 = tail call float @__subsf3(float 0x3FF921FB40000000, float %11)
br label %7
13: ; preds = %1
%14 = tail call i64 @FP_Cmp(float %0, float -1.000000e+00)
%15 = icmp sgt i64 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %13
%17 = tail call float @__divsf3(float 1.000000e+00, float %0)
%18 = tail call float @FP_Atan(float %17)
%19 = tail call float @__subsf3(float 0xBFF921FB40000000, float %18)
br label %7
20: ; preds = %13, %4
%21 = tail call i64 @FP_Cmp(float %0, float 0x3FDCCCCCC0000000)
%22 = icmp sgt i64 %21, 0
br i1 %22, label %23, label %31
23: ; preds = %20
%24 = tail call float @__subsf3(float %0, float 0x3FD7F2D6A0000000)
%25 = tail call float @__mulsf3(float %0, float 0x3FD7F2D6A0000000)
%26 = tail call float @__addsf3(float 1.000000e+00, float %25)
%27 = tail call float @__divsf3(float %24, float %26)
%28 = tail call float @FP_Atan(float %27)
%29 = tail call float @__addsf3(float 0x3FD921FB40000000, float %28)
%30 = tail call float @__subsf3(float %29, float 0x3FA1BB6AA0000000)
br label %7
31: ; preds = %20
%32 = tail call i64 @FP_Cmp(float %0, float 0xBFDCCCCCC0000000)
%33 = icmp slt i64 %32, 0
%34 = tail call float @__negsf2(float %0)
br i1 %33, label %35, label %44
35: ; preds = %31
%36 = tail call float @__subsf3(float %34, float 0x3FD7F2D6A0000000)
%37 = tail call float @__mulsf3(float %34, float 0x3FD7F2D6A0000000)
%38 = tail call float @__addsf3(float 1.000000e+00, float %37)
%39 = tail call float @__divsf3(float %36, float %38)
%40 = tail call float @FP_Atan(float %39)
%41 = tail call float @__addsf3(float 0x3FD921FB40000000, float %40)
%42 = tail call float @__subsf3(float %41, float 0x3FA1BB6AA0000000)
%43 = tail call float @__negsf2(float %42)
br label %7
44: ; preds = %31
%45 = tail call float @__mulsf3(float %34, float %0)
%46 = tail call float @__mulsf3(float %0, float %45)
%47 = tail call float @__floatsisf(i32 3)
%48 = tail call float @__divsf3(float %46, float %47)
%49 = tail call float @__addsf3(float %0, float %48)
%50 = tail call float @__mulsf3(float %46, float %45)
%51 = tail call float @__floatsisf(i32 5)
%52 = tail call float @__divsf3(float %50, float %51)
%53 = tail call float @__addsf3(float %49, float %52)
%54 = tail call float @__mulsf3(float %50, float %45)
%55 = tail call float @__floatsisf(i32 7)
%56 = tail call float @__divsf3(float %54, float %55)
%57 = tail call float @__addsf3(float %53, float %56)
%58 = tail call float @__mulsf3(float %54, float %45)
%59 = tail call float @__floatsisf(i32 9)
%60 = tail call float @__divsf3(float %58, float %59)
%61 = tail call float @__addsf3(float %57, float %60)
%62 = tail call float @__mulsf3(float %58, float %45)
%63 = tail call float @__floatsisf(i32 11)
%64 = tail call float @__divsf3(float %62, float %63)
%65 = tail call float @__addsf3(float %61, float %64)
%66 = tail call float @__mulsf3(float %62, float %45)
%67 = tail call float @__floatsisf(i32 13)
%68 = tail call float @__divsf3(float %66, float %67)
%69 = tail call float @__addsf3(float %65, float %68)
br label %7
}