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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @line_solve_sequence(ptr noundef, ptr noundef, float noundef, ptr noundef, ptr noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @node_solve_sequence(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, float noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @increment_dof_by_delta(ptr noundef, double noundef, i32 noundef) #1

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

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

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

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

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

33:                                               ; preds = %11
  %34 = load ptr, ptr %15, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.MAP_InputType, ptr %34, i32 0, i32 1
  %36 = load ptr, ptr %35, align 8, !tbaa !15
  %37 = load double, ptr %19, align 8, !tbaa !9
  %38 = fneg double %37
  %39 = load i32, ptr %20, align 4, !tbaa !11
  %40 = call i32 @increment_dof_by_delta(ptr noundef %36, double noundef %38, i32 noundef %39)
  store i32 %40, ptr %24, align 4, !tbaa !11
  %41 = load i32, ptr %24, align 4, !tbaa !11
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %43, label %46

43:                                               ; preds = %33
  %44 = load ptr, ptr %22, align 8, !tbaa !5
  %45 = load ptr, ptr %23, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %44, ptr noundef %45, i32 noundef 61)
  br label %246

46:                                               ; preds = %33
  %47 = load ptr, ptr %25, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.Domain_t, ptr %47, i32 0, i32 4
  %49 = load i32, ptr %48, align 8, !tbaa !17
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %57

51:                                               ; preds = %46
  %52 = load ptr, ptr %25, align 8, !tbaa !5
  %53 = load ptr, ptr %14, align 8, !tbaa !5
  %54 = load ptr, ptr %22, align 8, !tbaa !5
  %55 = load ptr, ptr %23, align 8, !tbaa !5
  %56 = call i32 @line_solve_sequence(ptr noundef %52, ptr noundef %53, float noundef 0.000000e+00, ptr noundef %54, ptr noundef %55)
  store i32 %56, ptr %24, align 4, !tbaa !11
  br label %66

57:                                               ; preds = %46
  %58 = load ptr, ptr %25, align 8, !tbaa !5
  %59 = load ptr, ptr %14, align 8, !tbaa !5
  %60 = load ptr, ptr %15, align 8, !tbaa !5
  %61 = load ptr, ptr %17, align 8, !tbaa !5
  %62 = load ptr, ptr %13, align 8, !tbaa !5
  %63 = load ptr, ptr %22, align 8, !tbaa !5
  %64 = load ptr, ptr %23, align 8, !tbaa !5
  %65 = call i32 @node_solve_sequence(ptr noundef %58, ptr noundef %59, ptr noundef %60, ptr noundef %61, ptr noundef %62, float noundef 0xC08F3F3340000000, ptr noundef %63, ptr noundef %64)
  store i32 %65, ptr %24, align 4, !tbaa !11
  br label %66

66:                                               ; preds = %57, %51
  %67 = load ptr, ptr %16, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.MAP_OutputType, ptr %67, i32 0, i32 1
  %69 = load ptr, ptr %68, align 8, !tbaa !30
  %70 = load ptr, ptr %18, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.Fd_t, ptr %70, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8, !tbaa !32
  %73 = load i32, ptr %20, align 4, !tbaa !11
  %74 = call i32 @set_force_plus(ptr noundef %69, ptr noundef %72, i32 noundef %73)
  store i32 %74, ptr %24, align 4, !tbaa !11
  %75 = load i32, ptr %24, align 4, !tbaa !11
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %77, label %80

77:                                               ; preds = %66
  %78 = load ptr, ptr %22, align 8, !tbaa !5
  %79 = load ptr, ptr %23, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %78, ptr noundef %79, i32 noundef 61)
  br label %246

80:                                               ; preds = %66
  %81 = load ptr, ptr %16, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.MAP_OutputType, ptr %81, i32 0, i32 3
  %83 = load ptr, ptr %82, align 8, !tbaa !34
  %84 = load ptr, ptr %18, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.Fd_t, ptr %84, i32 0, i32 1
  %86 = load ptr, ptr %85, align 8, !tbaa !35
  %87 = load i32, ptr %20, align 4, !tbaa !11
  %88 = call i32 @set_force_plus(ptr noundef %83, ptr noundef %86, i32 noundef %87)
  store i32 %88, ptr %24, align 4, !tbaa !11
  %89 = load i32, ptr %24, align 4, !tbaa !11
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %94

91:                                               ; preds = %80
  %92 = load ptr, ptr %22, align 8, !tbaa !5
  %93 = load ptr, ptr %23, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %92, ptr noundef %93, i32 noundef 61)
  br label %246

94:                                               ; preds = %80
  %95 = load ptr, ptr %16, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.MAP_OutputType, ptr %95, i32 0, i32 5
  %97 = load ptr, ptr %96, align 8, !tbaa !36
  %98 = load ptr, ptr %18, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.Fd_t, ptr %98, i32 0, i32 2
  %100 = load ptr, ptr %99, align 8, !tbaa !37
  %101 = load i32, ptr %20, align 4, !tbaa !11
  %102 = call i32 @set_force_plus(ptr noundef %97, ptr noundef %100, i32 noundef %101)
  store i32 %102, ptr %24, align 4, !tbaa !11
  %103 = load i32, ptr %24, align 4, !tbaa !11
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %108

105:                                              ; preds = %94
  %106 = load ptr, ptr %22, align 8, !tbaa !5
  %107 = load ptr, ptr %23, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %106, ptr noundef %107, i32 noundef 61)
  br label %246

108:                                              ; preds = %94
  %109 = load ptr, ptr %16, align 8, !tbaa !5
  %110 = load ptr, ptr %26, align 8, !tbaa !5
  %111 = load ptr, ptr %18, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.Fd_t, ptr %111, i32 0, i32 3
  %113 = load ptr, ptr %112, align 8, !tbaa !38
  %114 = load ptr, ptr %18, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.Fd_t, ptr %114, i32 0, i32 4
  %116 = load ptr, ptr %115, align 8, !tbaa !39
  %117 = load ptr, ptr %18, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.Fd_t, ptr %117, i32 0, i32 5
  %119 = load ptr, ptr %118, align 8, !tbaa !40
  %120 = load i32, ptr %20, align 4, !tbaa !11
  %121 = call i32 @set_moment_plus(ptr noundef %109, ptr noundef %110, ptr noundef %113, ptr noundef %116, ptr noundef %119, i32 noundef %120)
  store i32 %121, ptr %24, align 4, !tbaa !11
  %122 = load i32, ptr %24, align 4, !tbaa !11
  %123 = icmp ne i32 %122, 0
  br i1 %123, label %124, label %127

124:                                              ; preds = %108
  %125 = load ptr, ptr %22, align 8, !tbaa !5
  %126 = load ptr, ptr %23, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %125, ptr noundef %126, i32 noundef 61)
  br label %246

127:                                              ; preds = %108
  %128 = load ptr, ptr %15, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.MAP_InputType, ptr %128, i32 0, i32 1
  %130 = load ptr, ptr %129, align 8, !tbaa !15
  %131 = load ptr, ptr %21, align 8, !tbaa !5
  %132 = load i32, ptr %20, align 4, !tbaa !11
  %133 = call i32 @restore_original_displacement(ptr noundef %130, ptr noundef %131, i32 noundef %132)
  store i32 %133, ptr %24, align 4, !tbaa !11
  %134 = load i32, ptr %24, align 4, !tbaa !11
  %135 = icmp ne i32 %134, 0
  br i1 %135, label %136, label %139

136:                                              ; preds = %127
  %137 = load ptr, ptr %22, align 8, !tbaa !5
  %138 = load ptr, ptr %23, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %137, ptr noundef %138, i32 noundef 61)
  br label %246

139:                                              ; preds = %127
  %140 = load ptr, ptr %15, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.MAP_InputType, ptr %140, i32 0, i32 1
  %142 = load ptr, ptr %141, align 8, !tbaa !15
  %143 = load double, ptr %19, align 8, !tbaa !9
  %144 = load i32, ptr %20, align 4, !tbaa !11
  %145 = call i32 @increment_dof_by_delta(ptr noundef %142, double noundef %143, i32 noundef %144)
  store i32 %145, ptr %24, align 4, !tbaa !11
  %146 = load i32, ptr %24, align 4, !tbaa !11
  %147 = icmp ne i32 %146, 0
  br i1 %147, label %148, label %151

148:                                              ; preds = %139
  %149 = load ptr, ptr %22, align 8, !tbaa !5
  %150 = load ptr, ptr %23, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %149, ptr noundef %150, i32 noundef 61)
  br label %246

151:                                              ; preds = %139
  %152 = load ptr, ptr %25, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.Domain_t, ptr %152, i32 0, i32 4
  %154 = load i32, ptr %153, align 8, !tbaa !17
  %155 = icmp eq i32 %154, 0
  br i1 %155, label %156, label %162

156:                                              ; preds = %151
  %157 = load ptr, ptr %25, align 8, !tbaa !5
  %158 = load ptr, ptr %14, align 8, !tbaa !5
  %159 = load ptr, ptr %22, align 8, !tbaa !5
  %160 = load ptr, ptr %23, align 8, !tbaa !5
  %161 = call i32 @line_solve_sequence(ptr noundef %157, ptr noundef %158, float noundef 0.000000e+00, ptr noundef %159, ptr noundef %160)
  store i32 %161, ptr %24, align 4, !tbaa !11
  br label %171

162:                                              ; preds = %151
  %163 = load ptr, ptr %25, align 8, !tbaa !5
  %164 = load ptr, ptr %14, align 8, !tbaa !5
  %165 = load ptr, ptr %15, align 8, !tbaa !5
  %166 = load ptr, ptr %17, align 8, !tbaa !5
  %167 = load ptr, ptr %13, align 8, !tbaa !5
  %168 = load ptr, ptr %22, align 8, !tbaa !5
  %169 = load ptr, ptr %23, align 8, !tbaa !5
  %170 = call i32 @node_solve_sequence(ptr noundef %163, ptr noundef %164, ptr noundef %165, ptr noundef %166, ptr noundef %167, float noundef 0xC08F3F3340000000, ptr noundef %168, ptr noundef %169)
  store i32 %170, ptr %24, align 4, !tbaa !11
  br label %171

171:                                              ; preds = %162, %156
  %172 = load ptr, ptr %16, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.MAP_OutputType, ptr %172, i32 0, i32 1
  %174 = load ptr, ptr %173, align 8, !tbaa !30
  %175 = load ptr, ptr %18, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.Fd_t, ptr %175, i32 0, i32 0
  %177 = load ptr, ptr %176, align 8, !tbaa !32
  %178 = load i32, ptr %20, align 4, !tbaa !11
  %179 = call i32 @set_force_minus(ptr noundef %174, ptr noundef %177, i32 noundef %178)
  store i32 %179, ptr %24, align 4, !tbaa !11
  %180 = load i32, ptr %24, align 4, !tbaa !11
  %181 = icmp ne i32 %180, 0
  br i1 %181, label %182, label %185

182:                                              ; preds = %171
  %183 = load ptr, ptr %22, align 8, !tbaa !5
  %184 = load ptr, ptr %23, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %183, ptr noundef %184, i32 noundef 61)
  br label %246

185:                                              ; preds = %171
  %186 = load ptr, ptr %16, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.MAP_OutputType, ptr %186, i32 0, i32 3
  %188 = load ptr, ptr %187, align 8, !tbaa !34
  %189 = load ptr, ptr %18, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.Fd_t, ptr %189, i32 0, i32 1
  %191 = load ptr, ptr %190, align 8, !tbaa !35
  %192 = load i32, ptr %20, align 4, !tbaa !11
  %193 = call i32 @set_force_minus(ptr noundef %188, ptr noundef %191, i32 noundef %192)
  store i32 %193, ptr %24, align 4, !tbaa !11
  %194 = load i32, ptr %24, align 4, !tbaa !11
  %195 = icmp ne i32 %194, 0
  br i1 %195, label %196, label %199

196:                                              ; preds = %185
  %197 = load ptr, ptr %22, align 8, !tbaa !5
  %198 = load ptr, ptr %23, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %197, ptr noundef %198, i32 noundef 61)
  br label %246

199:                                              ; preds = %185
  %200 = load ptr, ptr %16, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.MAP_OutputType, ptr %200, i32 0, i32 5
  %202 = load ptr, ptr %201, align 8, !tbaa !36
  %203 = load ptr, ptr %18, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.Fd_t, ptr %203, i32 0, i32 2
  %205 = load ptr, ptr %204, align 8, !tbaa !37
  %206 = load i32, ptr %20, align 4, !tbaa !11
  %207 = call i32 @set_force_minus(ptr noundef %202, ptr noundef %205, i32 noundef %206)
  store i32 %207, ptr %24, align 4, !tbaa !11
  %208 = load i32, ptr %24, align 4, !tbaa !11
  %209 = icmp ne i32 %208, 0
  br i1 %209, label %210, label %213

210:                                              ; preds = %199
  %211 = load ptr, ptr %22, align 8, !tbaa !5
  %212 = load ptr, ptr %23, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %211, ptr noundef %212, i32 noundef 61)
  br label %246

213:                                              ; preds = %199
  %214 = load ptr, ptr %16, align 8, !tbaa !5
  %215 = load ptr, ptr %26, align 8, !tbaa !5
  %216 = load ptr, ptr %18, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.Fd_t, ptr %216, i32 0, i32 3
  %218 = load ptr, ptr %217, align 8, !tbaa !38
  %219 = load ptr, ptr %18, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.Fd_t, ptr %219, i32 0, i32 4
  %221 = load ptr, ptr %220, align 8, !tbaa !39
  %222 = load ptr, ptr %18, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.Fd_t, ptr %222, i32 0, i32 5
  %224 = load ptr, ptr %223, align 8, !tbaa !40
  %225 = load i32, ptr %20, align 4, !tbaa !11
  %226 = call i32 @set_moment_minus(ptr noundef %214, ptr noundef %215, ptr noundef %218, ptr noundef %221, ptr noundef %224, i32 noundef %225)
  store i32 %226, ptr %24, align 4, !tbaa !11
  %227 = load i32, ptr %24, align 4, !tbaa !11
  %228 = icmp ne i32 %227, 0
  br i1 %228, label %229, label %232

229:                                              ; preds = %213
  %230 = load ptr, ptr %22, align 8, !tbaa !5
  %231 = load ptr, ptr %23, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %230, ptr noundef %231, i32 noundef 61)
  br label %246

232:                                              ; preds = %213
  %233 = load ptr, ptr %15, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.MAP_InputType, ptr %233, i32 0, i32 1
  %235 = load ptr, ptr %234, align 8, !tbaa !15
  %236 = load ptr, ptr %21, align 8, !tbaa !5
  %237 = load i32, ptr %20, align 4, !tbaa !11
  %238 = call i32 @restore_original_displacement(ptr noundef %235, ptr noundef %236, i32 noundef %237)
  store i32 %238, ptr %24, align 4, !tbaa !11
  %239 = load i32, ptr %24, align 4, !tbaa !11
  %240 = icmp ne i32 %239, 0
  br i1 %240, label %241, label %244

241:                                              ; preds = %232
  %242 = load ptr, ptr %22, align 8, !tbaa !5
  %243 = load ptr, ptr %23, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %242, ptr noundef %243, i32 noundef 61)
  br label %246

244:                                              ; preds = %232
  br label %245

245:                                              ; preds = %244
  br label %246

246:                                              ; preds = %245, %241, %229, %210, %196, %182, %148, %136, %124, %105, %91, %77, %43
  %247 = load ptr, ptr %23, align 8, !tbaa !5
  %248 = load i32, ptr %247, align 4, !tbaa !11
  %249 = icmp eq i32 %248, 0
  br i1 %249, label %250, label %251

250:                                              ; preds = %246
  store i32 0, ptr %12, align 4
  store i32 1, ptr %27, align 4
  br label %257

251:                                              ; preds = %246
  %252 = load ptr, ptr %23, align 8, !tbaa !5
  %253 = load i32, ptr %252, align 4, !tbaa !11
  %254 = icmp eq i32 %253, 2
  br i1 %254, label %255, label %256

255:                                              ; preds = %251
  store i32 2, ptr %12, align 4
  store i32 1, ptr %27, align 4
  br label %257

256:                                              ; preds = %251
  store i32 3, ptr %12, align 4
  store i32 1, ptr %27, align 4
  br label %257

257:                                              ; preds = %256, %255, %250
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #3
  %258 = load i32, ptr %12, align 4
  ret i32 %258
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"MAP_OtherStateType", !6, i64 0, !6, i64 8, !12, i64 16, !6, i64 24, !12, i64 32, !6, i64 40, !12, i64 48, !6, i64 56, !12, i64 64, !6, i64 72, !12, i64 80, !6, i64 88, !12, i64 96, !6, i64 104, !12, i64 112, !6, i64 120, !12, i64 128, !6, i64 136, !12, i64 144, !6, i64 152, !12, i64 160, !6, i64 168, !12, i64 176, !6, i64 184, !12, i64 192, !6, i64 200, !12, i64 208, !6, i64 216, !12, i64 224, !6, i64 232, !12, i64 240, !6, i64 248, !12, i64 256}
!15 = !{!16, !6, i64 8}
!16 = !{!"MAP_InputType", !6, i64 0, !6, i64 8, !12, i64 16, !6, i64 24, !12, i64 32, !6, i64 40, !12, i64 48}
!17 = !{!18, !12, i64 456}
!18 = !{!"Domain_t", !19, i64 0, !20, i64 240, !22, i64 408, !6, i64 448, !12, i64 456, !23, i64 464, !28, i64 968, !28, i64 1088, !28, i64 1208, !28, i64 1328, !6, i64 1448}
!19 = !{!"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, !12, i64 200, !12, i64 204, !12, i64 208, !12, i64 212, !12, i64 216, !7, i64 220, !12, i64 228, !12, i64 232}
!20 = !{!"OuterSolveAttributes_t", !12, 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, !21, i64 152, !21, i64 153, !21, i64 154, !12, i64 156, !12, i64 160, !12, i64 164}
!21 = !{!"_Bool", !7, i64 0}
!22 = !{!"DomainOptions_t", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !21, i64 32, !21, i64 33, !12, i64 36}
!23 = !{!"Vessel_t", !24, i64 0, !6, i64 120, !6, i64 128, !6, i64 136, !26, i64 144, !26, i64 264, !27, i64 384}
!24 = !{!"EulerAngle_t", !25, i64 0, !25, i64 40, !25, i64 80}
!25 = !{!"VarType_t", !6, i64 0, !6, i64 8, !10, i64 16, !21, i64 24, !21, i64 25, !12, i64 28, !12, i64 32}
!26 = !{!"Point_t", !25, i64 0, !25, i64 40, !25, i64 80}
!27 = !{!"Force_t", !25, i64 0, !25, i64 40, !25, i64 80}
!28 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !6, i64 32, !12, i64 40, !12, i64 44, !12, i64 48, !6, i64 56, !29, i64 64}
!29 = !{!"list_attributes_s", !6, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!30 = !{!31, !6, i64 8}
!31 = !{!"MAP_OutputType", !6, i64 0, !6, i64 8, !12, i64 16, !6, i64 24, !12, i64 32, !6, i64 40, !12, i64 48, !6, i64 56, !12, i64 64, !6, i64 72, !12, i64 80}
!32 = !{!33, !6, i64 0}
!33 = !{!"Fd_t", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!34 = !{!31, !6, i64 24}
!35 = !{!33, !6, i64 8}
!36 = !{!31, !6, i64 40}
!37 = !{!33, !6, i64 16}
!38 = !{!33, !6, i64 24}
!39 = !{!33, !6, i64 32}
!40 = !{!33, !6, i64 40}


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

; Function Attrs: nounwind uwtable
declare dso_local i32 @line_solve_sequence(ptr noundef, ptr noundef, float noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @node_solve_sequence(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, float noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @increment_dof_by_delta(ptr noundef, double noundef, i32 noundef) local_unnamed_addr #0

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 4) i32 @fd_x_sequence(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr nocapture noundef readonly %5, double noundef %6, i32 noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10) local_unnamed_addr #0 {
  %12 = load ptr, ptr %0, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %12, i64 464
  %14 = getelementptr inbounds i8, ptr %2, i64 8
  %15 = load ptr, ptr %14, align 8, !tbaa !11
  %16 = fneg double %6
  %17 = tail call i32 @increment_dof_by_delta(ptr noundef %15, double noundef %16, i32 noundef %7)
  %.not = icmp eq i32 %17, 0
  br i1 %.not, label %18, label %.sink.split

18:                                               ; preds = %11
  %19 = getelementptr inbounds i8, ptr %12, i64 456
  %20 = load i32, ptr %19, align 8, !tbaa !13
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %22, label %24

22:                                               ; preds = %18
  %23 = tail call i32 @line_solve_sequence(ptr noundef nonnull %12, ptr noundef %1, float noundef 0.000000e+00, ptr noundef %9, ptr noundef %10)
  br label %26

24:                                               ; preds = %18
  %25 = tail call i32 @node_solve_sequence(ptr noundef nonnull %12, ptr noundef %1, ptr noundef nonnull %2, ptr noundef %4, ptr noundef nonnull %0, float noundef 0xC08F3F3340000000, ptr noundef %9, ptr noundef %10)
  br label %26

26:                                               ; preds = %24, %22
  %27 = getelementptr inbounds i8, ptr %3, i64 8
  %28 = load ptr, ptr %27, align 8, !tbaa !27
  %29 = load ptr, ptr %5, align 8, !tbaa !29
  %30 = tail call i32 @set_force_plus(ptr noundef %28, ptr noundef %29, i32 noundef %7)
  %.not107 = icmp eq i32 %30, 0
  br i1 %.not107, label %31, label %.sink.split

31:                                               ; preds = %26
  %32 = getelementptr inbounds i8, ptr %3, i64 24
  %33 = load ptr, ptr %32, align 8, !tbaa !31
  %34 = getelementptr inbounds i8, ptr %5, i64 8
  %35 = load ptr, ptr %34, align 8, !tbaa !32
  %36 = tail call i32 @set_force_plus(ptr noundef %33, ptr noundef %35, i32 noundef %7)
  %.not108 = icmp eq i32 %36, 0
  br i1 %.not108, label %37, label %.sink.split

37:                                               ; preds = %31
  %38 = getelementptr inbounds i8, ptr %3, i64 40
  %39 = load ptr, ptr %38, align 8, !tbaa !33
  %40 = getelementptr inbounds i8, ptr %5, i64 16
  %41 = load ptr, ptr %40, align 8, !tbaa !34
  %42 = tail call i32 @set_force_plus(ptr noundef %39, ptr noundef %41, i32 noundef %7)
  %.not109 = icmp eq i32 %42, 0
  br i1 %.not109, label %43, label %.sink.split

43:                                               ; preds = %37
  %44 = getelementptr inbounds i8, ptr %5, i64 24
  %45 = load ptr, ptr %44, align 8, !tbaa !35
  %46 = getelementptr inbounds i8, ptr %5, i64 32
  %47 = load ptr, ptr %46, align 8, !tbaa !36
  %48 = getelementptr inbounds i8, ptr %5, i64 40
  %49 = load ptr, ptr %48, align 8, !tbaa !37
  %50 = tail call i32 @set_moment_plus(ptr noundef nonnull %3, ptr noundef nonnull %13, ptr noundef %45, ptr noundef %47, ptr noundef %49, i32 noundef %7)
  %.not110 = icmp eq i32 %50, 0
  br i1 %.not110, label %51, label %.sink.split

51:                                               ; preds = %43
  %52 = load ptr, ptr %14, align 8, !tbaa !11
  %53 = tail call i32 @restore_original_displacement(ptr noundef %52, ptr noundef %8, i32 noundef %7)
  %.not111 = icmp eq i32 %53, 0
  br i1 %.not111, label %54, label %.sink.split

54:                                               ; preds = %51
  %55 = load ptr, ptr %14, align 8, !tbaa !11
  %56 = tail call i32 @increment_dof_by_delta(ptr noundef %55, double noundef %6, i32 noundef %7)
  %.not112 = icmp eq i32 %56, 0
  br i1 %.not112, label %57, label %.sink.split

57:                                               ; preds = %54
  %58 = load i32, ptr %19, align 8, !tbaa !13
  %59 = icmp eq i32 %58, 0
  br i1 %59, label %60, label %62

60:                                               ; preds = %57
  %61 = tail call i32 @line_solve_sequence(ptr noundef nonnull %12, ptr noundef %1, float noundef 0.000000e+00, ptr noundef %9, ptr noundef %10)
  br label %64

62:                                               ; preds = %57
  %63 = tail call i32 @node_solve_sequence(ptr noundef nonnull %12, ptr noundef %1, ptr noundef nonnull %2, ptr noundef %4, ptr noundef nonnull %0, float noundef 0xC08F3F3340000000, ptr noundef %9, ptr noundef %10)
  br label %64

64:                                               ; preds = %62, %60
  %65 = load ptr, ptr %27, align 8, !tbaa !27
  %66 = load ptr, ptr %5, align 8, !tbaa !29
  %67 = tail call i32 @set_force_minus(ptr noundef %65, ptr noundef %66, i32 noundef %7)
  %.not113 = icmp eq i32 %67, 0
  br i1 %.not113, label %68, label %.sink.split

68:                                               ; preds = %64
  %69 = load ptr, ptr %32, align 8, !tbaa !31
  %70 = load ptr, ptr %34, align 8, !tbaa !32
  %71 = tail call i32 @set_force_minus(ptr noundef %69, ptr noundef %70, i32 noundef %7)
  %.not114 = icmp eq i32 %71, 0
  br i1 %.not114, label %72, label %.sink.split

72:                                               ; preds = %68
  %73 = load ptr, ptr %38, align 8, !tbaa !33
  %74 = load ptr, ptr %40, align 8, !tbaa !34
  %75 = tail call i32 @set_force_minus(ptr noundef %73, ptr noundef %74, i32 noundef %7)
  %.not115 = icmp eq i32 %75, 0
  br i1 %.not115, label %76, label %.sink.split

76:                                               ; preds = %72
  %77 = load ptr, ptr %44, align 8, !tbaa !35
  %78 = load ptr, ptr %46, align 8, !tbaa !36
  %79 = load ptr, ptr %48, align 8, !tbaa !37
  %80 = tail call i32 @set_moment_minus(ptr noundef nonnull %3, ptr noundef nonnull %13, ptr noundef %77, ptr noundef %78, ptr noundef %79, i32 noundef %7)
  %.not116 = icmp eq i32 %80, 0
  br i1 %.not116, label %81, label %.sink.split

81:                                               ; preds = %76
  %82 = load ptr, ptr %14, align 8, !tbaa !11
  %83 = tail call i32 @restore_original_displacement(ptr noundef %82, ptr noundef %8, i32 noundef %7)
  %.not117 = icmp eq i32 %83, 0
  br i1 %.not117, label %84, label %.sink.split

.sink.split:                                      ; preds = %81, %76, %72, %68, %64, %54, %51, %43, %37, %31, %26, %11
  tail call void @set_universal_error(ptr noundef %9, ptr noundef %10, i32 noundef 61) #2
  br label %84

84:                                               ; preds = %.sink.split, %81
  %85 = load i32, ptr %10, align 4, !tbaa !38
  %switch.selectcmp = icmp eq i32 %85, 2
  %switch.select = select i1 %switch.selectcmp, i32 2, i32 3
  %switch.selectcmp118 = icmp eq i32 %85, 0
  %switch.select119 = select i1 %switch.selectcmp118, i32 0, i32 %switch.select
  ret i32 %switch.select119
}

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

attributes #0 = { 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 #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 }

!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, !7, i64 8}
!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 = !{!14, !10, i64 456}
!14 = !{!"Domain_t", !15, i64 0, !17, i64 240, !19, i64 408, !7, i64 448, !10, i64 456, !20, i64 464, !25, i64 968, !25, i64 1088, !25, i64 1208, !25, i64 1328, !7, i64 1448}
!15 = !{!"InnerSolveAttributes_t", !7, i64 0, !16, i64 8, !16, i64 16, !16, 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, !16, 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}
!16 = !{!"double", !8, i64 0}
!17 = !{!"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, !16, i64 104, !16, i64 112, !16, i64 120, !16, i64 128, !16, i64 136, !16, i64 144, !18, i64 152, !18, i64 153, !18, i64 154, !10, i64 156, !10, i64 160, !10, i64 164}
!18 = !{!"_Bool", !8, i64 0}
!19 = !{!"DomainOptions_t", !7, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !18, i64 32, !18, i64 33, !10, i64 36}
!20 = !{!"Vessel_t", !21, i64 0, !7, i64 120, !7, i64 128, !7, i64 136, !23, i64 144, !23, i64 264, !24, i64 384}
!21 = !{!"EulerAngle_t", !22, i64 0, !22, i64 40, !22, i64 80}
!22 = !{!"VarType_t", !7, i64 0, !7, i64 8, !16, i64 16, !18, i64 24, !18, i64 25, !10, i64 28, !10, i64 32}
!23 = !{!"Point_t", !22, i64 0, !22, i64 40, !22, i64 80}
!24 = !{!"Force_t", !22, i64 0, !22, i64 40, !22, i64 80}
!25 = !{!"", !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, !26, i64 64}
!26 = !{!"list_attributes_s", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !7, i64 40, !7, i64 48}
!27 = !{!28, !7, i64 8}
!28 = !{!"MAP_OutputType", !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}
!29 = !{!30, !7, i64 0}
!30 = !{!"Fd_t", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!31 = !{!28, !7, i64 24}
!32 = !{!30, !7, i64 8}
!33 = !{!28, !7, i64 40}
!34 = !{!30, !7, i64 16}
!35 = !{!30, !7, i64 24}
!36 = !{!30, !7, i64 32}
!37 = !{!30, !7, i64 40}
!38 = !{!10, !10, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass