#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 acos(double);
double asin(double);
double atan(double);
double atan2(double, double);
double cos(double);
double exp(double);
double log(double);
int /*<<< orphan*/ printf(char *, double, double, ...);
double sin(double);
double sqrt(double);
double tan(double);
void test_fops(double a, double b) {
  printf("a=%f b=%f a+b=%f\n", a, b, a + b);
  printf("a=%f b=%f a-b=%f\n", a, b, a - b);
  printf("a=%f b=%f a*b=%f\n", a, b, a * b);
  printf("a=%f b=%f a/b=%f\n", a, b, a / b);
  printf("a=%f sqrt(a)=%f\n", a, sqrt(a));
  printf("a=%f sin(a)=%f\n", a, sin(a));
  printf("a=%f cos(a)=%f\n", a, cos(a));
  printf("a=%f tan(a)=%f\n", a, tan(a));
  printf("a=%f log(a)=%f\n", a, log(a));
  printf("a=%f exp(a)=%f\n", a, exp(a));
  printf("a=%f b=%f atan2(a, b)=%f\n", a, b, atan2(a, b));
  printf("a=%f asin(sin(a))=%f\n", a, asin(sin(a)));
  printf("a=%f acos(cos(a))=%f\n", a, acos(cos(a)));
  printf("a=%f atan(tan(a))=%f\n", a, atan(tan(a)));
}


x86 assembly (clang, -O0):
<test_fops>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
addsd  -0x10(%rbp),%xmm2
lea    0xe23(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
subsd  -0x10(%rbp),%xmm2
lea    0xe13(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
mulsd  -0x10(%rbp),%xmm2
lea    0xe03(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
divsd  -0x10(%rbp),%xmm2
lea    0xdf3(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x8(%rbp),%xmm0
call   10d0 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
lea    0xddb(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1060 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
lea    0xdc2(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x8(%rbp),%xmm0
call   10b0 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
lea    0xda8(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x8(%rbp),%xmm0
call   10a0 <tan@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
lea    0xd8e(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x8(%rbp),%xmm0
call   10c0 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
lea    0xd74(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1090 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
lea    0xd5a(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <atan2@plt>
movsd  -0x38(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x30(%rbp),%xmm0
lea    0xd2c(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1060 <sin@plt>
call   1080 <asin@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
lea    0xd17(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
call   10b0 <cos@plt>
call   1050 <acos@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
lea    0xcfe(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   10a0 <tan@plt>
call   1070 <atan@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
lea    0xce5(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fops>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
movapd %xmm0,%xmm2
addsd  %xmm1,%xmm2
lea    0xe31(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
movapd %xmm0,%xmm2
movsd  0x10(%rsp),%xmm1
subsd  %xmm1,%xmm2
lea    0xe21(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
movapd %xmm0,%xmm2
movsd  0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm2
lea    0xe11(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
movapd %xmm0,%xmm2
movsd  0x10(%rsp),%xmm1
divsd  %xmm1,%xmm2
lea    0xe01(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
xorpd  %xmm0,%xmm0
movsd  0x8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jb     125b <test_fops+0xab>
movsd  0x8(%rsp),%xmm0
xorps  %xmm1,%xmm1
sqrtsd %xmm0,%xmm1
jmp    126a <test_fops+0xba>
movsd  0x8(%rsp),%xmm0
call   10d0 <sqrt@plt>
movapd %xmm0,%xmm1
lea    0xdd7(%rip),%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
call   1060 <sin@plt>
movaps %xmm0,%xmm1
lea    0xdc6(%rip),%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
call   10b0 <cos@plt>
movaps %xmm0,%xmm1
lea    0xdb4(%rip),%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
call   10a0 <tan@plt>
movaps %xmm0,%xmm1
lea    0xda2(%rip),%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
call   10c0 <log@plt>
movaps %xmm0,%xmm1
lea    0xd90(%rip),%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
call   1090 <exp@plt>
movaps %xmm0,%xmm1
lea    0xd7e(%rip),%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1030 <atan2@plt>
movaps %xmm0,%xmm2
lea    0xd66(%rip),%rdi
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    $0x3,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
call   1060 <sin@plt>
call   1080 <asin@plt>
movaps %xmm0,%xmm1
lea    0xd53(%rip),%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
call   10b0 <cos@plt>
call   1050 <acos@plt>
movaps %xmm0,%xmm1
lea    0xd42(%rip),%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
call   10a0 <tan@plt>
call   1070 <atan@plt>
movaps %xmm0,%xmm1
lea    0xd31(%rip),%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x2,%al
add    $0x18,%rsp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"a=%f b=%f a+b=%f\0A\00"
@.str.1 = [18 x i8] c"a=%f b=%f a-b=%f\0A\00"
@.str.2 = [18 x i8] c"a=%f b=%f a*b=%f\0A\00"
@.str.3 = [18 x i8] c"a=%f b=%f a/b=%f\0A\00"
@.str.4 = [17 x i8] c"a=%f sqrt(a)=%f\0A\00"
@.str.5 = [16 x i8] c"a=%f sin(a)=%f\0A\00"
@.str.6 = [16 x i8] c"a=%f cos(a)=%f\0A\00"
@.str.7 = [16 x i8] c"a=%f tan(a)=%f\0A\00"
@.str.8 = [16 x i8] c"a=%f log(a)=%f\0A\00"
@.str.9 = [16 x i8] c"a=%f exp(a)=%f\0A\00"
@.str.10 = [26 x i8] c"a=%f b=%f atan2(a, b)=%f\0A\00"
@.str.11 = [22 x i8] c"a=%f asin(sin(a))=%f\0A\00"
@.str.12 = [22 x i8] c"a=%f acos(cos(a))=%f\0A\00"
@.str.13 = [22 x i8] c"a=%f atan(tan(a))=%f\0A\00"
define void @test_fops(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = load double, double* %3
%8 = load double, double* %4
%9 = fadd double %7, %8
%10 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), double %5, double %6, double %9)
%11 = load double, double* %3
%12 = load double, double* %4
%13 = load double, double* %3
%14 = load double, double* %4
%15 = fsub double %13, %14
%16 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double %11, double %12, double %15)
%17 = load double, double* %3
%18 = load double, double* %4
%19 = load double, double* %3
%20 = load double, double* %4
%21 = fmul double %19, %20
%22 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), double %17, double %18, double %21)
%23 = load double, double* %3
%24 = load double, double* %4
%25 = load double, double* %3
%26 = load double, double* %4
%27 = fdiv double %25, %26
%28 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), double %23, double %24, double %27)
%29 = load double, double* %3
%30 = load double, double* %3
%31 = call double @sqrt(double %30)
%32 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), double %29, double %31)
%33 = load double, double* %3
%34 = load double, double* %3
%35 = call double @sin(double %34)
%36 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), double %33, double %35)
%37 = load double, double* %3
%38 = load double, double* %3
%39 = call double @cos(double %38)
%40 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), double %37, double %39)
%41 = load double, double* %3
%42 = load double, double* %3
%43 = call double @tan(double %42)
%44 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), double %41, double %43)
%45 = load double, double* %3
%46 = load double, double* %3
%47 = call double @log(double %46)
%48 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), double %45, double %47)
%49 = load double, double* %3
%50 = load double, double* %3
%51 = call double @exp(double %50)
%52 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), double %49, double %51)
%53 = load double, double* %3
%54 = load double, double* %4
%55 = load double, double* %3
%56 = load double, double* %4
%57 = call double @atan2(double %55, double %56)
%58 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0), double %53, double %54, double %57)
%59 = load double, double* %3
%60 = load double, double* %3
%61 = call double @sin(double %60)
%62 = call double @asin(double %61)
%63 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0), double %59, double %62)
%64 = load double, double* %3
%65 = load double, double* %3
%66 = call double @cos(double %65)
%67 = call double @acos(double %66)
%68 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i64 0, i64 0), double %64, double %67)
%69 = load double, double* %3
%70 = load double, double* %3
%71 = call double @tan(double %70)
%72 = call double @atan(double %71)
%73 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0), double %69, double %72)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"a=%f b=%f a+b=%f\0A\00"
@.str.1 = [18 x i8] c"a=%f b=%f a-b=%f\0A\00"
@.str.2 = [18 x i8] c"a=%f b=%f a*b=%f\0A\00"
@.str.3 = [18 x i8] c"a=%f b=%f a/b=%f\0A\00"
@.str.4 = [17 x i8] c"a=%f sqrt(a)=%f\0A\00"
@.str.5 = [16 x i8] c"a=%f sin(a)=%f\0A\00"
@.str.6 = [16 x i8] c"a=%f cos(a)=%f\0A\00"
@.str.7 = [16 x i8] c"a=%f tan(a)=%f\0A\00"
@.str.8 = [16 x i8] c"a=%f log(a)=%f\0A\00"
@.str.9 = [16 x i8] c"a=%f exp(a)=%f\0A\00"
@.str.10 = [26 x i8] c"a=%f b=%f atan2(a, b)=%f\0A\00"
@.str.11 = [22 x i8] c"a=%f asin(sin(a))=%f\0A\00"
@.str.12 = [22 x i8] c"a=%f acos(cos(a))=%f\0A\00"
@.str.13 = [22 x i8] c"a=%f atan(tan(a))=%f\0A\00"
define void @test_fops(double %0, double %1) {
%3 = fadd double %0, %1
%4 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), double %0, double %1, double %3)
%5 = fsub double %0, %1
%6 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double %0, double %1, double %5)
%7 = fmul double %0, %1
%8 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), double %0, double %1, double %7)
%9 = fdiv double %0, %1
%10 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), double %0, double %1, double %9)
%11 = tail call double @sqrt(double %0)
%12 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), double %0, double %11)
%13 = tail call double @sin(double %0)
%14 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), double %0, double %13)
%15 = tail call double @cos(double %0)
%16 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), double %0, double %15)
%17 = tail call double @tan(double %0)
%18 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), double %0, double %17)
%19 = tail call double @log(double %0)
%20 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), double %0, double %19)
%21 = tail call double @exp(double %0)
%22 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), double %0, double %21)
%23 = tail call double @atan2(double %0, double %1)
%24 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0), double %0, double %1, double %23)
%25 = tail call double @sin(double %0)
%26 = tail call double @asin(double %25)
%27 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0), double %0, double %26)
%28 = tail call double @cos(double %0)
%29 = tail call double @acos(double %28)
%30 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i64 0, i64 0), double %0, double %29)
%31 = tail call double @tan(double %0)
%32 = tail call double @atan(double %31)
%33 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0), double %0, double %32)
ret void
}