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

; 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.Fd_t = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.MAP_OtherStateType = type { ptr, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32 }
%struct.MAP_InputType = type { ptr, ptr, i32, ptr, i32, ptr, i32 }
%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 }

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

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

declare void @map_reset_universal_error(ptr noundef, ptr noundef) #1

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

declare i32 @line_solve_sequence(ptr noundef, ptr noundef, float noundef, ptr noundef, ptr noundef) #1

declare i32 @node_solve_sequence(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, float noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind
declare void @free(ptr noundef) #2

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

; Function Attrs: nounwind uwtable
define dso_local ptr @map_linearize_matrix(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, double noundef %5, ptr noundef %6, ptr noundef %7) #4 {
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca double, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %struct.Fd_t, align 8
  %27 = alloca ptr, align 8
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store double %5, ptr %14, align 8, !tbaa !9
  store ptr %6, ptr %15, align 8, !tbaa !5
  store ptr %7, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  store ptr null, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  store ptr null, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  store ptr null, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %28 = load ptr, ptr %11, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.MAP_OtherStateType, ptr %28, i32 0, i32 0
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  store ptr %30, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %31 = load ptr, ptr %9, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.MAP_InputType, ptr %31, i32 0, i32 2
  %33 = load i32, ptr %32, align 8, !tbaa !15
  store i32 %33, ptr %22, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 6, ptr %23, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store i32 0, ptr %25, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 48, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %34 = load ptr, ptr %16, align 8, !tbaa !5
  %35 = load ptr, ptr %15, align 8, !tbaa !5
  call void @map_reset_universal_error(ptr noundef %34, ptr noundef %35)
  %36 = call noalias ptr @malloc(i64 noundef 48) #6
  store ptr %36, ptr %27, align 8, !tbaa !5
  store i32 0, ptr %24, align 4, !tbaa !14
  br label %37

37:                                               ; preds = %82, %8
  %38 = load i32, ptr %24, align 4, !tbaa !14
  %39 = icmp slt i32 %38, 6
  br i1 %39, label %40, label %85

40:                                               ; preds = %37
  %41 = call noalias ptr @malloc(i64 noundef 48) #6
  %42 = load ptr, ptr %27, align 8, !tbaa !5
  %43 = load i32, ptr %24, align 4, !tbaa !14
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds ptr, ptr %42, i64 %44
  store ptr %41, ptr %45, align 8, !tbaa !5
  %46 = load ptr, ptr %27, align 8, !tbaa !5
  %47 = load i32, ptr %24, align 4, !tbaa !14
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds ptr, ptr %46, i64 %48
  %50 = load ptr, ptr %49, align 8, !tbaa !5
  %51 = getelementptr inbounds double, ptr %50, i64 0
  store double 0.000000e+00, ptr %51, align 8, !tbaa !9
  %52 = load ptr, ptr %27, align 8, !tbaa !5
  %53 = load i32, ptr %24, align 4, !tbaa !14
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds ptr, ptr %52, i64 %54
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  %57 = getelementptr inbounds double, ptr %56, i64 1
  store double 0.000000e+00, ptr %57, align 8, !tbaa !9
  %58 = load ptr, ptr %27, align 8, !tbaa !5
  %59 = load i32, ptr %24, align 4, !tbaa !14
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds ptr, ptr %58, i64 %60
  %62 = load ptr, ptr %61, align 8, !tbaa !5
  %63 = getelementptr inbounds double, ptr %62, i64 2
  store double 0.000000e+00, ptr %63, align 8, !tbaa !9
  %64 = load ptr, ptr %27, align 8, !tbaa !5
  %65 = load i32, ptr %24, align 4, !tbaa !14
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds ptr, ptr %64, i64 %66
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  %69 = getelementptr inbounds double, ptr %68, i64 3
  store double 0.000000e+00, ptr %69, align 8, !tbaa !9
  %70 = load ptr, ptr %27, align 8, !tbaa !5
  %71 = load i32, ptr %24, align 4, !tbaa !14
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds ptr, ptr %70, i64 %72
  %74 = load ptr, ptr %73, align 8, !tbaa !5
  %75 = getelementptr inbounds double, ptr %74, i64 4
  store double 0.000000e+00, ptr %75, align 8, !tbaa !9
  %76 = load ptr, ptr %27, align 8, !tbaa !5
  %77 = load i32, ptr %24, align 4, !tbaa !14
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds ptr, ptr %76, i64 %78
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = getelementptr inbounds double, ptr %80, i64 5
  store double 0.000000e+00, ptr %81, align 8, !tbaa !9
  br label %82

82:                                               ; preds = %40
  %83 = load i32, ptr %24, align 4, !tbaa !14
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %24, align 4, !tbaa !14
  br label %37, !llvm.loop !17

85:                                               ; preds = %37
  %86 = load i32, ptr %22, align 4, !tbaa !14
  %87 = sext i32 %86 to i64
  %88 = mul i64 %87, 8
  %89 = call noalias ptr @malloc(i64 noundef %88) #6
  %90 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 0
  store ptr %89, ptr %90, align 8, !tbaa !19
  %91 = load i32, ptr %22, align 4, !tbaa !14
  %92 = sext i32 %91 to i64
  %93 = mul i64 %92, 8
  %94 = call noalias ptr @malloc(i64 noundef %93) #6
  %95 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 1
  store ptr %94, ptr %95, align 8, !tbaa !21
  %96 = load i32, ptr %22, align 4, !tbaa !14
  %97 = sext i32 %96 to i64
  %98 = mul i64 %97, 8
  %99 = call noalias ptr @malloc(i64 noundef %98) #6
  %100 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 2
  store ptr %99, ptr %100, align 8, !tbaa !22
  %101 = load i32, ptr %22, align 4, !tbaa !14
  %102 = sext i32 %101 to i64
  %103 = mul i64 %102, 8
  %104 = call noalias ptr @malloc(i64 noundef %103) #6
  %105 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 3
  store ptr %104, ptr %105, align 8, !tbaa !23
  %106 = load i32, ptr %22, align 4, !tbaa !14
  %107 = sext i32 %106 to i64
  %108 = mul i64 %107, 8
  %109 = call noalias ptr @malloc(i64 noundef %108) #6
  %110 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 4
  store ptr %109, ptr %110, align 8, !tbaa !24
  %111 = load i32, ptr %22, align 4, !tbaa !14
  %112 = sext i32 %111 to i64
  %113 = mul i64 %112, 8
  %114 = call noalias ptr @malloc(i64 noundef %113) #6
  %115 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 5
  store ptr %114, ptr %115, align 8, !tbaa !25
  %116 = load i32, ptr %22, align 4, !tbaa !14
  %117 = sext i32 %116 to i64
  %118 = mul i64 %117, 8
  %119 = call noalias ptr @malloc(i64 noundef %118) #6
  store ptr %119, ptr %17, align 8, !tbaa !5
  %120 = load i32, ptr %22, align 4, !tbaa !14
  %121 = sext i32 %120 to i64
  %122 = mul i64 %121, 8
  %123 = call noalias ptr @malloc(i64 noundef %122) #6
  store ptr %123, ptr %18, align 8, !tbaa !5
  %124 = load i32, ptr %22, align 4, !tbaa !14
  %125 = sext i32 %124 to i64
  %126 = mul i64 %125, 8
  %127 = call noalias ptr @malloc(i64 noundef %126) #6
  store ptr %127, ptr %19, align 8, !tbaa !5
  store i32 0, ptr %24, align 4, !tbaa !14
  br label %128

128:                                              ; preds = %175, %85
  %129 = load i32, ptr %24, align 4, !tbaa !14
  %130 = load i32, ptr %22, align 4, !tbaa !14
  %131 = icmp slt i32 %129, %130
  br i1 %131, label %132, label %178

132:                                              ; preds = %128
  %133 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8, !tbaa !19
  %135 = load i32, ptr %24, align 4, !tbaa !14
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds double, ptr %134, i64 %136
  store double 0.000000e+00, ptr %137, align 8, !tbaa !9
  %138 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 1
  %139 = load ptr, ptr %138, align 8, !tbaa !21
  %140 = load i32, ptr %24, align 4, !tbaa !14
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds double, ptr %139, i64 %141
  store double 0.000000e+00, ptr %142, align 8, !tbaa !9
  %143 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 2
  %144 = load ptr, ptr %143, align 8, !tbaa !22
  %145 = load i32, ptr %24, align 4, !tbaa !14
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds double, ptr %144, i64 %146
  store double 0.000000e+00, ptr %147, align 8, !tbaa !9
  %148 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 3
  %149 = load ptr, ptr %148, align 8, !tbaa !23
  %150 = load i32, ptr %24, align 4, !tbaa !14
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds double, ptr %149, i64 %151
  store double 0.000000e+00, ptr %152, align 8, !tbaa !9
  %153 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 4
  %154 = load ptr, ptr %153, align 8, !tbaa !24
  %155 = load i32, ptr %24, align 4, !tbaa !14
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds double, ptr %154, i64 %156
  store double 0.000000e+00, ptr %157, align 8, !tbaa !9
  %158 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 5
  %159 = load ptr, ptr %158, align 8, !tbaa !25
  %160 = load i32, ptr %24, align 4, !tbaa !14
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds double, ptr %159, i64 %161
  store double 0.000000e+00, ptr %162, align 8, !tbaa !9
  %163 = load ptr, ptr %17, align 8, !tbaa !5
  %164 = load i32, ptr %24, align 4, !tbaa !14
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds double, ptr %163, i64 %165
  store double 0.000000e+00, ptr %166, align 8, !tbaa !9
  %167 = load ptr, ptr %18, align 8, !tbaa !5
  %168 = load i32, ptr %24, align 4, !tbaa !14
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds double, ptr %167, i64 %169
  store double 0.000000e+00, ptr %170, align 8, !tbaa !9
  %171 = load ptr, ptr %19, align 8, !tbaa !5
  %172 = load i32, ptr %24, align 4, !tbaa !14
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds double, ptr %171, i64 %173
  store double 0.000000e+00, ptr %174, align 8, !tbaa !9
  br label %175

175:                                              ; preds = %132
  %176 = load i32, ptr %24, align 4, !tbaa !14
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %24, align 4, !tbaa !14
  br label %128, !llvm.loop !26

178:                                              ; preds = %128
  br label %179

179:                                              ; preds = %178
  store i32 0, ptr %25, align 4, !tbaa !14
  br label %180

180:                                              ; preds = %218, %179
  %181 = load i32, ptr %25, align 4, !tbaa !14
  %182 = load i32, ptr %22, align 4, !tbaa !14
  %183 = icmp slt i32 %181, %182
  br i1 %183, label %184, label %221

184:                                              ; preds = %180
  %185 = load ptr, ptr %9, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.MAP_InputType, ptr %185, i32 0, i32 1
  %187 = load ptr, ptr %186, align 8, !tbaa !27
  %188 = load i32, ptr %25, align 4, !tbaa !14
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds double, ptr %187, i64 %189
  %191 = load double, ptr %190, align 8, !tbaa !9
  %192 = load ptr, ptr %17, align 8, !tbaa !5
  %193 = load i32, ptr %25, align 4, !tbaa !14
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds double, ptr %192, i64 %194
  store double %191, ptr %195, align 8, !tbaa !9
  %196 = load ptr, ptr %9, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.MAP_InputType, ptr %196, i32 0, i32 3
  %198 = load ptr, ptr %197, align 8, !tbaa !28
  %199 = load i32, ptr %25, align 4, !tbaa !14
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds double, ptr %198, i64 %200
  %202 = load double, ptr %201, align 8, !tbaa !9
  %203 = load ptr, ptr %18, align 8, !tbaa !5
  %204 = load i32, ptr %25, align 4, !tbaa !14
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds double, ptr %203, i64 %205
  store double %202, ptr %206, align 8, !tbaa !9
  %207 = load ptr, ptr %9, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.MAP_InputType, ptr %207, i32 0, i32 5
  %209 = load ptr, ptr %208, align 8, !tbaa !29
  %210 = load i32, ptr %25, align 4, !tbaa !14
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds double, ptr %209, i64 %211
  %213 = load double, ptr %212, align 8, !tbaa !9
  %214 = load ptr, ptr %19, align 8, !tbaa !5
  %215 = load i32, ptr %25, align 4, !tbaa !14
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds double, ptr %214, i64 %216
  store double %213, ptr %217, align 8, !tbaa !9
  br label %218

218:                                              ; preds = %184
  %219 = load i32, ptr %25, align 4, !tbaa !14
  %220 = add nsw i32 %219, 1
  store i32 %220, ptr %25, align 4, !tbaa !14
  br label %180, !llvm.loop !30

221:                                              ; preds = %180
  store i32 0, ptr %24, align 4, !tbaa !14
  br label %222

222:                                              ; preds = %449, %221
  %223 = load i32, ptr %24, align 4, !tbaa !14
  %224 = icmp slt i32 %223, 6
  br i1 %224, label %225, label %452

225:                                              ; preds = %222
  %226 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 0
  %227 = load ptr, ptr %226, align 8, !tbaa !19
  %228 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 1
  %229 = load ptr, ptr %228, align 8, !tbaa !21
  %230 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 2
  %231 = load ptr, ptr %230, align 8, !tbaa !22
  %232 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 3
  %233 = load ptr, ptr %232, align 8, !tbaa !23
  %234 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 4
  %235 = load ptr, ptr %234, align 8, !tbaa !24
  %236 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 5
  %237 = load ptr, ptr %236, align 8, !tbaa !25
  %238 = load i32, ptr %22, align 4, !tbaa !14
  %239 = call i32 @reset_force_to_zero(ptr noundef %227, ptr noundef %229, ptr noundef %231, ptr noundef %233, ptr noundef %235, ptr noundef %237, i32 noundef %238)
  store i32 %239, ptr %21, align 4, !tbaa !14
  %240 = load i32, ptr %24, align 4, !tbaa !14
  %241 = icmp eq i32 %240, 0
  br i1 %241, label %242, label %272

242:                                              ; preds = %225
  %243 = load ptr, ptr %11, align 8, !tbaa !5
  %244 = load ptr, ptr %10, align 8, !tbaa !5
  %245 = load ptr, ptr %9, align 8, !tbaa !5
  %246 = load ptr, ptr %12, align 8, !tbaa !5
  %247 = load ptr, ptr %13, align 8, !tbaa !5
  %248 = load double, ptr %14, align 8, !tbaa !9
  %249 = load i32, ptr %22, align 4, !tbaa !14
  %250 = load ptr, ptr %17, align 8, !tbaa !5
  %251 = load ptr, ptr %16, align 8, !tbaa !5
  %252 = load ptr, ptr %15, align 8, !tbaa !5
  %253 = call i32 @fd_x_sequence(ptr noundef %243, ptr noundef %244, ptr noundef %245, ptr noundef %246, ptr noundef %247, ptr noundef %26, double noundef %248, i32 noundef %249, ptr noundef %250, ptr noundef %251, ptr noundef %252)
  store i32 %253, ptr %21, align 4, !tbaa !14
  %254 = load i32, ptr %21, align 4, !tbaa !14
  %255 = icmp ne i32 %254, 0
  br i1 %255, label %256, label %259

256:                                              ; preds = %242
  %257 = load ptr, ptr %16, align 8, !tbaa !5
  %258 = load ptr, ptr %15, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %257, ptr noundef %258, i32 noundef 62)
  br label %452

259:                                              ; preds = %242
  %260 = load ptr, ptr %27, align 8, !tbaa !5
  %261 = getelementptr inbounds ptr, ptr %260, i64 0
  %262 = load ptr, ptr %261, align 8, !tbaa !5
  %263 = load double, ptr %14, align 8, !tbaa !9
  %264 = load i32, ptr %22, align 4, !tbaa !14
  %265 = call i32 @calculate_stiffness(ptr noundef %262, ptr noundef %26, double noundef %263, i32 noundef %264)
  store i32 %265, ptr %21, align 4, !tbaa !14
  %266 = load i32, ptr %21, align 4, !tbaa !14
  %267 = icmp ne i32 %266, 0
  br i1 %267, label %268, label %271

268:                                              ; preds = %259
  %269 = load ptr, ptr %16, align 8, !tbaa !5
  %270 = load ptr, ptr %15, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %269, ptr noundef %270, i32 noundef 62)
  br label %452

271:                                              ; preds = %259
  br label %448

272:                                              ; preds = %225
  %273 = load i32, ptr %24, align 4, !tbaa !14
  %274 = icmp eq i32 %273, 1
  br i1 %274, label %275, label %305

275:                                              ; preds = %272
  %276 = load ptr, ptr %11, align 8, !tbaa !5
  %277 = load ptr, ptr %10, align 8, !tbaa !5
  %278 = load ptr, ptr %9, align 8, !tbaa !5
  %279 = load ptr, ptr %12, align 8, !tbaa !5
  %280 = load ptr, ptr %13, align 8, !tbaa !5
  %281 = load double, ptr %14, align 8, !tbaa !9
  %282 = load i32, ptr %22, align 4, !tbaa !14
  %283 = load ptr, ptr %18, align 8, !tbaa !5
  %284 = load ptr, ptr %16, align 8, !tbaa !5
  %285 = load ptr, ptr %15, align 8, !tbaa !5
  %286 = call i32 @fd_y_sequence(ptr noundef %276, ptr noundef %277, ptr noundef %278, ptr noundef %279, ptr noundef %280, ptr noundef %26, double noundef %281, i32 noundef %282, ptr noundef %283, ptr noundef %284, ptr noundef %285)
  store i32 %286, ptr %21, align 4, !tbaa !14
  %287 = load i32, ptr %21, align 4, !tbaa !14
  %288 = icmp ne i32 %287, 0
  br i1 %288, label %289, label %292

289:                                              ; preds = %275
  %290 = load ptr, ptr %16, align 8, !tbaa !5
  %291 = load ptr, ptr %15, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %290, ptr noundef %291, i32 noundef 63)
  br label %452

292:                                              ; preds = %275
  %293 = load ptr, ptr %27, align 8, !tbaa !5
  %294 = getelementptr inbounds ptr, ptr %293, i64 1
  %295 = load ptr, ptr %294, align 8, !tbaa !5
  %296 = load double, ptr %14, align 8, !tbaa !9
  %297 = load i32, ptr %22, align 4, !tbaa !14
  %298 = call i32 @calculate_stiffness(ptr noundef %295, ptr noundef %26, double noundef %296, i32 noundef %297)
  store i32 %298, ptr %21, align 4, !tbaa !14
  %299 = load i32, ptr %21, align 4, !tbaa !14
  %300 = icmp ne i32 %299, 0
  br i1 %300, label %301, label %304

301:                                              ; preds = %292
  %302 = load ptr, ptr %16, align 8, !tbaa !5
  %303 = load ptr, ptr %15, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %302, ptr noundef %303, i32 noundef 63)
  br label %452

304:                                              ; preds = %292
  br label %447

305:                                              ; preds = %272
  %306 = load i32, ptr %24, align 4, !tbaa !14
  %307 = icmp eq i32 %306, 2
  br i1 %307, label %308, label %338

308:                                              ; preds = %305
  %309 = load ptr, ptr %11, align 8, !tbaa !5
  %310 = load ptr, ptr %10, align 8, !tbaa !5
  %311 = load ptr, ptr %9, align 8, !tbaa !5
  %312 = load ptr, ptr %12, align 8, !tbaa !5
  %313 = load ptr, ptr %13, align 8, !tbaa !5
  %314 = load double, ptr %14, align 8, !tbaa !9
  %315 = load i32, ptr %22, align 4, !tbaa !14
  %316 = load ptr, ptr %19, align 8, !tbaa !5
  %317 = load ptr, ptr %16, align 8, !tbaa !5
  %318 = load ptr, ptr %15, align 8, !tbaa !5
  %319 = call i32 @fd_z_sequence(ptr noundef %309, ptr noundef %310, ptr noundef %311, ptr noundef %312, ptr noundef %313, ptr noundef %26, double noundef %314, i32 noundef %315, ptr noundef %316, ptr noundef %317, ptr noundef %318)
  store i32 %319, ptr %21, align 4, !tbaa !14
  %320 = load i32, ptr %21, align 4, !tbaa !14
  %321 = icmp ne i32 %320, 0
  br i1 %321, label %322, label %325

322:                                              ; preds = %308
  %323 = load ptr, ptr %16, align 8, !tbaa !5
  %324 = load ptr, ptr %15, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %323, ptr noundef %324, i32 noundef 64)
  br label %452

325:                                              ; preds = %308
  %326 = load ptr, ptr %27, align 8, !tbaa !5
  %327 = getelementptr inbounds ptr, ptr %326, i64 2
  %328 = load ptr, ptr %327, align 8, !tbaa !5
  %329 = load double, ptr %14, align 8, !tbaa !9
  %330 = load i32, ptr %22, align 4, !tbaa !14
  %331 = call i32 @calculate_stiffness(ptr noundef %328, ptr noundef %26, double noundef %329, i32 noundef %330)
  store i32 %331, ptr %21, align 4, !tbaa !14
  %332 = load i32, ptr %21, align 4, !tbaa !14
  %333 = icmp ne i32 %332, 0
  br i1 %333, label %334, label %337

334:                                              ; preds = %325
  %335 = load ptr, ptr %16, align 8, !tbaa !5
  %336 = load ptr, ptr %15, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %335, ptr noundef %336, i32 noundef 64)
  br label %452

337:                                              ; preds = %325
  br label %446

338:                                              ; preds = %305
  %339 = load i32, ptr %24, align 4, !tbaa !14
  %340 = icmp eq i32 %339, 3
  br i1 %340, label %341, label %373

341:                                              ; preds = %338
  %342 = load ptr, ptr %11, align 8, !tbaa !5
  %343 = load ptr, ptr %10, align 8, !tbaa !5
  %344 = load ptr, ptr %9, align 8, !tbaa !5
  %345 = load ptr, ptr %12, align 8, !tbaa !5
  %346 = load ptr, ptr %13, align 8, !tbaa !5
  %347 = load double, ptr %14, align 8, !tbaa !9
  %348 = load i32, ptr %22, align 4, !tbaa !14
  %349 = load ptr, ptr %17, align 8, !tbaa !5
  %350 = load ptr, ptr %18, align 8, !tbaa !5
  %351 = load ptr, ptr %19, align 8, !tbaa !5
  %352 = load ptr, ptr %16, align 8, !tbaa !5
  %353 = load ptr, ptr %15, align 8, !tbaa !5
  %354 = call i32 @fd_phi_sequence(ptr noundef %342, ptr noundef %343, ptr noundef %344, ptr noundef %345, ptr noundef %346, ptr noundef %26, double noundef %347, i32 noundef %348, ptr noundef %349, ptr noundef %350, ptr noundef %351, ptr noundef %352, ptr noundef %353)
  store i32 %354, ptr %21, align 4, !tbaa !14
  %355 = load i32, ptr %21, align 4, !tbaa !14
  %356 = icmp ne i32 %355, 0
  br i1 %356, label %357, label %360

357:                                              ; preds = %341
  %358 = load ptr, ptr %16, align 8, !tbaa !5
  %359 = load ptr, ptr %15, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %358, ptr noundef %359, i32 noundef 65)
  br label %452

360:                                              ; preds = %341
  %361 = load ptr, ptr %27, align 8, !tbaa !5
  %362 = getelementptr inbounds ptr, ptr %361, i64 3
  %363 = load ptr, ptr %362, align 8, !tbaa !5
  %364 = load double, ptr %14, align 8, !tbaa !9
  %365 = load i32, ptr %22, align 4, !tbaa !14
  %366 = call i32 @calculate_stiffness(ptr noundef %363, ptr noundef %26, double noundef %364, i32 noundef %365)
  store i32 %366, ptr %21, align 4, !tbaa !14
  %367 = load i32, ptr %21, align 4, !tbaa !14
  %368 = icmp ne i32 %367, 0
  br i1 %368, label %369, label %372

369:                                              ; preds = %360
  %370 = load ptr, ptr %16, align 8, !tbaa !5
  %371 = load ptr, ptr %15, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %370, ptr noundef %371, i32 noundef 65)
  br label %452

372:                                              ; preds = %360
  br label %445

373:                                              ; preds = %338
  %374 = load i32, ptr %24, align 4, !tbaa !14
  %375 = icmp eq i32 %374, 4
  br i1 %375, label %376, label %408

376:                                              ; preds = %373
  %377 = load ptr, ptr %11, align 8, !tbaa !5
  %378 = load ptr, ptr %10, align 8, !tbaa !5
  %379 = load ptr, ptr %9, align 8, !tbaa !5
  %380 = load ptr, ptr %12, align 8, !tbaa !5
  %381 = load ptr, ptr %13, align 8, !tbaa !5
  %382 = load double, ptr %14, align 8, !tbaa !9
  %383 = load i32, ptr %22, align 4, !tbaa !14
  %384 = load ptr, ptr %17, align 8, !tbaa !5
  %385 = load ptr, ptr %18, align 8, !tbaa !5
  %386 = load ptr, ptr %19, align 8, !tbaa !5
  %387 = load ptr, ptr %16, align 8, !tbaa !5
  %388 = load ptr, ptr %15, align 8, !tbaa !5
  %389 = call i32 @fd_the_sequence(ptr noundef %377, ptr noundef %378, ptr noundef %379, ptr noundef %380, ptr noundef %381, ptr noundef %26, double noundef %382, i32 noundef %383, ptr noundef %384, ptr noundef %385, ptr noundef %386, ptr noundef %387, ptr noundef %388)
  store i32 %389, ptr %21, align 4, !tbaa !14
  %390 = load i32, ptr %21, align 4, !tbaa !14
  %391 = icmp ne i32 %390, 0
  br i1 %391, label %392, label %395

392:                                              ; preds = %376
  %393 = load ptr, ptr %16, align 8, !tbaa !5
  %394 = load ptr, ptr %15, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %393, ptr noundef %394, i32 noundef 66)
  br label %452

395:                                              ; preds = %376
  %396 = load ptr, ptr %27, align 8, !tbaa !5
  %397 = getelementptr inbounds ptr, ptr %396, i64 4
  %398 = load ptr, ptr %397, align 8, !tbaa !5
  %399 = load double, ptr %14, align 8, !tbaa !9
  %400 = load i32, ptr %22, align 4, !tbaa !14
  %401 = call i32 @calculate_stiffness(ptr noundef %398, ptr noundef %26, double noundef %399, i32 noundef %400)
  store i32 %401, ptr %21, align 4, !tbaa !14
  %402 = load i32, ptr %21, align 4, !tbaa !14
  %403 = icmp ne i32 %402, 0
  br i1 %403, label %404, label %407

404:                                              ; preds = %395
  %405 = load ptr, ptr %16, align 8, !tbaa !5
  %406 = load ptr, ptr %15, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %405, ptr noundef %406, i32 noundef 66)
  br label %452

407:                                              ; preds = %395
  br label %444

408:                                              ; preds = %373
  %409 = load i32, ptr %24, align 4, !tbaa !14
  %410 = icmp eq i32 %409, 5
  br i1 %410, label %411, label %443

411:                                              ; preds = %408
  %412 = load ptr, ptr %11, align 8, !tbaa !5
  %413 = load ptr, ptr %10, align 8, !tbaa !5
  %414 = load ptr, ptr %9, align 8, !tbaa !5
  %415 = load ptr, ptr %12, align 8, !tbaa !5
  %416 = load ptr, ptr %13, align 8, !tbaa !5
  %417 = load double, ptr %14, align 8, !tbaa !9
  %418 = load i32, ptr %22, align 4, !tbaa !14
  %419 = load ptr, ptr %17, align 8, !tbaa !5
  %420 = load ptr, ptr %18, align 8, !tbaa !5
  %421 = load ptr, ptr %19, align 8, !tbaa !5
  %422 = load ptr, ptr %16, align 8, !tbaa !5
  %423 = load ptr, ptr %15, align 8, !tbaa !5
  %424 = call i32 @fd_psi_sequence(ptr noundef %412, ptr noundef %413, ptr noundef %414, ptr noundef %415, ptr noundef %416, ptr noundef %26, double noundef %417, i32 noundef %418, ptr noundef %419, ptr noundef %420, ptr noundef %421, ptr noundef %422, ptr noundef %423)
  store i32 %424, ptr %21, align 4, !tbaa !14
  %425 = load i32, ptr %21, align 4, !tbaa !14
  %426 = icmp ne i32 %425, 0
  br i1 %426, label %427, label %430

427:                                              ; preds = %411
  %428 = load ptr, ptr %16, align 8, !tbaa !5
  %429 = load ptr, ptr %15, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %428, ptr noundef %429, i32 noundef 67)
  br label %452

430:                                              ; preds = %411
  %431 = load ptr, ptr %27, align 8, !tbaa !5
  %432 = getelementptr inbounds ptr, ptr %431, i64 5
  %433 = load ptr, ptr %432, align 8, !tbaa !5
  %434 = load double, ptr %14, align 8, !tbaa !9
  %435 = load i32, ptr %22, align 4, !tbaa !14
  %436 = call i32 @calculate_stiffness(ptr noundef %433, ptr noundef %26, double noundef %434, i32 noundef %435)
  store i32 %436, ptr %21, align 4, !tbaa !14
  %437 = load i32, ptr %21, align 4, !tbaa !14
  %438 = icmp ne i32 %437, 0
  br i1 %438, label %439, label %442

439:                                              ; preds = %430
  %440 = load ptr, ptr %16, align 8, !tbaa !5
  %441 = load ptr, ptr %15, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %440, ptr noundef %441, i32 noundef 67)
  br label %452

442:                                              ; preds = %430
  br label %443

443:                                              ; preds = %442, %408
  br label %444

444:                                              ; preds = %443, %407
  br label %445

445:                                              ; preds = %444, %372
  br label %446

446:                                              ; preds = %445, %337
  br label %447

447:                                              ; preds = %446, %304
  br label %448

448:                                              ; preds = %447, %271
  br label %449

449:                                              ; preds = %448
  %450 = load i32, ptr %24, align 4, !tbaa !14
  %451 = add nsw i32 %450, 1
  store i32 %451, ptr %24, align 4, !tbaa !14
  br label %222, !llvm.loop !31

452:                                              ; preds = %439, %427, %404, %392, %369, %357, %334, %322, %301, %289, %268, %256, %222
  %453 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 0
  %454 = load ptr, ptr %453, align 8, !tbaa !19
  %455 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 1
  %456 = load ptr, ptr %455, align 8, !tbaa !21
  %457 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 2
  %458 = load ptr, ptr %457, align 8, !tbaa !22
  %459 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 3
  %460 = load ptr, ptr %459, align 8, !tbaa !23
  %461 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 4
  %462 = load ptr, ptr %461, align 8, !tbaa !24
  %463 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 5
  %464 = load ptr, ptr %463, align 8, !tbaa !25
  %465 = load i32, ptr %22, align 4, !tbaa !14
  %466 = call i32 @reset_force_to_zero(ptr noundef %454, ptr noundef %456, ptr noundef %458, ptr noundef %460, ptr noundef %462, ptr noundef %464, i32 noundef %465)
  store i32 %466, ptr %21, align 4, !tbaa !14
  %467 = load ptr, ptr %9, align 8, !tbaa !5
  %468 = getelementptr inbounds %struct.MAP_InputType, ptr %467, i32 0, i32 1
  %469 = load ptr, ptr %468, align 8, !tbaa !27
  %470 = load ptr, ptr %17, align 8, !tbaa !5
  %471 = load i32, ptr %22, align 4, !tbaa !14
  %472 = call i32 @restore_original_displacement(ptr noundef %469, ptr noundef %470, i32 noundef %471)
  store i32 %472, ptr %21, align 4, !tbaa !14
  %473 = load ptr, ptr %9, align 8, !tbaa !5
  %474 = getelementptr inbounds %struct.MAP_InputType, ptr %473, i32 0, i32 3
  %475 = load ptr, ptr %474, align 8, !tbaa !28
  %476 = load ptr, ptr %18, align 8, !tbaa !5
  %477 = load i32, ptr %22, align 4, !tbaa !14
  %478 = call i32 @restore_original_displacement(ptr noundef %475, ptr noundef %476, i32 noundef %477)
  store i32 %478, ptr %21, align 4, !tbaa !14
  %479 = load ptr, ptr %9, align 8, !tbaa !5
  %480 = getelementptr inbounds %struct.MAP_InputType, ptr %479, i32 0, i32 5
  %481 = load ptr, ptr %480, align 8, !tbaa !29
  %482 = load ptr, ptr %19, align 8, !tbaa !5
  %483 = load i32, ptr %22, align 4, !tbaa !14
  %484 = call i32 @restore_original_displacement(ptr noundef %481, ptr noundef %482, i32 noundef %483)
  store i32 %484, ptr %21, align 4, !tbaa !14
  %485 = load ptr, ptr %20, align 8, !tbaa !5
  %486 = getelementptr inbounds %struct.Domain_t, ptr %485, i32 0, i32 4
  %487 = load i32, ptr %486, align 8, !tbaa !32
  %488 = icmp eq i32 %487, 0
  br i1 %488, label %489, label %495

489:                                              ; preds = %452
  %490 = load ptr, ptr %20, align 8, !tbaa !5
  %491 = load ptr, ptr %10, align 8, !tbaa !5
  %492 = load ptr, ptr %16, align 8, !tbaa !5
  %493 = load ptr, ptr %15, align 8, !tbaa !5
  %494 = call i32 @line_solve_sequence(ptr noundef %490, ptr noundef %491, float noundef 0.000000e+00, ptr noundef %492, ptr noundef %493)
  store i32 %494, ptr %21, align 4, !tbaa !14
  br label %504

495:                                              ; preds = %452
  %496 = load ptr, ptr %20, align 8, !tbaa !5
  %497 = load ptr, ptr %10, align 8, !tbaa !5
  %498 = load ptr, ptr %9, align 8, !tbaa !5
  %499 = load ptr, ptr %13, align 8, !tbaa !5
  %500 = load ptr, ptr %11, align 8, !tbaa !5
  %501 = load ptr, ptr %16, align 8, !tbaa !5
  %502 = load ptr, ptr %15, align 8, !tbaa !5
  %503 = call i32 @node_solve_sequence(ptr noundef %496, ptr noundef %497, ptr noundef %498, ptr noundef %499, ptr noundef %500, float noundef 0xC08F3F3340000000, ptr noundef %501, ptr noundef %502)
  store i32 %503, ptr %21, align 4, !tbaa !14
  br label %504

504:                                              ; preds = %495, %489
  br label %505

505:                                              ; preds = %504
  br label %506

506:                                              ; preds = %505
  %507 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 0
  %508 = load ptr, ptr %507, align 8, !tbaa !19
  %509 = icmp ne ptr %508, null
  br i1 %509, label %510, label %514

510:                                              ; preds = %506
  %511 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 0
  %512 = load ptr, ptr %511, align 8, !tbaa !19
  call void @free(ptr noundef %512) #5
  %513 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 0
  store ptr null, ptr %513, align 8, !tbaa !19
  br label %514

514:                                              ; preds = %510, %506
  %515 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 1
  %516 = load ptr, ptr %515, align 8, !tbaa !21
  %517 = icmp ne ptr %516, null
  br i1 %517, label %518, label %522

518:                                              ; preds = %514
  %519 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 1
  %520 = load ptr, ptr %519, align 8, !tbaa !21
  call void @free(ptr noundef %520) #5
  %521 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 1
  store ptr null, ptr %521, align 8, !tbaa !21
  br label %522

522:                                              ; preds = %518, %514
  %523 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 2
  %524 = load ptr, ptr %523, align 8, !tbaa !22
  %525 = icmp ne ptr %524, null
  br i1 %525, label %526, label %530

526:                                              ; preds = %522
  %527 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 2
  %528 = load ptr, ptr %527, align 8, !tbaa !22
  call void @free(ptr noundef %528) #5
  %529 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 2
  store ptr null, ptr %529, align 8, !tbaa !22
  br label %530

530:                                              ; preds = %526, %522
  %531 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 3
  %532 = load ptr, ptr %531, align 8, !tbaa !23
  %533 = icmp ne ptr %532, null
  br i1 %533, label %534, label %538

534:                                              ; preds = %530
  %535 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 3
  %536 = load ptr, ptr %535, align 8, !tbaa !23
  call void @free(ptr noundef %536) #5
  %537 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 3
  store ptr null, ptr %537, align 8, !tbaa !23
  br label %538

538:                                              ; preds = %534, %530
  %539 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 4
  %540 = load ptr, ptr %539, align 8, !tbaa !24
  %541 = icmp ne ptr %540, null
  br i1 %541, label %542, label %546

542:                                              ; preds = %538
  %543 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 4
  %544 = load ptr, ptr %543, align 8, !tbaa !24
  call void @free(ptr noundef %544) #5
  %545 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 4
  store ptr null, ptr %545, align 8, !tbaa !24
  br label %546

546:                                              ; preds = %542, %538
  %547 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 5
  %548 = load ptr, ptr %547, align 8, !tbaa !25
  %549 = icmp ne ptr %548, null
  br i1 %549, label %550, label %554

550:                                              ; preds = %546
  %551 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 5
  %552 = load ptr, ptr %551, align 8, !tbaa !25
  call void @free(ptr noundef %552) #5
  %553 = getelementptr inbounds %struct.Fd_t, ptr %26, i32 0, i32 5
  store ptr null, ptr %553, align 8, !tbaa !25
  br label %554

554:                                              ; preds = %550, %546
  %555 = load ptr, ptr %17, align 8, !tbaa !5
  %556 = icmp ne ptr %555, null
  br i1 %556, label %557, label %559

557:                                              ; preds = %554
  %558 = load ptr, ptr %17, align 8, !tbaa !5
  call void @free(ptr noundef %558) #5
  store ptr null, ptr %17, align 8, !tbaa !5
  br label %559

559:                                              ; preds = %557, %554
  %560 = load ptr, ptr %18, align 8, !tbaa !5
  %561 = icmp ne ptr %560, null
  br i1 %561, label %562, label %564

562:                                              ; preds = %559
  %563 = load ptr, ptr %18, align 8, !tbaa !5
  call void @free(ptr noundef %563) #5
  store ptr null, ptr %18, align 8, !tbaa !5
  br label %564

564:                                              ; preds = %562, %559
  %565 = load ptr, ptr %19, align 8, !tbaa !5
  %566 = icmp ne ptr %565, null
  br i1 %566, label %567, label %569

567:                                              ; preds = %564
  %568 = load ptr, ptr %19, align 8, !tbaa !5
  call void @free(ptr noundef %568) #5
  store ptr null, ptr %19, align 8, !tbaa !5
  br label %569

569:                                              ; preds = %567, %564
  %570 = load ptr, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  ret ptr %570
}

declare i32 @reset_force_to_zero(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

declare i32 @fd_x_sequence(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @calculate_stiffness(ptr noundef, ptr noundef, double noundef, i32 noundef) #1

declare i32 @fd_y_sequence(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @fd_z_sequence(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @fd_phi_sequence(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @fd_the_sequence(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @fd_psi_sequence(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @restore_original_displacement(ptr noundef, ptr noundef, i32 noundef) #1

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

!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, !6, i64 0}
!12 = !{!"MAP_OtherStateType", !6, i64 0, !6, i64 8, !13, i64 16, !6, i64 24, !13, i64 32, !6, i64 40, !13, i64 48, !6, i64 56, !13, i64 64, !6, i64 72, !13, i64 80, !6, i64 88, !13, i64 96, !6, i64 104, !13, i64 112, !6, i64 120, !13, i64 128, !6, i64 136, !13, i64 144, !6, i64 152, !13, i64 160, !6, i64 168, !13, i64 176, !6, i64 184, !13, i64 192, !6, i64 200, !13, i64 208, !6, i64 216, !13, i64 224, !6, i64 232, !13, i64 240, !6, i64 248, !13, i64 256}
!13 = !{!"int", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!16, !13, i64 16}
!16 = !{!"MAP_InputType", !6, i64 0, !6, i64 8, !13, i64 16, !6, i64 24, !13, i64 32, !6, i64 40, !13, i64 48}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !6, i64 0}
!20 = !{!"Fd_t", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!21 = !{!20, !6, i64 8}
!22 = !{!20, !6, i64 16}
!23 = !{!20, !6, i64 24}
!24 = !{!20, !6, i64 32}
!25 = !{!20, !6, i64 40}
!26 = distinct !{!26, !18}
!27 = !{!16, !6, i64 8}
!28 = !{!16, !6, i64 24}
!29 = !{!16, !6, i64 40}
!30 = distinct !{!30, !18}
!31 = distinct !{!31, !18}
!32 = !{!33, !13, i64 456}
!33 = !{!"Domain_t", !34, i64 0, !35, i64 240, !37, i64 408, !6, i64 448, !13, i64 456, !38, i64 464, !43, i64 968, !43, i64 1088, !43, i64 1208, !43, i64 1328, !6, i64 1448}
!34 = !{!"InnerSolveAttributes_t", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !7, i64 32, !7, i64 48, !7, i64 64, !7, i64 96, !7, i64 112, !7, i64 128, !7, i64 144, !7, i64 160, !7, i64 176, !10, i64 192, !13, i64 200, !13, i64 204, !13, i64 208, !13, i64 212, !13, i64 216, !7, i64 220, !13, i64 228, !13, i64 232}
!35 = !{!"OuterSolveAttributes_t", !13, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !36, i64 152, !36, i64 153, !36, i64 154, !13, i64 156, !13, i64 160, !13, i64 164}
!36 = !{!"_Bool", !7, i64 0}
!37 = !{!"DomainOptions_t", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !36, i64 32, !36, i64 33, !13, i64 36}
!38 = !{!"Vessel_t", !39, i64 0, !6, i64 120, !6, i64 128, !6, i64 136, !41, i64 144, !41, i64 264, !42, i64 384}
!39 = !{!"EulerAngle_t", !40, i64 0, !40, i64 40, !40, i64 80}
!40 = !{!"VarType_t", !6, i64 0, !6, i64 8, !10, i64 16, !36, i64 24, !36, i64 25, !13, i64 28, !13, i64 32}
!41 = !{!"Point_t", !40, i64 0, !40, i64 40, !40, i64 80}
!42 = !{!"Force_t", !40, i64 0, !40, i64 40, !40, i64 80}
!43 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !6, i64 32, !13, i64 40, !13, i64 44, !13, i64 48, !6, i64 56, !44, i64 64}
!44 = !{!"list_attributes_s", !6, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}


; 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.Fd_t = type { ptr, ptr, ptr, ptr, ptr, ptr }

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

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

declare void @map_reset_universal_error(ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare i32 @line_solve_sequence(ptr noundef, ptr noundef, float noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @node_solve_sequence(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, float noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local noalias noundef ptr @map_linearize_matrix(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, double noundef %5, ptr noundef %6, ptr noundef %7) local_unnamed_addr #4 {
  %9 = alloca %struct.Fd_t, align 8
  %10 = load ptr, ptr %2, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 16
  %12 = load i32, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %9) #7
  tail call void @map_reset_universal_error(ptr noundef %7, ptr noundef %6) #7
  %13 = tail call noalias dereferenceable_or_null(48) ptr @malloc(i64 noundef 48) #8
  %calloc = tail call dereferenceable_or_null(48) ptr @calloc(i64 1, i64 48)
  store ptr %calloc, ptr %13, align 8, !tbaa !13
  %calloc258 = tail call dereferenceable_or_null(48) ptr @calloc(i64 1, i64 48)
  %14 = getelementptr inbounds i8, ptr %13, i64 8
  store ptr %calloc258, ptr %14, align 8, !tbaa !13
  %calloc259 = tail call dereferenceable_or_null(48) ptr @calloc(i64 1, i64 48)
  %15 = getelementptr inbounds i8, ptr %13, i64 16
  store ptr %calloc259, ptr %15, align 8, !tbaa !13
  %calloc260 = tail call dereferenceable_or_null(48) ptr @calloc(i64 1, i64 48)
  %16 = getelementptr inbounds i8, ptr %13, i64 24
  store ptr %calloc260, ptr %16, align 8, !tbaa !13
  %calloc261 = tail call dereferenceable_or_null(48) ptr @calloc(i64 1, i64 48)
  %17 = getelementptr inbounds i8, ptr %13, i64 32
  store ptr %calloc261, ptr %17, align 8, !tbaa !13
  %calloc262 = tail call dereferenceable_or_null(48) ptr @calloc(i64 1, i64 48)
  %18 = getelementptr inbounds i8, ptr %13, i64 40
  store ptr %calloc262, ptr %18, align 8, !tbaa !13
  %19 = sext i32 %12 to i64
  %20 = shl nsw i64 %19, 3
  %21 = tail call noalias ptr @malloc(i64 noundef %20) #8
  store ptr %21, ptr %9, align 8, !tbaa !14
  %22 = tail call noalias ptr @malloc(i64 noundef %20) #8
  %23 = getelementptr inbounds i8, ptr %9, i64 8
  store ptr %22, ptr %23, align 8, !tbaa !16
  %24 = tail call noalias ptr @malloc(i64 noundef %20) #8
  %25 = getelementptr inbounds i8, ptr %9, i64 16
  store ptr %24, ptr %25, align 8, !tbaa !17
  %26 = tail call noalias ptr @malloc(i64 noundef %20) #8
  %27 = getelementptr inbounds i8, ptr %9, i64 24
  store ptr %26, ptr %27, align 8, !tbaa !18
  %28 = tail call noalias ptr @malloc(i64 noundef %20) #8
  %29 = getelementptr inbounds i8, ptr %9, i64 32
  store ptr %28, ptr %29, align 8, !tbaa !19
  %30 = tail call noalias ptr @malloc(i64 noundef %20) #8
  %31 = getelementptr inbounds i8, ptr %9, i64 40
  store ptr %30, ptr %31, align 8, !tbaa !20
  %32 = tail call noalias ptr @malloc(i64 noundef %20) #8
  %33 = ptrtoint ptr %32 to i64
  %34 = tail call noalias ptr @malloc(i64 noundef %20) #8
  %35 = ptrtoint ptr %34 to i64
  %36 = tail call noalias ptr @malloc(i64 noundef %20) #8
  %37 = ptrtoint ptr %36 to i64
  %38 = icmp sgt i32 %12, 0
  br i1 %38, label %.lr.ph251, label %.preheader.preheader

.lr.ph251:                                        ; preds = %8
  %39 = zext nneg i32 %12 to i64
  %40 = shl nuw nsw i64 %39, 3
  tail call void @llvm.memset.p0.i64(ptr align 8 %21, i8 0, i64 %40, i1 false), !tbaa !21
  tail call void @llvm.memset.p0.i64(ptr align 8 %22, i8 0, i64 %40, i1 false), !tbaa !21
  tail call void @llvm.memset.p0.i64(ptr align 8 %24, i8 0, i64 %40, i1 false), !tbaa !21
  tail call void @llvm.memset.p0.i64(ptr align 8 %26, i8 0, i64 %40, i1 false), !tbaa !21
  tail call void @llvm.memset.p0.i64(ptr align 8 %28, i8 0, i64 %40, i1 false), !tbaa !21
  tail call void @llvm.memset.p0.i64(ptr align 8 %30, i8 0, i64 %40, i1 false), !tbaa !21
  tail call void @llvm.memset.p0.i64(ptr align 8 %32, i8 0, i64 %40, i1 false), !tbaa !21
  tail call void @llvm.memset.p0.i64(ptr align 8 %34, i8 0, i64 %40, i1 false), !tbaa !21
  tail call void @llvm.memset.p0.i64(ptr align 8 %36, i8 0, i64 %40, i1 false), !tbaa !21
  %41 = getelementptr inbounds i8, ptr %0, i64 8
  %42 = load ptr, ptr %41, align 8, !tbaa !23
  %43 = getelementptr inbounds i8, ptr %0, i64 24
  %44 = load ptr, ptr %43, align 8, !tbaa !24
  %45 = getelementptr inbounds i8, ptr %0, i64 40
  %46 = load ptr, ptr %45, align 8, !tbaa !25
  %wide.trip.count = zext nneg i32 %12 to i64
  %min.iters.check = icmp ult i32 %12, 44
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph251
  %47 = ptrtoint ptr %46 to i64
  %48 = ptrtoint ptr %44 to i64
  %49 = ptrtoint ptr %42 to i64
  %50 = sub i64 %35, %33
  %diff.check = icmp ult i64 %50, 32
  %51 = sub i64 %37, %33
  %diff.check263 = icmp ult i64 %51, 32
  %conflict.rdx = or i1 %diff.check, %diff.check263
  %52 = sub i64 %33, %49
  %diff.check264 = icmp ult i64 %52, 32
  %conflict.rdx265 = or i1 %conflict.rdx, %diff.check264
  %53 = sub i64 %48, %33
  %diff.check266 = icmp ult i64 %53, 32
  %conflict.rdx267 = or i1 %conflict.rdx265, %diff.check266
  %54 = sub i64 %47, %33
  %diff.check268 = icmp ult i64 %54, 32
  %conflict.rdx269 = or i1 %conflict.rdx267, %diff.check268
  %55 = sub i64 %37, %35
  %diff.check270 = icmp ult i64 %55, 32
  %conflict.rdx271 = or i1 %conflict.rdx269, %diff.check270
  %56 = sub i64 %35, %49
  %diff.check272 = icmp ult i64 %56, 32
  %conflict.rdx273 = or i1 %conflict.rdx271, %diff.check272
  %57 = sub i64 %35, %48
  %diff.check274 = icmp ult i64 %57, 32
  %conflict.rdx275 = or i1 %conflict.rdx273, %diff.check274
  %58 = sub i64 %47, %35
  %diff.check276 = icmp ult i64 %58, 32
  %conflict.rdx277 = or i1 %conflict.rdx275, %diff.check276
  %59 = sub i64 %37, %49
  %diff.check278 = icmp ult i64 %59, 32
  %conflict.rdx279 = or i1 %conflict.rdx277, %diff.check278
  %60 = sub i64 %37, %48
  %diff.check280 = icmp ult i64 %60, 32
  %conflict.rdx281 = or i1 %conflict.rdx279, %diff.check280
  %61 = sub i64 %37, %47
  %diff.check282 = icmp ult i64 %61, 32
  %conflict.rdx283 = or i1 %conflict.rdx281, %diff.check282
  br i1 %conflict.rdx283, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %62 = getelementptr inbounds double, ptr %42, i64 %index
  %63 = getelementptr inbounds i8, ptr %62, i64 16
  %wide.load = load <2 x double>, ptr %62, align 8, !tbaa !21
  %wide.load284 = load <2 x double>, ptr %63, align 8, !tbaa !21
  %64 = getelementptr inbounds double, ptr %32, i64 %index
  %65 = getelementptr inbounds i8, ptr %64, i64 16
  store <2 x double> %wide.load, ptr %64, align 8, !tbaa !21
  store <2 x double> %wide.load284, ptr %65, align 8, !tbaa !21
  %66 = getelementptr inbounds double, ptr %44, i64 %index
  %67 = getelementptr inbounds i8, ptr %66, i64 16
  %wide.load285 = load <2 x double>, ptr %66, align 8, !tbaa !21
  %wide.load286 = load <2 x double>, ptr %67, align 8, !tbaa !21
  %68 = getelementptr inbounds double, ptr %34, i64 %index
  %69 = getelementptr inbounds i8, ptr %68, i64 16
  store <2 x double> %wide.load285, ptr %68, align 8, !tbaa !21
  store <2 x double> %wide.load286, ptr %69, align 8, !tbaa !21
  %70 = getelementptr inbounds double, ptr %46, i64 %index
  %71 = getelementptr inbounds i8, ptr %70, i64 16
  %wide.load287 = load <2 x double>, ptr %70, align 8, !tbaa !21
  %wide.load288 = load <2 x double>, ptr %71, align 8, !tbaa !21
  %72 = getelementptr inbounds double, ptr %36, i64 %index
  %73 = getelementptr inbounds i8, ptr %72, i64 16
  store <2 x double> %wide.load287, ptr %72, align 8, !tbaa !21
  store <2 x double> %wide.load288, ptr %73, align 8, !tbaa !21
  %index.next = add nuw i64 %index, 4
  %74 = icmp eq i64 %index.next, %n.vec
  br i1 %74, label %middle.block, label %vector.body, !llvm.loop !26

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.preheader.preheader, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph251
  %indvars.iv.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph251 ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %wide.trip.count, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %75 = getelementptr inbounds double, ptr %42, i64 %indvars.iv.ph
  %76 = load double, ptr %75, align 8, !tbaa !21
  %77 = getelementptr inbounds double, ptr %32, i64 %indvars.iv.ph
  store double %76, ptr %77, align 8, !tbaa !21
  %78 = getelementptr inbounds double, ptr %44, i64 %indvars.iv.ph
  %79 = load double, ptr %78, align 8, !tbaa !21
  %80 = getelementptr inbounds double, ptr %34, i64 %indvars.iv.ph
  store double %79, ptr %80, align 8, !tbaa !21
  %81 = getelementptr inbounds double, ptr %46, i64 %indvars.iv.ph
  %82 = load double, ptr %81, align 8, !tbaa !21
  %83 = getelementptr inbounds double, ptr %36, i64 %indvars.iv.ph
  store double %82, ptr %83, align 8, !tbaa !21
  %indvars.iv.next.prol = or disjoint i64 %indvars.iv.ph, 1
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %84 = add nsw i64 %wide.trip.count, -1
  %85 = icmp eq i64 %indvars.iv.ph, %84
  br i1 %85, label %.preheader.preheader, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %86 = getelementptr inbounds double, ptr %42, i64 %indvars.iv
  %87 = load double, ptr %86, align 8, !tbaa !21
  %88 = getelementptr inbounds double, ptr %32, i64 %indvars.iv
  store double %87, ptr %88, align 8, !tbaa !21
  %89 = getelementptr inbounds double, ptr %44, i64 %indvars.iv
  %90 = load double, ptr %89, align 8, !tbaa !21
  %91 = getelementptr inbounds double, ptr %34, i64 %indvars.iv
  store double %90, ptr %91, align 8, !tbaa !21
  %92 = getelementptr inbounds double, ptr %46, i64 %indvars.iv
  %93 = load double, ptr %92, align 8, !tbaa !21
  %94 = getelementptr inbounds double, ptr %36, i64 %indvars.iv
  store double %93, ptr %94, align 8, !tbaa !21
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %95 = getelementptr inbounds double, ptr %42, i64 %indvars.iv.next
  %96 = load double, ptr %95, align 8, !tbaa !21
  %97 = getelementptr inbounds double, ptr %32, i64 %indvars.iv.next
  store double %96, ptr %97, align 8, !tbaa !21
  %98 = getelementptr inbounds double, ptr %44, i64 %indvars.iv.next
  %99 = load double, ptr %98, align 8, !tbaa !21
  %100 = getelementptr inbounds double, ptr %34, i64 %indvars.iv.next
  store double %99, ptr %100, align 8, !tbaa !21
  %101 = getelementptr inbounds double, ptr %46, i64 %indvars.iv.next
  %102 = load double, ptr %101, align 8, !tbaa !21
  %103 = getelementptr inbounds double, ptr %36, i64 %indvars.iv.next
  store double %102, ptr %103, align 8, !tbaa !21
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond.not.1, label %.preheader.preheader, label %scalar.ph, !llvm.loop !30

.preheader.preheader:                             ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %8
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %136
  %.2252 = phi i32 [ %137, %136 ], [ 0, %.preheader.preheader ]
  %104 = load ptr, ptr %9, align 8, !tbaa !14
  %105 = load ptr, ptr %23, align 8, !tbaa !16
  %106 = load ptr, ptr %25, align 8, !tbaa !17
  %107 = load ptr, ptr %27, align 8, !tbaa !18
  %108 = load ptr, ptr %29, align 8, !tbaa !19
  %109 = load ptr, ptr %31, align 8, !tbaa !20
  %110 = call i32 @reset_force_to_zero(ptr noundef %104, ptr noundef %105, ptr noundef %106, ptr noundef %107, ptr noundef %108, ptr noundef %109, i32 noundef %12) #7
  switch i32 %.2252, label %default.unreachable [
    i32 0, label %111
    i32 1, label %116
    i32 2, label %120
    i32 3, label %124
    i32 4, label %128
    i32 5, label %132
  ]

111:                                              ; preds = %.preheader
  %112 = call i32 @fd_x_sequence(ptr noundef nonnull %2, ptr noundef %1, ptr noundef %0, ptr noundef %3, ptr noundef %4, ptr noundef nonnull %9, double noundef %5, i32 noundef %12, ptr noundef %32, ptr noundef %7, ptr noundef %6) #7
  %.not236 = icmp eq i32 %112, 0
  br i1 %.not236, label %113, label %.loopexit.sink.split

113:                                              ; preds = %111
  %114 = load ptr, ptr %13, align 8, !tbaa !13
  %115 = call i32 @calculate_stiffness(ptr noundef %114, ptr noundef nonnull %9, double noundef %5, i32 noundef %12) #7
  %.not237 = icmp eq i32 %115, 0
  br i1 %.not237, label %136, label %.loopexit.sink.split

116:                                              ; preds = %.preheader
  %117 = call i32 @fd_y_sequence(ptr noundef nonnull %2, ptr noundef %1, ptr noundef %0, ptr noundef %3, ptr noundef %4, ptr noundef nonnull %9, double noundef %5, i32 noundef %12, ptr noundef %34, ptr noundef %7, ptr noundef %6) #7
  %.not234 = icmp eq i32 %117, 0
  br i1 %.not234, label %118, label %.loopexit.sink.split

118:                                              ; preds = %116
  %119 = call i32 @calculate_stiffness(ptr noundef nonnull %calloc258, ptr noundef nonnull %9, double noundef %5, i32 noundef %12) #7
  %.not235 = icmp eq i32 %119, 0
  br i1 %.not235, label %136, label %.loopexit.sink.split

120:                                              ; preds = %.preheader
  %121 = call i32 @fd_z_sequence(ptr noundef nonnull %2, ptr noundef %1, ptr noundef %0, ptr noundef %3, ptr noundef %4, ptr noundef nonnull %9, double noundef %5, i32 noundef %12, ptr noundef %36, ptr noundef %7, ptr noundef %6) #7
  %.not232 = icmp eq i32 %121, 0
  br i1 %.not232, label %122, label %.loopexit.sink.split

122:                                              ; preds = %120
  %123 = call i32 @calculate_stiffness(ptr noundef nonnull %calloc259, ptr noundef nonnull %9, double noundef %5, i32 noundef %12) #7
  %.not233 = icmp eq i32 %123, 0
  br i1 %.not233, label %136, label %.loopexit.sink.split

124:                                              ; preds = %.preheader
  %125 = call i32 @fd_phi_sequence(ptr noundef nonnull %2, ptr noundef %1, ptr noundef %0, ptr noundef %3, ptr noundef %4, ptr noundef nonnull %9, double noundef %5, i32 noundef %12, ptr noundef %32, ptr noundef %34, ptr noundef %36, ptr noundef %7, ptr noundef %6) #7
  %.not230 = icmp eq i32 %125, 0
  br i1 %.not230, label %126, label %.loopexit.sink.split

126:                                              ; preds = %124
  %127 = call i32 @calculate_stiffness(ptr noundef nonnull %calloc260, ptr noundef nonnull %9, double noundef %5, i32 noundef %12) #7
  %.not231 = icmp eq i32 %127, 0
  br i1 %.not231, label %136, label %.loopexit.sink.split

128:                                              ; preds = %.preheader
  %129 = call i32 @fd_the_sequence(ptr noundef nonnull %2, ptr noundef %1, ptr noundef %0, ptr noundef %3, ptr noundef %4, ptr noundef nonnull %9, double noundef %5, i32 noundef %12, ptr noundef %32, ptr noundef %34, ptr noundef %36, ptr noundef %7, ptr noundef %6) #7
  %.not228 = icmp eq i32 %129, 0
  br i1 %.not228, label %130, label %.loopexit.sink.split

130:                                              ; preds = %128
  %131 = call i32 @calculate_stiffness(ptr noundef nonnull %calloc261, ptr noundef nonnull %9, double noundef %5, i32 noundef %12) #7
  %.not229 = icmp eq i32 %131, 0
  br i1 %.not229, label %136, label %.loopexit.sink.split

132:                                              ; preds = %.preheader
  %133 = call i32 @fd_psi_sequence(ptr noundef nonnull %2, ptr noundef %1, ptr noundef %0, ptr noundef %3, ptr noundef %4, ptr noundef nonnull %9, double noundef %5, i32 noundef %12, ptr noundef %32, ptr noundef %34, ptr noundef %36, ptr noundef %7, ptr noundef %6) #7
  %.not = icmp eq i32 %133, 0
  br i1 %.not, label %134, label %.loopexit.sink.split

134:                                              ; preds = %132
  %135 = call i32 @calculate_stiffness(ptr noundef nonnull %calloc262, ptr noundef nonnull %9, double noundef %5, i32 noundef %12) #7
  %.not227 = icmp eq i32 %135, 0
  br i1 %.not227, label %.loopexit, label %.loopexit.sink.split

default.unreachable:                              ; preds = %.preheader
  unreachable

136:                                              ; preds = %113, %122, %130, %126, %118
  %137 = add nuw nsw i32 %.2252, 1
  br label %.preheader

.loopexit.sink.split:                             ; preds = %130, %128, %126, %124, %122, %120, %118, %116, %113, %111, %134, %132
  %.sink = phi i32 [ 67, %132 ], [ 67, %134 ], [ 62, %111 ], [ 62, %113 ], [ 63, %116 ], [ 63, %118 ], [ 64, %120 ], [ 64, %122 ], [ 65, %124 ], [ 65, %126 ], [ 66, %128 ], [ 66, %130 ]
  call void @set_universal_error(ptr noundef %7, ptr noundef %6, i32 noundef %.sink) #7
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.sink.split, %134
  %138 = load ptr, ptr %9, align 8, !tbaa !14
  %139 = load ptr, ptr %23, align 8, !tbaa !16
  %140 = load ptr, ptr %25, align 8, !tbaa !17
  %141 = load ptr, ptr %27, align 8, !tbaa !18
  %142 = load ptr, ptr %29, align 8, !tbaa !19
  %143 = load ptr, ptr %31, align 8, !tbaa !20
  %144 = call i32 @reset_force_to_zero(ptr noundef %138, ptr noundef %139, ptr noundef %140, ptr noundef %141, ptr noundef %142, ptr noundef %143, i32 noundef %12) #7
  %145 = getelementptr inbounds i8, ptr %0, i64 8
  %146 = load ptr, ptr %145, align 8, !tbaa !23
  %147 = call i32 @restore_original_displacement(ptr noundef %146, ptr noundef %32, i32 noundef %12) #7
  %148 = getelementptr inbounds i8, ptr %0, i64 24
  %149 = load ptr, ptr %148, align 8, !tbaa !24
  %150 = call i32 @restore_original_displacement(ptr noundef %149, ptr noundef %34, i32 noundef %12) #7
  %151 = getelementptr inbounds i8, ptr %0, i64 40
  %152 = load ptr, ptr %151, align 8, !tbaa !25
  %153 = call i32 @restore_original_displacement(ptr noundef %152, ptr noundef %36, i32 noundef %12) #7
  %154 = getelementptr inbounds i8, ptr %10, i64 456
  %155 = load i32, ptr %154, align 8, !tbaa !31
  %156 = icmp eq i32 %155, 0
  br i1 %156, label %157, label %159

157:                                              ; preds = %.loopexit
  %158 = call i32 @line_solve_sequence(ptr noundef nonnull %10, ptr noundef %1, float noundef 0.000000e+00, ptr noundef %7, ptr noundef %6) #7
  br label %161

159:                                              ; preds = %.loopexit
  %160 = call i32 @node_solve_sequence(ptr noundef nonnull %10, ptr noundef %1, ptr noundef nonnull %0, ptr noundef %4, ptr noundef nonnull %2, float noundef 0xC08F3F3340000000, ptr noundef %7, ptr noundef %6) #7
  br label %161

161:                                              ; preds = %159, %157
  %162 = load ptr, ptr %9, align 8, !tbaa !14
  %.not238 = icmp eq ptr %162, null
  br i1 %.not238, label %164, label %163

163:                                              ; preds = %161
  call void @free(ptr noundef nonnull %162) #7
  store ptr null, ptr %9, align 8, !tbaa !14
  br label %164

164:                                              ; preds = %163, %161
  %165 = load ptr, ptr %23, align 8, !tbaa !16
  %.not239 = icmp eq ptr %165, null
  br i1 %.not239, label %167, label %166

166:                                              ; preds = %164
  call void @free(ptr noundef nonnull %165) #7
  store ptr null, ptr %23, align 8, !tbaa !16
  br label %167

167:                                              ; preds = %166, %164
  %168 = load ptr, ptr %25, align 8, !tbaa !17
  %.not240 = icmp eq ptr %168, null
  br i1 %.not240, label %170, label %169

169:                                              ; preds = %167
  call void @free(ptr noundef nonnull %168) #7
  store ptr null, ptr %25, align 8, !tbaa !17
  br label %170

170:                                              ; preds = %169, %167
  %171 = load ptr, ptr %27, align 8, !tbaa !18
  %.not241 = icmp eq ptr %171, null
  br i1 %.not241, label %173, label %172

172:                                              ; preds = %170
  call void @free(ptr noundef nonnull %171) #7
  store ptr null, ptr %27, align 8, !tbaa !18
  br label %173

173:                                              ; preds = %172, %170
  %174 = load ptr, ptr %29, align 8, !tbaa !19
  %.not242 = icmp eq ptr %174, null
  br i1 %.not242, label %176, label %175

175:                                              ; preds = %173
  call void @free(ptr noundef nonnull %174) #7
  store ptr null, ptr %29, align 8, !tbaa !19
  br label %176

176:                                              ; preds = %175, %173
  %177 = load ptr, ptr %31, align 8, !tbaa !20
  %.not243 = icmp eq ptr %177, null
  br i1 %.not243, label %179, label %178

178:                                              ; preds = %176
  call void @free(ptr noundef nonnull %177) #7
  br label %179

179:                                              ; preds = %178, %176
  %.not244 = icmp eq ptr %32, null
  br i1 %.not244, label %181, label %180

180:                                              ; preds = %179
  call void @free(ptr noundef nonnull %32) #7
  br label %181

181:                                              ; preds = %180, %179
  %.not245 = icmp eq ptr %34, null
  br i1 %.not245, label %183, label %182

182:                                              ; preds = %181
  call void @free(ptr noundef nonnull %34) #7
  br label %183

183:                                              ; preds = %182, %181
  %.not246 = icmp eq ptr %36, null
  br i1 %.not246, label %185, label %184

184:                                              ; preds = %183
  call void @free(ptr noundef nonnull %36) #7
  br label %185

185:                                              ; preds = %184, %183
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #7
  ret ptr %13
}

declare i32 @reset_force_to_zero(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare i32 @fd_x_sequence(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @calculate_stiffness(ptr noundef, ptr noundef, double noundef, i32 noundef) local_unnamed_addr #1

declare i32 @fd_y_sequence(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @fd_z_sequence(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @fd_phi_sequence(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @fd_the_sequence(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @fd_psi_sequence(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, double noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @restore_original_displacement(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }

!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 = !{!"MAP_OtherStateType", !7, i64 0, !7, i64 8, !10, i64 16, !7, i64 24, !10, i64 32, !7, i64 40, !10, i64 48, !7, i64 56, !10, i64 64, !7, i64 72, !10, i64 80, !7, i64 88, !10, i64 96, !7, i64 104, !10, i64 112, !7, i64 120, !10, i64 128, !7, i64 136, !10, i64 144, !7, i64 152, !10, i64 160, !7, i64 168, !10, i64 176, !7, i64 184, !10, i64 192, !7, i64 200, !10, i64 208, !7, i64 216, !10, i64 224, !7, i64 232, !10, i64 240, !7, i64 248, !10, i64 256}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"MAP_InputType", !7, i64 0, !7, i64 8, !10, i64 16, !7, i64 24, !10, i64 32, !7, i64 40, !10, i64 48}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !7, i64 0}
!15 = !{!"Fd_t", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!16 = !{!15, !7, i64 8}
!17 = !{!15, !7, i64 16}
!18 = !{!15, !7, i64 24}
!19 = !{!15, !7, i64 32}
!20 = !{!15, !7, i64 40}
!21 = !{!22, !22, i64 0}
!22 = !{!"double", !8, i64 0}
!23 = !{!12, !7, i64 8}
!24 = !{!12, !7, i64 24}
!25 = !{!12, !7, i64 40}
!26 = distinct !{!26, !27, !28, !29}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!"llvm.loop.isvectorized", i32 1}
!29 = !{!"llvm.loop.unroll.runtime.disable"}
!30 = distinct !{!30, !27, !28}
!31 = !{!32, !10, i64 456}
!32 = !{!"Domain_t", !33, i64 0, !34, i64 240, !36, i64 408, !7, i64 448, !10, i64 456, !37, i64 464, !42, i64 968, !42, i64 1088, !42, i64 1208, !42, i64 1328, !7, i64 1448}
!33 = !{!"InnerSolveAttributes_t", !7, i64 0, !22, i64 8, !22, i64 16, !22, i64 24, !8, i64 32, !8, i64 48, !8, i64 64, !8, i64 96, !8, i64 112, !8, i64 128, !8, i64 144, !8, i64 160, !8, i64 176, !22, i64 192, !10, i64 200, !10, i64 204, !10, i64 208, !10, i64 212, !10, i64 216, !8, i64 220, !10, i64 228, !10, i64 232}
!34 = !{!"OuterSolveAttributes_t", !10, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !22, i64 104, !22, i64 112, !22, i64 120, !22, i64 128, !22, i64 136, !22, i64 144, !35, i64 152, !35, i64 153, !35, i64 154, !10, i64 156, !10, i64 160, !10, i64 164}
!35 = !{!"_Bool", !8, i64 0}
!36 = !{!"DomainOptions_t", !7, i64 0, !22, i64 8, !22, i64 16, !22, i64 24, !35, i64 32, !35, i64 33, !10, i64 36}
!37 = !{!"Vessel_t", !38, i64 0, !7, i64 120, !7, i64 128, !7, i64 136, !40, i64 144, !40, i64 264, !41, i64 384}
!38 = !{!"EulerAngle_t", !39, i64 0, !39, i64 40, !39, i64 80}
!39 = !{!"VarType_t", !7, i64 0, !7, i64 8, !22, i64 16, !35, i64 24, !35, i64 25, !10, i64 28, !10, i64 32}
!40 = !{!"Point_t", !39, i64 0, !39, i64 40, !39, i64 80}
!41 = !{!"Force_t", !39, i64 0, !39, i64 40, !39, i64 80}
!42 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !7, i64 56, !43, i64 64}
!43 = !{!"list_attributes_s", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !7, i64 40, !7, i64 48}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopIdiomRecognizePass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass