#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 log(int);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, double *);
double tanh(int);
int main() {
  double G, F, Y, x, a;
  scanf("%lf", &a);
  scanf("%lf", &x);
  G = ((9 * (7 * a * a + 39 * a * x + 20 * x * x)) / 9 * a * a + 59 * a * x +
       30 * x * x);
  F = (tanh(9 * a * a - 14 * a * x + 5 * x * x));
  Y = (log(14 * a * a - 75 * a * x + 54 * x * x + 1) / log(10));
  printf("%f\n", G);
  printf("%f\n", F);
  printf("%f\n", Y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf02(%rip),%rdi
lea    -0x30(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xef2(%rip),%rdi
lea    -0x28(%rbp),%rsi
call   1050 <scanf@plt>
movsd  0xed9(%rip),%xmm1
mulsd  -0x30(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  0xebf(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe9d(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe6b(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xe5f(%rip),%xmm0
divsd  %xmm0,%xmm1
mulsd  -0x30(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  0xe59(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe37(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe10(%rip),%xmm1
mulsd  -0x30(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  0xdee(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xdc5(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <tanh@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  0xd95(%rip),%xmm1
mulsd  -0x30(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  0xd7b(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xd42(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xd20(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1060 <log@plt>
movsd  %xmm0,-0x38(%rbp)
mov    $0xa,%edi
call   1060 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xd43(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x18(%rbp),%xmm0
lea    0xd32(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x20(%rbp),%xmm0
lea    0xd21(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xf14(%rip),%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movsd  0x10(%rsp),%xmm0
movsd  0xe8c(%rip),%xmm2
mulsd  %xmm0,%xmm2
movsd  0xe88(%rip),%xmm3
mulsd  %xmm0,%xmm3
movsd  0x18(%rsp),%xmm1
mulsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm2
addsd  %xmm3,%xmm2
movsd  0xe72(%rip),%xmm3
mulsd  %xmm1,%xmm3
mulsd  %xmm1,%xmm3
addsd  %xmm2,%xmm3
movsd  0xe66(%rip),%xmm2
mulsd  %xmm2,%xmm3
divsd  %xmm2,%xmm3
mulsd  %xmm0,%xmm3
movsd  0xe5a(%rip),%xmm4
mulsd  %xmm0,%xmm4
mulsd  %xmm1,%xmm4
mulsd  %xmm0,%xmm3
addsd  %xmm4,%xmm3
movsd  0xe4a(%rip),%xmm4
mulsd  %xmm1,%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm3,%xmm4
movsd  %xmm4,0x28(%rsp)
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
mulsd  0xe30(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
movsd  0xe28(%rip),%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm0,%xmm2
cvttsd2si %xmm2,%edi
call   1030 <tanh@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x10(%rsp),%xmm0
movsd  0xe07(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x18(%rsp),%xmm2
mulsd  %xmm0,%xmm1
mulsd  0xdf9(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xdf1(%rip),%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
addsd  0xde5(%rip),%xmm1
cvttsd2si %xmm1,%edi
call   1060 <log@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0xa,%edi
call   1060 <log@plt>
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
lea    0xdc1(%rip),%rbx
mov    %rbx,%rdi
movsd  0x28(%rsp),%xmm0
call   1040 <printf@plt>
mov    %rbx,%rdi
movsd  0x20(%rsp),%xmm0
call   1040 <printf@plt>
mov    %rbx,%rdi
movsd  0x8(%rsp),%xmm0
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store i32 0, i32* %1
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %6)
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %5)
%9 = load double, double* %6
%10 = fmul double 7.000000e+00, %9
%11 = load double, double* %6
%12 = load double, double* %6
%13 = fmul double 3.900000e+01, %12
%14 = load double, double* %5
%15 = fmul double %13, %14
%16 = call double @llvm.fmuladd.f64(double %10, double %11, double %15)
%17 = load double, double* %5
%18 = fmul double 2.000000e+01, %17
%19 = load double, double* %5
%20 = call double @llvm.fmuladd.f64(double %18, double %19, double %16)
%21 = fmul double 9.000000e+00, %20
%22 = fdiv double %21, 9.000000e+00
%23 = load double, double* %6
%24 = fmul double %22, %23
%25 = load double, double* %6
%26 = load double, double* %6
%27 = fmul double 5.900000e+01, %26
%28 = load double, double* %5
%29 = fmul double %27, %28
%30 = call double @llvm.fmuladd.f64(double %24, double %25, double %29)
%31 = load double, double* %5
%32 = fmul double 3.000000e+01, %31
%33 = load double, double* %5
%34 = call double @llvm.fmuladd.f64(double %32, double %33, double %30)
store double %34, double* %2
%35 = load double, double* %6
%36 = fmul double 9.000000e+00, %35
%37 = load double, double* %6
%38 = load double, double* %6
%39 = fmul double 1.400000e+01, %38
%40 = load double, double* %5
%41 = fmul double %39, %40
%42 = fneg double %41
%43 = call double @llvm.fmuladd.f64(double %36, double %37, double %42)
%44 = load double, double* %5
%45 = fmul double 5.000000e+00, %44
%46 = load double, double* %5
%47 = call double @llvm.fmuladd.f64(double %45, double %46, double %43)
%48 = fptosi double %47 to i32
%49 = call double @tanh(i32 %48)
store double %49, double* %3
%50 = load double, double* %6
%51 = fmul double 1.400000e+01, %50
%52 = load double, double* %6
%53 = load double, double* %6
%54 = fmul double 7.500000e+01, %53
%55 = load double, double* %5
%56 = fmul double %54, %55
%57 = fneg double %56
%58 = call double @llvm.fmuladd.f64(double %51, double %52, double %57)
%59 = load double, double* %5
%60 = fmul double 5.400000e+01, %59
%61 = load double, double* %5
%62 = call double @llvm.fmuladd.f64(double %60, double %61, double %58)
%63 = fadd double %62, 1.000000e+00
%64 = fptosi double %63 to i32
%65 = call double @log(i32 %64)
%66 = call double @log(i32 10)
%67 = fdiv double %65, %66
store double %67, double* %4
%68 = load double, double* %2
%69 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %68)
%70 = load double, double* %3
%71 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %70)
%72 = load double, double* %4
%73 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %72)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%6 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%7 = load double, double* %2
%8 = fmul double %7, 7.000000e+00
%9 = fmul double %7, 3.900000e+01
%10 = load double, double* %1
%11 = fmul double %9, %10
%12 = call double @llvm.fmuladd.f64(double %8, double %7, double %11)
%13 = fmul double %10, 2.000000e+01
%14 = call double @llvm.fmuladd.f64(double %13, double %10, double %12)
%15 = fmul double %14, 9.000000e+00
%16 = fdiv double %15, 9.000000e+00
%17 = fmul double %7, %16
%18 = fmul double %7, 5.900000e+01
%19 = fmul double %18, %10
%20 = call double @llvm.fmuladd.f64(double %17, double %7, double %19)
%21 = fmul double %10, 3.000000e+01
%22 = call double @llvm.fmuladd.f64(double %21, double %10, double %20)
%23 = fmul double %7, 9.000000e+00
%24 = fmul double %7, -1.400000e+01
%25 = fmul double %24, %10
%26 = call double @llvm.fmuladd.f64(double %23, double %7, double %25)
%27 = fmul double %10, 5.000000e+00
%28 = call double @llvm.fmuladd.f64(double %27, double %10, double %26)
%29 = fptosi double %28 to i32
%30 = call double @tanh(i32 %29)
%31 = load double, double* %2
%32 = fmul double %31, 1.400000e+01
%33 = load double, double* %1
%34 = fmul double %31, -7.500000e+01
%35 = fmul double %34, %33
%36 = call double @llvm.fmuladd.f64(double %32, double %31, double %35)
%37 = fmul double %33, 5.400000e+01
%38 = call double @llvm.fmuladd.f64(double %37, double %33, double %36)
%39 = fadd double %38, 1.000000e+00
%40 = fptosi double %39 to i32
%41 = call double @log(i32 %40)
%42 = call double @log(i32 10)
%43 = fdiv double %41, %42
%44 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %22)
%45 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %30)
%46 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %43)
ret i32 0
}