#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 */
struct basic_variable {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(double *);
struct basic_variable *init_basic(int, int, double);
int /*<<< orphan*/ insert_basic(struct basic_variable **, int,
                                struct basic_variable *);
scalar_t__ malloc(int);
double *vector_copy(double *, int);
struct basic_variable **initialize_flow(int n_x, double *weight_x, int n_y,
                                        double *weight_y, double **cost) {
  struct basic_variable **basis;
  struct basic_variable *basic;
  double *remaining_x;
  double *remaining_y;
  int fx, fy, b, B;
  b = 0;
  B = n_x + n_y - 1;
  basis = (struct basic_variable **)malloc((B + 1) *
                                           sizeof(struct basic_variable *));
  remaining_x = vector_copy(weight_x, n_x);
  remaining_y = vector_copy(weight_y, n_y);
  fx = 0;
  fy = 0;
  while (1) {
    if (fx == (n_x - 1)) {
      for (; fy < n_y; fy++) {
        basic = init_basic(fx, fy, remaining_y[fy]);
        insert_basic(basis, b, basic);
        b++;
      }
      break;
    }
    if (fy == (n_y - 1)) {
      for (; fx < n_x; fx++) {
        basic = init_basic(fx, fy, remaining_x[fx]);
        insert_basic(basis, b, basic);
        b++;
      }
      break;
    }
    if (remaining_x[fx] <= remaining_y[fy]) {
      basic = init_basic(fx, fy, remaining_x[fx]);
      insert_basic(basis, b, basic);
      b++;
      remaining_y[fy] -= remaining_x[fx];
      fx++;
    } else {
      basic = init_basic(fx, fy, remaining_y[fy]);
      insert_basic(basis, b, basic);
      b++;
      remaining_x[fx] -= remaining_y[fy];
      fy++;
    }
  }
  free(remaining_x);
  free(remaining_y);
  return basis;
}


x86 assembly (clang, -O0):
<initialize_flow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movl   $0x0,-0x54(%rbp)
mov    -0x4(%rbp),%eax
add    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1030 <vector_copy@plt>
mov    %rax,-0x40(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <vector_copy@plt>
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x50(%rbp)
mov    -0x4c(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    122c <initialize_flow+0xdc>
jmp    11d8 <initialize_flow+0x88>
mov    -0x50(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1227 <initialize_flow+0xd7>
mov    -0x4c(%rbp),%edi
mov    -0x50(%rbp),%esi
mov    -0x48(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1050 <init_basic@plt>
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x54(%rbp),%esi
mov    -0x38(%rbp),%rdx
call   1070 <insert_basic@plt>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    11d8 <initialize_flow+0x88>
jmp    1386 <initialize_flow+0x236>
mov    -0x50(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    1296 <initialize_flow+0x146>
jmp    1242 <initialize_flow+0xf2>
mov    -0x4c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1291 <initialize_flow+0x141>
mov    -0x4c(%rbp),%edi
mov    -0x50(%rbp),%esi
mov    -0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1050 <init_basic@plt>
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x54(%rbp),%esi
mov    -0x38(%rbp),%rdx
call   1070 <insert_basic@plt>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1242 <initialize_flow+0xf2>
jmp    1386 <initialize_flow+0x236>
mov    -0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x48(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jb     1320 <initialize_flow+0x1d0>
mov    -0x4c(%rbp),%edi
mov    -0x50(%rbp),%esi
mov    -0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1050 <init_basic@plt>
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x54(%rbp),%esi
mov    -0x38(%rbp),%rdx
call   1070 <insert_basic@plt>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x48(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1381 <initialize_flow+0x231>
mov    -0x4c(%rbp),%edi
mov    -0x50(%rbp),%esi
mov    -0x48(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1050 <init_basic@plt>
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x54(%rbp),%esi
mov    -0x38(%rbp),%rdx
call   1070 <insert_basic@plt>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x48(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    11c2 <initialize_flow+0x72>
mov    -0x40(%rbp),%rdi
call   1040 <free@plt>
mov    -0x48(%rbp),%rdi
call   1040 <free@plt>
mov    -0x30(%rbp),%rax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_flow>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rcx,%r14
mov    %edx,%ebx
mov    %rsi,%r12
mov    %edi,%ebp
lea    (%rbx,%rbp,1),%edi
shl    $0x3,%edi
call   1060 <malloc@plt>
mov    %rax,%r15
mov    %r12,%rdi
mov    %ebp,%esi
call   1030 <vector_copy@plt>
mov    %rax,0x10(%rsp)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <vector_copy@plt>
mov    %ebp,%ecx
add    $0xffffffff,%ecx
mov    %ecx,0xc(%rsp)
mov    %rbx,0x30(%rsp)
je     126e <initialize_flow+0x11e>
mov    %rbp,0x28(%rsp)
lea    -0x1(%rbx),%ecx
xor    %ebp,%ebp
xor    %r12d,%r12d
xor    %r14d,%r14d
mov    0x10(%rsp),%r13
mov    %ecx,0x8(%rsp)
mov    %r15,0x18(%rsp)
mov    %rax,0x20(%rsp)
jmp    1217 <initialize_flow+0xc7>
nopl   0x0(%rax,%rax,1)
movapd %xmm1,%xmm0
call   1050 <init_basic@plt>
mov    0x18(%rsp),%rdi
mov    %ebp,%esi
mov    %rax,%rdx
call   1070 <insert_basic@plt>
movsd  0x0(%r13,%r15,8),%xmm0
mov    0x20(%rsp),%rax
subsd  (%rax,%rbx,8),%xmm0
movsd  %xmm0,0x0(%r13,%r15,8)
add    $0x1,%r12d
add    $0x1,%ebp
cmp    0xc(%rsp),%r14d
mov    0x18(%rsp),%r15
mov    0x8(%rsp),%ecx
je     1273 <initialize_flow+0x123>
cmp    %ecx,%r12d
je     12cf <initialize_flow+0x17f>
movslq %r14d,%r15
movsd  0x0(%r13,%r15,8),%xmm0
movslq %r12d,%rbx
movsd  (%rax,%rbx,8),%xmm1
mov    %r15d,%edi
mov    %r12d,%esi
ucomisd %xmm0,%xmm1
jb     11d0 <initialize_flow+0x80>
call   1050 <init_basic@plt>
mov    0x18(%rsp),%rdi
mov    %ebp,%esi
mov    %rax,%rdx
call   1070 <insert_basic@plt>
mov    0x20(%rsp),%rax
movsd  (%rax,%rbx,8),%xmm0
subsd  0x0(%r13,%r15,8),%xmm0
movsd  %xmm0,(%rax,%rbx,8)
lea    0x1(%r15),%r14d
jmp    1204 <initialize_flow+0xb4>
xor    %r12d,%r12d
xor    %ebp,%ebp
mov    %rax,%r13
mov    0x30(%rsp),%r14
cmp    %r14d,%r12d
jge    131d <initialize_flow+0x1cd>
movslq %r12d,%rax
lea    0x0(,%rax,8),%rbx
add    %r13,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rbx),%xmm0
mov    0xc(%rsp),%edi
mov    %r12d,%esi
call   1050 <init_basic@plt>
mov    %r15,%rdi
mov    %ebp,%esi
mov    %rax,%rdx
call   1070 <insert_basic@plt>
add    $0x1,%ebp
add    $0x1,%r12d
add    $0x8,%rbx
cmp    %r12d,%r14d
jne    12a0 <initialize_flow+0x150>
jmp    131d <initialize_flow+0x1cd>
mov    %rax,%r13
mov    0x28(%rsp),%r12
cmp    %r12d,%r14d
jge    131d <initialize_flow+0x1cd>
movslq %r14d,%rax
mov    0x10(%rsp),%rcx
lea    (%rcx,%rax,8),%rbx
nopl   0x0(%rax,%rax,1)
movsd  (%rbx),%xmm0
mov    %r14d,%edi
mov    0x8(%rsp),%esi
call   1050 <init_basic@plt>
mov    %r15,%rdi
mov    %ebp,%esi
mov    %rax,%rdx
call   1070 <insert_basic@plt>
add    $0x1,%ebp
add    $0x1,%r14d
add    $0x8,%rbx
cmp    %r14d,%r12d
jne    12f0 <initialize_flow+0x1a0>
mov    0x10(%rsp),%rdi
call   1040 <free@plt>
mov    %r13,%rdi
call   1040 <free@plt>
mov    %r15,%rax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.basic_variable = type { i32 }
define %struct.basic_variable** @initialize_flow(i32 %0, double* %1, i32 %2, double* %3, double** %4) {
%6 = alloca i32
%7 = alloca double*
%8 = alloca i32
%9 = alloca double*
%10 = alloca double**
%11 = alloca %struct.basic_variable**
%12 = alloca %struct.basic_variable*
%13 = alloca double*
%14 = alloca double*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32 %0, i32* %6
store double* %1, double** %7
store i32 %2, i32* %8
store double* %3, double** %9
store double** %4, double*** %10
store i32 0, i32* %17
%19 = load i32, i32* %6
%20 = load i32, i32* %8
%21 = add nsw i32 %19, %20
%22 = sub nsw i32 %21, 1
store i32 %22, i32* %18
%23 = load i32, i32* %18
%24 = add nsw i32 %23, 1
%25 = sext i32 %24 to i64
%26 = mul i64 %25, 8
%27 = trunc i64 %26 to i32
%28 = call i64 @malloc(i32 %27)
%29 = inttoptr i64 %28 to %struct.basic_variable**
store %struct.basic_variable** %29, %struct.basic_variable*** %11
%30 = load double*, double** %7
%31 = load i32, i32* %6
%32 = call double* @vector_copy(double* %30, i32 %31)
store double* %32, double** %13
%33 = load double*, double** %9
%34 = load i32, i32* %8
%35 = call double* @vector_copy(double* %33, i32 %34)
store double* %35, double** %14
store i32 0, i32* %15
store i32 0, i32* %16
br label %36
36: ; preds = %5, %162
%37 = load i32, i32* %15
%38 = load i32, i32* %6
%39 = sub nsw i32 %38, 1
%40 = icmp eq i32 %37, %39
br i1 %40, label %41, label %65
41: ; preds = %36
br label %42
42: ; preds = %61, %41
%43 = load i32, i32* %16
%44 = load i32, i32* %8
%45 = icmp slt i32 %43, %44
br i1 %45, label %46, label %64
46: ; preds = %42
%47 = load i32, i32* %15
%48 = load i32, i32* %16
%49 = load double*, double** %14
%50 = load i32, i32* %16
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds double, double* %49, i64 %51
%53 = load double, double* %52
%54 = call %struct.basic_variable* @init_basic(i32 %47, i32 %48, double %53)
store %struct.basic_variable* %54, %struct.basic_variable** %12
%55 = load %struct.basic_variable**, %struct.basic_variable*** %11
%56 = load i32, i32* %17
%57 = load %struct.basic_variable*, %struct.basic_variable** %12
%58 = call i32 @insert_basic(%struct.basic_variable** %55, i32 %56, %struct.basic_variable* %57)
%59 = load i32, i32* %17
%60 = add nsw i32 %59, 1
store i32 %60, i32* %17
br label %61
61: ; preds = %46
%62 = load i32, i32* %16
%63 = add nsw i32 %62, 1
store i32 %63, i32* %16
br label %42
64: ; preds = %42
br label %163
65: ; preds = %36
%66 = load i32, i32* %16
%67 = load i32, i32* %8
%68 = sub nsw i32 %67, 1
%69 = icmp eq i32 %66, %68
br i1 %69, label %70, label %94
70: ; preds = %65
br label %71
71: ; preds = %90, %70
%72 = load i32, i32* %15
%73 = load i32, i32* %6
%74 = icmp slt i32 %72, %73
br i1 %74, label %75, label %93
75: ; preds = %71
%76 = load i32, i32* %15
%77 = load i32, i32* %16
%78 = load double*, double** %13
%79 = load i32, i32* %15
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds double, double* %78, i64 %80
%82 = load double, double* %81
%83 = call %struct.basic_variable* @init_basic(i32 %76, i32 %77, double %82)
store %struct.basic_variable* %83, %struct.basic_variable** %12
%84 = load %struct.basic_variable**, %struct.basic_variable*** %11
%85 = load i32, i32* %17
%86 = load %struct.basic_variable*, %struct.basic_variable** %12
%87 = call i32 @insert_basic(%struct.basic_variable** %84, i32 %85, %struct.basic_variable* %86)
%88 = load i32, i32* %17
%89 = add nsw i32 %88, 1
store i32 %89, i32* %17
br label %90
90: ; preds = %75
%91 = load i32, i32* %15
%92 = add nsw i32 %91, 1
store i32 %92, i32* %15
br label %71
93: ; preds = %71
br label %163
94: ; preds = %65
%95 = load double*, double** %13
%96 = load i32, i32* %15
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds double, double* %95, i64 %97
%99 = load double, double* %98
%100 = load double*, double** %14
%101 = load i32, i32* %16
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds double, double* %100, i64 %102
%104 = load double, double* %103
%105 = fcmp ole double %99, %104
br i1 %105, label %106, label %134
106: ; preds = %94
%107 = load i32, i32* %15
%108 = load i32, i32* %16
%109 = load double*, double** %13
%110 = load i32, i32* %15
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds double, double* %109, i64 %111
%113 = load double, double* %112
%114 = call %struct.basic_variable* @init_basic(i32 %107, i32 %108, double %113)
store %struct.basic_variable* %114, %struct.basic_variable** %12
%115 = load %struct.basic_variable**, %struct.basic_variable*** %11
%116 = load i32, i32* %17
%117 = load %struct.basic_variable*, %struct.basic_variable** %12
%118 = call i32 @insert_basic(%struct.basic_variable** %115, i32 %116, %struct.basic_variable* %117)
%119 = load i32, i32* %17
%120 = add nsw i32 %119, 1
store i32 %120, i32* %17
%121 = load double*, double** %13
%122 = load i32, i32* %15
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds double, double* %121, i64 %123
%125 = load double, double* %124
%126 = load double*, double** %14
%127 = load i32, i32* %16
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds double, double* %126, i64 %128
%130 = load double, double* %129
%131 = fsub double %130, %125
store double %131, double* %129
%132 = load i32, i32* %15
%133 = add nsw i32 %132, 1
store i32 %133, i32* %15
br label %162
134: ; preds = %94
%135 = load i32, i32* %15
%136 = load i32, i32* %16
%137 = load double*, double** %14
%138 = load i32, i32* %16
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds double, double* %137, i64 %139
%141 = load double, double* %140
%142 = call %struct.basic_variable* @init_basic(i32 %135, i32 %136, double %141)
store %struct.basic_variable* %142, %struct.basic_variable** %12
%143 = load %struct.basic_variable**, %struct.basic_variable*** %11
%144 = load i32, i32* %17
%145 = load %struct.basic_variable*, %struct.basic_variable** %12
%146 = call i32 @insert_basic(%struct.basic_variable** %143, i32 %144, %struct.basic_variable* %145)
%147 = load i32, i32* %17
%148 = add nsw i32 %147, 1
store i32 %148, i32* %17
%149 = load double*, double** %14
%150 = load i32, i32* %16
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds double, double* %149, i64 %151
%153 = load double, double* %152
%154 = load double*, double** %13
%155 = load i32, i32* %15
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds double, double* %154, i64 %156
%158 = load double, double* %157
%159 = fsub double %158, %153
store double %159, double* %157
%160 = load i32, i32* %16
%161 = add nsw i32 %160, 1
store i32 %161, i32* %16
br label %162
162: ; preds = %134, %106
br label %36
163: ; preds = %93, %64
%164 = load double*, double** %13
%165 = call i32 @free(double* %164)
%166 = load double*, double** %14
%167 = call i32 @free(double* %166)
%168 = load %struct.basic_variable**, %struct.basic_variable*** %11
ret %struct.basic_variable** %168
}

LLVM IR (-O2):
%struct.basic_variable = type { i32 }
define %struct.basic_variable** @initialize_flow(i32 %0, double* %1, i32 %2, double* %3, double** nocapture readnone %4) {
%6 = add nsw i32 %2, %0
%7 = shl i32 %6, 3
%8 = tail call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to %struct.basic_variable**
%10 = tail call double* @vector_copy(double* %1, i32 %0)
%11 = tail call double* @vector_copy(double* %3, i32 %2)
%12 = add nsw i32 %0, -1
%13 = icmp eq i32 %12, 0
br i1 %13, label %16, label %14
14: ; preds = %5
%15 = add nsw i32 %2, -1
br label %34
16: ; preds = %77, %5
%17 = phi i32 [ 0, %5 ], [ %79, %77 ]
%18 = phi i32 [ 0, %5 ], [ %80, %77 ]
%19 = icmp slt i32 %17, %2
br i1 %19, label %20, label %82
20: ; preds = %16
%21 = sext i32 %17 to i64
br label %22
22: ; preds = %20, %22
%23 = phi i64 [ %21, %20 ], [ %31, %22 ]
%24 = phi i32 [ %18, %20 ], [ %30, %22 ]
%25 = getelementptr inbounds double, double* %11, i64 %23
%26 = load double, double* %25
%27 = trunc i64 %23 to i32
%28 = tail call %struct.basic_variable* @init_basic(i32 %12, i32 %27, double %26)
%29 = tail call i32 @insert_basic(%struct.basic_variable** %9, i32 %24, %struct.basic_variable* %28)
%30 = add nuw nsw i32 %24, 1
%31 = add nsw i64 %23, 1
%32 = trunc i64 %31 to i32
%33 = icmp eq i32 %32, %2
br i1 %33, label %82, label %22
34: ; preds = %14, %77
%35 = phi i32 [ 0, %14 ], [ %80, %77 ]
%36 = phi i32 [ 0, %14 ], [ %79, %77 ]
%37 = phi i32 [ 0, %14 ], [ %78, %77 ]
%38 = icmp eq i32 %36, %15
br i1 %38, label %39, label %55
39: ; preds = %34
%40 = icmp slt i32 %37, %0
br i1 %40, label %41, label %82
41: ; preds = %39
%42 = sext i32 %37 to i64
br label %43
43: ; preds = %41, %43
%44 = phi i64 [ %42, %41 ], [ %52, %43 ]
%45 = phi i32 [ %35, %41 ], [ %51, %43 ]
%46 = getelementptr inbounds double, double* %10, i64 %44
%47 = load double, double* %46
%48 = trunc i64 %44 to i32
%49 = tail call %struct.basic_variable* @init_basic(i32 %48, i32 %15, double %47)
%50 = tail call i32 @insert_basic(%struct.basic_variable** %9, i32 %45, %struct.basic_variable* %49)
%51 = add nuw nsw i32 %45, 1
%52 = add nsw i64 %44, 1
%53 = trunc i64 %52 to i32
%54 = icmp eq i32 %53, %0
br i1 %54, label %82, label %43
55: ; preds = %34
%56 = sext i32 %37 to i64
%57 = getelementptr inbounds double, double* %10, i64 %56
%58 = load double, double* %57
%59 = sext i32 %36 to i64
%60 = getelementptr inbounds double, double* %11, i64 %59
%61 = load double, double* %60
%62 = fcmp ugt double %58, %61
br i1 %62, label %70, label %63
63: ; preds = %55
%64 = tail call %struct.basic_variable* @init_basic(i32 %37, i32 %36, double %58)
%65 = tail call i32 @insert_basic(%struct.basic_variable** %9, i32 %35, %struct.basic_variable* %64)
%66 = load double, double* %57
%67 = load double, double* %60
%68 = fsub double %67, %66
store double %68, double* %60
%69 = add nsw i32 %37, 1
br label %77
70: ; preds = %55
%71 = tail call %struct.basic_variable* @init_basic(i32 %37, i32 %36, double %61)
%72 = tail call i32 @insert_basic(%struct.basic_variable** %9, i32 %35, %struct.basic_variable* %71)
%73 = load double, double* %60
%74 = load double, double* %57
%75 = fsub double %74, %73
store double %75, double* %57
%76 = add nsw i32 %36, 1
br label %77
77: ; preds = %70, %63
%78 = phi i32 [ %69, %63 ], [ %37, %70 ]
%79 = phi i32 [ %36, %63 ], [ %76, %70 ]
%80 = add nuw nsw i32 %35, 1
%81 = icmp eq i32 %78, %12
br i1 %81, label %16, label %34
82: ; preds = %43, %22, %39, %16
%83 = tail call i32 @free(double* %10)
%84 = tail call i32 @free(double* %11)
ret %struct.basic_variable** %9
}