#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 */
int /*<<< orphan*/ cov_check(char *, char *, char *);
int /*<<< orphan*/ cov_log(double, char *, char *);
int /*<<< orphan*/ printf(char *, long double);
int main(int argc, char *argv[]) {
  double a[3] = {2.1, 2.2, 2.3};
  double b = 3;
  double c = a[1] + b;
  cov_log(c, "result", argv[2]);
  cov_check(argv[2], argv[1], argv[3]);
  printf("%1.15Le\n", (long double)c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x20(%rbp)
movaps 0xea8(%rip),%xmm0
movaps %xmm0,-0x30(%rbp)
movabs $0x4008000000000000,%rax
mov    %rax,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
lea    0xe87(%rip),%rdi
call   1050 <cov_log@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    0x10(%rax),%rdi
mov    0x18(%rax),%rdx
call   1040 <cov_check@plt>
fldl   -0x40(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    0xe65(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    0x10(%rsi),%rsi
lea    0xec5(%rip),%rdi
movsd  0xeb5(%rip),%xmm0
call   1050 <cov_log@plt>
mov    0x8(%rbx),%rsi
mov    0x10(%rbx),%rdi
mov    0x18(%rbx),%rdx
call   1040 <cov_check@plt>
fldl   0xe99(%rip)
fstpt  (%rsp)
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [3 x double] [double 2.100000e+00, double 2.200000e+00, double 2.300000e+00]
@.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 [3 x double]
%7 = alloca double
%8 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = bitcast [3 x double]* %6 to i8*
store double 3.000000e+00, double* %7
%10 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 1
%11 = load double, double* %10
%12 = load double, double* %7
%13 = fadd double %11, %12
store double %13, double* %8
%14 = load double, double* %8
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 2
%17 = load i8*, i8** %16
%18 = call i32 @cov_log(double %14, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %17)
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 2
%21 = load i8*, i8** %20
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 3
%27 = load i8*, i8** %26
%28 = call i32 @cov_check(i8* %21, i8* %24, i8* %27)
%29 = load double, double* %8
%30 = fpext double %29 to x86_fp80
%31 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), x86_fp80 %30)
ret i32 0
}

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 = getelementptr inbounds i8*, i8** %1, i64 2
%4 = load i8*, i8** %3
%5 = tail call i32 @cov_log(double 5.200000e+00, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8*, i8** %1, i64 3
%10 = load i8*, i8** %9
%11 = tail call i32 @cov_check(i8* %6, i8* %8, i8* %10)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), x86_fp80 0xK4001A666666666666800)
ret i32 0
}