#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 long f(double const **, double **, long long *, double *,
            int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int /*<<< orphan*/);
long long int main_f(long long int argc, char *argv[]) {
  long long int *iw = 0;
  double w[3];
  const double *arg[2] = {w + 0};
  double *res[2] = {w + 1};
  long long int j;
  double *a = w;
  for (j = 0; j < 1; ++j)
    scanf("%lf", a++);
  long long int flag = f(arg, res, iw, w + 2, 0);
  if (flag)
    return flag;
  const double *r = w + 1;
  for (j = 0; j < 1; ++j)
    printf("%g ", *r++);
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
lea    -0x50(%rbp),%rcx
lea    -0x40(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    %rcx,%rax
add    $0x8,%rax
add    $0x10,%rcx
mov    %rcx,-0x90(%rbp)
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rax
mov    -0x90(%rbp),%rcx
movq   $0x0,(%rax)
add    $0x8,%rax
mov    %rax,-0x98(%rbp)
cmp    %rcx,%rax
mov    %rax,-0x88(%rbp)
jne    1170 <main_f+0x40>
lea    -0x60(%rbp),%rcx
lea    -0x40(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x60(%rbp)
mov    %rcx,%rax
add    $0x8,%rax
add    $0x10,%rcx
mov    %rcx,-0xa8(%rbp)
mov    %rax,-0xa0(%rbp)
mov    -0xa0(%rbp),%rax
mov    -0xa8(%rbp),%rcx
movq   $0x0,(%rax)
add    $0x8,%rax
mov    %rax,-0xb0(%rbp)
cmp    %rcx,%rax
mov    %rax,-0xa0(%rbp)
jne    11c9 <main_f+0x99>
lea    -0x40(%rbp),%rax
mov    %rax,-0x70(%rbp)
movq   $0x0,-0x68(%rbp)
cmpq   $0x1,-0x68(%rbp)
jge    1242 <main_f+0x112>
mov    -0x70(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x70(%rbp)
mov    %eax,%esi
lea    0xdd4(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x68(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x68(%rbp)
jmp    1209 <main_f+0xd9>
lea    -0x50(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    -0x40(%rbp),%rcx
add    $0x10,%rcx
xor    %r8d,%r8d
call   1030 <f@plt>
mov    %rax,-0x78(%rbp)
cmpq   $0x0,-0x78(%rbp)
je     127a <main_f+0x14a>
mov    -0x78(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <main_f+0x1b1>
lea    -0x40(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x80(%rbp)
movq   $0x0,-0x68(%rbp)
cmpq   $0x1,-0x68(%rbp)
jge    12cb <main_f+0x19b>
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x80(%rbp)
movsd  (%rax),%xmm0
lea    0xd51(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x68(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x68(%rbp)
jmp    128e <main_f+0x15e>
lea    0xd36(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main_f>:
push   %rbx
sub    $0x40,%rsp
lea    0x20(%rsp),%rsi
mov    %rsi,0x10(%rsp)
movq   $0x0,0x18(%rsp)
lea    0x28(%rsp),%rax
mov    %rax,(%rsp)
movq   $0x0,0x8(%rsp)
lea    0xe8f(%rip),%rdi
call   1060 <scanf@plt>
lea    0x30(%rsp),%rcx
lea    0x10(%rsp),%rdi
mov    %rsp,%rsi
xor    %edx,%edx
xor    %r8d,%r8d
call   1040 <f@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    11b3 <main_f+0x73>
movsd  0x28(%rsp),%xmm0
lea    0xe62(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [4 x i8] c"%g \00"
@.str.2 = [2 x i8] c"\0A\00"
define i64 @main_f(i64 %0, i8** %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8**
%6 = alloca i64*
%7 = alloca [3 x double]
%8 = alloca [2 x double*]
%9 = alloca [2 x double*]
%10 = alloca i64
%11 = alloca double*
%12 = alloca i64
%13 = alloca double*
store i64 %0, i64* %4
store i8** %1, i8*** %5
store i64* null, i64** %6
%14 = getelementptr inbounds [2 x double*], [2 x double*]* %8, i64 0, i64 0
%15 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%16 = getelementptr inbounds double, double* %15, i64 0
store double* %16, double** %14
%17 = getelementptr inbounds double*, double** %14, i64 1
%18 = getelementptr inbounds double*, double** %14, i64 2
br label %19
19: ; preds = %19, %2
%20 = phi double** [ %17, %2 ], [ %21, %19 ]
store double* null, double** %20
%21 = getelementptr inbounds double*, double** %20, i64 1
%22 = icmp eq double** %21, %18
br i1 %22, label %23, label %19
23: ; preds = %19
%24 = getelementptr inbounds [2 x double*], [2 x double*]* %9, i64 0, i64 0
%25 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%26 = getelementptr inbounds double, double* %25, i64 1
store double* %26, double** %24
%27 = getelementptr inbounds double*, double** %24, i64 1
%28 = getelementptr inbounds double*, double** %24, i64 2
br label %29
29: ; preds = %29, %23
%30 = phi double** [ %27, %23 ], [ %31, %29 ]
store double* null, double** %30
%31 = getelementptr inbounds double*, double** %30, i64 1
%32 = icmp eq double** %31, %28
br i1 %32, label %33, label %29
33: ; preds = %29
%34 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
store double* %34, double** %11
store i64 0, i64* %10
br label %35
35: ; preds = %43, %33
%36 = load i64, i64* %10
%37 = icmp slt i64 %36, 1
br i1 %37, label %38, label %46
38: ; preds = %35
%39 = load double*, double** %11
%40 = getelementptr inbounds double, double* %39, i32 1
store double* %40, double** %11
%41 = ptrtoint double* %39 to i32
%42 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %41)
br label %43
43: ; preds = %38
%44 = load i64, i64* %10
%45 = add nsw i64 %44, 1
store i64 %45, i64* %10
br label %35
46: ; preds = %35
%47 = getelementptr inbounds [2 x double*], [2 x double*]* %8, i64 0, i64 0
%48 = getelementptr inbounds [2 x double*], [2 x double*]* %9, i64 0, i64 0
%49 = load i64*, i64** %6
%50 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%51 = getelementptr inbounds double, double* %50, i64 2
%52 = call i64 @f(double** %47, double** %48, i64* %49, double* %51, i32 0)
store i64 %52, i64* %12
%53 = load i64, i64* %12
%54 = icmp ne i64 %53, 0
br i1 %54, label %55, label %57
55: ; preds = %46
%56 = load i64, i64* %12
store i64 %56, i64* %3
br label %73
57: ; preds = %46
%58 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%59 = getelementptr inbounds double, double* %58, i64 1
store double* %59, double** %13
store i64 0, i64* %10
br label %60
60: ; preds = %68, %57
%61 = load i64, i64* %10
%62 = icmp slt i64 %61, 1
br i1 %62, label %63, label %71
63: ; preds = %60
%64 = load double*, double** %13
%65 = getelementptr inbounds double, double* %64, i32 1
store double* %65, double** %13
%66 = load double, double* %64
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %66)
br label %68
68: ; preds = %63
%69 = load i64, i64* %10
%70 = add nsw i64 %69, 1
store i64 %70, i64* %10
br label %60
71: ; preds = %60
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i64 0, i64* %3
br label %73
73: ; preds = %71, %55
%74 = load i64, i64* %3
ret i64 %74
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [4 x i8] c"%g \00"
define i64 @main_f(i64 %0, i8** nocapture readnone %1) {
%3 = alloca [3 x double]
%4 = alloca [2 x double*]
%5 = alloca [2 x double*]
%6 = bitcast [3 x double]* %3 to i8*
%7 = bitcast [2 x double*]* %4 to i8*
%8 = getelementptr inbounds [2 x double*], [2 x double*]* %4, i64 0, i64 0
%9 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
store double* %9, double** %8
%10 = getelementptr inbounds [2 x double*], [2 x double*]* %4, i64 0, i64 1
store double* null, double** %10
%11 = bitcast [2 x double*]* %5 to i8*
%12 = getelementptr inbounds [2 x double*], [2 x double*]* %5, i64 0, i64 0
%13 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 1
store double* %13, double** %12
%14 = getelementptr inbounds [2 x double*], [2 x double*]* %5, i64 0, i64 1
store double* null, double** %14
%15 = ptrtoint [3 x double]* %3 to i64
%16 = trunc i64 %15 to i32
%17 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 2
%19 = call i64 @f(double** %8, double** %12, i64* null, double* %18, i32 0)
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %25
21: ; preds = %2
%22 = load double, double* %13
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %22)
%24 = call i32 @putchar(i32 10)
br label %25
25: ; preds = %2, %21
ret i64 %19
}