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


x86 assembly (clang, -O0):
<test1f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%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   1030 <sinf@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1050 <cosf@plt>
movaps %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <tanf@plt>
movaps %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jne    11e6 <test1f+0xa6>
jp     11e6 <test1f+0xa6>
jmp    11ed <test1f+0xad>
mov    $0x0,%al
call   1060 <link_error@plt>
movss  -0x4(%rbp),%xmm0
call   1050 <cosf@plt>
movss  %xmm0,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sinf@plt>
movaps %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <tanf@plt>
movaps %xmm0,%xmm2
movss  -0x14(%rbp),%xmm0
movss  0xdcf(%rip),%xmm1
divss  %xmm2,%xmm1
ucomiss %xmm1,%xmm0
jne    1249 <test1f+0x109>
jp     1249 <test1f+0x109>
jmp    1250 <test1f+0x110>
mov    $0x0,%al
call   1060 <link_error@plt>
movss  -0x4(%rbp),%xmm0
call   1040 <tanf@plt>
movss  %xmm0,-0x20(%rbp)
movss  -0x4(%rbp),%xmm0
call   1050 <cosf@plt>
movaps %xmm0,%xmm1
movss  -0x20(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sinf@plt>
movaps %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jne    12a0 <test1f+0x160>
jp     12a0 <test1f+0x160>
jmp    12a7 <test1f+0x167>
mov    $0x0,%al
call   1060 <link_error@plt>
movss  -0x4(%rbp),%xmm0
call   1050 <cosf@plt>
movss  %xmm0,-0x28(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <tanf@plt>
movaps %xmm0,%xmm1
movss  -0x28(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sinf@plt>
movaps %xmm0,%xmm1
movss  -0x24(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jne    12f7 <test1f+0x1b7>
jp     12f7 <test1f+0x1b7>
jmp    12fe <test1f+0x1be>
mov    $0x0,%al
call   1060 <link_error@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1f>:
sub    $0x38,%rsp
movss  %xmm0,0xc(%rsp)
call   1050 <cosf@plt>
movss  %xmm0,0x10(%rsp)
movss  0xc(%rsp),%xmm0
call   1050 <cosf@plt>
movss  0x10(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    116d <test1f+0x2d>
jnp    1174 <test1f+0x34>
xor    %eax,%eax
call   1060 <link_error@plt>
movss  0xc(%rsp),%xmm0
call   1030 <sinf@plt>
movss  %xmm0,0x10(%rsp)
movss  0xc(%rsp),%xmm0
call   1050 <cosf@plt>
movss  0x10(%rsp),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,0x10(%rsp)
movss  0xc(%rsp),%xmm0
call   1040 <tanf@plt>
movss  0x10(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    11b8 <test1f+0x78>
jnp    11bf <test1f+0x7f>
xor    %eax,%eax
call   1060 <link_error@plt>
movss  0xc(%rsp),%xmm0
call   1050 <cosf@plt>
movaps %xmm0,0x10(%rsp)
movss  0xc(%rsp),%xmm0
call   1030 <sinf@plt>
movaps %xmm0,0x20(%rsp)
movss  0xc(%rsp),%xmm0
call   1040 <tanf@plt>
movaps 0xe0f(%rip),%xmm1
movaps 0x10(%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    1213 <test1f+0xd3>
jnp    121a <test1f+0xda>
xor    %eax,%eax
call   1060 <link_error@plt>
movss  0xc(%rsp),%xmm0
call   1040 <tanf@plt>
movss  %xmm0,0x10(%rsp)
movss  0xc(%rsp),%xmm0
call   1050 <cosf@plt>
mulss  0x10(%rsp),%xmm0
movss  %xmm0,0x10(%rsp)
movss  0xc(%rsp),%xmm0
call   1030 <sinf@plt>
movss  0x10(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    125a <test1f+0x11a>
jnp    1261 <test1f+0x121>
xor    %eax,%eax
call   1060 <link_error@plt>
movss  0xc(%rsp),%xmm0
call   1050 <cosf@plt>
movss  %xmm0,0x10(%rsp)
movss  0xc(%rsp),%xmm0
call   1040 <tanf@plt>
mulss  0x10(%rsp),%xmm0
movss  %xmm0,0x10(%rsp)
movss  0xc(%rsp),%xmm0
call   1030 <sinf@plt>
movss  0x10(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    12a1 <test1f+0x161>
jnp    12ac <test1f+0x16c>
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 @sinf(float %12)
%14 = load float, float* %2
%15 = call float @cosf(float %14)
%16 = fdiv float %13, %15
%17 = load float, float* %2
%18 = call float @tanf(float %17)
%19 = fcmp une float %16, %18
br i1 %19, label %20, label %22
20: ; preds = %11
%21 = call i32 (...) @link_error()
br label %22
22: ; preds = %20, %11
%23 = load float, float* %2
%24 = call float @cosf(float %23)
%25 = load float, float* %2
%26 = call float @sinf(float %25)
%27 = fdiv float %24, %26
%28 = load float, float* %2
%29 = call float @tanf(float %28)
%30 = fdiv float 1.000000e+00, %29
%31 = fcmp une float %27, %30
br i1 %31, label %32, label %34
32: ; preds = %22
%33 = call i32 (...) @link_error()
br label %34
34: ; preds = %32, %22
%35 = load float, float* %2
%36 = call float @tanf(float %35)
%37 = load float, float* %2
%38 = call float @cosf(float %37)
%39 = fmul float %36, %38
%40 = load float, float* %2
%41 = call float @sinf(float %40)
%42 = fcmp une float %39, %41
br i1 %42, label %43, label %45
43: ; preds = %34
%44 = call i32 (...) @link_error()
br label %45
45: ; preds = %43, %34
%46 = load float, float* %2
%47 = call float @cosf(float %46)
%48 = load float, float* %2
%49 = call float @tanf(float %48)
%50 = fmul float %47, %49
%51 = load float, float* %2
%52 = call float @sinf(float %51)
%53 = fcmp une float %50, %52
br i1 %53, label %54, label %56
54: ; preds = %45
%55 = call i32 (...) @link_error()
br label %56
56: ; preds = %54, %45
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 @sinf(float %0)
%9 = tail call float @cosf(float %0)
%10 = fdiv float %8, %9
%11 = tail call float @tanf(float %0)
%12 = fcmp une float %10, %11
br i1 %12, label %13, label %15
13: ; preds = %7
%14 = tail call i32 (...) @link_error()
br label %15
15: ; preds = %13, %7
%16 = tail call float @cosf(float %0)
%17 = tail call float @sinf(float %0)
%18 = tail call float @tanf(float %0)
%19 = insertelement <2 x float> <float poison, float 1.000000e+00>, float %16, i64 0
%20 = insertelement <2 x float> poison, float %17, i64 0
%21 = insertelement <2 x float> %20, float %18, i64 1
%22 = fdiv <2 x float> %19, %21
%23 = extractelement <2 x float> %22, i64 0
%24 = extractelement <2 x float> %22, i64 1
%25 = fcmp une float %23, %24
br i1 %25, label %26, label %28
26: ; preds = %15
%27 = tail call i32 (...) @link_error()
br label %28
28: ; preds = %26, %15
%29 = tail call float @tanf(float %0)
%30 = tail call float @cosf(float %0)
%31 = fmul float %29, %30
%32 = tail call float @sinf(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 @tanf(float %0)
%39 = fmul float %37, %38
%40 = tail call float @sinf(float %0)
%41 = fcmp une float %39, %40
br i1 %41, label %42, label %44
42: ; preds = %36
%43 = tail call i32 (...) @link_error()
br label %44
44: ; preds = %42, %36
ret void
}