#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 */
float cosf(float);
float fabsf(float);
int /*<<< orphan*/ link_error();
float sinf(float);
float tanf(float);
void test1f(float x) {
  if (cosf(x) != cosf(-x))
    link_error();
  if (cosf(x) != cosf(fabsf(x)))
    link_error();
  if (cosf(x) != cosf(-fabsf(x)))
    link_error();
  if (cosf(tanf(x)) != cosf(tanf(-fabsf(x))))
    link_error();
  if (sinf(x) / cosf(x) != tanf(x))
    link_error();
  if (cosf(x) / sinf(x) != 1.0f / tanf(x))
    link_error();
  if (tanf(x) * cosf(x) != sinf(x))
    link_error();
  if (cosf(x) * tanf(x) != sinf(x))
    link_error();
  if (sinf(x) / tanf(x) != cosf(x))
    link_error();
  if (tanf(x) / sinf(x) != 1.0f / cosf(x))
    link_error();
}


x86 assembly (clang, -O0):
<test1f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1050 <cosf@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
call   1050 <cosf@plt>
movaps %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jne    118f <test1f+0x4f>
jp     118f <test1f+0x4f>
jmp    1196 <test1f+0x56>
mov    $0x0,%al
call   1060 <link_error@plt>
movss  -0x4(%rbp),%xmm0
call   1050 <cosf@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movaps 0xe4f(%rip),%xmm1
pand   %xmm1,%xmm0
call   1050 <cosf@plt>
movaps %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jne    11d6 <test1f+0x96>
jp     11d6 <test1f+0x96>
jmp    11dd <test1f+0x9d>
mov    $0x0,%al
call   1060 <link_error@plt>
movss  -0x4(%rbp),%xmm0
call   1050 <cosf@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movaps 0xe08(%rip),%xmm1
pand   %xmm1,%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
call   1050 <cosf@plt>
movaps %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jne    122a <test1f+0xea>
jp     122a <test1f+0xea>
jmp    1231 <test1f+0xf1>
mov    $0x0,%al
call   1060 <link_error@plt>
movss  -0x4(%rbp),%xmm0
call   1040 <tanf@plt>
call   1050 <cosf@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
movaps 0xdaf(%rip),%xmm1
pand   %xmm1,%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
call   1040 <tanf@plt>
call   1050 <cosf@plt>
movaps %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jne    1288 <test1f+0x148>
jp     1288 <test1f+0x148>
jmp    128f <test1f+0x14f>
mov    $0x0,%al
call   1060 <link_error@plt>
movss  -0x4(%rbp),%xmm0
call   1030 <sinf@plt>
movss  %xmm0,-0x1c(%rbp)
movss  -0x4(%rbp),%xmm0
call   1050 <cosf@plt>
movaps %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <tanf@plt>
movaps %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jne    12df <test1f+0x19f>
jp     12df <test1f+0x19f>
jmp    12e6 <test1f+0x1a6>
mov    $0x0,%al
call   1060 <link_error@plt>
movss  -0x4(%rbp),%xmm0
call   1050 <cosf@plt>
movss  %xmm0,-0x24(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sinf@plt>
movaps %xmm0,%xmm1
movss  -0x24(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <tanf@plt>
movaps %xmm0,%xmm2
movss  -0x20(%rbp),%xmm0
movss  0xce6(%rip),%xmm1
divss  %xmm2,%xmm1
ucomiss %xmm1,%xmm0
jne    1342 <test1f+0x202>
jp     1342 <test1f+0x202>
jmp    1349 <test1f+0x209>
mov    $0x0,%al
call   1060 <link_error@plt>
movss  -0x4(%rbp),%xmm0
call   1040 <tanf@plt>
movss  %xmm0,-0x2c(%rbp)
movss  -0x4(%rbp),%xmm0
call   1050 <cosf@plt>
movaps %xmm0,%xmm1
movss  -0x2c(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sinf@plt>
movaps %xmm0,%xmm1
movss  -0x28(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jne    1399 <test1f+0x259>
jp     1399 <test1f+0x259>
jmp    13a0 <test1f+0x260>
mov    $0x0,%al
call   1060 <link_error@plt>
movss  -0x4(%rbp),%xmm0
call   1050 <cosf@plt>
movss  %xmm0,-0x34(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <tanf@plt>
movaps %xmm0,%xmm1
movss  -0x34(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sinf@plt>
movaps %xmm0,%xmm1
movss  -0x30(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jne    13f0 <test1f+0x2b0>
jp     13f0 <test1f+0x2b0>
jmp    13f7 <test1f+0x2b7>
mov    $0x0,%al
call   1060 <link_error@plt>
movss  -0x4(%rbp),%xmm0
call   1030 <sinf@plt>
movss  %xmm0,-0x3c(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <tanf@plt>
movaps %xmm0,%xmm1
movss  -0x3c(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x4(%rbp),%xmm0
call   1050 <cosf@plt>
movaps %xmm0,%xmm1
movss  -0x38(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jne    1447 <test1f+0x307>
jp     1447 <test1f+0x307>
jmp    144e <test1f+0x30e>
mov    $0x0,%al
call   1060 <link_error@plt>
movss  -0x4(%rbp),%xmm0
call   1040 <tanf@plt>
movss  %xmm0,-0x44(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sinf@plt>
movaps %xmm0,%xmm1
movss  -0x44(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x40(%rbp)
movss  -0x4(%rbp),%xmm0
call   1050 <cosf@plt>
movaps %xmm0,%xmm2
movss  -0x40(%rbp),%xmm0
movss  0xb7e(%rip),%xmm1
divss  %xmm2,%xmm1
ucomiss %xmm1,%xmm0
jne    14aa <test1f+0x36a>
jp     14aa <test1f+0x36a>
jmp    14b1 <test1f+0x371>
mov    $0x0,%al
call   1060 <link_error@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1f>:
sub    $0x38,%rsp
movaps %xmm0,0x10(%rsp)
call   1050 <cosf@plt>
movss  %xmm0,(%rsp)
movaps 0x10(%rsp),%xmm0
call   1050 <cosf@plt>
movss  (%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    1169 <test1f+0x29>
jnp    1170 <test1f+0x30>
xor    %eax,%eax
call   1060 <link_error@plt>
movaps 0x10(%rsp),%xmm0
call   1050 <cosf@plt>
movss  %xmm0,0x20(%rsp)
movaps 0xe79(%rip),%xmm0
andps  0x10(%rsp),%xmm0
movaps %xmm0,(%rsp)
call   1050 <cosf@plt>
movss  0x20(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    11a2 <test1f+0x62>
jnp    11a9 <test1f+0x69>
xor    %eax,%eax
call   1060 <link_error@plt>
movaps 0x10(%rsp),%xmm0
call   1050 <cosf@plt>
movss  %xmm0,0x20(%rsp)
movaps (%rsp),%xmm0
call   1050 <cosf@plt>
movss  0x20(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    11cf <test1f+0x8f>
jnp    11d6 <test1f+0x96>
xor    %eax,%eax
call   1060 <link_error@plt>
movaps 0x10(%rsp),%xmm0
call   1040 <tanf@plt>
call   1050 <cosf@plt>
movss  %xmm0,0x20(%rsp)
movaps (%rsp),%xmm0
call   1040 <tanf@plt>
call   1050 <cosf@plt>
movss  0x20(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    1206 <test1f+0xc6>
jnp    120d <test1f+0xcd>
xor    %eax,%eax
call   1060 <link_error@plt>
movaps 0x10(%rsp),%xmm0
call   1030 <sinf@plt>
movss  %xmm0,(%rsp)
movaps 0x10(%rsp),%xmm0
call   1050 <cosf@plt>
movss  (%rsp),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
movaps 0x10(%rsp),%xmm0
call   1040 <tanf@plt>
movss  (%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    124a <test1f+0x10a>
jnp    1251 <test1f+0x111>
xor    %eax,%eax
call   1060 <link_error@plt>
movaps 0x10(%rsp),%xmm0
call   1050 <cosf@plt>
movaps %xmm0,(%rsp)
movaps 0x10(%rsp),%xmm0
call   1030 <sinf@plt>
movaps %xmm0,0x20(%rsp)
movaps 0x10(%rsp),%xmm0
call   1040 <tanf@plt>
movaps 0xd91(%rip),%xmm1
movaps (%rsp),%xmm2
movss  %xmm2,%xmm1
movaps 0x20(%rsp),%xmm2
unpcklps %xmm0,%xmm2
divps  %xmm2,%xmm1
movaps %xmm1,%xmm0
shufps $0x55,%xmm1,%xmm0
ucomiss %xmm0,%xmm1
jne    12a0 <test1f+0x160>
jnp    12a7 <test1f+0x167>
xor    %eax,%eax
call   1060 <link_error@plt>
movaps 0x10(%rsp),%xmm0
call   1040 <tanf@plt>
movss  %xmm0,(%rsp)
movaps 0x10(%rsp),%xmm0
call   1050 <cosf@plt>
mulss  (%rsp),%xmm0
movss  %xmm0,(%rsp)
movaps 0x10(%rsp),%xmm0
call   1030 <sinf@plt>
movss  (%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    12e0 <test1f+0x1a0>
jnp    12e7 <test1f+0x1a7>
xor    %eax,%eax
call   1060 <link_error@plt>
movaps 0x10(%rsp),%xmm0
call   1050 <cosf@plt>
movss  %xmm0,(%rsp)
movaps 0x10(%rsp),%xmm0
call   1040 <tanf@plt>
mulss  (%rsp),%xmm0
movss  %xmm0,(%rsp)
movaps 0x10(%rsp),%xmm0
call   1030 <sinf@plt>
movss  (%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    1320 <test1f+0x1e0>
jnp    1327 <test1f+0x1e7>
xor    %eax,%eax
call   1060 <link_error@plt>
movaps 0x10(%rsp),%xmm0
call   1030 <sinf@plt>
movss  %xmm0,(%rsp)
movaps 0x10(%rsp),%xmm0
call   1040 <tanf@plt>
movss  (%rsp),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
movaps 0x10(%rsp),%xmm0
call   1050 <cosf@plt>
movss  (%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    1364 <test1f+0x224>
jnp    136b <test1f+0x22b>
xor    %eax,%eax
call   1060 <link_error@plt>
movaps 0x10(%rsp),%xmm0
call   1040 <tanf@plt>
movaps %xmm0,(%rsp)
movaps 0x10(%rsp),%xmm0
call   1030 <sinf@plt>
movaps %xmm0,0x20(%rsp)
movaps 0x10(%rsp),%xmm0
call   1050 <cosf@plt>
movaps 0xc77(%rip),%xmm1
movaps (%rsp),%xmm2
movss  %xmm2,%xmm1
movaps 0x20(%rsp),%xmm2
unpcklps %xmm0,%xmm2
divps  %xmm2,%xmm1
movaps %xmm1,%xmm0
shufps $0x55,%xmm1,%xmm0
ucomiss %xmm0,%xmm1
jne    13ba <test1f+0x27a>
jnp    13c5 <test1f+0x285>
xor    %eax,%eax
add    $0x38,%rsp
jmp    1060 <link_error@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
define void @test1f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @cosf(float %3)
%5 = load float, float* %2
%6 = fneg float %5
%7 = call float @cosf(float %6)
%8 = fcmp une float %4, %7
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 (...) @link_error()
br label %11
11: ; preds = %9, %1
%12 = load float, float* %2
%13 = call float @cosf(float %12)
%14 = load float, float* %2
%15 = call float @llvm.fabs.f32(float %14)
%16 = call float @cosf(float %15)
%17 = fcmp une float %13, %16
br i1 %17, label %18, label %20
18: ; preds = %11
%19 = call i32 (...) @link_error()
br label %20
20: ; preds = %18, %11
%21 = load float, float* %2
%22 = call float @cosf(float %21)
%23 = load float, float* %2
%24 = call float @llvm.fabs.f32(float %23)
%25 = fneg float %24
%26 = call float @cosf(float %25)
%27 = fcmp une float %22, %26
br i1 %27, label %28, label %30
28: ; preds = %20
%29 = call i32 (...) @link_error()
br label %30
30: ; preds = %28, %20
%31 = load float, float* %2
%32 = call float @tanf(float %31)
%33 = call float @cosf(float %32)
%34 = load float, float* %2
%35 = call float @llvm.fabs.f32(float %34)
%36 = fneg float %35
%37 = call float @tanf(float %36)
%38 = call float @cosf(float %37)
%39 = fcmp une float %33, %38
br i1 %39, label %40, label %42
40: ; preds = %30
%41 = call i32 (...) @link_error()
br label %42
42: ; preds = %40, %30
%43 = load float, float* %2
%44 = call float @sinf(float %43)
%45 = load float, float* %2
%46 = call float @cosf(float %45)
%47 = fdiv float %44, %46
%48 = load float, float* %2
%49 = call float @tanf(float %48)
%50 = fcmp une float %47, %49
br i1 %50, label %51, label %53
51: ; preds = %42
%52 = call i32 (...) @link_error()
br label %53
53: ; preds = %51, %42
%54 = load float, float* %2
%55 = call float @cosf(float %54)
%56 = load float, float* %2
%57 = call float @sinf(float %56)
%58 = fdiv float %55, %57
%59 = load float, float* %2
%60 = call float @tanf(float %59)
%61 = fdiv float 1.000000e+00, %60
%62 = fcmp une float %58, %61
br i1 %62, label %63, label %65
63: ; preds = %53
%64 = call i32 (...) @link_error()
br label %65
65: ; preds = %63, %53
%66 = load float, float* %2
%67 = call float @tanf(float %66)
%68 = load float, float* %2
%69 = call float @cosf(float %68)
%70 = fmul float %67, %69
%71 = load float, float* %2
%72 = call float @sinf(float %71)
%73 = fcmp une float %70, %72
br i1 %73, label %74, label %76
74: ; preds = %65
%75 = call i32 (...) @link_error()
br label %76
76: ; preds = %74, %65
%77 = load float, float* %2
%78 = call float @cosf(float %77)
%79 = load float, float* %2
%80 = call float @tanf(float %79)
%81 = fmul float %78, %80
%82 = load float, float* %2
%83 = call float @sinf(float %82)
%84 = fcmp une float %81, %83
br i1 %84, label %85, label %87
85: ; preds = %76
%86 = call i32 (...) @link_error()
br label %87
87: ; preds = %85, %76
%88 = load float, float* %2
%89 = call float @sinf(float %88)
%90 = load float, float* %2
%91 = call float @tanf(float %90)
%92 = fdiv float %89, %91
%93 = load float, float* %2
%94 = call float @cosf(float %93)
%95 = fcmp une float %92, %94
br i1 %95, label %96, label %98
96: ; preds = %87
%97 = call i32 (...) @link_error()
br label %98
98: ; preds = %96, %87
%99 = load float, float* %2
%100 = call float @tanf(float %99)
%101 = load float, float* %2
%102 = call float @sinf(float %101)
%103 = fdiv float %100, %102
%104 = load float, float* %2
%105 = call float @cosf(float %104)
%106 = fdiv float 1.000000e+00, %105
%107 = fcmp une float %103, %106
br i1 %107, label %108, label %110
108: ; preds = %98
%109 = call i32 (...) @link_error()
br label %110
110: ; preds = %108, %98
ret void
}

LLVM IR (-O2):
define void @test1f(float %0) {
%2 = tail call float @cosf(float %0)
%3 = tail call float @cosf(float %0)
%4 = fcmp une float %2, %3
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (...) @link_error()
br label %7
7: ; preds = %5, %1
%8 = tail call float @cosf(float %0)
%9 = tail call float @llvm.fabs.f32(float %0)
%10 = tail call float @cosf(float %9)
%11 = fcmp une float %8, %10
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = tail call i32 (...) @link_error()
br label %14
14: ; preds = %12, %7
%15 = tail call float @cosf(float %0)
%16 = tail call float @cosf(float %9)
%17 = fcmp une float %15, %16
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = tail call i32 (...) @link_error()
br label %20
20: ; preds = %18, %14
%21 = tail call float @tanf(float %0)
%22 = tail call float @cosf(float %21)
%23 = tail call float @tanf(float %9)
%24 = tail call float @cosf(float %23)
%25 = fcmp une float %22, %24
br i1 %25, label %26, label %28
26: ; preds = %20
%27 = tail call i32 (...) @link_error()
br label %28
28: ; preds = %26, %20
%29 = tail call float @sinf(float %0)
%30 = tail call float @cosf(float %0)
%31 = fdiv float %29, %30
%32 = tail call float @tanf(float %0)
%33 = fcmp une float %31, %32
br i1 %33, label %34, label %36
34: ; preds = %28
%35 = tail call i32 (...) @link_error()
br label %36
36: ; preds = %34, %28
%37 = tail call float @cosf(float %0)
%38 = tail call float @sinf(float %0)
%39 = tail call float @tanf(float %0)
%40 = insertelement <2 x float> <float poison, float 1.000000e+00>, float %37, i64 0
%41 = insertelement <2 x float> poison, float %38, i64 0
%42 = insertelement <2 x float> %41, float %39, i64 1
%43 = fdiv <2 x float> %40, %42
%44 = extractelement <2 x float> %43, i64 0
%45 = extractelement <2 x float> %43, i64 1
%46 = fcmp une float %44, %45
br i1 %46, label %47, label %49
47: ; preds = %36
%48 = tail call i32 (...) @link_error()
br label %49
49: ; preds = %47, %36
%50 = tail call float @tanf(float %0)
%51 = tail call float @cosf(float %0)
%52 = fmul float %50, %51
%53 = tail call float @sinf(float %0)
%54 = fcmp une float %52, %53
br i1 %54, label %55, label %57
55: ; preds = %49
%56 = tail call i32 (...) @link_error()
br label %57
57: ; preds = %55, %49
%58 = tail call float @cosf(float %0)
%59 = tail call float @tanf(float %0)
%60 = fmul float %58, %59
%61 = tail call float @sinf(float %0)
%62 = fcmp une float %60, %61
br i1 %62, label %63, label %65
63: ; preds = %57
%64 = tail call i32 (...) @link_error()
br label %65
65: ; preds = %63, %57
%66 = tail call float @sinf(float %0)
%67 = tail call float @tanf(float %0)
%68 = fdiv float %66, %67
%69 = tail call float @cosf(float %0)
%70 = fcmp une float %68, %69
br i1 %70, label %71, label %73
71: ; preds = %65
%72 = tail call i32 (...) @link_error()
br label %73
73: ; preds = %71, %65
%74 = tail call float @tanf(float %0)
%75 = tail call float @sinf(float %0)
%76 = tail call float @cosf(float %0)
%77 = insertelement <2 x float> <float poison, float 1.000000e+00>, float %74, i64 0
%78 = insertelement <2 x float> poison, float %75, i64 0
%79 = insertelement <2 x float> %78, float %76, i64 1
%80 = fdiv <2 x float> %77, %79
%81 = extractelement <2 x float> %80, i64 0
%82 = extractelement <2 x float> %80, i64 1
%83 = fcmp une float %81, %82
br i1 %83, label %84, label %86
84: ; preds = %73
%85 = tail call i32 (...) @link_error()
br label %86
86: ; preds = %84, %73
ret void
}