; LLVM IR from OpenFAST/openfast :: modules/map/src (mapinit)

; 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.tagbstring = type { i32, i32, ptr }
%struct.CableLibrary_t = type { double, double, double, double, double, double, double, double, double, double, ptr }
%struct.InitializationData_t = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.bstrList = type { i32, i32, ptr }
%struct.Domain_t = type { %struct.InnerSolveAttributes_t, %struct.OuterSolveAttributes_t, %struct.DomainOptions_t, ptr, i32, %struct.Vessel_t, %struct.list_t, %struct.list_t, %struct.list_t, %struct.list_t, ptr }
%struct.InnerSolveAttributes_t = type { ptr, double, double, double, [2 x double], [2 x double], [4 x double], [2 x double], [2 x double], [2 x double], [2 x double], [2 x double], [2 x double], double, i32, i32, i32, i32, i32, [2 x i32], i32, i32 }
%struct.OuterSolveAttributes_t = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, double, double, double, double, double, i8, i8, i8, i32, i32, i32 }
%struct.DomainOptions_t = type { ptr, double, double, double, i8, i8, i32 }
%struct.Vessel_t = type { %struct.EulerAngle_t, ptr, ptr, ptr, %struct.Point_t, %struct.Point_t, %struct.Force_t }
%struct.EulerAngle_t = type { %struct.VarType_t, %struct.VarType_t, %struct.VarType_t }
%struct.VarType_t = type { ptr, ptr, double, i8, i8, i32, i32 }
%struct.Point_t = type { %struct.VarType_t, %struct.VarType_t, %struct.VarType_t }
%struct.Force_t = type { %struct.VarType_t, %struct.VarType_t, %struct.VarType_t }
%struct.list_t = type { ptr, ptr, ptr, i32, ptr, i32, i32, i32, ptr, %struct.list_attributes_s }
%struct.list_attributes_s = type { ptr, ptr, ptr, i32, ptr, ptr, ptr }

@.str.34 = external hidden unnamed_addr constant [5 x i8], align 1

declare void @set_universal_error(ptr noundef, ptr noundef, i32 noundef) #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @set_library_diameter(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @set_library_mass_density(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @set_library_ea(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @set_library_cb(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @set_library_internal_damping(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @set_library_added_mass_coefficient(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @set_library_cross_flow_drag_coefficient(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @set_library_tangent_drag_coefficient(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #3

declare ptr @bsplits(ptr noundef, ptr noundef) #0

declare i32 @bstrListDestroy(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @reset_cable_library(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @set_cable_library_list(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #2 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %struct.tagbstring, align 8
  %17 = alloca %struct.CableLibrary_t, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.InitializationData_t, ptr %20, i32 0, i32 0
  %22 = load ptr, ptr %21, align 8, !tbaa !11
  %23 = getelementptr inbounds %struct.bstrList, ptr %22, i32 0, i32 0
  %24 = load i32, ptr %23, align 8, !tbaa !13
  %25 = sub nsw i32 %24, 1
  store i32 %25, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store ptr null, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 88, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  store ptr null, ptr %18, align 8, !tbaa !5
  br label %26

26:                                               ; preds = %4
  %27 = getelementptr inbounds %struct.tagbstring, ptr %16, i32 0, i32 2
  store ptr @.str.34, ptr %27, align 8, !tbaa !15
  %28 = getelementptr inbounds %struct.tagbstring, ptr %16, i32 0, i32 2
  %29 = load ptr, ptr %28, align 8, !tbaa !15
  %30 = icmp ne ptr %29, null
  br i1 %30, label %31, label %36

31:                                               ; preds = %26
  %32 = getelementptr inbounds %struct.tagbstring, ptr %16, i32 0, i32 2
  %33 = load ptr, ptr %32, align 8, !tbaa !15
  %34 = call i64 @strlen(ptr noundef %33) #5
  %35 = trunc i64 %34 to i32
  br label %37

36:                                               ; preds = %26
  br label %37

37:                                               ; preds = %36, %31
  %38 = phi i32 [ %35, %31 ], [ 0, %36 ]
  %39 = getelementptr inbounds %struct.tagbstring, ptr %16, i32 0, i32 1
  store i32 %38, ptr %39, align 4, !tbaa !17
  %40 = getelementptr inbounds %struct.tagbstring, ptr %16, i32 0, i32 0
  store i32 -1, ptr %40, align 8, !tbaa !18
  br label %41

41:                                               ; preds = %37
  br label %42

42:                                               ; preds = %41
  %43 = call i32 @reset_cable_library(ptr noundef %17)
  store i32 %43, ptr %10, align 4, !tbaa !9
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %286, %42
  %45 = load i32, ptr %11, align 4, !tbaa !9
  %46 = load i32, ptr %14, align 4, !tbaa !9
  %47 = icmp sle i32 %45, %46
  br i1 %47, label %48, label %289

48:                                               ; preds = %44
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.Domain_t, ptr %49, i32 0, i32 6
  %51 = call i32 @list_append(ptr noundef %50, ptr noundef %17)
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.Domain_t, ptr %52, i32 0, i32 6
  %54 = load i32, ptr %11, align 4, !tbaa !9
  %55 = call ptr @list_get_at(ptr noundef %53, i32 noundef %54)
  store ptr %55, ptr %18, align 8, !tbaa !5
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.InitializationData_t, ptr %56, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8, !tbaa !11
  %59 = getelementptr inbounds %struct.bstrList, ptr %58, i32 0, i32 2
  %60 = load ptr, ptr %59, align 8, !tbaa !19
  %61 = load i32, ptr %11, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds ptr, ptr %60, i64 %62
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  %65 = call ptr @bsplits(ptr noundef %64, ptr noundef %16)
  store ptr %65, ptr %15, align 8, !tbaa !5
  store i32 0, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %48
  br label %67

67:                                               ; preds = %278, %66
  %68 = load i32, ptr %12, align 4, !tbaa !9
  %69 = load ptr, ptr %15, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.bstrList, ptr %69, i32 0, i32 0
  %71 = load i32, ptr %70, align 8, !tbaa !13
  %72 = sub nsw i32 %71, 1
  %73 = icmp slt i32 %68, %72
  br i1 %73, label %74, label %281

74:                                               ; preds = %67
  %75 = load ptr, ptr %15, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.bstrList, ptr %75, i32 0, i32 2
  %77 = load ptr, ptr %76, align 8, !tbaa !19
  %78 = load i32, ptr %12, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds ptr, ptr %77, i64 %79
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.tagbstring, ptr %81, i32 0, i32 1
  %83 = load i32, ptr %82, align 4, !tbaa !17
  %84 = icmp ne i32 %83, 0
  br i1 %84, label %85, label %278

85:                                               ; preds = %74
  %86 = load i32, ptr %13, align 4, !tbaa !9
  %87 = icmp eq i32 %86, 0
  br i1 %87, label %88, label %101

88:                                               ; preds = %85
  %89 = load ptr, ptr %15, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.bstrList, ptr %89, i32 0, i32 2
  %91 = load ptr, ptr %90, align 8, !tbaa !19
  %92 = load i32, ptr %12, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds ptr, ptr %91, i64 %93
  %95 = load ptr, ptr %94, align 8, !tbaa !5
  %96 = call ptr @bstrcpy(ptr noundef %95)
  %97 = load ptr, ptr %18, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.CableLibrary_t, ptr %97, i32 0, i32 10
  store ptr %96, ptr %98, align 8, !tbaa !20
  %99 = load i32, ptr %13, align 4, !tbaa !9
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %13, align 4, !tbaa !9
  br label %277

101:                                              ; preds = %85
  %102 = load i32, ptr %13, align 4, !tbaa !9
  %103 = icmp eq i32 %102, 1
  br i1 %103, label %104, label %122

104:                                              ; preds = %101
  %105 = load ptr, ptr %15, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.bstrList, ptr %105, i32 0, i32 2
  %107 = load ptr, ptr %106, align 8, !tbaa !19
  %108 = load i32, ptr %12, align 4, !tbaa !9
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds ptr, ptr %107, i64 %109
  %111 = load ptr, ptr %110, align 8, !tbaa !5
  %112 = load ptr, ptr %18, align 8, !tbaa !5
  %113 = call i32 @set_library_diameter(ptr noundef %111, ptr noundef %112)
  store i32 %113, ptr %10, align 4, !tbaa !9
  %114 = load i32, ptr %10, align 4, !tbaa !9
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %116, label %119

116:                                              ; preds = %104
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %117, ptr noundef %118, i32 noundef 12)
  br label %281

119:                                              ; preds = %104
  %120 = load i32, ptr %13, align 4, !tbaa !9
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %13, align 4, !tbaa !9
  br label %276

122:                                              ; preds = %101
  %123 = load i32, ptr %13, align 4, !tbaa !9
  %124 = icmp eq i32 %123, 2
  br i1 %124, label %125, label %143

125:                                              ; preds = %122
  %126 = load ptr, ptr %15, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.bstrList, ptr %126, i32 0, i32 2
  %128 = load ptr, ptr %127, align 8, !tbaa !19
  %129 = load i32, ptr %12, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds ptr, ptr %128, i64 %130
  %132 = load ptr, ptr %131, align 8, !tbaa !5
  %133 = load ptr, ptr %18, align 8, !tbaa !5
  %134 = call i32 @set_library_mass_density(ptr noundef %132, ptr noundef %133)
  store i32 %134, ptr %10, align 4, !tbaa !9
  %135 = load i32, ptr %10, align 4, !tbaa !9
  %136 = icmp ne i32 %135, 0
  br i1 %136, label %137, label %140

137:                                              ; preds = %125
  %138 = load ptr, ptr %8, align 8, !tbaa !5
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %138, ptr noundef %139, i32 noundef 13)
  br label %281

140:                                              ; preds = %125
  %141 = load i32, ptr %13, align 4, !tbaa !9
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %13, align 4, !tbaa !9
  br label %275

143:                                              ; preds = %122
  %144 = load i32, ptr %13, align 4, !tbaa !9
  %145 = icmp eq i32 %144, 3
  br i1 %145, label %146, label %164

146:                                              ; preds = %143
  %147 = load ptr, ptr %15, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.bstrList, ptr %147, i32 0, i32 2
  %149 = load ptr, ptr %148, align 8, !tbaa !19
  %150 = load i32, ptr %12, align 4, !tbaa !9
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds ptr, ptr %149, i64 %151
  %153 = load ptr, ptr %152, align 8, !tbaa !5
  %154 = load ptr, ptr %18, align 8, !tbaa !5
  %155 = call i32 @set_library_ea(ptr noundef %153, ptr noundef %154)
  store i32 %155, ptr %10, align 4, !tbaa !9
  %156 = load i32, ptr %10, align 4, !tbaa !9
  %157 = icmp ne i32 %156, 0
  br i1 %157, label %158, label %161

158:                                              ; preds = %146
  %159 = load ptr, ptr %8, align 8, !tbaa !5
  %160 = load ptr, ptr %9, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %159, ptr noundef %160, i32 noundef 14)
  br label %281

161:                                              ; preds = %146
  %162 = load i32, ptr %13, align 4, !tbaa !9
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %13, align 4, !tbaa !9
  br label %274

164:                                              ; preds = %143
  %165 = load i32, ptr %13, align 4, !tbaa !9
  %166 = icmp eq i32 %165, 4
  br i1 %166, label %167, label %185

167:                                              ; preds = %164
  %168 = load ptr, ptr %15, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.bstrList, ptr %168, i32 0, i32 2
  %170 = load ptr, ptr %169, align 8, !tbaa !19
  %171 = load i32, ptr %12, align 4, !tbaa !9
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds ptr, ptr %170, i64 %172
  %174 = load ptr, ptr %173, align 8, !tbaa !5
  %175 = load ptr, ptr %18, align 8, !tbaa !5
  %176 = call i32 @set_library_cb(ptr noundef %174, ptr noundef %175)
  store i32 %176, ptr %10, align 4, !tbaa !9
  %177 = load i32, ptr %10, align 4, !tbaa !9
  %178 = icmp ne i32 %177, 0
  br i1 %178, label %179, label %182

179:                                              ; preds = %167
  %180 = load ptr, ptr %8, align 8, !tbaa !5
  %181 = load ptr, ptr %9, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %180, ptr noundef %181, i32 noundef 15)
  br label %281

182:                                              ; preds = %167
  %183 = load i32, ptr %13, align 4, !tbaa !9
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %13, align 4, !tbaa !9
  br label %273

185:                                              ; preds = %164
  %186 = load i32, ptr %13, align 4, !tbaa !9
  %187 = icmp eq i32 %186, 5
  br i1 %187, label %188, label %206

188:                                              ; preds = %185
  %189 = load ptr, ptr %15, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.bstrList, ptr %189, i32 0, i32 2
  %191 = load ptr, ptr %190, align 8, !tbaa !19
  %192 = load i32, ptr %12, align 4, !tbaa !9
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds ptr, ptr %191, i64 %193
  %195 = load ptr, ptr %194, align 8, !tbaa !5
  %196 = load ptr, ptr %18, align 8, !tbaa !5
  %197 = call i32 @set_library_internal_damping(ptr noundef %195, ptr noundef %196)
  store i32 %197, ptr %10, align 4, !tbaa !9
  %198 = load i32, ptr %10, align 4, !tbaa !9
  %199 = icmp ne i32 %198, 0
  br i1 %199, label %200, label %203

200:                                              ; preds = %188
  %201 = load ptr, ptr %8, align 8, !tbaa !5
  %202 = load ptr, ptr %9, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %201, ptr noundef %202, i32 noundef 81)
  br label %281

203:                                              ; preds = %188
  %204 = load i32, ptr %13, align 4, !tbaa !9
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %13, align 4, !tbaa !9
  br label %272

206:                                              ; preds = %185
  %207 = load i32, ptr %13, align 4, !tbaa !9
  %208 = icmp eq i32 %207, 6
  br i1 %208, label %209, label %227

209:                                              ; preds = %206
  %210 = load ptr, ptr %15, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.bstrList, ptr %210, i32 0, i32 2
  %212 = load ptr, ptr %211, align 8, !tbaa !19
  %213 = load i32, ptr %12, align 4, !tbaa !9
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds ptr, ptr %212, i64 %214
  %216 = load ptr, ptr %215, align 8, !tbaa !5
  %217 = load ptr, ptr %18, align 8, !tbaa !5
  %218 = call i32 @set_library_added_mass_coefficient(ptr noundef %216, ptr noundef %217)
  store i32 %218, ptr %10, align 4, !tbaa !9
  %219 = load i32, ptr %10, align 4, !tbaa !9
  %220 = icmp ne i32 %219, 0
  br i1 %220, label %221, label %224

221:                                              ; preds = %209
  %222 = load ptr, ptr %8, align 8, !tbaa !5
  %223 = load ptr, ptr %9, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %222, ptr noundef %223, i32 noundef 82)
  br label %281

224:                                              ; preds = %209
  %225 = load i32, ptr %13, align 4, !tbaa !9
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %13, align 4, !tbaa !9
  br label %271

227:                                              ; preds = %206
  %228 = load i32, ptr %13, align 4, !tbaa !9
  %229 = icmp eq i32 %228, 7
  br i1 %229, label %230, label %248

230:                                              ; preds = %227
  %231 = load ptr, ptr %15, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.bstrList, ptr %231, i32 0, i32 2
  %233 = load ptr, ptr %232, align 8, !tbaa !19
  %234 = load i32, ptr %12, align 4, !tbaa !9
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds ptr, ptr %233, i64 %235
  %237 = load ptr, ptr %236, align 8, !tbaa !5
  %238 = load ptr, ptr %18, align 8, !tbaa !5
  %239 = call i32 @set_library_cross_flow_drag_coefficient(ptr noundef %237, ptr noundef %238)
  store i32 %239, ptr %10, align 4, !tbaa !9
  %240 = load i32, ptr %10, align 4, !tbaa !9
  %241 = icmp ne i32 %240, 0
  br i1 %241, label %242, label %245

242:                                              ; preds = %230
  %243 = load ptr, ptr %8, align 8, !tbaa !5
  %244 = load ptr, ptr %9, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %243, ptr noundef %244, i32 noundef 83)
  br label %281

245:                                              ; preds = %230
  %246 = load i32, ptr %13, align 4, !tbaa !9
  %247 = add nsw i32 %246, 1
  store i32 %247, ptr %13, align 4, !tbaa !9
  br label %270

248:                                              ; preds = %227
  %249 = load i32, ptr %13, align 4, !tbaa !9
  %250 = icmp eq i32 %249, 8
  br i1 %250, label %251, label %269

251:                                              ; preds = %248
  %252 = load ptr, ptr %15, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.bstrList, ptr %252, i32 0, i32 2
  %254 = load ptr, ptr %253, align 8, !tbaa !19
  %255 = load i32, ptr %12, align 4, !tbaa !9
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds ptr, ptr %254, i64 %256
  %258 = load ptr, ptr %257, align 8, !tbaa !5
  %259 = load ptr, ptr %18, align 8, !tbaa !5
  %260 = call i32 @set_library_tangent_drag_coefficient(ptr noundef %258, ptr noundef %259)
  store i32 %260, ptr %10, align 4, !tbaa !9
  %261 = load i32, ptr %10, align 4, !tbaa !9
  %262 = icmp ne i32 %261, 0
  br i1 %262, label %263, label %266

263:                                              ; preds = %251
  %264 = load ptr, ptr %8, align 8, !tbaa !5
  %265 = load ptr, ptr %9, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %264, ptr noundef %265, i32 noundef 84)
  br label %281

266:                                              ; preds = %251
  %267 = load i32, ptr %13, align 4, !tbaa !9
  %268 = add nsw i32 %267, 1
  store i32 %268, ptr %13, align 4, !tbaa !9
  br label %269

269:                                              ; preds = %266, %248
  br label %270

270:                                              ; preds = %269, %245
  br label %271

271:                                              ; preds = %270, %224
  br label %272

272:                                              ; preds = %271, %203
  br label %273

273:                                              ; preds = %272, %182
  br label %274

274:                                              ; preds = %273, %161
  br label %275

275:                                              ; preds = %274, %140
  br label %276

276:                                              ; preds = %275, %119
  br label %277

277:                                              ; preds = %276, %88
  br label %278

278:                                              ; preds = %277, %74
  %279 = load i32, ptr %12, align 4, !tbaa !9
  %280 = add nsw i32 %279, 1
  store i32 %280, ptr %12, align 4, !tbaa !9
  br label %67, !llvm.loop !23

281:                                              ; preds = %263, %242, %221, %200, %179, %158, %137, %116, %67
  br label %282

282:                                              ; preds = %281
  br label %283

283:                                              ; preds = %282
  %284 = load ptr, ptr %15, align 8, !tbaa !5
  %285 = call i32 @bstrListDestroy(ptr noundef %284)
  store i32 %285, ptr %10, align 4, !tbaa !9
  br label %286

286:                                              ; preds = %283
  %287 = load i32, ptr %11, align 4, !tbaa !9
  %288 = add nsw i32 %287, 1
  store i32 %288, ptr %11, align 4, !tbaa !9
  br label %44, !llvm.loop !25

289:                                              ; preds = %44
  %290 = load ptr, ptr %9, align 8, !tbaa !5
  %291 = load i32, ptr %290, align 4, !tbaa !9
  %292 = icmp eq i32 %291, 0
  br i1 %292, label %293, label %294

293:                                              ; preds = %289
  store i32 0, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %300

294:                                              ; preds = %289
  %295 = load ptr, ptr %9, align 8, !tbaa !5
  %296 = load i32, ptr %295, align 4, !tbaa !9
  %297 = icmp eq i32 %296, 2
  br i1 %297, label %298, label %299

298:                                              ; preds = %294
  store i32 2, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %300

299:                                              ; preds = %294
  store i32 3, ptr %5, align 4
  store i32 1, ptr %19, align 4
  br label %300

300:                                              ; preds = %299, %298, %293
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 88, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %301 = load i32, ptr %5, align 4
  ret i32 %301
}

declare i32 @list_append(ptr noundef, ptr noundef) #0

declare ptr @list_get_at(ptr noundef, i32 noundef) #0

declare ptr @bstrcpy(ptr noundef) #0

attributes #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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nounwind willreturn memory(read) "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 = { nounwind }
attributes #5 = { nounwind willreturn memory(read) }

!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 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"InitializationData_t", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!13 = !{!14, !10, i64 0}
!14 = !{!"bstrList", !10, i64 0, !10, i64 4, !6, i64 8}
!15 = !{!16, !6, i64 8}
!16 = !{!"tagbstring", !10, i64 0, !10, i64 4, !6, i64 8}
!17 = !{!16, !10, i64 4}
!18 = !{!16, !10, i64 0}
!19 = !{!14, !6, i64 8}
!20 = !{!21, !6, i64 80}
!21 = !{!"CableLibrary_t", !22, i64 0, !22, i64 8, !22, i64 16, !22, i64 24, !22, i64 32, !22, i64 40, !22, i64 48, !22, i64 56, !22, i64 64, !22, i64 72, !6, i64 80}
!22 = !{!"double", !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}


; 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"

%struct.tagbstring = type { i32, i32, ptr }
%struct.CableLibrary_t = type { double, double, double, double, double, double, double, double, double, double, ptr }

@.str.34 = external hidden unnamed_addr constant [5 x i8], align 1

declare void @set_universal_error(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @set_library_diameter(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @set_library_mass_density(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @set_library_ea(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @set_library_cb(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @set_library_internal_damping(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @set_library_added_mass_coefficient(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @set_library_cross_flow_drag_coefficient(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @set_library_tangent_drag_coefficient(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

declare ptr @bsplits(ptr noundef, ptr noundef) local_unnamed_addr #0

declare i32 @bstrListDestroy(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @reset_cable_library(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 4) i32 @set_cable_library_list(ptr noundef %0, ptr nocapture noundef readonly %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #2 {
  %5 = alloca %struct.tagbstring, align 8
  %6 = alloca %struct.CableLibrary_t, align 8
  %7 = load ptr, ptr %1, align 8, !tbaa !5
  %8 = load i32, ptr %7, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %6) #4
  %9 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @.str.34, ptr %9, align 8, !tbaa !13
  %10 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @.str.34) #5
  %11 = trunc i64 %10 to i32
  %12 = getelementptr inbounds i8, ptr %5, i64 4
  store i32 %11, ptr %12, align 4, !tbaa !15
  store i32 -1, ptr %5, align 8, !tbaa !16
  %13 = call i32 @reset_cable_library(ptr noundef nonnull %6)
  %.not.not102 = icmp sgt i32 %8, 0
  br i1 %.not.not102, label %.lr.ph104, label %._crit_edge

.lr.ph104:                                        ; preds = %4
  %14 = getelementptr inbounds i8, ptr %0, i64 968
  %wide.trip.count = zext nneg i32 %8 to i64
  br label %15

15:                                               ; preds = %.lr.ph104, %.loopexit
  %indvars.iv106 = phi i64 [ 0, %.lr.ph104 ], [ %indvars.iv.next107, %.loopexit ]
  %16 = call i32 @list_append(ptr noundef nonnull %14, ptr noundef nonnull %6) #4
  %17 = trunc nuw nsw i64 %indvars.iv106 to i32
  %18 = call ptr @list_get_at(ptr noundef nonnull %14, i32 noundef %17) #4
  %19 = load ptr, ptr %1, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %19, i64 8
  %21 = load ptr, ptr %20, align 8, !tbaa !17
  %22 = getelementptr inbounds ptr, ptr %21, i64 %indvars.iv106
  %23 = load ptr, ptr %22, align 8, !tbaa !18
  %24 = call ptr @bsplits(ptr noundef %23, ptr noundef nonnull %5) #4
  %25 = load i32, ptr %24, align 8, !tbaa !10
  %26 = icmp sgt i32 %25, 1
  br i1 %26, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %15
  %27 = getelementptr inbounds i8, ptr %24, i64 8
  %28 = getelementptr inbounds i8, ptr %18, i64 80
  br label %29

29:                                               ; preds = %.lr.ph, %54
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %54 ]
  %.086101 = phi i32 [ 0, %.lr.ph ], [ %.1, %54 ]
  %30 = load ptr, ptr %27, align 8, !tbaa !17
  %31 = getelementptr inbounds ptr, ptr %30, i64 %indvars.iv
  %32 = load ptr, ptr %31, align 8, !tbaa !18
  %33 = getelementptr inbounds i8, ptr %32, i64 4
  %34 = load i32, ptr %33, align 4, !tbaa !15
  %.not = icmp eq i32 %34, 0
  br i1 %.not, label %54, label %35

35:                                               ; preds = %29
  switch i32 %.086101, label %54 [
    i32 0, label %36
    i32 1, label %38
    i32 2, label %40
    i32 3, label %42
    i32 4, label %44
    i32 5, label %46
    i32 6, label %48
    i32 7, label %50
    i32 8, label %52
  ]

36:                                               ; preds = %35
  %37 = call ptr @bstrcpy(ptr noundef nonnull %32) #4
  store ptr %37, ptr %28, align 8, !tbaa !19
  br label %54

38:                                               ; preds = %35
  %39 = call i32 @set_library_diameter(ptr noundef nonnull %32, ptr noundef %18)
  %.not97 = icmp eq i32 %39, 0
  br i1 %.not97, label %54, label %.loopexit.sink.split

40:                                               ; preds = %35
  %41 = call i32 @set_library_mass_density(ptr noundef nonnull %32, ptr noundef %18)
  %.not96 = icmp eq i32 %41, 0
  br i1 %.not96, label %54, label %.loopexit.sink.split

42:                                               ; preds = %35
  %43 = call i32 @set_library_ea(ptr noundef nonnull %32, ptr noundef %18)
  %.not95 = icmp eq i32 %43, 0
  br i1 %.not95, label %54, label %.loopexit.sink.split

44:                                               ; preds = %35
  %45 = call i32 @set_library_cb(ptr noundef nonnull %32, ptr noundef %18)
  %.not94 = icmp eq i32 %45, 0
  br i1 %.not94, label %54, label %.loopexit.sink.split

46:                                               ; preds = %35
  %47 = call i32 @set_library_internal_damping(ptr noundef nonnull %32, ptr noundef %18)
  %.not93 = icmp eq i32 %47, 0
  br i1 %.not93, label %54, label %.loopexit.sink.split

48:                                               ; preds = %35
  %49 = call i32 @set_library_added_mass_coefficient(ptr noundef nonnull %32, ptr noundef %18)
  %.not92 = icmp eq i32 %49, 0
  br i1 %.not92, label %54, label %.loopexit.sink.split

50:                                               ; preds = %35
  %51 = call i32 @set_library_cross_flow_drag_coefficient(ptr noundef nonnull %32, ptr noundef %18)
  %.not91 = icmp eq i32 %51, 0
  br i1 %.not91, label %54, label %.loopexit.sink.split

52:                                               ; preds = %35
  %53 = call i32 @set_library_tangent_drag_coefficient(ptr noundef nonnull %32, ptr noundef %18)
  %.not90 = icmp eq i32 %53, 0
  br i1 %.not90, label %54, label %.loopexit.sink.split

54:                                               ; preds = %52, %35, %50, %48, %46, %44, %42, %40, %38, %36, %29
  %.1 = phi i32 [ 1, %36 ], [ %.086101, %29 ], [ 2, %38 ], [ 3, %40 ], [ 4, %42 ], [ 5, %44 ], [ 6, %46 ], [ 7, %48 ], [ 8, %50 ], [ %.086101, %35 ], [ 9, %52 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %55 = load i32, ptr %24, align 8, !tbaa !10
  %56 = add nsw i32 %55, -1
  %57 = sext i32 %56 to i64
  %58 = icmp slt i64 %indvars.iv.next, %57
  br i1 %58, label %29, label %.loopexit, !llvm.loop !22

.loopexit.sink.split:                             ; preds = %52, %50, %48, %46, %44, %42, %40, %38
  %.sink = phi i32 [ 12, %38 ], [ 13, %40 ], [ 14, %42 ], [ 15, %44 ], [ 81, %46 ], [ 82, %48 ], [ 83, %50 ], [ 84, %52 ]
  call void @set_universal_error(ptr noundef %2, ptr noundef %3, i32 noundef %.sink) #4
  br label %.loopexit

.loopexit:                                        ; preds = %54, %.loopexit.sink.split, %15
  %59 = call i32 @bstrListDestroy(ptr noundef nonnull %24) #4
  %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next107, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %15, !llvm.loop !24

._crit_edge:                                      ; preds = %.loopexit, %4
  %60 = load i32, ptr %3, align 4, !tbaa !25
  %switch.selectcmp = icmp eq i32 %60, 2
  %switch.select = select i1 %switch.selectcmp, i32 2, i32 3
  %switch.selectcmp98 = icmp eq i32 %60, 0
  %switch.select99 = select i1 %switch.selectcmp98, i32 0, i32 %switch.select
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  ret i32 %switch.select99
}

declare i32 @list_append(ptr noundef, ptr noundef) local_unnamed_addr #0

declare ptr @list_get_at(ptr noundef, i32 noundef) local_unnamed_addr #0

declare ptr @bstrcpy(ptr noundef) local_unnamed_addr #0

attributes #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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { nounwind }
attributes #5 = { nounwind willreturn memory(read) }

!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 = !{!"InitializationData_t", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !12, i64 0}
!11 = !{!"bstrList", !12, i64 0, !12, i64 4, !7, i64 8}
!12 = !{!"int", !8, i64 0}
!13 = !{!14, !7, i64 8}
!14 = !{!"tagbstring", !12, i64 0, !12, i64 4, !7, i64 8}
!15 = !{!14, !12, i64 4}
!16 = !{!14, !12, i64 0}
!17 = !{!11, !7, i64 8}
!18 = !{!7, !7, i64 0}
!19 = !{!20, !7, i64 80}
!20 = !{!"CableLibrary_t", !21, i64 0, !21, i64 8, !21, i64 16, !21, i64 24, !21, i64 32, !21, i64 40, !21, i64 48, !21, i64 56, !21, i64 64, !21, i64 72, !7, i64 80}
!21 = !{!"double", !8, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = !{!12, !12, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass