#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*/ binomial(int, double, double *);
int /*<<< orphan*/ initialize_array(double *, int);
int /*<<< orphan*/ revert_array(double *, double *, int);
void generate_delta_coefficients(double vetor[], double out[], int n,
                                 double delta) {
  initialize_array(out, n);
  double a_invertido[n];
  initialize_array(a_invertido, n);
  revert_array(vetor, a_invertido, n);
  double _a[n];
  initialize_array(_a, n);
  int i, j;
  for (i = 0; i < n; i++) {
    double b[n + 1];
    initialize_array(b, n + 1);
    binomial(i, delta, b);
    for (j = 0; j < i + 1; j++) {
      b[j] = b[j] * a_invertido[i];
      _a[j] = _a[j] + b[j];
    }
  }
  revert_array(_a, out, n);
}


x86 assembly (clang, -O0):
<generate_delta_coefficients>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1050 <initialize_array@plt>
mov    -0x14(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
lea    0xf(,%rax,8),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x60(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x30(%rbp)
mov    -0x14(%rbp),%esi
call   1050 <initialize_array@plt>
mov    -0x60(%rbp),%rsi
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
call   1040 <revert_array@plt>
mov    -0x14(%rbp),%eax
lea    0xf(,%rax,8),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x58(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x38(%rbp)
mov    -0x14(%rbp),%esi
call   1050 <initialize_array@plt>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1291 <generate_delta_coefficients+0x161>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %rsp,%rcx
mov    %rcx,-0x48(%rbp)
lea    0xf(,%rax,8),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x68(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x50(%rbp)
mov    -0x14(%rbp),%esi
add    $0x1,%esi
call   1050 <initialize_array@plt>
mov    -0x68(%rbp),%rsi
mov    -0x3c(%rbp),%edi
movsd  -0x20(%rbp),%xmm0
call   1030 <binomial@plt>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    127c <generate_delta_coefficients+0x14c>
mov    -0x58(%rbp),%rax
mov    -0x68(%rbp),%rcx
mov    -0x60(%rbp),%rdx
movslq -0x40(%rbp),%rsi
movsd  (%rcx,%rsi,8),%xmm0
movslq -0x3c(%rbp),%rsi
mulsd  (%rdx,%rsi,8),%xmm0
movslq -0x40(%rbp),%rdx
movsd  %xmm0,(%rcx,%rdx,8)
movslq -0x40(%rbp),%rdx
movsd  (%rax,%rdx,8),%xmm0
movslq -0x40(%rbp),%rdx
addsd  (%rcx,%rdx,8),%xmm0
movslq -0x40(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    121b <generate_delta_coefficients+0xeb>
mov    -0x48(%rbp),%rax
mov    %rax,%rsp
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11c2 <generate_delta_coefficients+0x92>
mov    -0x58(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <revert_array@plt>
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate_delta_coefficients>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
movsd  %xmm0,-0x78(%rbp)
mov    %edx,%r15d
mov    %rdi,%r12
mov    %rsi,-0x50(%rbp)
mov    %rsi,%rdi
mov    %edx,%esi
call   1050 <initialize_array@plt>
mov    %r15d,%eax
mov    %rsp,%rbx
mov    %rax,-0x70(%rbp)
lea    0xf(,%rax,8),%r14
and    $0xfffffffffffffff0,%r14
sub    %r14,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
mov    %r15d,%esi
call   1050 <initialize_array@plt>
mov    %r12,%rdi
mov    %rbx,-0x68(%rbp)
mov    %rbx,%rsi
mov    %r15d,%edx
call   1040 <revert_array@plt>
mov    %rsp,%rbx
sub    %r14,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
mov    %r15d,%esi
call   1050 <initialize_array@plt>
mov    %r15,-0x48(%rbp)
test   %r15d,%r15d
jle    13b8 <generate_delta_coefficients+0x288>
mov    -0x48(%rbp),%rax
add    $0x1,%eax
mov    $0x1,%r13d
mov    $0xfffffffffffffffd,%rdi
xor    %r15d,%r15d
mov    %rax,-0x60(%rbp)
lea    0xf(,%rax,8),%rax
and    $0xfffffffffffffff0,%rax
mov    %rax,-0x58(%rbp)
jmp    1205 <generate_delta_coefficients+0xd5>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rdx,%rsp
add    $0x1,%r13
add    $0x1,%rdi
cmp    -0x70(%rbp),%r15
je     13b8 <generate_delta_coefficients+0x288>
mov    %rdi,-0x30(%rbp)
mov    %rsp,-0x38(%rbp)
lea    -0x3(%r15),%r12
lea    0x1(%r15),%rax
mov    %rax,-0x40(%rbp)
mov    %rsp,%r14
sub    -0x58(%rbp),%r14
mov    %r14,%rsp
mov    %r14,%rdi
mov    -0x60(%rbp),%rsi
call   1050 <initialize_array@plt>
mov    %r15d,%edi
movsd  -0x78(%rbp),%xmm0
mov    %r14,%rsi
call   1030 <binomial@plt>
mov    -0x68(%rbp),%rax
movsd  (%rax,%r15,8),%xmm0
sub    $0x3,%r15
jae    1270 <generate_delta_coefficients+0x140>
xor    %ecx,%ecx
mov    -0x40(%rbp),%r15
mov    -0x38(%rbp),%rdx
mov    -0x30(%rbp),%rdi
jmp    1390 <generate_delta_coefficients+0x260>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
shr    $0x2,%r12
add    $0x1,%r12
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
cmp    $0x4,%r15
jae    12a0 <generate_delta_coefficients+0x170>
xor    %eax,%eax
mov    -0x40(%rbp),%r15
mov    -0x38(%rbp),%rdx
mov    -0x30(%rbp),%rdi
jmp    133e <generate_delta_coefficients+0x20e>
nopl   0x0(%rax)
mov    -0x30(%rbp),%rdi
mov    %rdi,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
and    $0xfffffffffffffffe,%rcx
xor    %eax,%eax
mov    -0x40(%rbp),%r15
mov    -0x38(%rbp),%rdx
nopl   (%rax)
movapd (%r14,%rax,8),%xmm2
mulpd  %xmm1,%xmm2
movapd 0x10(%r14,%rax,8),%xmm3
mulpd  %xmm1,%xmm3
movapd %xmm2,(%r14,%rax,8)
movapd %xmm3,0x10(%r14,%rax,8)
addpd  (%rbx,%rax,8),%xmm2
addpd  0x10(%rbx,%rax,8),%xmm3
movapd %xmm2,(%rbx,%rax,8)
movapd %xmm3,0x10(%rbx,%rax,8)
movapd 0x20(%r14,%rax,8),%xmm2
mulpd  %xmm1,%xmm2
movapd 0x30(%r14,%rax,8),%xmm3
mulpd  %xmm1,%xmm3
movapd %xmm2,0x20(%r14,%rax,8)
movapd %xmm3,0x30(%r14,%rax,8)
addpd  0x20(%rbx,%rax,8),%xmm2
addpd  0x30(%rbx,%rax,8),%xmm3
movapd %xmm2,0x20(%rbx,%rax,8)
movapd %xmm3,0x30(%rbx,%rax,8)
add    $0x8,%rax
add    $0xfffffffffffffffe,%rcx
jne    12c0 <generate_delta_coefficients+0x190>
mov    %r15,%rcx
and    $0xfffffffffffffffc,%rcx
test   $0x1,%r12b
je     137f <generate_delta_coefficients+0x24f>
movapd (%r14,%rax,8),%xmm2
mulpd  %xmm1,%xmm2
mulpd  0x10(%r14,%rax,8),%xmm1
movapd %xmm2,(%r14,%rax,8)
movapd %xmm1,0x10(%r14,%rax,8)
addpd  (%rbx,%rax,8),%xmm2
addpd  0x10(%rbx,%rax,8),%xmm1
movapd %xmm2,(%rbx,%rax,8)
movapd %xmm1,0x10(%rbx,%rax,8)
cmp    %rcx,%r15
je     11f0 <generate_delta_coefficients+0xc0>
nopl   0x0(%rax,%rax,1)
movsd  (%r14,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%r14,%rcx,8)
addsd  (%rbx,%rcx,8),%xmm1
movsd  %xmm1,(%rbx,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%r13
jne    1390 <generate_delta_coefficients+0x260>
jmp    11f0 <generate_delta_coefficients+0xc0>
mov    %rbx,%rdi
mov    -0x50(%rbp),%rsi
mov    -0x48(%rbp),%rdx
call   1040 <revert_array@plt>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @generate_delta_coefficients(double* %0, double* %1, i32 %2, double %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
%8 = alloca double
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i64
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i64
store double* %0, double** %5
store double* %1, double** %6
store i32 %2, i32* %7
store double %3, double* %8
%16 = load double*, double** %6
%17 = load i32, i32* %7
%18 = call i32 @initialize_array(double* %16, i32 %17)
%19 = load i32, i32* %7
%20 = zext i32 %19 to i64
%21 = call i8* @llvm.stacksave()
store i8* %21, i8** %9
%22 = alloca double, i64 %20
store i64 %20, i64* %10
%23 = load i32, i32* %7
%24 = call i32 @initialize_array(double* %22, i32 %23)
%25 = load double*, double** %5
%26 = load i32, i32* %7
%27 = call i32 @revert_array(double* %25, double* %22, i32 %26)
%28 = load i32, i32* %7
%29 = zext i32 %28 to i64
%30 = alloca double, i64 %29
store i64 %29, i64* %11
%31 = load i32, i32* %7
%32 = call i32 @initialize_array(double* %30, i32 %31)
store i32 0, i32* %12
br label %33
33: ; preds = %84, %4
%34 = load i32, i32* %12
%35 = load i32, i32* %7
%36 = icmp slt i32 %34, %35
br i1 %36, label %37, label %87
37: ; preds = %33
%38 = load i32, i32* %7
%39 = add nsw i32 %38, 1
%40 = zext i32 %39 to i64
%41 = call i8* @llvm.stacksave()
store i8* %41, i8** %14
%42 = alloca double, i64 %40
store i64 %40, i64* %15
%43 = load i32, i32* %7
%44 = add nsw i32 %43, 1
%45 = call i32 @initialize_array(double* %42, i32 %44)
%46 = load i32, i32* %12
%47 = load double, double* %8
%48 = call i32 @binomial(i32 %46, double %47, double* %42)
store i32 0, i32* %13
br label %49
49: ; preds = %79, %37
%50 = load i32, i32* %13
%51 = load i32, i32* %12
%52 = add nsw i32 %51, 1
%53 = icmp slt i32 %50, %52
br i1 %53, label %54, label %82
54: ; preds = %49
%55 = load i32, i32* %13
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds double, double* %42, i64 %56
%58 = load double, double* %57
%59 = load i32, i32* %12
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds double, double* %22, i64 %60
%62 = load double, double* %61
%63 = fmul double %58, %62
%64 = load i32, i32* %13
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds double, double* %42, i64 %65
store double %63, double* %66
%67 = load i32, i32* %13
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double, double* %30, i64 %68
%70 = load double, double* %69
%71 = load i32, i32* %13
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds double, double* %42, i64 %72
%74 = load double, double* %73
%75 = fadd double %70, %74
%76 = load i32, i32* %13
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds double, double* %30, i64 %77
store double %75, double* %78
br label %79
79: ; preds = %54
%80 = load i32, i32* %13
%81 = add nsw i32 %80, 1
store i32 %81, i32* %13
br label %49
82: ; preds = %49
%83 = load i8*, i8** %14
br label %84
84: ; preds = %82
%85 = load i32, i32* %12
%86 = add nsw i32 %85, 1
store i32 %86, i32* %12
br label %33
87: ; preds = %33
%88 = load double*, double** %6
%89 = load i32, i32* %7
%90 = call i32 @revert_array(double* %30, double* %88, i32 %89)
%91 = load i8*, i8** %9
ret void
}

LLVM IR (-O2):
define void @generate_delta_coefficients(double* %0, double* %1, i32 %2, double %3) {
%5 = tail call i32 @initialize_array(double* %1, i32 %2)
%6 = zext i32 %2 to i64
%7 = alloca double, i64 %6
%8 = call i32 @initialize_array(double* %7, i32 %2)
%9 = call i32 @revert_array(double* %0, double* %7, i32 %2)
%10 = alloca double, i64 %6
%11 = call i32 @initialize_array(double* %10, i32 %2)
%12 = icmp sgt i32 %2, 0
br i1 %12, label %13, label %130
13: ; preds = %4
%14 = add nuw nsw i32 %2, 1
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %13, %126
%17 = phi i64 [ 0, %13 ], [ %127, %126 ]
%18 = phi i64 [ 1, %13 ], [ %128, %126 ]
%19 = add nsw i64 %17, -3
%20 = lshr i64 %19, 2
%21 = add nuw nsw i64 %20, 1
%22 = add nuw i64 %17, 1
%23 = call i8* @llvm.stacksave()
%24 = alloca double, i64 %15
%25 = call i32 @initialize_array(double* %24, i32 %14)
%26 = trunc i64 %17 to i32
%27 = call i32 @binomial(i32 %26, double %3, double* %24)
%28 = getelementptr inbounds double, double* %7, i64 %17
%29 = load double, double* %28
%30 = icmp ult i64 %17, 3
br i1 %30, label %114, label %31
31: ; preds = %16
%32 = and i64 %22, -4
%33 = insertelement <2 x double> poison, double %29, i64 0
%34 = shufflevector <2 x double> %33, <2 x double> poison, <2 x i32> zeroinitializer
%35 = insertelement <2 x double> poison, double %29, i64 0
%36 = shufflevector <2 x double> %35, <2 x double> poison, <2 x i32> zeroinitializer
%37 = and i64 %21, 1
%38 = icmp ult i64 %19, 4
br i1 %38, label %88, label %39
39: ; preds = %31
%40 = and i64 %21, 9223372036854775806
br label %41
41: ; preds = %41, %39
%42 = phi i64 [ 0, %39 ], [ %85, %41 ]
%43 = phi i64 [ 0, %39 ], [ %86, %41 ]
%44 = getelementptr inbounds double, double* %24, i64 %42
%45 = bitcast double* %44 to <2 x double>*
%46 = load <2 x double>, <2 x double>* %45
%47 = getelementptr inbounds double, double* %44, i64 2
%48 = bitcast double* %47 to <2 x double>*
%49 = load <2 x double>, <2 x double>* %48
%50 = fmul <2 x double> %46, %34
%51 = fmul <2 x double> %49, %36
%52 = bitcast double* %44 to <2 x double>*
store <2 x double> %50, <2 x double>* %52
%53 = bitcast double* %47 to <2 x double>*
store <2 x double> %51, <2 x double>* %53
%54 = getelementptr inbounds double, double* %10, i64 %42
%55 = bitcast double* %54 to <2 x double>*
%56 = load <2 x double>, <2 x double>* %55
%57 = getelementptr inbounds double, double* %54, i64 2
%58 = bitcast double* %57 to <2 x double>*
%59 = load <2 x double>, <2 x double>* %58
%60 = fadd <2 x double> %50, %56
%61 = fadd <2 x double> %51, %59
%62 = bitcast double* %54 to <2 x double>*
store <2 x double> %60, <2 x double>* %62
%63 = bitcast double* %57 to <2 x double>*
store <2 x double> %61, <2 x double>* %63
%64 = or i64 %42, 4
%65 = getelementptr inbounds double, double* %24, i64 %64
%66 = bitcast double* %65 to <2 x double>*
%67 = load <2 x double>, <2 x double>* %66
%68 = getelementptr inbounds double, double* %65, i64 2
%69 = bitcast double* %68 to <2 x double>*
%70 = load <2 x double>, <2 x double>* %69
%71 = fmul <2 x double> %67, %34
%72 = fmul <2 x double> %70, %36
%73 = bitcast double* %65 to <2 x double>*
store <2 x double> %71, <2 x double>* %73
%74 = bitcast double* %68 to <2 x double>*
store <2 x double> %72, <2 x double>* %74
%75 = getelementptr inbounds double, double* %10, i64 %64
%76 = bitcast double* %75 to <2 x double>*
%77 = load <2 x double>, <2 x double>* %76
%78 = getelementptr inbounds double, double* %75, i64 2
%79 = bitcast double* %78 to <2 x double>*
%80 = load <2 x double>, <2 x double>* %79
%81 = fadd <2 x double> %71, %77
%82 = fadd <2 x double> %72, %80
%83 = bitcast double* %75 to <2 x double>*
store <2 x double> %81, <2 x double>* %83
%84 = bitcast double* %78 to <2 x double>*
store <2 x double> %82, <2 x double>* %84
%85 = add nuw i64 %42, 8
%86 = add i64 %43, 2
%87 = icmp eq i64 %86, %40
br i1 %87, label %88, label %41
88: ; preds = %41, %31
%89 = phi i64 [ 0, %31 ], [ %85, %41 ]
%90 = icmp eq i64 %37, 0
br i1 %90, label %112, label %91
91: ; preds = %88
%92 = getelementptr inbounds double, double* %24, i64 %89
%93 = bitcast double* %92 to <2 x double>*
%94 = load <2 x double>, <2 x double>* %93
%95 = getelementptr inbounds double, double* %92, i64 2
%96 = bitcast double* %95 to <2 x double>*
%97 = load <2 x double>, <2 x double>* %96
%98 = fmul <2 x double> %94, %34
%99 = fmul <2 x double> %97, %36
%100 = bitcast double* %92 to <2 x double>*
store <2 x double> %98, <2 x double>* %100
%101 = bitcast double* %95 to <2 x double>*
store <2 x double> %99, <2 x double>* %101
%102 = getelementptr inbounds double, double* %10, i64 %89
%103 = bitcast double* %102 to <2 x double>*
%104 = load <2 x double>, <2 x double>* %103
%105 = getelementptr inbounds double, double* %102, i64 2
%106 = bitcast double* %105 to <2 x double>*
%107 = load <2 x double>, <2 x double>* %106
%108 = fadd <2 x double> %98, %104
%109 = fadd <2 x double> %99, %107
%110 = bitcast double* %102 to <2 x double>*
store <2 x double> %108, <2 x double>* %110
%111 = bitcast double* %105 to <2 x double>*
store <2 x double> %109, <2 x double>* %111
br label %112
112: ; preds = %88, %91
%113 = icmp eq i64 %22, %32
br i1 %113, label %126, label %114
114: ; preds = %16, %112
%115 = phi i64 [ 0, %16 ], [ %32, %112 ]
br label %116
116: ; preds = %114, %116
%117 = phi i64 [ %124, %116 ], [ %115, %114 ]
%118 = getelementptr inbounds double, double* %24, i64 %117
%119 = load double, double* %118
%120 = fmul double %119, %29
store double %120, double* %118
%121 = getelementptr inbounds double, double* %10, i64 %117
%122 = load double, double* %121
%123 = fadd double %120, %122
store double %123, double* %121
%124 = add nuw nsw i64 %117, 1
%125 = icmp eq i64 %124, %18
br i1 %125, label %126, label %116
126: ; preds = %116, %112
%127 = add nuw nsw i64 %17, 1
%128 = add nuw nsw i64 %18, 1
%129 = icmp eq i64 %127, %6
br i1 %129, label %130, label %16
130: ; preds = %126, %4
%131 = call i32 @revert_array(double* %10, double* %1, i32 %2)
ret void
}