#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 */
long double calculate(int const, long double **);
int /*<<< orphan*/ cov_check(char *, char *, char *);
int /*<<< orphan*/ cov_log(long double, char *, char *);
int /*<<< orphan*/ printf(char *, long double);
int main(int argc, char *argv[]) {
  const int n = 4;
  long double c[n][2];
  c[0][0] = 5.0;
  c[1][0] = 2304.0;
  c[2][0] = 118101.0;
  c[3][0] = 1838336.0;
  long double result = c[3][0] + 2.2L + calculate(n, c);
  cov_log(result, "result", argv[2]);
  cov_check(argv[2], argv[1], argv[3]);
  printf("%1.15Le\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
mov    %rsp,%rax
mov    %rax,-0x20(%rbp)
flds   0xe93(%rip)
fstpt  -0xb0(%rbp)
flds   0xe8b(%rip)
fstpt  -0x90(%rbp)
flds   0xe83(%rip)
fstpt  -0x70(%rbp)
flds   0xe7e(%rip)
fstpt  -0x50(%rbp)
fldt   -0x50(%rbp)
fldt   0xe76(%rip)
faddp  %st,%st(1)
fstpt  -0xbc(%rbp)
mov    $0x4,%edi
lea    -0xb0(%rbp),%rsi
call   1040 <calculate@plt>
fldt   -0xbc(%rbp)
faddp  %st,%st(1)
fstpt  -0x30(%rbp)
fldt   -0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
mov    %rsp,%rax
fstpt  (%rax)
lea    0xe4b(%rip),%rdi
call   1060 <cov_log@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    0x10(%rax),%rdi
mov    0x18(%rax),%rdx
call   1050 <cov_check@plt>
fldt   -0x30(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    0xe29(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xa0,%rsp
mov    %rsi,%rbx
flds   0xeaf(%rip)
fstpt  0x20(%rsp)
flds   0xea9(%rip)
fstpt  0x40(%rsp)
flds   0xea3(%rip)
fstpt  0x60(%rsp)
flds   0xe9d(%rip)
fstpt  0x80(%rsp)
lea    0x20(%rsp),%rsi
mov    $0x4,%edi
call   1040 <calculate@plt>
fldt   0xe85(%rip)
faddp  %st,%st(1)
fld    %st(0)
fstpt  0x14(%rsp)
mov    0x10(%rbx),%rsi
fstpt  (%rsp)
lea    0xe7f(%rip),%rdi
call   1060 <cov_log@plt>
mov    0x8(%rbx),%rsi
mov    0x10(%rbx),%rdi
mov    0x18(%rbx),%rdx
call   1050 <cov_check@plt>
fldt   0x14(%rsp)
fstpt  (%rsp)
lea    0xe62(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"result\00"
@.str.1 = [9 x i8] c"%1.15Le\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca x86_fp80
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 4, i32* %6
%9 = call i8* @llvm.stacksave()
store i8* %9, i8** %7
%10 = alloca [2 x x86_fp80], i64 4
%11 = getelementptr inbounds [2 x x86_fp80], [2 x x86_fp80]* %10, i64 0
%12 = getelementptr inbounds [2 x x86_fp80], [2 x x86_fp80]* %11, i64 0, i64 0
store x86_fp80 0xK4001A000000000000000, x86_fp80* %12
%13 = getelementptr inbounds [2 x x86_fp80], [2 x x86_fp80]* %10, i64 1
%14 = getelementptr inbounds [2 x x86_fp80], [2 x x86_fp80]* %13, i64 0, i64 0
store x86_fp80 0xK400A9000000000000000, x86_fp80* %14
%15 = getelementptr inbounds [2 x x86_fp80], [2 x x86_fp80]* %10, i64 2
%16 = getelementptr inbounds [2 x x86_fp80], [2 x x86_fp80]* %15, i64 0, i64 0
store x86_fp80 0xK400FE6AA800000000000, x86_fp80* %16
%17 = getelementptr inbounds [2 x x86_fp80], [2 x x86_fp80]* %10, i64 3
%18 = getelementptr inbounds [2 x x86_fp80], [2 x x86_fp80]* %17, i64 0, i64 0
store x86_fp80 0xK4013E068000000000000, x86_fp80* %18
%19 = getelementptr inbounds [2 x x86_fp80], [2 x x86_fp80]* %10, i64 3
%20 = getelementptr inbounds [2 x x86_fp80], [2 x x86_fp80]* %19, i64 0, i64 0
%21 = load x86_fp80, x86_fp80* %20
%22 = fadd x86_fp80 %21, 0xK40008CCCCCCCCCCCCCCD
%23 = bitcast [2 x x86_fp80]* %10 to x86_fp80**
%24 = call x86_fp80 @calculate(i32 4, x86_fp80** %23)
%25 = fadd x86_fp80 %22, %24
store x86_fp80 %25, x86_fp80* %8
%26 = load x86_fp80, x86_fp80* %8
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 2
%29 = load i8*, i8** %28
%30 = call i32 @cov_log(x86_fp80 %26, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %29)
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 2
%33 = load i8*, i8** %32
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 1
%36 = load i8*, i8** %35
%37 = load i8**, i8*** %5
%38 = getelementptr inbounds i8*, i8** %37, i64 3
%39 = load i8*, i8** %38
%40 = call i32 @cov_check(i8* %33, i8* %36, i8* %39)
%41 = load x86_fp80, x86_fp80* %8
%42 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), x86_fp80 %41)
store i32 0, i32* %3
%43 = load i8*, i8** %7
%44 = load i32, i32* %3
ret i32 %44
}

LLVM IR (-O2):
@.str = [7 x i8] c"result\00"
@.str.1 = [9 x i8] c"%1.15Le\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [4 x [2 x x86_fp80]]
%4 = getelementptr inbounds [4 x [2 x x86_fp80]], [4 x [2 x x86_fp80]]* %3, i64 0, i64 0, i64 0
store x86_fp80 0xK4001A000000000000000, x86_fp80* %4
%5 = getelementptr inbounds [4 x [2 x x86_fp80]], [4 x [2 x x86_fp80]]* %3, i64 0, i64 1, i64 0
store x86_fp80 0xK400A9000000000000000, x86_fp80* %5
%6 = getelementptr inbounds [4 x [2 x x86_fp80]], [4 x [2 x x86_fp80]]* %3, i64 0, i64 2, i64 0
store x86_fp80 0xK400FE6AA800000000000, x86_fp80* %6
%7 = getelementptr inbounds [4 x [2 x x86_fp80]], [4 x [2 x x86_fp80]]* %3, i64 0, i64 3, i64 0
store x86_fp80 0xK4013E068000000000000, x86_fp80* %7
%8 = bitcast [4 x [2 x x86_fp80]]* %3 to x86_fp80**
%9 = call x86_fp80 @calculate(i32 4, x86_fp80** %8)
%10 = fadd x86_fp80 %9, 0xK4013E06811999999999A
%11 = getelementptr inbounds i8*, i8** %1, i64 2
%12 = load i8*, i8** %11
%13 = call i32 @cov_log(x86_fp80 %10, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = load i8*, i8** %11
%15 = getelementptr inbounds i8*, i8** %1, i64 1
%16 = load i8*, i8** %15
%17 = getelementptr inbounds i8*, i8** %1, i64 3
%18 = load i8*, i8** %17
%19 = call i32 @cov_check(i8* %14, i8* %16, i8* %18)
%20 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), x86_fp80 %10)
ret i32 0
}