#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 */
double atan(double);
double fabs(double);
double atan2(double y, double x) {
  double z;
  int k, m, hx, hy, ix, iy;
  unsigned lx, ly;
  hx = *(1 + (int *)&x);
  ix = hx & 0x7fffffff;
  lx = *(int *)&x;
  hy = *(1 + (int *)&y);
  iy = hy & 0x7fffffff;
  ly = *(int *)&y;
  if (((ix | ((lx | -lx) >> 31)) > 0x7ff00000) ||
      ((iy | ((ly | -ly) >> 31)) > 0x7ff00000)) {
    return x + y;
  }
  if (((hx - 0x3ff00000) | lx) == 0) {
    return atan(y);
  }
  m = ((hy >> 31) & 1) | ((hx >> 30) & 2);
  if ((iy | ly) == 0) {
    switch (m) {
    case 0:
    case 1: {
      return y;
    }
    case 2: {
      return 3.1415926535897931160E+00 + 1.0e-300;
    }
    case 3: {
      return -3.1415926535897931160E+00 - 1.0e-300;
    }
    }
  }
  if ((ix | lx) == 0) {
    return (hy < 0) ? -1.5707963267948965580E+00 - 1.0e-300
                    : 1.5707963267948965580E+00 + 1.0e-300;
  }
  if (ix == 0x7ff00000) {
    if (iy == 0x7ff00000) {
      switch (m) {
      case 0: {
        return 7.8539816339744827900E-01 + 1.0e-300;
      }
      case 1: {
        return -7.8539816339744827900E-01 - 1.0e-300;
      }
      case 2: {
        return 3.0 * 7.8539816339744827900E-01 + 1.0e-300;
      }
      case 3: {
        return -3.0 * 7.8539816339744827900E-01 - 1.0e-300;
      }
      }
    } else {
      switch (m) {
      case 0: {
        return 0.0;
      }
      case 1: {
        return -0.0;
      }
      case 2: {
        return 3.1415926535897931160E+00 + 1.0e-300;
      }
      case 3: {
        return -3.1415926535897931160E+00 - 1.0e-300;
      }
      }
    }
  }
  if (iy == 0x7ff00000) {
    return (hy < 0) ? -1.5707963267948965580E+00 - 1.0e-300
                    : 1.5707963267948965580E+00 + 1.0e-300;
  }
  k = (iy - ix) >> 20;
  if (k > 60) {
    z = 1.5707963267948965580E+00 + 0.5 * 1.2246467991473531772E-16;
  } else if (hx < 0 && k < -60) {
    z = 0.0;
  } else {
    z = atan(fabs(y / x));
  }
  switch (m) {
  case 0: {
    return z;
  }
  case 1: {
    *(1 + (int *)&z) ^= 0x80000000;
    return z;
  }
  case 2: {
    return 3.1415926535897931160E+00 - (z - 1.2246467991473531772E-16);
  }
  default: {
    return (z - 1.2246467991473531772E-16) - 3.1415926535897931160E+00;
  }
  }
}


x86 assembly (clang, -O0):
<atan2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
and    $0x7fffffff,%eax
mov    %eax,-0x34(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
and    $0x7fffffff,%eax
mov    %eax,-0x38(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x3c(%rbp),%ecx
xor    %edx,%edx
sub    -0x3c(%rbp),%edx
or     %edx,%ecx
shr    $0x1f,%ecx
or     %ecx,%eax
cmp    $0x7ff00000,%eax
ja     118d <atan2+0x7d>
mov    -0x38(%rbp),%eax
mov    -0x40(%rbp),%ecx
xor    %edx,%edx
sub    -0x40(%rbp),%edx
or     %edx,%ecx
shr    $0x1f,%ecx
or     %ecx,%eax
cmp    $0x7ff00000,%eax
jbe    11a1 <atan2+0x91>
movsd  -0x18(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1509 <atan2+0x3f9>
mov    -0x2c(%rbp),%eax
sub    $0x3ff00000,%eax
or     -0x3c(%rbp),%eax
cmp    $0x0,%eax
jne    11c9 <atan2+0xb9>
movsd  -0x10(%rbp),%xmm0
call   1030 <atan@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    1509 <atan2+0x3f9>
mov    -0x30(%rbp),%eax
sar    $0x1f,%eax
and    $0x1,%eax
mov    -0x2c(%rbp),%ecx
sar    $0x1e,%ecx
and    $0x2,%ecx
or     %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    -0x38(%rbp),%eax
or     -0x40(%rbp),%eax
cmp    $0x0,%eax
jne    125d <atan2+0x14d>
mov    -0x28(%rbp),%eax
mov    %eax,-0x44(%rbp)
sub    $0x2,%eax
jb     1225 <atan2+0x115>
jmp    1203 <atan2+0xf3>
mov    -0x44(%rbp),%eax
sub    $0x2,%eax
je     1234 <atan2+0x124>
jmp    1214 <atan2+0x104>
mov    -0x44(%rbp),%eax
sub    $0x3,%eax
je     1246 <atan2+0x136>
jmp    1258 <atan2+0x148>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1509 <atan2+0x3f9>
movsd  0xdcc(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1509 <atan2+0x3f9>
movsd  0xdb2(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1509 <atan2+0x3f9>
jmp    125d <atan2+0x14d>
mov    -0x34(%rbp),%eax
or     -0x3c(%rbp),%eax
cmp    $0x0,%eax
jne    12ab <atan2+0x19b>
mov    -0x30(%rbp),%eax
movsd  0xdd1(%rip),%xmm0
movsd  0xdb9(%rip),%xmm1
movsd  %xmm1,-0x58(%rbp)
cmp    $0x0,%eax
movsd  %xmm0,-0x50(%rbp)
jl     129c <atan2+0x18c>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1509 <atan2+0x3f9>
cmpl   $0x7ff00000,-0x34(%rbp)
jne    13a9 <atan2+0x299>
cmpl   $0x7ff00000,-0x38(%rbp)
jne    1337 <atan2+0x227>
mov    -0x28(%rbp),%eax
mov    %rax,-0x60(%rbp)
sub    $0x3,%rax
ja     1332 <atan2+0x222>
mov    -0x60(%rbp),%rax
lea    0xd8f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movsd  0xd3e(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1509 <atan2+0x3f9>
movsd  0xd24(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1509 <atan2+0x3f9>
movsd  0xd0a(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1509 <atan2+0x3f9>
movsd  0xcf0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1509 <atan2+0x3f9>
jmp    13a4 <atan2+0x294>
mov    -0x28(%rbp),%eax
mov    %rax,-0x68(%rbp)
sub    $0x3,%rax
ja     139f <atan2+0x28f>
mov    -0x68(%rbp),%rax
lea    0xd0d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1509 <atan2+0x3f9>
movsd  0xc9f(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1509 <atan2+0x3f9>
movsd  0xc85(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1509 <atan2+0x3f9>
movsd  0xc6b(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1509 <atan2+0x3f9>
jmp    13a4 <atan2+0x294>
jmp    13a9 <atan2+0x299>
cmpl   $0x7ff00000,-0x38(%rbp)
jne    13f5 <atan2+0x2e5>
mov    -0x30(%rbp),%eax
movsd  0xc87(%rip),%xmm0
movsd  0xc6f(%rip),%xmm1
movsd  %xmm1,-0x78(%rbp)
cmp    $0x0,%eax
movsd  %xmm0,-0x70(%rbp)
jl     13e6 <atan2+0x2d6>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1509 <atan2+0x3f9>
mov    -0x38(%rbp),%eax
sub    -0x34(%rbp),%eax
sar    $0x14,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x3c,-0x24(%rbp)
jle    141d <atan2+0x30d>
movsd  0xc25(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1462 <atan2+0x352>
cmpl   $0x0,-0x2c(%rbp)
jge    143e <atan2+0x32e>
cmpl   $0xffffffc4,-0x24(%rbp)
jge    143e <atan2+0x32e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    145d <atan2+0x34d>
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
movaps 0xc01(%rip),%xmm1
pand   %xmm1,%xmm0
call   1030 <atan@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    1462 <atan2+0x352>
mov    -0x28(%rbp),%eax
mov    %eax,-0x7c(%rbp)
test   %eax,%eax
je     1497 <atan2+0x387>
jmp    1475 <atan2+0x365>
mov    -0x7c(%rbp),%eax
sub    $0x1,%eax
je     14a6 <atan2+0x396>
jmp    1486 <atan2+0x376>
mov    -0x7c(%rbp),%eax
sub    $0x2,%eax
je     14c0 <atan2+0x3b0>
jmp    14e7 <atan2+0x3d7>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1509 <atan2+0x3f9>
mov    -0x1c(%rbp),%eax
xor    $0x80000000,%eax
mov    %eax,-0x1c(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1509 <atan2+0x3f9>
movsd  -0x20(%rbp),%xmm1
movsd  0xb73(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xb2f(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1509 <atan2+0x3f9>
movsd  -0x20(%rbp),%xmm0
movsd  0xb4c(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xb08(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atan2>:
push   %rbp
push   %rbx
push   %rax
movq   %xmm1,%rax
mov    %rax,%rsi
shr    $0x20,%rsi
mov    %esi,%ecx
and    $0x7fffffff,%ecx
xor    %edx,%edx
test   %eax,%eax
setne  %dl
or     %ecx,%edx
cmp    $0x7ff00000,%edx
ja     115e <atan2+0x4e>
movq   %xmm0,%rbx
mov    %rbx,%rdi
shr    $0x20,%rdi
mov    %edi,%edx
and    $0x7fffffff,%edx
xor    %ebp,%ebp
test   %ebx,%ebx
setne  %bpl
or     %edx,%ebp
cmp    $0x7ff00001,%ebp
jb     1169 <atan2+0x59>
addsd  %xmm1,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    -0x3ff00000(%rsi),%ebp
or     %eax,%ebp
je     11a1 <atan2+0x91>
shr    $0x1f,%edi
shr    $0x1f,%esi
lea    (%rdi,%rsi,2),%ebp
or     %edx,%ebx
je     11ac <atan2+0x9c>
mov    %ecx,%esi
or     %eax,%esi
je     11c8 <atan2+0xb8>
cmp    $0x7ff00000,%ecx
jne    11c0 <atan2+0xb0>
mov    %ebp,%eax
cmp    $0x7ff00000,%edx
jne    11da <atan2+0xca>
lea    0xeb1(%rip),%rcx
jmp    11e1 <atan2+0xd1>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <atan@plt>
cmp    $0x2,%ebp
jb     1162 <atan2+0x52>
cmp    $0x3,%ebp
jne    11ff <atan2+0xef>
movsd  0xe5a(%rip),%xmm0
jmp    1162 <atan2+0x52>
cmp    $0x7ff00000,%edx
jne    11eb <atan2+0xdb>
andpd  0xe60(%rip),%xmm0
orpd   0xe68(%rip),%xmm0
jmp    1162 <atan2+0x52>
lea    0xe8f(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
jmp    1162 <atan2+0x52>
sub    %ecx,%edx
cmp    $0x3cfffff,%edx
jle    120c <atan2+0xfc>
movsd  0xe03(%rip),%xmm2
jmp    1232 <atan2+0x122>
movsd  0xe09(%rip),%xmm0
jmp    1162 <atan2+0x52>
test   %rax,%rax
jns    121d <atan2+0x10d>
xorpd  %xmm2,%xmm2
cmp    $0xfc400000,%edx
jl     1232 <atan2+0x122>
divsd  %xmm1,%xmm0
andpd  0xdf7(%rip),%xmm0
call   1030 <atan@plt>
movapd %xmm0,%xmm2
test   %ebp,%ebp
je     1248 <atan2+0x138>
cmp    $0x2,%ebp
je     1251 <atan2+0x141>
cmp    $0x1,%ebp
jne    126a <atan2+0x15a>
xorpd  0xde8(%rip),%xmm2
movapd %xmm2,%xmm0
jmp    1162 <atan2+0x52>
addsd  0xdaf(%rip),%xmm2
movsd  0xdaf(%rip),%xmm0
subsd  %xmm2,%xmm0
jmp    1162 <atan2+0x52>
addsd  0xd96(%rip),%xmm2
addsd  0xd9e(%rip),%xmm2
movapd %xmm2,%xmm0
jmp    1162 <atan2+0x52>

LLVM IR (-O0):
define double @atan2(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store double %0, double* %4
store double %1, double* %5
%15 = bitcast double* %5 to i32*
%16 = getelementptr inbounds i32, i32* %15, i64 1
%17 = load i32, i32* %16
store i32 %17, i32* %9
%18 = load i32, i32* %9
%19 = and i32 %18, 2147483647
store i32 %19, i32* %11
%20 = bitcast double* %5 to i32*
%21 = load i32, i32* %20
store i32 %21, i32* %13
%22 = bitcast double* %4 to i32*
%23 = getelementptr inbounds i32, i32* %22, i64 1
%24 = load i32, i32* %23
store i32 %24, i32* %10
%25 = load i32, i32* %10
%26 = and i32 %25, 2147483647
store i32 %26, i32* %12
%27 = bitcast double* %4 to i32*
%28 = load i32, i32* %27
store i32 %28, i32* %14
%29 = load i32, i32* %11
%30 = load i32, i32* %13
%31 = load i32, i32* %13
%32 = sub i32 0, %31
%33 = or i32 %30, %32
%34 = lshr i32 %33, 31
%35 = or i32 %29, %34
%36 = icmp ugt i32 %35, 2146435072
br i1 %36, label %46, label %37
37: ; preds = %2
%38 = load i32, i32* %12
%39 = load i32, i32* %14
%40 = load i32, i32* %14
%41 = sub i32 0, %40
%42 = or i32 %39, %41
%43 = lshr i32 %42, 31
%44 = or i32 %38, %43
%45 = icmp ugt i32 %44, 2146435072
br i1 %45, label %46, label %50
46: ; preds = %37, %2
%47 = load double, double* %5
%48 = load double, double* %4
%49 = fadd double %47, %48
store double %49, double* %3
br label %157
50: ; preds = %37
%51 = load i32, i32* %9
%52 = sub nsw i32 %51, 1072693248
%53 = load i32, i32* %13
%54 = or i32 %52, %53
%55 = icmp eq i32 %54, 0
br i1 %55, label %56, label %59
56: ; preds = %50
%57 = load double, double* %4
%58 = call double @atan(double %57)
store double %58, double* %3
br label %157
59: ; preds = %50
%60 = load i32, i32* %10
%61 = ashr i32 %60, 31
%62 = and i32 %61, 1
%63 = load i32, i32* %9
%64 = ashr i32 %63, 30
%65 = and i32 %64, 2
%66 = or i32 %62, %65
store i32 %66, i32* %8
%67 = load i32, i32* %12
%68 = load i32, i32* %14
%69 = or i32 %67, %68
%70 = icmp eq i32 %69, 0
br i1 %70, label %71, label %78
71: ; preds = %59
%72 = load i32, i32* %8
switch i32 %72, label %77 [
i32 0, label %73
i32 1, label %73
i32 2, label %75
i32 3, label %76
]
73: ; preds = %71, %71
%74 = load double, double* %4
store double %74, double* %3
br label %157
75: ; preds = %71
store double 0x400921FB54442D18, double* %3
br label %157
76: ; preds = %71
store double 0xC00921FB54442D18, double* %3
br label %157
77: ; preds = %71
br label %78
78: ; preds = %77, %59
%79 = load i32, i32* %11
%80 = load i32, i32* %13
%81 = or i32 %79, %80
%82 = icmp eq i32 %81, 0
br i1 %82, label %83, label %88
83: ; preds = %78
%84 = load i32, i32* %10
%85 = icmp slt i32 %84, 0
%86 = zext i1 %85 to i64
%87 = select i1 %85, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18
store double %87, double* %3
br label %157
88: ; preds = %78
%89 = load i32, i32* %11
%90 = icmp eq i32 %89, 2146435072
br i1 %90, label %91, label %109
91: ; preds = %88
%92 = load i32, i32* %12
%93 = icmp eq i32 %92, 2146435072
br i1 %93, label %94, label %101
94: ; preds = %91
%95 = load i32, i32* %8
switch i32 %95, label %100 [
i32 0, label %96
i32 1, label %97
i32 2, label %98
i32 3, label %99
]
96: ; preds = %94
store double 0x3FE921FB54442D18, double* %3
br label %157
97: ; preds = %94
store double 0xBFE921FB54442D18, double* %3
br label %157
98: ; preds = %94
store double 0x4002D97C7F3321D2, double* %3
br label %157
99: ; preds = %94
store double 0xC002D97C7F3321D2, double* %3
br label %157
100: ; preds = %94
br label %108
101: ; preds = %91
%102 = load i32, i32* %8
switch i32 %102, label %107 [
i32 0, label %103
i32 1, label %104
i32 2, label %105
i32 3, label %106
]
103: ; preds = %101
store double 0.000000e+00, double* %3
br label %157
104: ; preds = %101
store double -0.000000e+00, double* %3
br label %157
105: ; preds = %101
store double 0x400921FB54442D18, double* %3
br label %157
106: ; preds = %101
store double 0xC00921FB54442D18, double* %3
br label %157
107: ; preds = %101
br label %108
108: ; preds = %107, %100
br label %109
109: ; preds = %108, %88
%110 = load i32, i32* %12
%111 = icmp eq i32 %110, 2146435072
br i1 %111, label %112, label %117
112: ; preds = %109
%113 = load i32, i32* %10
%114 = icmp slt i32 %113, 0
%115 = zext i1 %114 to i64
%116 = select i1 %114, double 0xBFF921FB54442D18, double 0x3FF921FB54442D18
store double %116, double* %3
br label %157
117: ; preds = %109
%118 = load i32, i32* %12
%119 = load i32, i32* %11
%120 = sub nsw i32 %118, %119
%121 = ashr i32 %120, 20
store i32 %121, i32* %7
%122 = load i32, i32* %7
%123 = icmp sgt i32 %122, 60
br i1 %123, label %124, label %125
124: ; preds = %117
store double 0x3FF921FB54442D18, double* %6
br label %139
125: ; preds = %117
%126 = load i32, i32* %9
%127 = icmp slt i32 %126, 0
br i1 %127, label %128, label %132
128: ; preds = %125
%129 = load i32, i32* %7
%130 = icmp slt i32 %129, -60
br i1 %130, label %131, label %132
131: ; preds = %128
store double 0.000000e+00, double* %6
br label %138
132: ; preds = %128, %125
%133 = load double, double* %4
%134 = load double, double* %5
%135 = fdiv double %133, %134
%136 = call double @llvm.fabs.f64(double %135)
%137 = call double @atan(double %136)
store double %137, double* %6
br label %138
138: ; preds = %132, %131
br label %139
139: ; preds = %138, %124
%140 = load i32, i32* %8
switch i32 %140, label %153 [
i32 0, label %141
i32 1, label %143
i32 2, label %149
]
141: ; preds = %139
%142 = load double, double* %6
store double %142, double* %3
br label %157
143: ; preds = %139
%144 = bitcast double* %6 to i32*
%145 = getelementptr inbounds i32, i32* %144, i64 1
%146 = load i32, i32* %145
%147 = xor i32 %146, -2147483648
store i32 %147, i32* %145
%148 = load double, double* %6
store double %148, double* %3
br label %157
149: ; preds = %139
%150 = load double, double* %6
%151 = fsub double %150, 0x3CA1A62633145C07
%152 = fsub double 0x400921FB54442D18, %151
store double %152, double* %3
br label %157
153: ; preds = %139
%154 = load double, double* %6
%155 = fsub double %154, 0x3CA1A62633145C07
%156 = fsub double %155, 0x400921FB54442D18
store double %156, double* %3
br label %157
157: ; preds = %153, %149, %143, %141, %112, %106, %105, %104, %103, %99, %98, %97, %96, %83, %76, %75, %73, %56, %46
%158 = load double, double* %3
ret double %158
}

LLVM IR (-O2):
@switch.table.atan2 = [4 x double] [double 0x3FE921FB54442D18, double 0xBFE921FB54442D18, double 0x4002D97C7F3321D2, double 0xC002D97C7F3321D2]
@switch.table.atan2.1 = [4 x double] [double 0.000000e+00, double -0.000000e+00, double 0x400921FB54442D18, double 0xC00921FB54442D18]
define double @atan2(double %0, double %1) {
%3 = bitcast double %1 to i64
%4 = lshr i64 %3, 32
%5 = trunc i64 %4 to i32
%6 = and i32 %5, 2147483647
%7 = trunc i64 %3 to i32
%8 = bitcast double %0 to i64
%9 = lshr i64 %8, 32
%10 = trunc i64 %9 to i32
%11 = and i32 %10, 2147483647
%12 = trunc i64 %8 to i32
%13 = icmp ne i32 %7, 0
%14 = zext i1 %13 to i32
%15 = or i32 %6, %14
%16 = icmp ugt i32 %15, 2146435072
br i1 %16, label %22, label %17
17: ; preds = %2
%18 = icmp ne i32 %12, 0
%19 = zext i1 %18 to i32
%20 = or i32 %11, %19
%21 = icmp ugt i32 %20, 2146435072
br i1 %21, label %22, label %24
22: ; preds = %17, %2
%23 = fadd double %0, %1
br label %84
24: ; preds = %17
%25 = add nsw i32 %5, -1072693248
%26 = or i32 %25, %7
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %24
%29 = tail call double @atan(double %0)
br label %84
30: ; preds = %24
%31 = lshr i32 %10, 31
%32 = lshr i32 %5, 30
%33 = and i32 %32, 2
%34 = or i32 %33, %31
%35 = or i32 %11, %12
%36 = icmp eq i32 %35, 0
br i1 %36, label %37, label %41
37: ; preds = %30
switch i32 %34, label %40 [
i32 0, label %84
i32 1, label %84
i32 2, label %38
i32 3, label %39
]
38: ; preds = %37
br label %84
39: ; preds = %37
br label %84
40: ; preds = %37
unreachable
41: ; preds = %30
%42 = or i32 %6, %7
%43 = icmp eq i32 %42, 0
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = tail call double @llvm.copysign.f64(double 0x3FF921FB54442D18, double %0)
br label %84
46: ; preds = %41
%47 = icmp eq i32 %6, 2146435072
%48 = icmp eq i32 %11, 2146435072
br i1 %47, label %49, label %50
49: ; preds = %46
br i1 %48, label %76, label %80
50: ; preds = %46
br i1 %48, label %51, label %53
51: ; preds = %50
%52 = tail call double @llvm.copysign.f64(double 0x3FF921FB54442D18, double %0)
br label %84
53: ; preds = %50
%54 = sub nsw i32 %11, %6
%55 = icmp sgt i32 %54, 63963135
br i1 %55, label %64, label %56
56: ; preds = %53
%57 = icmp slt i64 %3, 0
%58 = icmp slt i32 %54, -62914560
%59 = select i1 %57, i1 %58, i1 false
br i1 %59, label %64, label %60
60: ; preds = %56
%61 = fdiv double %0, %1
%62 = tail call double @llvm.fabs.f64(double %61)
%63 = tail call double @atan(double %62)
br label %64
64: ; preds = %56, %53, %60
%65 = phi double [ %63, %60 ], [ 0x3FF921FB54442D18, %53 ], [ 0.000000e+00, %56 ]
switch i32 %34, label %73 [
i32 0, label %84
i32 1, label %66
i32 2, label %70
]
66: ; preds = %64
%67 = bitcast double %65 to i64
%68 = xor i64 %67, -9223372036854775808
%69 = bitcast i64 %68 to double
br label %84
70: ; preds = %64
%71 = fadd double %65, 0xBCA1A62633145C07
%72 = fsub double 0x400921FB54442D18, %71
br label %84
73: ; preds = %64
%74 = fadd double %65, 0xBCA1A62633145C07
%75 = fadd double %74, 0xC00921FB54442D18
br label %84
76: ; preds = %49
%77 = zext i32 %34 to i64
%78 = getelementptr inbounds [4 x double], [4 x double]* @switch.table.atan2, i64 0, i64 %77
%79 = load double, double* %78
br label %84
80: ; preds = %49
%81 = zext i32 %34 to i64
%82 = getelementptr inbounds [4 x double], [4 x double]* @switch.table.atan2.1, i64 0, i64 %81
%83 = load double, double* %82
br label %84
84: ; preds = %80, %76, %64, %37, %37, %73, %70, %66, %51, %44, %39, %38, %28, %22
%85 = phi double [ %23, %22 ], [ %29, %28 ], [ %45, %44 ], [ %52, %51 ], [ %75, %73 ], [ %72, %70 ], [ %69, %66 ], [ 0xC00921FB54442D18, %39 ], [ 0x400921FB54442D18, %38 ], [ %0, %37 ], [ %0, %37 ], [ %65, %64 ], [ %79, %76 ], [ %83, %80 ]
ret double %85
}