#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*/ abort();
double cosatan(double);
float cosatanf(float);
long double cosatanl(long double);
double nextafter(int /*<<< orphan*/, double);
float nextafterf(int /*<<< orphan*/, float);
long double nextafterl(int /*<<< orphan*/, long double);
double sinatan(double);
float sinatanf(float);
long double sinatanl(long double);
int /*<<< orphan*/ sqrt(double);
int /*<<< orphan*/ sqrtf(float);
int /*<<< orphan*/ sqrtl(long double);
int main() {
  float fc = nextafterf(sqrtf(3.40282346638528859811704183484516925e+38F - 1),
                        3.40282346638528859811704183484516925e+38F);
  double c =
      nextafter(sqrt(((double)1.79769313486231570814527423731704357e+308L) - 1),
                ((double)1.79769313486231570814527423731704357e+308L));
  long double lc =
      nextafterl(sqrtl(1.18973149535723176502126385303097021e+4932L - 1),
                 1.18973149535723176502126385303097021e+4932L);
  volatile float fy;
  volatile double y;
  volatile long double ly;
  fy = sinatanf(fc);
  y = sinatan(c);
  ly = sinatanl(lc);
  if (fy != 1.f || y != 1 || ly != 1.L)
    abort();
  fy = cosatanf(fc);
  y = cosatan(c);
  ly = cosatanl(lc);
  if (fy != 0.f || y != 0. || ly != 0.L)
    abort();
  fy = sinatanf(-fc);
  y = sinatan(-c);
  ly = sinatanl(-lc);
  if (fy != -1.f || y != -1. || ly != -1.L)
    abort();
  fy = cosatanf(-fc);
  y = cosatan(-c);
  ly = cosatanl(-lc);
  if (fy != 0.f || y != 0. || ly != 0.L)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xe1d(%rip),%xmm0
movss  %xmm0,-0x5c(%rbp)
call   1090 <sqrtf@plt>
movss  -0x5c(%rbp),%xmm0
mov    %eax,%edi
call   10c0 <nextafterf@plt>
movss  %xmm0,-0x8(%rbp)
movsd  0xe06(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
call   10d0 <sqrt@plt>
movsd  -0x58(%rbp),%xmm0
mov    %eax,%edi
call   10b0 <nextafter@plt>
movsd  %xmm0,-0x10(%rbp)
mov    %rsp,%rax
fldt   0xe02(%rip)
fld    %st(0)
fstpt  -0x4c(%rbp)
fstpt  (%rax)
call   1080 <sqrtl@plt>
fldt   -0x4c(%rbp)
mov    %eax,%edi
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <nextafterl@plt>
fstpt  -0x20(%rbp)
movss  -0x8(%rbp),%xmm0
call   10e0 <sinatanf@plt>
movss  %xmm0,-0x24(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1060 <sinatan@plt>
movsd  %xmm0,-0x30(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   10f0 <sinatanl@plt>
fstpt  -0x40(%rbp)
movss  -0x24(%rbp),%xmm0
movss  0xd79(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    12cf <main+0xff>
jp     12cf <main+0xff>
movsd  -0x30(%rbp),%xmm0
movsd  0xd75(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    12cf <main+0xff>
jp     12cf <main+0xff>
fldt   -0x40(%rbp)
fld1
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    12cf <main+0xff>
jp     12cf <main+0xff>
jmp    12d6 <main+0x106>
mov    $0x0,%al
call   1040 <abort@plt>
movss  -0x8(%rbp),%xmm0
call   1050 <cosatanf@plt>
movss  %xmm0,-0x24(%rbp)
movsd  -0x10(%rbp),%xmm0
call   10a0 <cosatan@plt>
movsd  %xmm0,-0x30(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1070 <cosatanl@plt>
fstpt  -0x40(%rbp)
movss  -0x24(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    134f <main+0x17f>
jp     134f <main+0x17f>
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    134f <main+0x17f>
jp     134f <main+0x17f>
fldt   -0x40(%rbp)
fldz
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    134f <main+0x17f>
jp     134f <main+0x17f>
jmp    1356 <main+0x186>
mov    $0x0,%al
call   1040 <abort@plt>
movaps 0xce3(%rip),%xmm1
movss  -0x8(%rbp),%xmm0
pxor   %xmm1,%xmm0
call   10e0 <sinatanf@plt>
movss  %xmm0,-0x24(%rbp)
movaps 0xcd9(%rip),%xmm1
movsd  -0x10(%rbp),%xmm0
pxor   %xmm1,%xmm0
call   1060 <sinatan@plt>
movsd  %xmm0,-0x30(%rbp)
fldt   -0x20(%rbp)
fchs
mov    %rsp,%rax
fstpt  (%rax)
call   10f0 <sinatanl@plt>
fstpt  -0x40(%rbp)
movss  -0x24(%rbp),%xmm0
movss  0xc5f(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    13f3 <main+0x223>
jp     13f3 <main+0x223>
movsd  -0x30(%rbp),%xmm0
movsd  0xc5b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    13f3 <main+0x223>
jp     13f3 <main+0x223>
fldt   -0x40(%rbp)
fld1
fchs
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    13f3 <main+0x223>
jp     13f3 <main+0x223>
jmp    13fa <main+0x22a>
mov    $0x0,%al
call   1040 <abort@plt>
movaps 0xc3f(%rip),%xmm1
movss  -0x8(%rbp),%xmm0
pxor   %xmm1,%xmm0
call   1050 <cosatanf@plt>
movss  %xmm0,-0x24(%rbp)
movaps 0xc35(%rip),%xmm1
movsd  -0x10(%rbp),%xmm0
pxor   %xmm1,%xmm0
call   10a0 <cosatan@plt>
movsd  %xmm0,-0x30(%rbp)
fldt   -0x20(%rbp)
fchs
mov    %rsp,%rax
fstpt  (%rax)
call   1070 <cosatanl@plt>
fstpt  -0x40(%rbp)
movss  -0x24(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    148b <main+0x2bb>
jp     148b <main+0x2bb>
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    148b <main+0x2bb>
jp     148b <main+0x2bb>
fldt   -0x40(%rbp)
fldz
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    148b <main+0x2bb>
jp     148b <main+0x2bb>
jmp    1492 <main+0x2c2>
mov    $0x0,%al
call   1040 <abort@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x78,%rsp
movss  0xe24(%rip),%xmm0
call   1090 <sqrtf@plt>
mov    %eax,%edi
movss  0xe15(%rip),%xmm0
call   10c0 <nextafterf@plt>
movaps %xmm0,0x50(%rsp)
movsd  0xe13(%rip),%xmm0
call   10d0 <sqrt@plt>
mov    %eax,%edi
movsd  0xe04(%rip),%xmm0
call   10b0 <nextafter@plt>
movaps %xmm0,0x40(%rsp)
fldt   0xe14(%rip)
fld    %st(0)
fstpt  0x24(%rsp)
fstpt  (%rsp)
call   1080 <sqrtl@plt>
fldt   0x24(%rsp)
fstpt  (%rsp)
mov    %eax,%edi
call   1030 <nextafterl@plt>
fstpt  0x24(%rsp)
movaps 0x50(%rsp),%xmm0
call   10e0 <sinatanf@plt>
movss  %xmm0,0x14(%rsp)
movaps 0x40(%rsp),%xmm0
call   1060 <sinatan@plt>
movsd  %xmm0,0x18(%rsp)
fldt   0x24(%rsp)
fstpt  (%rsp)
call   10f0 <sinatanl@plt>
fstpt  0x30(%rsp)
movss  0x14(%rsp),%xmm0
ucomiss 0xd8b(%rip),%xmm0
jne    1439 <main+0x269>
jp     1439 <main+0x269>
movsd  0x18(%rsp),%xmm0
ucomisd 0xd85(%rip),%xmm0
jne    1439 <main+0x269>
jp     1439 <main+0x269>
fldt   0x30(%rsp)
fld1
fld    %st(0)
fstpt  0x6c(%rsp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1439 <main+0x269>
jp     1439 <main+0x269>
movaps 0x50(%rsp),%xmm0
call   1050 <cosatanf@plt>
movss  %xmm0,0x14(%rsp)
movaps 0x40(%rsp),%xmm0
call   10a0 <cosatan@plt>
movsd  %xmm0,0x18(%rsp)
fldt   0x24(%rsp)
fstpt  (%rsp)
call   1070 <cosatanl@plt>
fstpt  0x30(%rsp)
movss  0x14(%rsp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1439 <main+0x269>
jp     1439 <main+0x269>
movsd  0x18(%rsp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1439 <main+0x269>
jp     1439 <main+0x269>
fldt   0x30(%rsp)
fldz
fld    %st(0)
fstpt  0x60(%rsp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1439 <main+0x269>
jp     1439 <main+0x269>
movaps 0x50(%rsp),%xmm0
xorps  0xcf8(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
call   10e0 <sinatanf@plt>
movss  %xmm0,0x14(%rsp)
movaps 0x40(%rsp),%xmm0
xorps  0xcec(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
call   1060 <sinatan@plt>
movsd  %xmm0,0x18(%rsp)
fldt   0x24(%rsp)
fchs
fld    %st(0)
fstpt  0x24(%rsp)
fstpt  (%rsp)
call   10f0 <sinatanl@plt>
fstpt  0x30(%rsp)
movss  0x14(%rsp),%xmm0
ucomiss 0xc6f(%rip),%xmm0
jne    1439 <main+0x269>
jp     1439 <main+0x269>
movsd  0x18(%rsp),%xmm0
ucomisd 0xc6d(%rip),%xmm0
jne    1439 <main+0x269>
jp     1439 <main+0x269>
fldt   0x30(%rsp)
fldt   0x6c(%rsp)
fchs
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1439 <main+0x269>
jp     1439 <main+0x269>
movaps 0x50(%rsp),%xmm0
call   1050 <cosatanf@plt>
movss  %xmm0,0x14(%rsp)
movaps 0x40(%rsp),%xmm0
call   10a0 <cosatan@plt>
movsd  %xmm0,0x18(%rsp)
fldt   0x24(%rsp)
fstpt  (%rsp)
call   1070 <cosatanl@plt>
fstpt  0x30(%rsp)
movss  0x14(%rsp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1439 <main+0x269>
jp     1439 <main+0x269>
movsd  0x18(%rsp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1439 <main+0x269>
jp     1439 <main+0x269>
fldt   0x30(%rsp)
fldt   0x60(%rsp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1439 <main+0x269>
jp     1439 <main+0x269>
xor    %eax,%eax
add    $0x78,%rsp
ret
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca double
%4 = alloca x86_fp80
%5 = alloca float
%6 = alloca double
%7 = alloca x86_fp80
store i32 0, i32* %1
%8 = call i32 @sqrtf(float 0x47EFFFFFE0000000)
%9 = call float @nextafterf(i32 %8, float 0x47EFFFFFE0000000)
store float %9, float* %2
%10 = call i32 @sqrt(double 0x7FEFFFFFFFFFFFFF)
%11 = call double @nextafter(i32 %10, double 0x7FEFFFFFFFFFFFFF)
store double %11, double* %3
%12 = call i32 @sqrtl(x86_fp80 0xK7FFEFFFFFFFFFFFFFFFF)
%13 = call x86_fp80 @nextafterl(i32 %12, x86_fp80 0xK7FFEFFFFFFFFFFFFFFFF)
store x86_fp80 %13, x86_fp80* %4
%14 = load float, float* %2
%15 = call float @sinatanf(float %14)
store volatile float %15, float* %5
%16 = load double, double* %3
%17 = call double @sinatan(double %16)
store volatile double %17, double* %6
%18 = load x86_fp80, x86_fp80* %4
%19 = call x86_fp80 @sinatanl(x86_fp80 %18)
store volatile x86_fp80 %19, x86_fp80* %7
%20 = load volatile float, float* %5
%21 = fcmp une float %20, 1.000000e+00
br i1 %21, label %28, label %22
22: ; preds = %0
%23 = load volatile double, double* %6
%24 = fcmp une double %23, 1.000000e+00
br i1 %24, label %28, label %25
25: ; preds = %22
%26 = load volatile x86_fp80, x86_fp80* %7
%27 = fcmp une x86_fp80 %26, 0xK3FFF8000000000000000
br i1 %27, label %28, label %30
28: ; preds = %25, %22, %0
%29 = call i32 (...) @abort()
unreachable
30: ; preds = %25
%31 = load float, float* %2
%32 = call float @cosatanf(float %31)
store volatile float %32, float* %5
%33 = load double, double* %3
%34 = call double @cosatan(double %33)
store volatile double %34, double* %6
%35 = load x86_fp80, x86_fp80* %4
%36 = call x86_fp80 @cosatanl(x86_fp80 %35)
store volatile x86_fp80 %36, x86_fp80* %7
%37 = load volatile float, float* %5
%38 = fcmp une float %37, 0.000000e+00
br i1 %38, label %45, label %39
39: ; preds = %30
%40 = load volatile double, double* %6
%41 = fcmp une double %40, 0.000000e+00
br i1 %41, label %45, label %42
42: ; preds = %39
%43 = load volatile x86_fp80, x86_fp80* %7
%44 = fcmp une x86_fp80 %43, 0xK00000000000000000000
br i1 %44, label %45, label %47
45: ; preds = %42, %39, %30
%46 = call i32 (...) @abort()
unreachable
47: ; preds = %42
%48 = load float, float* %2
%49 = fneg float %48
%50 = call float @sinatanf(float %49)
store volatile float %50, float* %5
%51 = load double, double* %3
%52 = fneg double %51
%53 = call double @sinatan(double %52)
store volatile double %53, double* %6
%54 = load x86_fp80, x86_fp80* %4
%55 = fneg x86_fp80 %54
%56 = call x86_fp80 @sinatanl(x86_fp80 %55)
store volatile x86_fp80 %56, x86_fp80* %7
%57 = load volatile float, float* %5
%58 = fcmp une float %57, -1.000000e+00
br i1 %58, label %65, label %59
59: ; preds = %47
%60 = load volatile double, double* %6
%61 = fcmp une double %60, -1.000000e+00
br i1 %61, label %65, label %62
62: ; preds = %59
%63 = load volatile x86_fp80, x86_fp80* %7
%64 = fcmp une x86_fp80 %63, 0xKBFFF8000000000000000
br i1 %64, label %65, label %67
65: ; preds = %62, %59, %47
%66 = call i32 (...) @abort()
unreachable
67: ; preds = %62
%68 = load float, float* %2
%69 = fneg float %68
%70 = call float @cosatanf(float %69)
store volatile float %70, float* %5
%71 = load double, double* %3
%72 = fneg double %71
%73 = call double @cosatan(double %72)
store volatile double %73, double* %6
%74 = load x86_fp80, x86_fp80* %4
%75 = fneg x86_fp80 %74
%76 = call x86_fp80 @cosatanl(x86_fp80 %75)
store volatile x86_fp80 %76, x86_fp80* %7
%77 = load volatile float, float* %5
%78 = fcmp une float %77, 0.000000e+00
br i1 %78, label %85, label %79
79: ; preds = %67
%80 = load volatile double, double* %6
%81 = fcmp une double %80, 0.000000e+00
br i1 %81, label %85, label %82
82: ; preds = %79
%83 = load volatile x86_fp80, x86_fp80* %7
%84 = fcmp une x86_fp80 %83, 0xK00000000000000000000
br i1 %84, label %85, label %87
85: ; preds = %82, %79, %67
%86 = call i32 (...) @abort()
unreachable
87: ; preds = %82
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca float
%2 = alloca double
%3 = alloca x86_fp80
%4 = tail call i32 @sqrtf(float 0x47EFFFFFE0000000)
%5 = tail call float @nextafterf(i32 %4, float 0x47EFFFFFE0000000)
%6 = tail call i32 @sqrt(double 0x7FEFFFFFFFFFFFFF)
%7 = tail call double @nextafter(i32 %6, double 0x7FEFFFFFFFFFFFFF)
%8 = tail call i32 @sqrtl(x86_fp80 0xK7FFEFFFFFFFFFFFFFFFF)
%9 = tail call x86_fp80 @nextafterl(i32 %8, x86_fp80 0xK7FFEFFFFFFFFFFFFFFFF)
%10 = bitcast float* %1 to i8*
%11 = bitcast double* %2 to i8*
%12 = bitcast x86_fp80* %3 to i8*
%13 = tail call float @sinatanf(float %5)
store volatile float %13, float* %1
%14 = tail call double @sinatan(double %7)
store volatile double %14, double* %2
%15 = tail call x86_fp80 @sinatanl(x86_fp80 %9)
store volatile x86_fp80 %15, x86_fp80* %3
%16 = load volatile float, float* %1
%17 = fcmp une float %16, 1.000000e+00
br i1 %17, label %24, label %18
18: ; preds = %0
%19 = load volatile double, double* %2
%20 = fcmp une double %19, 1.000000e+00
br i1 %20, label %24, label %21
21: ; preds = %18
%22 = load volatile x86_fp80, x86_fp80* %3
%23 = fcmp une x86_fp80 %22, 0xK3FFF8000000000000000
br i1 %23, label %24, label %26
24: ; preds = %21, %18, %0
%25 = tail call i32 (...) @abort()
unreachable
26: ; preds = %21
%27 = tail call float @cosatanf(float %5)
store volatile float %27, float* %1
%28 = tail call double @cosatan(double %7)
store volatile double %28, double* %2
%29 = tail call x86_fp80 @cosatanl(x86_fp80 %9)
store volatile x86_fp80 %29, x86_fp80* %3
%30 = load volatile float, float* %1
%31 = fcmp une float %30, 0.000000e+00
br i1 %31, label %38, label %32
32: ; preds = %26
%33 = load volatile double, double* %2
%34 = fcmp une double %33, 0.000000e+00
br i1 %34, label %38, label %35
35: ; preds = %32
%36 = load volatile x86_fp80, x86_fp80* %3
%37 = fcmp une x86_fp80 %36, 0xK00000000000000000000
br i1 %37, label %38, label %40
38: ; preds = %35, %32, %26
%39 = tail call i32 (...) @abort()
unreachable
40: ; preds = %35
%41 = fneg float %5
%42 = tail call float @sinatanf(float %41)
store volatile float %42, float* %1
%43 = fneg double %7
%44 = tail call double @sinatan(double %43)
store volatile double %44, double* %2
%45 = fneg x86_fp80 %9
%46 = tail call x86_fp80 @sinatanl(x86_fp80 %45)
store volatile x86_fp80 %46, x86_fp80* %3
%47 = load volatile float, float* %1
%48 = fcmp une float %47, -1.000000e+00
br i1 %48, label %55, label %49
49: ; preds = %40
%50 = load volatile double, double* %2
%51 = fcmp une double %50, -1.000000e+00
br i1 %51, label %55, label %52
52: ; preds = %49
%53 = load volatile x86_fp80, x86_fp80* %3
%54 = fcmp une x86_fp80 %53, 0xKBFFF8000000000000000
br i1 %54, label %55, label %57
55: ; preds = %52, %49, %40
%56 = tail call i32 (...) @abort()
unreachable
57: ; preds = %52
%58 = tail call float @cosatanf(float %41)
store volatile float %58, float* %1
%59 = tail call double @cosatan(double %43)
store volatile double %59, double* %2
%60 = tail call x86_fp80 @cosatanl(x86_fp80 %45)
store volatile x86_fp80 %60, x86_fp80* %3
%61 = load volatile float, float* %1
%62 = fcmp une float %61, 0.000000e+00
br i1 %62, label %69, label %63
63: ; preds = %57
%64 = load volatile double, double* %2
%65 = fcmp une double %64, 0.000000e+00
br i1 %65, label %69, label %66
66: ; preds = %63
%67 = load volatile x86_fp80, x86_fp80* %3
%68 = fcmp une x86_fp80 %67, 0xK00000000000000000000
br i1 %68, label %69, label %71
69: ; preds = %66, %63, %57
%70 = tail call i32 (...) @abort()
unreachable
71: ; preds = %66
ret i32 0
}