#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 EXIT_SUCCESS;
int /*<<< orphan*/ free(double *);
int /*<<< orphan*/ l1tf(int, double *, double, double *);
double *malloc(int);
int /*<<< orphan*/ print_dvec(int, double *);
int /*<<< orphan*/ print_info(int, double, double);
int /*<<< orphan*/ process_args(int, char **, int *, double **, double *,
                                double *);
int main(int argc, char *argv[]) {
  int n;
  double *x, *y;
  double lambda, lambda_max;
  process_args(argc, argv, &n, &y, &lambda, &lambda_max);
  print_info(n, lambda, lambda_max);
  x = malloc(sizeof(double) * n);
  l1tf(n, y, lambda, x);
  print_dvec(n, x);
  free(y);
  free(x);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x28(%rbp),%rcx
lea    -0x30(%rbp),%r8
lea    -0x38(%rbp),%r9
call   1070 <process_args@plt>
mov    -0x14(%rbp),%edi
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
call   1080 <print_info@plt>
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x28(%rbp),%rsi
movsd  -0x30(%rbp),%xmm0
mov    -0x20(%rbp),%rdx
call   1040 <l1tf@plt>
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1060 <print_dvec@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    0x2def(%rip),%rax
mov    (%rax),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
lea    0xc(%rsp),%rdx
lea    0x18(%rsp),%rcx
lea    0x10(%rsp),%r8
lea    0x20(%rsp),%r9
call   1070 <process_args@plt>
mov    0xc(%rsp),%edi
movsd  0x10(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
call   1080 <print_info@plt>
mov    0xc(%rsp),%r14d
lea    0x0(,%r14,8),%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    0x18(%rsp),%rsi
movsd  0x10(%rsp),%xmm0
mov    %r14d,%edi
mov    %rax,%rdx
call   1040 <l1tf@plt>
mov    0xc(%rsp),%edi
mov    %rbx,%rsi
call   1060 <print_dvec@plt>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x2dfb(%rip),%rax
mov    (%rax),%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca double*
%8 = alloca double*
%9 = alloca double
%10 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = load i32, i32* %4
%12 = load i8**, i8*** %5
%13 = call i32 @process_args(i32 %11, i8** %12, i32* %6, double** %8, double* %9, double* %10)
%14 = load i32, i32* %6
%15 = load double, double* %9
%16 = load double, double* %10
%17 = call i32 @print_info(i32 %14, double %15, double %16)
%18 = load i32, i32* %6
%19 = sext i32 %18 to i64
%20 = mul i64 8, %19
%21 = trunc i64 %20 to i32
%22 = call double* @malloc(i32 %21)
store double* %22, double** %7
%23 = load i32, i32* %6
%24 = load double*, double** %8
%25 = load double, double* %9
%26 = load double*, double** %7
%27 = call i32 @l1tf(i32 %23, double* %24, double %25, double* %26)
%28 = load i32, i32* %6
%29 = load double*, double** %7
%30 = call i32 @print_dvec(i32 %28, double* %29)
%31 = load double*, double** %8
%32 = call i32 @free(double* %31)
%33 = load double*, double** %7
%34 = call i32 @free(double* %33)
%35 = load i32, i32* @EXIT_SUCCESS
ret i32 %35
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca double
%6 = alloca double
%7 = bitcast i32* %3 to i8*
%8 = bitcast double** %4 to i8*
%9 = bitcast double* %5 to i8*
%10 = bitcast double* %6 to i8*
%11 = call i32 @process_args(i32 %0, i8** %1, i32* %3, double** %4, double* %5, double* %6)
%12 = load i32, i32* %3
%13 = load double, double* %5
%14 = load double, double* %6
%15 = call i32 @print_info(i32 %12, double %13, double %14)
%16 = load i32, i32* %3
%17 = shl i32 %16, 3
%18 = call double* @malloc(i32 %17)
%19 = load double*, double** %4
%20 = load double, double* %5
%21 = call i32 @l1tf(i32 %16, double* %19, double %20, double* %18)
%22 = load i32, i32* %3
%23 = call i32 @print_dvec(i32 %22, double* %18)
%24 = load double*, double** %4
%25 = call i32 @free(double* %24)
%26 = call i32 @free(double* %18)
%27 = load i32, i32* @EXIT_SUCCESS
ret i32 %27
}