; LLVM IR from siconos/siconos :: externals/lbl/src (ma27_lib)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.Ma27_Data = type { i32, i32, [31 x i32], [21 x i32], [6 x double], ptr, ptr, ptr, i32, ptr, ptr, i32, i32, double, i32, ptr, i32, ptr, ptr, i8, ptr }

@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [37 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare void @cblas_dcopy(i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #2

declare void @ma27cd_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @MA27_Refine(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, double noundef %4, i32 noundef %5) #3 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca double, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store double %4, ptr %12, align 8, !tbaa !9
  store i32 %5, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.Ma27_Data, ptr %23, i32 0, i32 0
  %25 = load i32, ptr %24, align 8, !tbaa !13
  store i32 %25, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %26 = load ptr, ptr %8, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.Ma27_Data, ptr %26, i32 0, i32 20
  %28 = load ptr, ptr %27, align 8, !tbaa !15
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %35

30:                                               ; preds = %6
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.Ma27_Data, ptr %31, i32 0, i32 20
  %33 = load ptr, ptr %32, align 8, !tbaa !15
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef @.str.13) #5
  br label %35

35:                                               ; preds = %30, %6
  %36 = load i32, ptr %14, align 4, !tbaa !11
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  %38 = call double @cblas_dnrm_infty(i32 noundef %36, ptr noundef %37, i32 noundef 1)
  store double %38, ptr %20, align 8, !tbaa !9
  %39 = load i32, ptr %14, align 4, !tbaa !11
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.Ma27_Data, ptr %41, i32 0, i32 18
  %43 = load ptr, ptr %42, align 8, !tbaa !16
  call void @cblas_dcopy(i32 noundef %39, ptr noundef %40, i32 noundef 1, ptr noundef %43, i32 noundef 1)
  store i32 0, ptr %18, align 4, !tbaa !11
  br label %44

44:                                               ; preds = %108, %35
  %45 = load i32, ptr %18, align 4, !tbaa !11
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.Ma27_Data, ptr %46, i32 0, i32 1
  %48 = load i32, ptr %47, align 4, !tbaa !17
  %49 = icmp slt i32 %45, %48
  br i1 %49, label %50, label %111

50:                                               ; preds = %44
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.Ma27_Data, ptr %51, i32 0, i32 5
  %53 = load ptr, ptr %52, align 8, !tbaa !18
  %54 = load i32, ptr %18, align 4, !tbaa !11
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds i32, ptr %53, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !11
  store i32 %57, ptr %16, align 4, !tbaa !11
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.Ma27_Data, ptr %58, i32 0, i32 6
  %60 = load ptr, ptr %59, align 8, !tbaa !19
  %61 = load i32, ptr %18, align 4, !tbaa !11
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds i32, ptr %60, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !11
  store i32 %64, ptr %17, align 4, !tbaa !11
  %65 = load ptr, ptr %11, align 8, !tbaa !5
  %66 = load i32, ptr %18, align 4, !tbaa !11
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds double, ptr %65, i64 %67
  %69 = load double, ptr %68, align 8, !tbaa !9
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  %71 = load i32, ptr %17, align 4, !tbaa !11
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds double, ptr %70, i64 %72
  %74 = load double, ptr %73, align 8, !tbaa !9
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.Ma27_Data, ptr %75, i32 0, i32 18
  %77 = load ptr, ptr %76, align 8, !tbaa !16
  %78 = load i32, ptr %16, align 4, !tbaa !11
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds double, ptr %77, i64 %79
  %81 = load double, ptr %80, align 8, !tbaa !9
  %82 = fneg double %69
  %83 = call double @llvm.fmuladd.f64(double %82, double %74, double %81)
  store double %83, ptr %80, align 8, !tbaa !9
  %84 = load i32, ptr %16, align 4, !tbaa !11
  %85 = load i32, ptr %17, align 4, !tbaa !11
  %86 = icmp ne i32 %84, %85
  br i1 %86, label %87, label %107

87:                                               ; preds = %50
  %88 = load ptr, ptr %11, align 8, !tbaa !5
  %89 = load i32, ptr %18, align 4, !tbaa !11
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds double, ptr %88, i64 %90
  %92 = load double, ptr %91, align 8, !tbaa !9
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = load i32, ptr %16, align 4, !tbaa !11
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds double, ptr %93, i64 %95
  %97 = load double, ptr %96, align 8, !tbaa !9
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.Ma27_Data, ptr %98, i32 0, i32 18
  %100 = load ptr, ptr %99, align 8, !tbaa !16
  %101 = load i32, ptr %17, align 4, !tbaa !11
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds double, ptr %100, i64 %102
  %104 = load double, ptr %103, align 8, !tbaa !9
  %105 = fneg double %92
  %106 = call double @llvm.fmuladd.f64(double %105, double %97, double %104)
  store double %106, ptr %103, align 8, !tbaa !9
  br label %107

107:                                              ; preds = %87, %50
  br label %108

108:                                              ; preds = %107
  %109 = load i32, ptr %18, align 4, !tbaa !11
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %18, align 4, !tbaa !11
  br label %44, !llvm.loop !20

111:                                              ; preds = %44
  %112 = load i32, ptr %14, align 4, !tbaa !11
  %113 = load ptr, ptr %8, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.Ma27_Data, ptr %113, i32 0, i32 18
  %115 = load ptr, ptr %114, align 8, !tbaa !16
  %116 = call double @cblas_dnrm_infty(i32 noundef %112, ptr noundef %115, i32 noundef 1)
  store double %116, ptr %21, align 8, !tbaa !9
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.Ma27_Data, ptr %117, i32 0, i32 20
  %119 = load ptr, ptr %118, align 8, !tbaa !15
  %120 = icmp ne ptr %119, null
  br i1 %120, label %121, label %127

121:                                              ; preds = %111
  %122 = load ptr, ptr %8, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.Ma27_Data, ptr %122, i32 0, i32 20
  %124 = load ptr, ptr %123, align 8, !tbaa !15
  %125 = load double, ptr %21, align 8, !tbaa !9
  %126 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %124, ptr noundef @.str.14, double noundef %125) #5
  br label %127

127:                                              ; preds = %121, %111
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.Ma27_Data, ptr %128, i32 0, i32 20
  %130 = load ptr, ptr %129, align 8, !tbaa !15
  %131 = icmp ne ptr %130, null
  br i1 %131, label %132, label %141

132:                                              ; preds = %127
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.Ma27_Data, ptr %133, i32 0, i32 20
  %135 = load ptr, ptr %134, align 8, !tbaa !15
  %136 = load double, ptr %12, align 8, !tbaa !9
  %137 = load double, ptr %20, align 8, !tbaa !9
  %138 = fadd double 1.000000e+00, %137
  %139 = fmul double %136, %138
  %140 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %135, ptr noundef @.str.15, double noundef %139) #5
  br label %141

141:                                              ; preds = %132, %127
  store i32 0, ptr %19, align 4, !tbaa !11
  br label %142

142:                                              ; preds = %286, %141
  %143 = load i32, ptr %19, align 4, !tbaa !11
  %144 = load i32, ptr %13, align 4, !tbaa !11
  %145 = icmp slt i32 %143, %144
  br i1 %145, label %146, label %153

146:                                              ; preds = %142
  %147 = load double, ptr %21, align 8, !tbaa !9
  %148 = load double, ptr %12, align 8, !tbaa !9
  %149 = load double, ptr %20, align 8, !tbaa !9
  %150 = fadd double 1.000000e+00, %149
  %151 = fmul double %148, %150
  %152 = fcmp ogt double %147, %151
  br label %153

153:                                              ; preds = %146, %142
  %154 = phi i1 [ false, %142 ], [ %152, %146 ]
  br i1 %154, label %155, label %287

155:                                              ; preds = %153
  %156 = load i32, ptr %19, align 4, !tbaa !11
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %19, align 4, !tbaa !11
  %158 = load i32, ptr %14, align 4, !tbaa !11
  %159 = load ptr, ptr %8, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.Ma27_Data, ptr %159, i32 0, i32 18
  %161 = load ptr, ptr %160, align 8, !tbaa !16
  %162 = load ptr, ptr %10, align 8, !tbaa !5
  call void @cblas_dcopy(i32 noundef %158, ptr noundef %161, i32 noundef 1, ptr noundef %162, i32 noundef 1)
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.Ma27_Data, ptr %163, i32 0, i32 15
  %165 = load ptr, ptr %164, align 8, !tbaa !22
  %166 = load ptr, ptr %8, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.Ma27_Data, ptr %166, i32 0, i32 14
  %168 = load ptr, ptr %8, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.Ma27_Data, ptr %168, i32 0, i32 7
  %170 = load ptr, ptr %169, align 8, !tbaa !23
  %171 = load ptr, ptr %8, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.Ma27_Data, ptr %171, i32 0, i32 8
  %173 = load ptr, ptr %8, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.Ma27_Data, ptr %173, i32 0, i32 17
  %175 = load ptr, ptr %174, align 8, !tbaa !24
  %176 = load ptr, ptr %8, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.Ma27_Data, ptr %176, i32 0, i32 16
  %178 = load ptr, ptr %10, align 8, !tbaa !5
  %179 = load ptr, ptr %8, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.Ma27_Data, ptr %179, i32 0, i32 10
  %181 = load ptr, ptr %180, align 8, !tbaa !25
  %182 = load ptr, ptr %8, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.Ma27_Data, ptr %182, i32 0, i32 11
  %184 = load ptr, ptr %8, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.Ma27_Data, ptr %184, i32 0, i32 2
  %186 = getelementptr inbounds [31 x i32], ptr %185, i64 0, i64 0
  %187 = load ptr, ptr %8, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.Ma27_Data, ptr %187, i32 0, i32 3
  %189 = getelementptr inbounds [21 x i32], ptr %188, i64 0, i64 0
  call void @ma27cd_(ptr noundef %14, ptr noundef %165, ptr noundef %167, ptr noundef %170, ptr noundef %172, ptr noundef %175, ptr noundef %177, ptr noundef %178, ptr noundef %181, ptr noundef %183, ptr noundef %186, ptr noundef %189)
  %190 = load ptr, ptr %8, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.Ma27_Data, ptr %190, i32 0, i32 3
  %192 = getelementptr inbounds [21 x i32], ptr %191, i64 0, i64 0
  %193 = load i32, ptr %192, align 4, !tbaa !11
  store i32 %193, ptr %15, align 4, !tbaa !11
  %194 = load i32, ptr %15, align 4, !tbaa !11
  %195 = icmp ne i32 %194, 0
  br i1 %195, label %196, label %198

196:                                              ; preds = %155
  %197 = load i32, ptr %15, align 4, !tbaa !11
  store i32 %197, ptr %7, align 4
  store i32 1, ptr %22, align 4
  br label %298

198:                                              ; preds = %155
  %199 = load i32, ptr %14, align 4, !tbaa !11
  %200 = load ptr, ptr %10, align 8, !tbaa !5
  %201 = load ptr, ptr %9, align 8, !tbaa !5
  call void @cblas_daxpy(i32 noundef %199, double noundef 1.000000e+00, ptr noundef %200, i32 noundef 1, ptr noundef %201, i32 noundef 1)
  store i32 0, ptr %18, align 4, !tbaa !11
  br label %202

202:                                              ; preds = %266, %198
  %203 = load i32, ptr %18, align 4, !tbaa !11
  %204 = load ptr, ptr %8, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.Ma27_Data, ptr %204, i32 0, i32 1
  %206 = load i32, ptr %205, align 4, !tbaa !17
  %207 = icmp slt i32 %203, %206
  br i1 %207, label %208, label %269

208:                                              ; preds = %202
  %209 = load ptr, ptr %8, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.Ma27_Data, ptr %209, i32 0, i32 5
  %211 = load ptr, ptr %210, align 8, !tbaa !18
  %212 = load i32, ptr %18, align 4, !tbaa !11
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds i32, ptr %211, i64 %213
  %215 = load i32, ptr %214, align 4, !tbaa !11
  store i32 %215, ptr %16, align 4, !tbaa !11
  %216 = load ptr, ptr %8, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.Ma27_Data, ptr %216, i32 0, i32 6
  %218 = load ptr, ptr %217, align 8, !tbaa !19
  %219 = load i32, ptr %18, align 4, !tbaa !11
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds i32, ptr %218, i64 %220
  %222 = load i32, ptr %221, align 4, !tbaa !11
  store i32 %222, ptr %17, align 4, !tbaa !11
  %223 = load ptr, ptr %11, align 8, !tbaa !5
  %224 = load i32, ptr %18, align 4, !tbaa !11
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds double, ptr %223, i64 %225
  %227 = load double, ptr %226, align 8, !tbaa !9
  %228 = load ptr, ptr %10, align 8, !tbaa !5
  %229 = load i32, ptr %17, align 4, !tbaa !11
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds double, ptr %228, i64 %230
  %232 = load double, ptr %231, align 8, !tbaa !9
  %233 = load ptr, ptr %8, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.Ma27_Data, ptr %233, i32 0, i32 18
  %235 = load ptr, ptr %234, align 8, !tbaa !16
  %236 = load i32, ptr %16, align 4, !tbaa !11
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds double, ptr %235, i64 %237
  %239 = load double, ptr %238, align 8, !tbaa !9
  %240 = fneg double %227
  %241 = call double @llvm.fmuladd.f64(double %240, double %232, double %239)
  store double %241, ptr %238, align 8, !tbaa !9
  %242 = load i32, ptr %16, align 4, !tbaa !11
  %243 = load i32, ptr %17, align 4, !tbaa !11
  %244 = icmp ne i32 %242, %243
  br i1 %244, label %245, label %265

245:                                              ; preds = %208
  %246 = load ptr, ptr %11, align 8, !tbaa !5
  %247 = load i32, ptr %18, align 4, !tbaa !11
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds double, ptr %246, i64 %248
  %250 = load double, ptr %249, align 8, !tbaa !9
  %251 = load ptr, ptr %10, align 8, !tbaa !5
  %252 = load i32, ptr %16, align 4, !tbaa !11
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds double, ptr %251, i64 %253
  %255 = load double, ptr %254, align 8, !tbaa !9
  %256 = load ptr, ptr %8, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.Ma27_Data, ptr %256, i32 0, i32 18
  %258 = load ptr, ptr %257, align 8, !tbaa !16
  %259 = load i32, ptr %17, align 4, !tbaa !11
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds double, ptr %258, i64 %260
  %262 = load double, ptr %261, align 8, !tbaa !9
  %263 = fneg double %250
  %264 = call double @llvm.fmuladd.f64(double %263, double %255, double %262)
  store double %264, ptr %261, align 8, !tbaa !9
  br label %265

265:                                              ; preds = %245, %208
  br label %266

266:                                              ; preds = %265
  %267 = load i32, ptr %18, align 4, !tbaa !11
  %268 = add nsw i32 %267, 1
  store i32 %268, ptr %18, align 4, !tbaa !11
  br label %202, !llvm.loop !26

269:                                              ; preds = %202
  %270 = load i32, ptr %14, align 4, !tbaa !11
  %271 = load ptr, ptr %8, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.Ma27_Data, ptr %271, i32 0, i32 18
  %273 = load ptr, ptr %272, align 8, !tbaa !16
  %274 = call double @cblas_dnrm_infty(i32 noundef %270, ptr noundef %273, i32 noundef 1)
  store double %274, ptr %21, align 8, !tbaa !9
  %275 = load ptr, ptr %8, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.Ma27_Data, ptr %275, i32 0, i32 20
  %277 = load ptr, ptr %276, align 8, !tbaa !15
  %278 = icmp ne ptr %277, null
  br i1 %278, label %279, label %286

279:                                              ; preds = %269
  %280 = load ptr, ptr %8, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.Ma27_Data, ptr %280, i32 0, i32 20
  %282 = load ptr, ptr %281, align 8, !tbaa !15
  %283 = load i32, ptr %19, align 4, !tbaa !11
  %284 = load double, ptr %21, align 8, !tbaa !9
  %285 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %282, ptr noundef @.str.16, i32 noundef %283, double noundef %284) #5
  br label %286

286:                                              ; preds = %279, %269
  br label %142, !llvm.loop !27

287:                                              ; preds = %153
  %288 = load ptr, ptr %8, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.Ma27_Data, ptr %288, i32 0, i32 20
  %290 = load ptr, ptr %289, align 8, !tbaa !15
  %291 = icmp ne ptr %290, null
  br i1 %291, label %292, label %297

292:                                              ; preds = %287
  %293 = load ptr, ptr %8, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.Ma27_Data, ptr %293, i32 0, i32 20
  %295 = load ptr, ptr %294, align 8, !tbaa !15
  %296 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %295, ptr noundef @.str.1) #5
  br label %297

297:                                              ; preds = %292, %287
  store i32 0, ptr %7, align 4
  store i32 1, ptr %22, align 4
  br label %298

298:                                              ; preds = %297, %196
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  %299 = load i32, ptr %7, align 4
  ret i32 %299
}

; Function Attrs: nounwind uwtable
declare hidden double @cblas_dnrm_infty(i32 noundef, ptr noundef, i32 noundef) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

declare void @cblas_daxpy(i32 noundef, double noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"Ma27_Data", !12, i64 0, !12, i64 4, !7, i64 8, !7, i64 132, !7, i64 216, !6, i64 264, !6, i64 272, !6, i64 280, !12, i64 288, !6, i64 296, !6, i64 304, !12, i64 312, !12, i64 316, !10, i64 320, !12, i64 328, !6, i64 336, !12, i64 344, !6, i64 352, !6, i64 360, !7, i64 368, !6, i64 376}
!15 = !{!14, !6, i64 376}
!16 = !{!14, !6, i64 360}
!17 = !{!14, !12, i64 4}
!18 = !{!14, !6, i64 264}
!19 = !{!14, !6, i64 272}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!14, !6, i64 336}
!23 = !{!14, !6, i64 280}
!24 = !{!14, !6, i64 352}
!25 = !{!14, !6, i64 304}
!26 = distinct !{!26, !21}
!27 = distinct !{!27, !21}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [37 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare void @cblas_dcopy(i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @ma27cd_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local i32 @MA27_Refine(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr nocapture noundef readonly %3, double noundef %4, i32 noundef %5) local_unnamed_addr #3 {
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  %8 = load i32, ptr %0, align 8, !tbaa !5
  store i32 %8, ptr %7, align 4, !tbaa !12
  %9 = getelementptr inbounds i8, ptr %0, i64 376
  %10 = load ptr, ptr %9, align 8, !tbaa !13
  %.not = icmp eq ptr %10, null
  br i1 %.not, label %13, label %11

11:                                               ; preds = %6
  %12 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %10, ptr noundef nonnull @.str.13) #5
  br label %13

13:                                               ; preds = %11, %6
  %14 = tail call double @cblas_dnrm_infty(i32 noundef %8, ptr noundef %2, i32 noundef 1)
  %15 = getelementptr inbounds i8, ptr %0, i64 360
  %16 = load ptr, ptr %15, align 8, !tbaa !14
  tail call void @cblas_dcopy(i32 noundef %8, ptr noundef %2, i32 noundef 1, ptr noundef %16, i32 noundef 1) #5
  %17 = getelementptr inbounds i8, ptr %0, i64 4
  %18 = load i32, ptr %17, align 4, !tbaa !15
  %19 = icmp sgt i32 %18, 0
  %.pre = load ptr, ptr %15, align 8, !tbaa !14
  br i1 %19, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %13
  %20 = getelementptr inbounds i8, ptr %0, i64 264
  %21 = load ptr, ptr %20, align 8, !tbaa !16
  %22 = getelementptr inbounds i8, ptr %0, i64 272
  %23 = load ptr, ptr %22, align 8, !tbaa !17
  %wide.trip.count = zext nneg i32 %18 to i64
  br label %24

24:                                               ; preds = %.lr.ph, %47
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %47 ]
  %25 = getelementptr inbounds i32, ptr %21, i64 %indvars.iv
  %26 = load i32, ptr %25, align 4, !tbaa !12
  %27 = getelementptr inbounds i32, ptr %23, i64 %indvars.iv
  %28 = load i32, ptr %27, align 4, !tbaa !12
  %29 = getelementptr inbounds double, ptr %3, i64 %indvars.iv
  %30 = load double, ptr %29, align 8, !tbaa !18
  %31 = sext i32 %28 to i64
  %32 = getelementptr inbounds double, ptr %1, i64 %31
  %33 = load double, ptr %32, align 8, !tbaa !18
  %34 = sext i32 %26 to i64
  %35 = getelementptr inbounds double, ptr %.pre, i64 %34
  %36 = load double, ptr %35, align 8, !tbaa !18
  %37 = fneg double %30
  %38 = tail call double @llvm.fmuladd.f64(double %37, double %33, double %36)
  store double %38, ptr %35, align 8, !tbaa !18
  %.not102 = icmp eq i32 %26, %28
  br i1 %.not102, label %47, label %39

39:                                               ; preds = %24
  %40 = load double, ptr %29, align 8, !tbaa !18
  %41 = getelementptr inbounds double, ptr %1, i64 %34
  %42 = load double, ptr %41, align 8, !tbaa !18
  %43 = getelementptr inbounds double, ptr %.pre, i64 %31
  %44 = load double, ptr %43, align 8, !tbaa !18
  %45 = fneg double %40
  %46 = tail call double @llvm.fmuladd.f64(double %45, double %42, double %44)
  store double %46, ptr %43, align 8, !tbaa !18
  br label %47

47:                                               ; preds = %24, %39
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %24, !llvm.loop !19

._crit_edge:                                      ; preds = %47, %13
  %48 = tail call double @cblas_dnrm_infty(i32 noundef %8, ptr noundef %.pre, i32 noundef 1)
  %49 = load ptr, ptr %9, align 8, !tbaa !13
  %.not96 = icmp eq ptr %49, null
  br i1 %.not96, label %.thread, label %50

50:                                               ; preds = %._crit_edge
  %51 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %49, ptr noundef nonnull @.str.14, double noundef %48) #5
  %.pr = load ptr, ptr %9, align 8, !tbaa !13
  %.not97 = icmp eq ptr %.pr, null
  br i1 %.not97, label %.thread, label %52

52:                                               ; preds = %50
  %53 = fadd double %14, 1.000000e+00
  %54 = fmul double %53, %4
  %55 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %.pr, ptr noundef nonnull @.str.15, double noundef %54) #5
  br label %.thread

.thread:                                          ; preds = %._crit_edge, %52, %50
  %56 = icmp sgt i32 %5, 0
  br i1 %56, label %.lr.ph112, label %.critedge

.lr.ph112:                                        ; preds = %.thread
  %57 = fadd double %14, 1.000000e+00
  %58 = fmul double %57, %4
  %59 = getelementptr inbounds i8, ptr %0, i64 336
  %60 = getelementptr inbounds i8, ptr %0, i64 328
  %61 = getelementptr inbounds i8, ptr %0, i64 280
  %62 = getelementptr inbounds i8, ptr %0, i64 288
  %63 = getelementptr inbounds i8, ptr %0, i64 352
  %64 = getelementptr inbounds i8, ptr %0, i64 344
  %65 = getelementptr inbounds i8, ptr %0, i64 304
  %66 = getelementptr inbounds i8, ptr %0, i64 312
  %67 = getelementptr inbounds i8, ptr %0, i64 8
  %68 = getelementptr inbounds i8, ptr %0, i64 132
  %69 = getelementptr inbounds i8, ptr %0, i64 264
  %70 = getelementptr inbounds i8, ptr %0, i64 272
  br label %71

71:                                               ; preds = %.lr.ph112, %117
  %.0111 = phi double [ %48, %.lr.ph112 ], [ %113, %117 ]
  %.088110 = phi i32 [ 0, %.lr.ph112 ], [ %74, %117 ]
  %72 = fcmp ogt double %.0111, %58
  br i1 %72, label %73, label %.critedge

73:                                               ; preds = %71
  %74 = add nuw nsw i32 %.088110, 1
  %75 = load i32, ptr %7, align 4, !tbaa !12
  %76 = load ptr, ptr %15, align 8, !tbaa !14
  call void @cblas_dcopy(i32 noundef %75, ptr noundef %76, i32 noundef 1, ptr noundef %2, i32 noundef 1) #5
  %77 = load ptr, ptr %59, align 8, !tbaa !21
  %78 = load ptr, ptr %61, align 8, !tbaa !22
  %79 = load ptr, ptr %63, align 8, !tbaa !23
  %80 = load ptr, ptr %65, align 8, !tbaa !24
  call void @ma27cd_(ptr noundef nonnull %7, ptr noundef %77, ptr noundef nonnull %60, ptr noundef %78, ptr noundef nonnull %62, ptr noundef %79, ptr noundef nonnull %64, ptr noundef %2, ptr noundef %80, ptr noundef nonnull %66, ptr noundef nonnull %67, ptr noundef nonnull %68) #5
  %81 = load i32, ptr %68, align 4, !tbaa !12
  %.not99 = icmp eq i32 %81, 0
  br i1 %.not99, label %82, label %.loopexit

82:                                               ; preds = %73
  %83 = load i32, ptr %7, align 4, !tbaa !12
  call void @cblas_daxpy(i32 noundef %83, double noundef 1.000000e+00, ptr noundef %2, i32 noundef 1, ptr noundef %1, i32 noundef 1) #5
  %84 = load i32, ptr %17, align 4, !tbaa !15
  %85 = icmp sgt i32 %84, 0
  %.pre121 = load ptr, ptr %15, align 8, !tbaa !14
  br i1 %85, label %.lr.ph108, label %._crit_edge109

.lr.ph108:                                        ; preds = %82
  %86 = load ptr, ptr %69, align 8, !tbaa !16
  %87 = load ptr, ptr %70, align 8, !tbaa !17
  %wide.trip.count118 = zext nneg i32 %84 to i64
  br label %88

88:                                               ; preds = %.lr.ph108, %111
  %indvars.iv115 = phi i64 [ 0, %.lr.ph108 ], [ %indvars.iv.next116, %111 ]
  %89 = getelementptr inbounds i32, ptr %86, i64 %indvars.iv115
  %90 = load i32, ptr %89, align 4, !tbaa !12
  %91 = getelementptr inbounds i32, ptr %87, i64 %indvars.iv115
  %92 = load i32, ptr %91, align 4, !tbaa !12
  %93 = getelementptr inbounds double, ptr %3, i64 %indvars.iv115
  %94 = load double, ptr %93, align 8, !tbaa !18
  %95 = sext i32 %92 to i64
  %96 = getelementptr inbounds double, ptr %2, i64 %95
  %97 = load double, ptr %96, align 8, !tbaa !18
  %98 = sext i32 %90 to i64
  %99 = getelementptr inbounds double, ptr %.pre121, i64 %98
  %100 = load double, ptr %99, align 8, !tbaa !18
  %101 = fneg double %94
  %102 = call double @llvm.fmuladd.f64(double %101, double %97, double %100)
  store double %102, ptr %99, align 8, !tbaa !18
  %.not101 = icmp eq i32 %90, %92
  br i1 %.not101, label %111, label %103

103:                                              ; preds = %88
  %104 = load double, ptr %93, align 8, !tbaa !18
  %105 = getelementptr inbounds double, ptr %2, i64 %98
  %106 = load double, ptr %105, align 8, !tbaa !18
  %107 = getelementptr inbounds double, ptr %.pre121, i64 %95
  %108 = load double, ptr %107, align 8, !tbaa !18
  %109 = fneg double %104
  %110 = call double @llvm.fmuladd.f64(double %109, double %106, double %108)
  store double %110, ptr %107, align 8, !tbaa !18
  br label %111

111:                                              ; preds = %88, %103
  %indvars.iv.next116 = add nuw nsw i64 %indvars.iv115, 1
  %exitcond119.not = icmp eq i64 %indvars.iv.next116, %wide.trip.count118
  br i1 %exitcond119.not, label %._crit_edge109, label %88, !llvm.loop !25

._crit_edge109:                                   ; preds = %111, %82
  %112 = load i32, ptr %7, align 4, !tbaa !12
  %113 = call double @cblas_dnrm_infty(i32 noundef %112, ptr noundef %.pre121, i32 noundef 1)
  %114 = load ptr, ptr %9, align 8, !tbaa !13
  %.not100 = icmp eq ptr %114, null
  br i1 %.not100, label %117, label %115

115:                                              ; preds = %._crit_edge109
  %116 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %114, ptr noundef nonnull @.str.16, i32 noundef %74, double noundef %113) #5
  br label %117

117:                                              ; preds = %115, %._crit_edge109
  %exitcond120.not = icmp eq i32 %74, %5
  br i1 %exitcond120.not, label %.critedge, label %71, !llvm.loop !26

.critedge:                                        ; preds = %71, %117, %.thread
  %118 = load ptr, ptr %9, align 8, !tbaa !13
  %.not98 = icmp eq ptr %118, null
  br i1 %.not98, label %.loopexit, label %119

119:                                              ; preds = %.critedge
  %120 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %118, ptr noundef nonnull @.str.1) #5
  br label %.loopexit

.loopexit:                                        ; preds = %73, %.critedge, %119
  %.087 = phi i32 [ 0, %119 ], [ 0, %.critedge ], [ %81, %73 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  ret i32 %.087
}

; Function Attrs: nounwind uwtable
declare hidden double @cblas_dnrm_infty(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

declare void @cblas_daxpy(i32 noundef, double noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"Ma27_Data", !7, i64 0, !7, i64 4, !8, i64 8, !8, i64 132, !8, i64 216, !10, i64 264, !10, i64 272, !10, i64 280, !7, i64 288, !10, i64 296, !10, i64 304, !7, i64 312, !7, i64 316, !11, i64 320, !7, i64 328, !10, i64 336, !7, i64 344, !10, i64 352, !10, i64 360, !8, i64 368, !10, i64 376}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!6, !10, i64 376}
!14 = !{!6, !10, i64 360}
!15 = !{!6, !7, i64 4}
!16 = !{!6, !10, i64 264}
!17 = !{!6, !10, i64 272}
!18 = !{!11, !11, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!6, !10, i64 336}
!22 = !{!6, !10, i64 280}
!23 = !{!6, !10, i64 352}
!24 = !{!6, !10, i64 304}
!25 = distinct !{!25, !20}
!26 = distinct !{!26, !20}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass