#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*/ gamma_wilson_7(double *, double, double *, double **,
                                  double **, double, double);
void Beta_Separator(double error[], double feed_xL_out[], double beta[],
                    double ps[], double P[], double T[], double feed_xL[],
                    double feed_comp[], double VIJ[][7], double aij[][7],
                    double R, double T_ref) {
  int i;
  double sum1, sum2, K[7], feed_yV[7], g[7];
  gamma_wilson_7(g, T[0], feed_xL, VIJ, aij, R, T_ref);
  sum1 = 0.;
  sum2 = 0.;
  for (i = 0; i < 7; i++) {
    K[i] = ps[i] * g[i] / P[0];
    feed_xL_out[i] = feed_comp[i] / (1 + (K[i] - 1) * beta[0]);
    feed_yV[i] = K[i] * feed_xL_out[i];
    sum1 += feed_xL[i];
    sum2 += feed_yV[i];
  };
  error[0] = sum1 - sum2;
}


x86 assembly (clang, -O0):
<Beta_Separator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movsd  %xmm0,-0x38(%rbp)
movsd  %xmm1,-0x40(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x10(%rbp),%rsi
mov    0x20(%rbp),%rdx
mov    0x28(%rbp),%rcx
movsd  -0x38(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
call   1030 <gamma_wilson_7@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0x7,-0x44(%rbp)
jge    1279 <Beta_Separator+0x169>
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x44(%rbp),%rax
mulsd  -0x110(%rbp,%rax,8),%xmm0
ff ff
mov    -0x28(%rbp),%rax
divsd  (%rax),%xmm0
movslq -0x44(%rbp),%rax
movsd  %xmm0,-0x90(%rbp,%rax,8)
ff ff
mov    0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x44(%rbp),%rax
movsd  -0x90(%rbp,%rax,8),%xmm1
ff ff
movsd  0xe17(%rip),%xmm2
subsd  %xmm2,%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xdff(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x44(%rbp),%rax
movsd  -0x90(%rbp,%rax,8),%xmm0
ff ff
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movslq -0x44(%rbp),%rax
movsd  %xmm0,-0xd0(%rbp,%rax,8)
ff ff
mov    0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movslq -0x44(%rbp),%rax
movsd  -0xd0(%rbp,%rax,8),%xmm0
ff ff
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    118e <Beta_Separator+0x7e>
movsd  -0x50(%rbp),%xmm0
subsd  -0x58(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Beta_Separator>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
movaps %xmm1,%xmm2
movaps %xmm0,%xmm1
mov    %r8,%rbx
mov    %rcx,%rbp
mov    %rdx,%r13
mov    %rsi,%r12
mov    %rdi,0x8(%rsp)
mov    0x88(%rsp),%r14
mov    0x80(%rsp),%r15
mov    0x90(%rsp),%rdx
mov    0x98(%rsp),%rcx
movsd  (%r9),%xmm0
lea    0x10(%rsp),%rdi
mov    %r15,%rsi
call   1030 <gamma_wilson_7@plt>
movsd  0x0(%rbp),%xmm1
mulsd  0x10(%rsp),%xmm1
divsd  (%rbx),%xmm1
movsd  (%r14),%xmm3
movsd  0xe7d(%rip),%xmm0
movapd %xmm1,%xmm4
addsd  %xmm0,%xmm4
mulsd  0x0(%r13),%xmm4
movsd  0xe6f(%rip),%xmm2
addsd  %xmm2,%xmm4
divsd  %xmm4,%xmm3
movsd  %xmm3,(%r12)
mulsd  %xmm1,%xmm3
xorpd  %xmm1,%xmm1
addsd  %xmm1,%xmm3
addsd  (%r15),%xmm1
movsd  0x8(%rbp),%xmm5
mulsd  0x18(%rsp),%xmm5
divsd  (%rbx),%xmm5
movsd  0x8(%r14),%xmm4
movapd %xmm5,%xmm6
addsd  %xmm0,%xmm6
mulsd  0x0(%r13),%xmm6
addsd  %xmm2,%xmm6
divsd  %xmm6,%xmm4
movsd  %xmm4,0x8(%r12)
addsd  0x8(%r15),%xmm1
mulsd  %xmm5,%xmm4
movsd  0x10(%rbp),%xmm5
mulsd  0x20(%rsp),%xmm5
addsd  %xmm3,%xmm4
divsd  (%rbx),%xmm5
movsd  0x10(%r14),%xmm3
movapd %xmm5,%xmm6
addsd  %xmm0,%xmm6
mulsd  0x0(%r13),%xmm6
addsd  %xmm2,%xmm6
divsd  %xmm6,%xmm3
movsd  %xmm3,0x10(%r12)
addsd  0x10(%r15),%xmm1
mulsd  %xmm5,%xmm3
movsd  0x18(%rbp),%xmm5
mulsd  0x28(%rsp),%xmm5
addsd  %xmm4,%xmm3
divsd  (%rbx),%xmm5
movsd  0x18(%r14),%xmm4
movapd %xmm5,%xmm6
addsd  %xmm0,%xmm6
mulsd  0x0(%r13),%xmm6
addsd  %xmm2,%xmm6
divsd  %xmm6,%xmm4
movsd  %xmm4,0x18(%r12)
addsd  0x18(%r15),%xmm1
mulsd  %xmm5,%xmm4
movsd  0x20(%rbp),%xmm5
mulsd  0x30(%rsp),%xmm5
addsd  %xmm3,%xmm4
divsd  (%rbx),%xmm5
movsd  0x20(%r14),%xmm3
movapd %xmm5,%xmm6
addsd  %xmm0,%xmm6
mulsd  0x0(%r13),%xmm6
addsd  %xmm2,%xmm6
divsd  %xmm6,%xmm3
movsd  %xmm3,0x20(%r12)
addsd  0x20(%r15),%xmm1
mulsd  %xmm5,%xmm3
movsd  0x28(%rbp),%xmm5
mulsd  0x38(%rsp),%xmm5
addsd  %xmm4,%xmm3
divsd  (%rbx),%xmm5
movsd  0x28(%r14),%xmm4
movapd %xmm5,%xmm6
addsd  %xmm0,%xmm6
mulsd  0x0(%r13),%xmm6
addsd  %xmm2,%xmm6
divsd  %xmm6,%xmm4
movsd  %xmm4,0x28(%r12)
addsd  0x28(%r15),%xmm1
mulsd  %xmm5,%xmm4
movsd  0x30(%rbp),%xmm5
mulsd  0x40(%rsp),%xmm5
addsd  %xmm3,%xmm4
divsd  (%rbx),%xmm5
movsd  0x30(%r14),%xmm3
addsd  %xmm5,%xmm0
mulsd  0x0(%r13),%xmm0
addsd  %xmm2,%xmm0
divsd  %xmm0,%xmm3
movsd  %xmm3,0x30(%r12)
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
addsd  0x30(%r15),%xmm1
subsd  %xmm3,%xmm1
mov    0x8(%rsp),%rax
movsd  %xmm1,(%rax)
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @Beta_Separator(double* %0, double* %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7, [7 x double]* %8, [7 x double]* %9, double %10, double %11) {
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca double*
%18 = alloca double*
%19 = alloca double*
%20 = alloca double*
%21 = alloca [7 x double]*
%22 = alloca [7 x double]*
%23 = alloca double
%24 = alloca double
%25 = alloca i32
%26 = alloca double
%27 = alloca double
%28 = alloca [7 x double]
%29 = alloca [7 x double]
%30 = alloca [7 x double]
store double* %0, double** %13
store double* %1, double** %14
store double* %2, double** %15
store double* %3, double** %16
store double* %4, double** %17
store double* %5, double** %18
store double* %6, double** %19
store double* %7, double** %20
store [7 x double]* %8, [7 x double]** %21
store [7 x double]* %9, [7 x double]** %22
store double %10, double* %23
store double %11, double* %24
%31 = getelementptr inbounds [7 x double], [7 x double]* %30, i64 0, i64 0
%32 = load double*, double** %18
%33 = getelementptr inbounds double, double* %32, i64 0
%34 = load double, double* %33
%35 = load double*, double** %19
%36 = load [7 x double]*, [7 x double]** %21
%37 = bitcast [7 x double]* %36 to double**
%38 = load [7 x double]*, [7 x double]** %22
%39 = bitcast [7 x double]* %38 to double**
%40 = load double, double* %23
%41 = load double, double* %24
%42 = call i32 @gamma_wilson_7(double* %31, double %34, double* %35, double** %37, double** %39, double %40, double %41)
store double 0.000000e+00, double* %26
store double 0.000000e+00, double* %27
store i32 0, i32* %25
br label %43
43: ; preds = %109, %12
%44 = load i32, i32* %25
%45 = icmp slt i32 %44, 7
br i1 %45, label %46, label %112
46: ; preds = %43
%47 = load double*, double** %16
%48 = load i32, i32* %25
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds double, double* %47, i64 %49
%51 = load double, double* %50
%52 = load i32, i32* %25
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [7 x double], [7 x double]* %30, i64 0, i64 %53
%55 = load double, double* %54
%56 = fmul double %51, %55
%57 = load double*, double** %17
%58 = getelementptr inbounds double, double* %57, i64 0
%59 = load double, double* %58
%60 = fdiv double %56, %59
%61 = load i32, i32* %25
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [7 x double], [7 x double]* %28, i64 0, i64 %62
store double %60, double* %63
%64 = load double*, double** %20
%65 = load i32, i32* %25
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds double, double* %64, i64 %66
%68 = load double, double* %67
%69 = load i32, i32* %25
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [7 x double], [7 x double]* %28, i64 0, i64 %70
%72 = load double, double* %71
%73 = fsub double %72, 1.000000e+00
%74 = load double*, double** %15
%75 = getelementptr inbounds double, double* %74, i64 0
%76 = load double, double* %75
%77 = call double @llvm.fmuladd.f64(double %73, double %76, double 1.000000e+00)
%78 = fdiv double %68, %77
%79 = load double*, double** %14
%80 = load i32, i32* %25
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds double, double* %79, i64 %81
store double %78, double* %82
%83 = load i32, i32* %25
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [7 x double], [7 x double]* %28, i64 0, i64 %84
%86 = load double, double* %85
%87 = load double*, double** %14
%88 = load i32, i32* %25
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds double, double* %87, i64 %89
%91 = load double, double* %90
%92 = fmul double %86, %91
%93 = load i32, i32* %25
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [7 x double], [7 x double]* %29, i64 0, i64 %94
store double %92, double* %95
%96 = load double*, double** %19
%97 = load i32, i32* %25
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds double, double* %96, i64 %98
%100 = load double, double* %99
%101 = load double, double* %26
%102 = fadd double %101, %100
store double %102, double* %26
%103 = load i32, i32* %25
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds [7 x double], [7 x double]* %29, i64 0, i64 %104
%106 = load double, double* %105
%107 = load double, double* %27
%108 = fadd double %107, %106
store double %108, double* %27
br label %109
109: ; preds = %46
%110 = load i32, i32* %25
%111 = add nsw i32 %110, 1
store i32 %111, i32* %25
br label %43
112: ; preds = %43
%113 = load double, double* %26
%114 = load double, double* %27
%115 = fsub double %113, %114
%116 = load double*, double** %13
%117 = getelementptr inbounds double, double* %116, i64 0
store double %115, double* %117
ret void
}

LLVM IR (-O2):
define void @Beta_Separator(double* nocapture writeonly %0, double* nocapture writeonly %1, double* nocapture %2, double* nocapture %3, double* nocapture %4, double* nocapture %5, double* %6, double* nocapture %7, [7 x double]* %8, [7 x double]* %9, double %10, double %11) {
%13 = alloca [7 x double]
%14 = bitcast [7 x double]* %13 to i8*
%15 = getelementptr inbounds [7 x double], [7 x double]* %13, i64 0, i64 0
%16 = load double, double* %5
%17 = bitcast [7 x double]* %8 to double**
%18 = bitcast [7 x double]* %9 to double**
%19 = call i32 @gamma_wilson_7(double* %15, double %16, double* %6, double** %17, double** %18, double %10, double %11)
%20 = load double, double* %3
%21 = load double, double* %15
%22 = fmul double %20, %21
%23 = load double, double* %4
%24 = fdiv double %22, %23
%25 = load double, double* %7
%26 = fadd double %24, -1.000000e+00
%27 = load double, double* %2
%28 = call double @llvm.fmuladd.f64(double %26, double %27, double 1.000000e+00)
%29 = fdiv double %25, %28
store double %29, double* %1
%30 = fmul double %24, %29
%31 = load double, double* %6
%32 = fadd double %31, 0.000000e+00
%33 = fadd double %30, 0.000000e+00
%34 = getelementptr inbounds double, double* %3, i64 1
%35 = load double, double* %34
%36 = getelementptr inbounds [7 x double], [7 x double]* %13, i64 0, i64 1
%37 = load double, double* %36
%38 = fmul double %35, %37
%39 = load double, double* %4
%40 = fdiv double %38, %39
%41 = getelementptr inbounds double, double* %7, i64 1
%42 = load double, double* %41
%43 = fadd double %40, -1.000000e+00
%44 = load double, double* %2
%45 = call double @llvm.fmuladd.f64(double %43, double %44, double 1.000000e+00)
%46 = fdiv double %42, %45
%47 = getelementptr inbounds double, double* %1, i64 1
store double %46, double* %47
%48 = fmul double %40, %46
%49 = getelementptr inbounds double, double* %6, i64 1
%50 = load double, double* %49
%51 = fadd double %32, %50
%52 = fadd double %33, %48
%53 = getelementptr inbounds double, double* %3, i64 2
%54 = load double, double* %53
%55 = getelementptr inbounds [7 x double], [7 x double]* %13, i64 0, i64 2
%56 = load double, double* %55
%57 = fmul double %54, %56
%58 = load double, double* %4
%59 = fdiv double %57, %58
%60 = getelementptr inbounds double, double* %7, i64 2
%61 = load double, double* %60
%62 = fadd double %59, -1.000000e+00
%63 = load double, double* %2
%64 = call double @llvm.fmuladd.f64(double %62, double %63, double 1.000000e+00)
%65 = fdiv double %61, %64
%66 = getelementptr inbounds double, double* %1, i64 2
store double %65, double* %66
%67 = fmul double %59, %65
%68 = getelementptr inbounds double, double* %6, i64 2
%69 = load double, double* %68
%70 = fadd double %51, %69
%71 = fadd double %52, %67
%72 = getelementptr inbounds double, double* %3, i64 3
%73 = load double, double* %72
%74 = getelementptr inbounds [7 x double], [7 x double]* %13, i64 0, i64 3
%75 = load double, double* %74
%76 = fmul double %73, %75
%77 = load double, double* %4
%78 = fdiv double %76, %77
%79 = getelementptr inbounds double, double* %7, i64 3
%80 = load double, double* %79
%81 = fadd double %78, -1.000000e+00
%82 = load double, double* %2
%83 = call double @llvm.fmuladd.f64(double %81, double %82, double 1.000000e+00)
%84 = fdiv double %80, %83
%85 = getelementptr inbounds double, double* %1, i64 3
store double %84, double* %85
%86 = fmul double %78, %84
%87 = getelementptr inbounds double, double* %6, i64 3
%88 = load double, double* %87
%89 = fadd double %70, %88
%90 = fadd double %71, %86
%91 = getelementptr inbounds double, double* %3, i64 4
%92 = load double, double* %91
%93 = getelementptr inbounds [7 x double], [7 x double]* %13, i64 0, i64 4
%94 = load double, double* %93
%95 = fmul double %92, %94
%96 = load double, double* %4
%97 = fdiv double %95, %96
%98 = getelementptr inbounds double, double* %7, i64 4
%99 = load double, double* %98
%100 = fadd double %97, -1.000000e+00
%101 = load double, double* %2
%102 = call double @llvm.fmuladd.f64(double %100, double %101, double 1.000000e+00)
%103 = fdiv double %99, %102
%104 = getelementptr inbounds double, double* %1, i64 4
store double %103, double* %104
%105 = fmul double %97, %103
%106 = getelementptr inbounds double, double* %6, i64 4
%107 = load double, double* %106
%108 = fadd double %89, %107
%109 = fadd double %90, %105
%110 = getelementptr inbounds double, double* %3, i64 5
%111 = load double, double* %110
%112 = getelementptr inbounds [7 x double], [7 x double]* %13, i64 0, i64 5
%113 = load double, double* %112
%114 = fmul double %111, %113
%115 = load double, double* %4
%116 = fdiv double %114, %115
%117 = getelementptr inbounds double, double* %7, i64 5
%118 = load double, double* %117
%119 = fadd double %116, -1.000000e+00
%120 = load double, double* %2
%121 = call double @llvm.fmuladd.f64(double %119, double %120, double 1.000000e+00)
%122 = fdiv double %118, %121
%123 = getelementptr inbounds double, double* %1, i64 5
store double %122, double* %123
%124 = fmul double %116, %122
%125 = getelementptr inbounds double, double* %6, i64 5
%126 = load double, double* %125
%127 = fadd double %108, %126
%128 = fadd double %109, %124
%129 = getelementptr inbounds double, double* %3, i64 6
%130 = load double, double* %129
%131 = getelementptr inbounds [7 x double], [7 x double]* %13, i64 0, i64 6
%132 = load double, double* %131
%133 = fmul double %130, %132
%134 = load double, double* %4
%135 = fdiv double %133, %134
%136 = getelementptr inbounds double, double* %7, i64 6
%137 = load double, double* %136
%138 = fadd double %135, -1.000000e+00
%139 = load double, double* %2
%140 = call double @llvm.fmuladd.f64(double %138, double %139, double 1.000000e+00)
%141 = fdiv double %137, %140
%142 = getelementptr inbounds double, double* %1, i64 6
store double %141, double* %142
%143 = fmul double %135, %141
%144 = getelementptr inbounds double, double* %6, i64 6
%145 = load double, double* %144
%146 = fadd double %127, %145
%147 = fadd double %128, %143
%148 = fsub double %146, %147
store double %148, double* %0
ret void
}