#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(int);
int cos(int);
int pow(double, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  double a, x, G, F, Y;
  printf("Введите a: ");
  scanf("%lf", &a);
  printf("Введите х: ");
  scanf("%lf", &x);
  G = (4 * (-18 * pow(a, 2) + 3 * a * x + 10 * pow(x, 2))) /
      (15 * pow(a, 2) + 29 * a * x + 12 * pow(x, 2));
  printf("G = %lf\n\n", G);
  printf("Введите a: ");
  scanf("%lf", &a);
  printf("Введите х: ");
  scanf("%lf", &x);
  F = 1 / (cos(5 * pow(a, 2) + 14 * a * x - 3 * pow(x, 2)));
  printf("F = %lf\n\n", F);
  printf("Введите a: ");
  scanf("%lf", &a);
  printf("Введите х: ");
  scanf("%lf", &x);
  Y = acos(9 * pow(a, 2) + 42 * a * x + 40 * pow(x, 2) + 1);
  printf("Y = %lf\n\n", Y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb1(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1070 <pow@plt>
imul   $0xffffffee,%eax,%eax
cvtsi2sd %eax,%xmm1
movsd  0xe6c(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x2,%edi
call   1070 <pow@plt>
movsd  -0x58(%rbp),%xmm1
imul   $0xa,%eax,%eax
cvtsi2sd %eax,%xmm0
addsd  %xmm0,%xmm1
movsd  0xe26(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1070 <pow@plt>
imul   $0xf,%eax,%eax
cvtsi2sd %eax,%xmm1
movsd  0xdf7(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x2,%edi
call   1070 <pow@plt>
movsd  -0x50(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm0
imul   $0xc,%eax,%eax
cvtsi2sd %eax,%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xdea(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xdb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdb6(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xdaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd98(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1070 <pow@plt>
imul   $0x5,%eax,%eax
cvtsi2sd %eax,%xmm1
movsd  0xd3e(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x2,%edi
call   1070 <pow@plt>
movsd  -0x40(%rbp),%xmm0
imul   $0x3,%eax,%eax
cvtsi2sd %eax,%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1060 <cos@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
lea    0xd35(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xcf2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xcf7(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xceb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xcd9(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1070 <pow@plt>
imul   $0x9,%eax,%eax
cvtsi2sd %eax,%xmm1
movsd  0xc77(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x2,%edi
call   1070 <pow@plt>
movsd  -0x38(%rbp),%xmm0
imul   $0x28,%eax,%eax
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
movsd  0xc31(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <acos@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
lea    0xc82(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xecb(%rip),%r14
xor    %ebp,%ebp
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecb(%rip),%rbx
lea    0x8(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
lea    0xeb8(%rip),%r12
mov    %r12,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x18(%rsp),%r13
mov    %rbx,%rdi
mov    %r13,%rsi
call   1050 <scanf@plt>
movsd  0x8(%rsp),%xmm0
mov    $0x2,%edi
call   1070 <pow@plt>
add    %eax,%eax
lea    (%rax,%rax,8),%eax
neg    %eax
cvtsi2sd %eax,%xmm1
movsd  0x8(%rsp),%xmm2
mulsd  0xe2e(%rip),%xmm2
movsd  0x18(%rsp),%xmm0
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x10(%rsp)
mov    $0x2,%edi
call   1070 <pow@plt>
add    %eax,%eax
lea    (%rax,%rax,4),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x10(%rsp),%xmm0
mulsd  0xdfe(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
mov    $0x2,%edi
call   1070 <pow@plt>
lea    (%rax,%rax,4),%eax
lea    (%rax,%rax,2),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x8(%rsp),%xmm2
mulsd  0xdd5(%rip),%xmm2
movsd  0x18(%rsp),%xmm0
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x20(%rsp)
mov    $0x2,%edi
call   1070 <pow@plt>
shl    $0x2,%eax
lea    (%rax,%rax,2),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
addsd  0x20(%rsp),%xmm1
movsd  0x10(%rsp),%xmm0
divsd  %xmm1,%xmm0
lea    0xdde(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   1050 <scanf@plt>
movsd  0x8(%rsp),%xmm0
mov    $0x2,%edi
call   1070 <pow@plt>
lea    (%rax,%rax,4),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x8(%rsp),%xmm2
mulsd  0xd42(%rip),%xmm2
movsd  0x18(%rsp),%xmm0
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x10(%rsp)
mov    $0x2,%edi
call   1070 <pow@plt>
lea    (%rax,%rax,2),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
call   1060 <cos@plt>
lea    0x1(%rax),%ecx
cmp    $0x3,%ecx
cmovae %ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
lea    0xd3d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   1050 <scanf@plt>
movsd  0x8(%rsp),%xmm0
mov    $0x2,%edi
call   1070 <pow@plt>
lea    (%rax,%rax,8),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x8(%rsp),%xmm2
mulsd  0xc9f(%rip),%xmm2
movsd  0x18(%rsp),%xmm0
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x10(%rsp)
mov    $0x2,%edi
call   1070 <pow@plt>
shl    $0x3,%eax
lea    (%rax,%rax,4),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x10(%rsp),%xmm0
addsd  0xc6e(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <acos@plt>
lea    0xca5(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 a: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [20 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D1\85: \00"
@.str.3 = [10 x i8] c"G = %lf\0A\0A\00"
@.str.4 = [10 x i8] c"F = %lf\0A\0A\00"
@.str.5 = [10 x i8] c"Y = %lf\0A\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 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%11 = load double, double* %2
%12 = call i32 @pow(double %11, i32 2)
%13 = mul nsw i32 -18, %12
%14 = sitofp i32 %13 to double
%15 = load double, double* %2
%16 = fmul double 3.000000e+00, %15
%17 = load double, double* %3
%18 = call double @llvm.fmuladd.f64(double %16, double %17, double %14)
%19 = load double, double* %3
%20 = call i32 @pow(double %19, i32 2)
%21 = mul nsw i32 10, %20
%22 = sitofp i32 %21 to double
%23 = fadd double %18, %22
%24 = fmul double 4.000000e+00, %23
%25 = load double, double* %2
%26 = call i32 @pow(double %25, i32 2)
%27 = mul nsw i32 15, %26
%28 = sitofp i32 %27 to double
%29 = load double, double* %2
%30 = fmul double 2.900000e+01, %29
%31 = load double, double* %3
%32 = call double @llvm.fmuladd.f64(double %30, double %31, double %28)
%33 = load double, double* %3
%34 = call i32 @pow(double %33, i32 2)
%35 = mul nsw i32 12, %34
%36 = sitofp i32 %35 to double
%37 = fadd double %32, %36
%38 = fdiv double %24, %37
store double %38, double* %4
%39 = load double, double* %4
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), double %39)
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%42 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%44 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%45 = load double, double* %2
%46 = call i32 @pow(double %45, i32 2)
%47 = mul nsw i32 5, %46
%48 = sitofp i32 %47 to double
%49 = load double, double* %2
%50 = fmul double 1.400000e+01, %49
%51 = load double, double* %3
%52 = call double @llvm.fmuladd.f64(double %50, double %51, double %48)
%53 = load double, double* %3
%54 = call i32 @pow(double %53, i32 2)
%55 = mul nsw i32 3, %54
%56 = sitofp i32 %55 to double
%57 = fsub double %52, %56
%58 = fptosi double %57 to i32
%59 = call i32 @cos(i32 %58)
%60 = sdiv i32 1, %59
%61 = sitofp i32 %60 to double
store double %61, double* %5
%62 = load double, double* %5
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), double %62)
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%65 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%67 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%68 = load double, double* %2
%69 = call i32 @pow(double %68, i32 2)
%70 = mul nsw i32 9, %69
%71 = sitofp i32 %70 to double
%72 = load double, double* %2
%73 = fmul double 4.200000e+01, %72
%74 = load double, double* %3
%75 = call double @llvm.fmuladd.f64(double %73, double %74, double %71)
%76 = load double, double* %3
%77 = call i32 @pow(double %76, i32 2)
%78 = mul nsw i32 40, %77
%79 = sitofp i32 %78 to double
%80 = fadd double %75, %79
%81 = fadd double %80, 1.000000e+00
%82 = fptosi double %81 to i32
%83 = call double @acos(i32 %82)
store double %83, double* %6
%84 = load double, double* %6
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), double %84)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 a: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [20 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D1\85: \00"
@.str.3 = [10 x i8] c"G = %lf\0A\0A\00"
@.str.4 = [10 x i8] c"F = %lf\0A\0A\00"
@.str.5 = [10 x i8] c"Y = %lf\0A\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%9 = load double, double* %1
%10 = call i32 @pow(double %9, i32 2)
%11 = mul nsw i32 %10, -18
%12 = sitofp i32 %11 to double
%13 = load double, double* %1
%14 = fmul double %13, 3.000000e+00
%15 = load double, double* %2
%16 = call double @llvm.fmuladd.f64(double %14, double %15, double %12)
%17 = call i32 @pow(double %15, i32 2)
%18 = mul nsw i32 %17, 10
%19 = sitofp i32 %18 to double
%20 = fadd double %16, %19
%21 = fmul double %20, 4.000000e+00
%22 = load double, double* %1
%23 = call i32 @pow(double %22, i32 2)
%24 = mul nsw i32 %23, 15
%25 = sitofp i32 %24 to double
%26 = load double, double* %1
%27 = fmul double %26, 2.900000e+01
%28 = load double, double* %2
%29 = call double @llvm.fmuladd.f64(double %27, double %28, double %25)
%30 = call i32 @pow(double %28, i32 2)
%31 = mul nsw i32 %30, 12
%32 = sitofp i32 %31 to double
%33 = fadd double %29, %32
%34 = fdiv double %21, %33
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), double %34)
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%37 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%39 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%40 = load double, double* %1
%41 = call i32 @pow(double %40, i32 2)
%42 = mul nsw i32 %41, 5
%43 = sitofp i32 %42 to double
%44 = load double, double* %1
%45 = fmul double %44, 1.400000e+01
%46 = load double, double* %2
%47 = call double @llvm.fmuladd.f64(double %45, double %46, double %43)
%48 = call i32 @pow(double %46, i32 2)
%49 = mul nsw i32 %48, 3
%50 = sitofp i32 %49 to double
%51 = fsub double %47, %50
%52 = fptosi double %51 to i32
%53 = call i32 @cos(i32 %52)
%54 = add i32 %53, 1
%55 = icmp ult i32 %54, 3
%56 = select i1 %55, i32 %53, i32 0
%57 = sitofp i32 %56 to double
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), double %57)
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%60 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%62 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%63 = load double, double* %1
%64 = call i32 @pow(double %63, i32 2)
%65 = mul nsw i32 %64, 9
%66 = sitofp i32 %65 to double
%67 = load double, double* %1
%68 = fmul double %67, 4.200000e+01
%69 = load double, double* %2
%70 = call double @llvm.fmuladd.f64(double %68, double %69, double %66)
%71 = call i32 @pow(double %69, i32 2)
%72 = mul nsw i32 %71, 40
%73 = sitofp i32 %72 to double
%74 = fadd double %70, %73
%75 = fadd double %74, 1.000000e+00
%76 = fptosi double %75 to i32
%77 = call double @acos(i32 %76)
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), double %77)
ret i32 0
}