; LLVM IR from AasmundResell/CFD-Marker-and-Cell :: Marin_Datalab/src/calculateFlowField.ll (Z18calculateFlowFieldddidR5FieldR9Field_Validdi)

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%struct.Field_Val = type { [2500 x double], [2500 x double], [2500 x double], [2601 x double] }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z18calculateFlowFieldddidR5FieldR9Field_Validdi(double noundef %0, double noundef %1, i32 noundef %2, double noundef %3, ptr noundef nonnull align 8 dereferenceable(64896) %4, ptr noundef nonnull align 8 dereferenceable(80808) %5, i32 noundef %6, double noundef %7, double noundef %8, i32 noundef %9) #0 personality ptr @__gxx_personality_v0 {
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = alloca %"class.std::basic_ofstream", align 8
  %27 = alloca %"class.std::basic_ofstream", align 8
  %28 = alloca ptr, align 8
  %29 = alloca i32, align 4
  %30 = alloca %"class.std::basic_ofstream", align 8
  %31 = alloca %"class.std::basic_ofstream", align 8
  %32 = alloca %"class.std::basic_ofstream", align 8
  %33 = alloca %"class.std::basic_ofstream", align 8
  %34 = alloca i64, align 8
  %35 = alloca %struct.Field_Val, align 8
  store double %0, ptr %11, align 8, !tbaa !5
  store double %1, ptr %12, align 8, !tbaa !5
  store i32 %2, ptr %13, align 4, !tbaa !9
  store double %3, ptr %14, align 8, !tbaa !5
  store ptr %4, ptr %15, align 8, !tbaa !11
  store ptr %5, ptr %16, align 8, !tbaa !11
  store i32 %6, ptr %17, align 4, !tbaa !9
  store double %7, ptr %18, align 8, !tbaa !5
  store double %8, ptr %19, align 8, !tbaa !5
  store i32 %9, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  store i32 1, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  %36 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 8) #10
  store double 0.000000e+00, ptr %36, align 8, !tbaa !5
  store ptr %36, ptr %25, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 512, ptr %26) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %26)
  call void @llvm.lifetime.start.p0(i64 512, ptr %27) #9
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %27)
          to label %37 unwind label %60

37:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 512, ptr %30) #9
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %30)
          to label %38 unwind label %64

38:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 512, ptr %31) #9
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %31)
          to label %39 unwind label %68

39:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 512, ptr %32) #9
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %32)
          to label %40 unwind label %72

40:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 512, ptr %33) #9
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %33)
          to label %41 unwind label %76

41:                                               ; preds = %40
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %32, ptr noundef @.str, i32 noundef 16)
          to label %42 unwind label %80

42:                                               ; preds = %41
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %33, ptr noundef @.str.1, i32 noundef 16)
          to label %43 unwind label %80

43:                                               ; preds = %42
  %44 = load ptr, ptr %33, align 8, !tbaa !13
  %45 = getelementptr i8, ptr %44, i64 -24
  %46 = load i64, ptr %45, align 8
  %47 = getelementptr inbounds i8, ptr %33, i64 %46
  %48 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %47)
          to label %49 unwind label %80

49:                                               ; preds = %43
  br i1 %48, label %57, label %50

50:                                               ; preds = %49
  %51 = load ptr, ptr %32, align 8, !tbaa !13
  %52 = getelementptr i8, ptr %51, i64 -24
  %53 = load i64, ptr %52, align 8
  %54 = getelementptr inbounds i8, ptr %32, i64 %53
  %55 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %54)
          to label %56 unwind label %80

56:                                               ; preds = %50
  br i1 %55, label %57, label %84

57:                                               ; preds = %56, %49
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
          to label %59 unwind label %80

59:                                               ; preds = %57
  br label %84

60:                                               ; preds = %10
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %28, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %29, align 4
  br label %209

64:                                               ; preds = %37
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %28, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %29, align 4
  br label %208

68:                                               ; preds = %38
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %28, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %29, align 4
  br label %207

72:                                               ; preds = %39
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %28, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %29, align 4
  br label %206

76:                                               ; preds = %40
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %28, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %29, align 4
  br label %205

80:                                               ; preds = %84, %57, %50, %43, %42, %41
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %28, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %29, align 4
  br label %204

84:                                               ; preds = %59, %56
  invoke void @_Z12makeVTFfilesRSt14basic_ofstreamIcSt11char_traitsIcEES3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(248) %26, ptr noundef nonnull align 8 dereferenceable(248) %27, ptr noundef nonnull align 8 dereferenceable(248) %30, ptr noundef nonnull align 8 dereferenceable(248) %31)
          to label %85 unwind label %80

85:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #9
  %86 = call i64 @clock() #9
  store i64 %86, ptr %34, align 8, !tbaa !15
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %87

87:                                               ; preds = %185, %85
  %88 = load i32, ptr %21, align 4, !tbaa !9
  %89 = sitofp i32 %88 to double
  %90 = load i32, ptr %13, align 4, !tbaa !9
  %91 = sitofp i32 %90 to double
  %92 = load double, ptr %14, align 8, !tbaa !5
  %93 = fdiv double %91, %92
  %94 = fcmp ole double %89, %93
  br i1 %94, label %95, label %188

95:                                               ; preds = %87
  %96 = load double, ptr %12, align 8, !tbaa !5
  %97 = load double, ptr %11, align 8, !tbaa !5
  %98 = load double, ptr %14, align 8, !tbaa !5
  %99 = load ptr, ptr %15, align 8, !tbaa !11
  invoke void @_Z6calVeldddR5Field(double noundef %96, double noundef %97, double noundef %98, ptr noundef nonnull align 8 dereferenceable(64896) %99)
          to label %100 unwind label %111

100:                                              ; preds = %95
  store i32 1, ptr %23, align 4, !tbaa !9
  br label %101

101:                                              ; preds = %139, %100
  %102 = load i32, ptr %23, align 4, !tbaa !9
  %103 = load i32, ptr %17, align 4, !tbaa !9
  %104 = icmp sle i32 %102, %103
  br i1 %104, label %105, label %142

105:                                              ; preds = %101
  %106 = load i32, ptr %20, align 4, !tbaa !9
  %107 = icmp eq i32 %106, 1
  br i1 %107, label %108, label %115

108:                                              ; preds = %105
  %109 = load ptr, ptr %15, align 8, !tbaa !11
  invoke void @_Z11cavityBoxBCR5Field(ptr noundef nonnull align 8 dereferenceable(64896) %109)
          to label %110 unwind label %111

110:                                              ; preds = %108
  br label %115

111:                                              ; preds = %202, %201, %200, %188, %181, %175, %171, %168, %156, %146, %127, %124, %118, %108, %95
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %28, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #9
  br label %204

115:                                              ; preds = %110, %105
  %116 = load i32, ptr %20, align 4, !tbaa !9
  %117 = icmp eq i32 %116, 2
  br i1 %117, label %118, label %121

118:                                              ; preds = %115
  %119 = load ptr, ptr %15, align 8, !tbaa !11
  invoke void @_Z18flowAroundSquareBCR5Field(ptr noundef nonnull align 8 dereferenceable(64896) %119)
          to label %120 unwind label %111

120:                                              ; preds = %118
  br label %121

121:                                              ; preds = %120, %115
  %122 = load i32, ptr %20, align 4, !tbaa !9
  %123 = icmp eq i32 %122, 3
  br i1 %123, label %124, label %127

124:                                              ; preds = %121
  %125 = load ptr, ptr %15, align 8, !tbaa !11
  invoke void @_Z18flowAroundVPlateBCR5Field(ptr noundef nonnull align 8 dereferenceable(64896) %125)
          to label %126 unwind label %111

126:                                              ; preds = %124
  br label %127

127:                                              ; preds = %126, %121
  %128 = load double, ptr %12, align 8, !tbaa !5
  %129 = load double, ptr %14, align 8, !tbaa !5
  %130 = load double, ptr %18, align 8, !tbaa !5
  %131 = load double, ptr %19, align 8, !tbaa !5
  %132 = load ptr, ptr %15, align 8, !tbaa !11
  %133 = load ptr, ptr %25, align 8, !tbaa !11
  invoke void @_Z5piterddddR5FieldRiPd(double noundef %128, double noundef %129, double noundef %130, double noundef %131, ptr noundef nonnull align 8 dereferenceable(64896) %132, ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef %133)
          to label %134 unwind label %111

134:                                              ; preds = %127
  %135 = load i32, ptr %22, align 4, !tbaa !9
  %136 = icmp eq i32 %135, 0
  br i1 %136, label %137, label %138

137:                                              ; preds = %134
  br label %142

138:                                              ; preds = %134
  br label %139

139:                                              ; preds = %138
  %140 = load i32, ptr %23, align 4, !tbaa !9
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %23, align 4, !tbaa !9
  br label %101, !llvm.loop !17

142:                                              ; preds = %137, %101
  %143 = load i32, ptr %23, align 4, !tbaa !9
  %144 = load i32, ptr %17, align 4, !tbaa !9
  %145 = icmp sge i32 %143, %144
  br i1 %145, label %146, label %156

146:                                              ; preds = %142
  %147 = load i32, ptr %21, align 4, !tbaa !9
  %148 = sitofp i32 %147 to double
  %149 = load double, ptr %14, align 8, !tbaa !5
  %150 = fmul double %148, %149
  %151 = load i32, ptr %23, align 4, !tbaa !9
  %152 = load ptr, ptr %25, align 8, !tbaa !11
  %153 = load double, ptr %152, align 8, !tbaa !5
  %154 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3, double noundef %150, i32 noundef %151, double noundef %153)
          to label %155 unwind label %111

155:                                              ; preds = %146
  br label %164

156:                                              ; preds = %142
  %157 = load i32, ptr %21, align 4, !tbaa !9
  %158 = sitofp i32 %157 to double
  %159 = load double, ptr %14, align 8, !tbaa !5
  %160 = fmul double %158, %159
  %161 = load i32, ptr %23, align 4, !tbaa !9
  %162 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.4, double noundef %160, i32 noundef %161)
          to label %163 unwind label %111

163:                                              ; preds = %156
  br label %164

164:                                              ; preds = %163, %155
  %165 = load i32, ptr %21, align 4, !tbaa !9
  %166 = srem i32 %165, 10
  %167 = icmp eq i32 %166, 0
  br i1 %167, label %168, label %181

168:                                              ; preds = %164
  %169 = load ptr, ptr %15, align 8, !tbaa !11
  %170 = load ptr, ptr %16, align 8, !tbaa !11
  invoke void @_Z16calculateAverageRK5FieldR9Field_Val(ptr noundef nonnull align 8 dereferenceable(64896) %169, ptr noundef nonnull align 8 dereferenceable(80808) %170)
          to label %171 unwind label %111

171:                                              ; preds = %168
  %172 = load ptr, ptr %15, align 8, !tbaa !11
  %173 = load ptr, ptr %16, align 8, !tbaa !11
  %174 = load double, ptr %12, align 8, !tbaa !5
  invoke void @_Z14streamFunctionRK5FieldR9Field_Vald(ptr noundef nonnull align 8 dereferenceable(64896) %172, ptr noundef nonnull align 8 dereferenceable(80808) %173, double noundef %174)
          to label %175 unwind label %111

175:                                              ; preds = %171
  %176 = load ptr, ptr %16, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %35, ptr align 8 %176, i64 80808, i1 false), !tbaa.struct !19
  %177 = load i32, ptr %24, align 4, !tbaa !9
  invoke void @_Z12writeResults9Field_ValRSt14basic_ofstreamIcSt11char_traitsIcEES4_S4_S4_i(ptr noundef byval(%struct.Field_Val) align 8 %35, ptr noundef nonnull align 8 dereferenceable(248) %26, ptr noundef nonnull align 8 dereferenceable(248) %27, ptr noundef nonnull align 8 dereferenceable(248) %30, ptr noundef nonnull align 8 dereferenceable(248) %31, i32 noundef %177)
          to label %178 unwind label %111

178:                                              ; preds = %175
  %179 = load i32, ptr %24, align 4, !tbaa !9
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %24, align 4, !tbaa !9
  br label %181

181:                                              ; preds = %178, %164
  %182 = load i32, ptr %20, align 4, !tbaa !9
  %183 = load ptr, ptr %15, align 8, !tbaa !11
  invoke void @_Z14calculateForceiRK5FieldRSt14basic_ofstreamIcSt11char_traitsIcEES6_(i32 noundef %182, ptr noundef nonnull align 8 dereferenceable(64896) %183, ptr noundef nonnull align 8 dereferenceable(248) %32, ptr noundef nonnull align 8 dereferenceable(248) %33)
          to label %184 unwind label %111

184:                                              ; preds = %181
  br label %185

185:                                              ; preds = %184
  %186 = load i32, ptr %21, align 4, !tbaa !9
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %21, align 4, !tbaa !9
  br label %87, !llvm.loop !21

188:                                              ; preds = %87
  %189 = call i64 @clock() #9
  %190 = load i64, ptr %34, align 8, !tbaa !15
  %191 = sub nsw i64 %189, %190
  %192 = sitofp i64 %191 to float
  %193 = fdiv float %192, 1.000000e+06
  %194 = fpext float %193 to double
  %195 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.5, double noundef %194)
          to label %196 unwind label %111

196:                                              ; preds = %188
  %197 = load ptr, ptr %25, align 8, !tbaa !11
  %198 = icmp eq ptr %197, null
  br i1 %198, label %200, label %199

199:                                              ; preds = %196
  call void @_ZdlPvm(ptr noundef %197, i64 noundef 8) #11
  br label %200

200:                                              ; preds = %199, %196
  invoke void @_Z14appendVTFstepsRSt14basic_ofstreamIcSt11char_traitsIcEES3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(248) %26, ptr noundef nonnull align 8 dereferenceable(248) %27, ptr noundef nonnull align 8 dereferenceable(248) %30, ptr noundef nonnull align 8 dereferenceable(248) %31)
          to label %201 unwind label %111

201:                                              ; preds = %200
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %32)
          to label %202 unwind label %111

202:                                              ; preds = %201
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %33)
          to label %203 unwind label %111

203:                                              ; preds = %202
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %33) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr %33) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %32) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr %32) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %31) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr %31) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %30) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr %30) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %27) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr %27) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %26) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  ret void

204:                                              ; preds = %111, %80
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %33) #9
  br label %205

205:                                              ; preds = %204, %76
  call void @llvm.lifetime.end.p0(i64 512, ptr %33) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %32) #9
  br label %206

206:                                              ; preds = %205, %72
  call void @llvm.lifetime.end.p0(i64 512, ptr %32) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %31) #9
  br label %207

207:                                              ; preds = %206, %68
  call void @llvm.lifetime.end.p0(i64 512, ptr %31) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %30) #9
  br label %208

208:                                              ; preds = %207, %64
  call void @llvm.lifetime.end.p0(i64 512, ptr %30) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %27) #9
  br label %209

209:                                              ; preds = %208, %60
  call void @llvm.lifetime.end.p0(i64 512, ptr %27) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %26) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  br label %210

210:                                              ; preds = %209
  %211 = load ptr, ptr %28, align 8
  %212 = load i32, ptr %29, align 4
  %213 = insertvalue { ptr, i32 } poison, ptr %211, 0
  %214 = insertvalue { ptr, i32 } %213, i32 %212, 1
  resume { ptr, i32 } %214
}

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

declare void @_Z12makeVTFfilesRSt14basic_ofstreamIcSt11char_traitsIcEES3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(248)) #4

; Function Attrs: nounwind
declare i64 @clock() #5

declare void @_Z6calVeldddR5Field(double noundef, double noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(64896)) #4

declare void @_Z11cavityBoxBCR5Field(ptr noundef nonnull align 8 dereferenceable(64896)) #4

declare void @_Z18flowAroundSquareBCR5Field(ptr noundef nonnull align 8 dereferenceable(64896)) #4

declare void @_Z18flowAroundVPlateBCR5Field(ptr noundef nonnull align 8 dereferenceable(64896)) #4

declare void @_Z5piterddddR5FieldRiPd(double noundef, double noundef, double noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(64896), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) #4

declare i32 @printf(ptr noundef, ...) #4

declare void @_Z16calculateAverageRK5FieldR9Field_Val(ptr noundef nonnull align 8 dereferenceable(64896), ptr noundef nonnull align 8 dereferenceable(80808)) #4

declare void @_Z14streamFunctionRK5FieldR9Field_Vald(ptr noundef nonnull align 8 dereferenceable(64896), ptr noundef nonnull align 8 dereferenceable(80808), double noundef) #4

declare void @_Z12writeResults9Field_ValRSt14basic_ofstreamIcSt11char_traitsIcEES4_S4_S4_i(ptr noundef byval(%struct.Field_Val) align 8, ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(248), i32 noundef) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

declare void @_Z14calculateForceiRK5FieldRSt14basic_ofstreamIcSt11char_traitsIcEES6_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(64896), ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(248)) #4

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #7

declare void @_Z14appendVTFstepsRSt14basic_ofstreamIcSt11char_traitsIcEES3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(248)) #4

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #8 align 2

attributes #0 = { mustprogress 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nobuiltin 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 #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 "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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nobuiltin 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 #8 = { mustprogress 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 #9 = { nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { builtin 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{i64 0, i64 20000, !20, i64 20000, i64 20000, !20, i64 40000, i64 20000, !20, i64 60000, i64 20808, !20}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !18}


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%struct.Field_Val = type { [2500 x double], [2500 x double], [2500 x double], [2601 x double] }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z18calculateFlowFieldddidR5FieldR9Field_Validdi(double noundef %0, double noundef %1, i32 noundef %2, double noundef %3, ptr noundef nonnull align 8 dereferenceable(64896) %4, ptr noundef nonnull align 8 dereferenceable(80808) %5, i32 noundef %6, double noundef %7, double noundef %8, i32 noundef %9) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::basic_ofstream", align 8
  %13 = alloca %"class.std::basic_ofstream", align 8
  %14 = alloca %"class.std::basic_ofstream", align 8
  %15 = alloca %"class.std::basic_ofstream", align 8
  %16 = alloca %"class.std::basic_ofstream", align 8
  %17 = alloca %"class.std::basic_ofstream", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #9
  %18 = tail call noalias noundef nonnull dereferenceable(8) ptr @_Znwm(i64 noundef 8) #10
  store double 0.000000e+00, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %12) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %12)
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %13) #9
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %13)
          to label %19 unwind label %41

19:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %14) #9
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %14)
          to label %20 unwind label %43

20:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %15) #9
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %15)
          to label %21 unwind label %45

21:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %16) #9
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %16)
          to label %22 unwind label %47

22:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %17) #9
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %17)
          to label %23 unwind label %49

23:                                               ; preds = %22
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %16, ptr noundef nonnull @.str, i32 noundef 16)
          to label %24 unwind label %51

24:                                               ; preds = %23
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %17, ptr noundef nonnull @.str.1, i32 noundef 16)
          to label %25 unwind label %51

25:                                               ; preds = %24
  %26 = load ptr, ptr %17, align 8, !tbaa !9
  %27 = getelementptr i8, ptr %26, i64 -24
  %28 = load i64, ptr %27, align 8
  %29 = getelementptr inbounds i8, ptr %17, i64 %28
  %30 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %29)
          to label %31 unwind label %51

31:                                               ; preds = %25
  br i1 %30, label %39, label %32

32:                                               ; preds = %31
  %33 = load ptr, ptr %16, align 8, !tbaa !9
  %34 = getelementptr i8, ptr %33, i64 -24
  %35 = load i64, ptr %34, align 8
  %36 = getelementptr inbounds i8, ptr %16, i64 %35
  %37 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %36)
          to label %38 unwind label %51

38:                                               ; preds = %32
  br i1 %37, label %39, label %53

39:                                               ; preds = %38, %31
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
          to label %53 unwind label %51

41:                                               ; preds = %10
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %117

43:                                               ; preds = %19
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %116

45:                                               ; preds = %20
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %115

47:                                               ; preds = %21
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %114

49:                                               ; preds = %22
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %113

51:                                               ; preds = %53, %39, %32, %25, %24, %23
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

53:                                               ; preds = %39, %38
  invoke void @_Z12makeVTFfilesRSt14basic_ofstreamIcSt11char_traitsIcEES3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(248) %12, ptr noundef nonnull align 8 dereferenceable(248) %13, ptr noundef nonnull align 8 dereferenceable(248) %14, ptr noundef nonnull align 8 dereferenceable(248) %15)
          to label %54 unwind label %51

54:                                               ; preds = %53
  %55 = call i64 @clock() #9
  %56 = sitofp i32 %2 to double
  %57 = fdiv double %56, %3
  %58 = fcmp ult double %57, 0.000000e+00
  br i1 %58, label %._crit_edge96, label %.lr.ph95

.lr.ph95:                                         ; preds = %54
  %.not68 = icmp slt i32 %6, 1
  %59 = add i32 %6, 1
  br label %60

60:                                               ; preds = %.lr.ph95, %100
  %61 = phi double [ 0.000000e+00, %.lr.ph95 ], [ %102, %100 ]
  %.093 = phi i32 [ 0, %.lr.ph95 ], [ %101, %100 ]
  %.05492 = phi i32 [ 1, %.lr.ph95 ], [ %.155, %100 ]
  invoke void @_Z6calVeldddR5Field(double noundef %1, double noundef %0, double noundef %3, ptr noundef nonnull align 8 dereferenceable(64896) %4)
          to label %.preheader unwind label %.loopexit.split-lp.loopexit

.preheader:                                       ; preds = %60
  br i1 %.not68, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  switch i32 %9, label %.lr.ph.split [
    i32 1, label %.lr.ph.split.us
    i32 2, label %.lr.ph.split.us74
    i32 3, label %.lr.ph.split.us83
  ]

.lr.ph.split.us:                                  ; preds = %.lr.ph, %66
  %.05369.us = phi i32 [ %67, %66 ], [ %9, %.lr.ph ]
  invoke void @_Z11cavityBoxBCR5Field(ptr noundef nonnull align 8 dereferenceable(64896) %4)
          to label %62 unwind label %.loopexit.split.us

62:                                               ; preds = %.lr.ph.split.us
  invoke void @_Z5piterddddR5FieldRiPd(double noundef %1, double noundef %3, double noundef %7, double noundef %8, ptr noundef nonnull align 8 dereferenceable(64896) %4, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull %18)
          to label %63 unwind label %.loopexit.split.us

63:                                               ; preds = %62
  %64 = load i32, ptr %11, align 4, !tbaa !11
  %65 = icmp eq i32 %64, 0
  br i1 %65, label %._crit_edge, label %66

66:                                               ; preds = %63
  %67 = add nuw i32 %.05369.us, 1
  %exitcond104.not = icmp eq i32 %.05369.us, %6
  br i1 %exitcond104.not, label %._crit_edge, label %.lr.ph.split.us, !llvm.loop !13

.loopexit.split.us:                               ; preds = %62, %.lr.ph.split.us
  %lpad.loopexit.us = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.lr.ph.split.us74:                                ; preds = %.lr.ph, %72
  %.05369.us75 = phi i32 [ %73, %72 ], [ 1, %.lr.ph ]
  invoke void @_Z18flowAroundSquareBCR5Field(ptr noundef nonnull align 8 dereferenceable(64896) %4)
          to label %68 unwind label %.loopexit.split.split.us

68:                                               ; preds = %.lr.ph.split.us74
  invoke void @_Z5piterddddR5FieldRiPd(double noundef %1, double noundef %3, double noundef %7, double noundef %8, ptr noundef nonnull align 8 dereferenceable(64896) %4, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull %18)
          to label %69 unwind label %.loopexit.split.split.us

69:                                               ; preds = %68
  %70 = load i32, ptr %11, align 4, !tbaa !11
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %._crit_edge, label %72

72:                                               ; preds = %69
  %73 = add nuw i32 %.05369.us75, 1
  %exitcond103.not = icmp eq i32 %.05369.us75, %6
  br i1 %exitcond103.not, label %._crit_edge, label %.lr.ph.split.us74, !llvm.loop !13

.loopexit.split.split.us:                         ; preds = %68, %.lr.ph.split.us74
  %lpad.loopexit.us77 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.lr.ph.split.us83:                                ; preds = %.lr.ph, %78
  %.05369.us84 = phi i32 [ %79, %78 ], [ 1, %.lr.ph ]
  invoke void @_Z18flowAroundVPlateBCR5Field(ptr noundef nonnull align 8 dereferenceable(64896) %4)
          to label %74 unwind label %.loopexit.split.split.split.us

74:                                               ; preds = %.lr.ph.split.us83
  invoke void @_Z5piterddddR5FieldRiPd(double noundef %1, double noundef %3, double noundef %7, double noundef %8, ptr noundef nonnull align 8 dereferenceable(64896) %4, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull %18)
          to label %75 unwind label %.loopexit.split.split.split.us

75:                                               ; preds = %74
  %76 = load i32, ptr %11, align 4, !tbaa !11
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %._crit_edge, label %78

78:                                               ; preds = %75
  %79 = add nuw i32 %.05369.us84, 1
  %exitcond.not = icmp eq i32 %.05369.us84, %6
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph.split.us83, !llvm.loop !13

.loopexit.split.split.split.us:                   ; preds = %74, %.lr.ph.split.us83
  %lpad.loopexit.us86 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.lr.ph.split:                                     ; preds = %.lr.ph, %83
  %.05369 = phi i32 [ %84, %83 ], [ 1, %.lr.ph ]
  invoke void @_Z5piterddddR5FieldRiPd(double noundef %1, double noundef %3, double noundef %7, double noundef %8, ptr noundef nonnull align 8 dereferenceable(64896) %4, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull %18)
          to label %80 unwind label %.loopexit.split.split.split

.loopexit.split.split.split:                      ; preds = %.lr.ph.split
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.loopexit.split-lp.loopexit:                      ; preds = %99, %96, %95, %94, %60
  %lpad.loopexit64 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.loopexit.split-lp.loopexit.split-lp:             ; preds = %111, %110, %._crit_edge96
  %lpad.loopexit.split-lp65 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

80:                                               ; preds = %.lr.ph.split
  %81 = load i32, ptr %11, align 4, !tbaa !11
  %82 = icmp eq i32 %81, 0
  br i1 %82, label %._crit_edge, label %83

83:                                               ; preds = %80
  %84 = add nuw i32 %.05369, 1
  %exitcond105.not = icmp eq i32 %.05369, %6
  br i1 %exitcond105.not, label %._crit_edge, label %.lr.ph.split, !llvm.loop !13

._crit_edge:                                      ; preds = %78, %75, %72, %69, %66, %63, %83, %80, %.preheader
  %.053.lcssa = phi i32 [ 1, %.preheader ], [ %.05369, %80 ], [ %59, %83 ], [ %.05369.us, %63 ], [ %59, %66 ], [ %.05369.us75, %69 ], [ %59, %72 ], [ %.05369.us84, %75 ], [ %59, %78 ]
  %.not57 = icmp slt i32 %.053.lcssa, %6
  %85 = fmul double %61, %3
  br i1 %.not57, label %89, label %86

86:                                               ; preds = %._crit_edge
  %87 = load double, ptr %18, align 8, !tbaa !5
  %88 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, double noundef %85, i32 noundef %.053.lcssa, double noundef %87)
  br label %91

89:                                               ; preds = %._crit_edge
  %90 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, double noundef %85, i32 noundef %.053.lcssa)
  br label %91

91:                                               ; preds = %89, %86
  %92 = urem i32 %.093, 10
  %93 = icmp eq i32 %92, 0
  br i1 %93, label %94, label %99

94:                                               ; preds = %91
  invoke void @_Z16calculateAverageRK5FieldR9Field_Val(ptr noundef nonnull align 8 dereferenceable(64896) %4, ptr noundef nonnull align 8 dereferenceable(80808) %5)
          to label %95 unwind label %.loopexit.split-lp.loopexit

95:                                               ; preds = %94
  invoke void @_Z14streamFunctionRK5FieldR9Field_Vald(ptr noundef nonnull align 8 dereferenceable(64896) %4, ptr noundef nonnull align 8 dereferenceable(80808) %5, double noundef %1)
          to label %96 unwind label %.loopexit.split-lp.loopexit

96:                                               ; preds = %95
  invoke void @_Z12writeResults9Field_ValRSt14basic_ofstreamIcSt11char_traitsIcEES4_S4_S4_i(ptr noundef nonnull byval(%struct.Field_Val) align 8 %5, ptr noundef nonnull align 8 dereferenceable(248) %12, ptr noundef nonnull align 8 dereferenceable(248) %13, ptr noundef nonnull align 8 dereferenceable(248) %14, ptr noundef nonnull align 8 dereferenceable(248) %15, i32 noundef %.05492)
          to label %97 unwind label %.loopexit.split-lp.loopexit

97:                                               ; preds = %96
  %98 = add nsw i32 %.05492, 1
  br label %99

99:                                               ; preds = %97, %91
  %.155 = phi i32 [ %98, %97 ], [ %.05492, %91 ]
  invoke void @_Z14calculateForceiRK5FieldRSt14basic_ofstreamIcSt11char_traitsIcEES6_(i32 noundef %9, ptr noundef nonnull align 8 dereferenceable(64896) %4, ptr noundef nonnull align 8 dereferenceable(248) %16, ptr noundef nonnull align 8 dereferenceable(248) %17)
          to label %100 unwind label %.loopexit.split-lp.loopexit

100:                                              ; preds = %99
  %101 = add nuw nsw i32 %.093, 1
  %102 = uitofp nneg i32 %101 to double
  %103 = fcmp ult double %57, %102
  br i1 %103, label %._crit_edge96, label %60, !llvm.loop !15

._crit_edge96:                                    ; preds = %100, %54
  %104 = call i64 @clock() #9
  %105 = sub nsw i64 %104, %55
  %106 = sitofp i64 %105 to float
  %107 = fdiv float %106, 1.000000e+06
  %108 = fpext float %107 to double
  %109 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %108)
  call void @_ZdlPvm(ptr noundef nonnull %18, i64 noundef 8) #11
  invoke void @_Z14appendVTFstepsRSt14basic_ofstreamIcSt11char_traitsIcEES3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(248) %12, ptr noundef nonnull align 8 dereferenceable(248) %13, ptr noundef nonnull align 8 dereferenceable(248) %14, ptr noundef nonnull align 8 dereferenceable(248) %15)
          to label %110 unwind label %.loopexit.split-lp.loopexit.split-lp

110:                                              ; preds = %._crit_edge96
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %16)
          to label %111 unwind label %.loopexit.split-lp.loopexit.split-lp

111:                                              ; preds = %110
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %17)
          to label %112 unwind label %.loopexit.split-lp.loopexit.split-lp

112:                                              ; preds = %111
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %17) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %17) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %16) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %16) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %15) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %15) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %14) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %14) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %13) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %13) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %12) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #9
  ret void

.loopexit:                                        ; preds = %.loopexit.split.split.us, %.loopexit.split.split.split.us, %.loopexit.split.split.split, %.loopexit.split.us, %.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit, %51
  %.pn = phi { ptr, i32 } [ %52, %51 ], [ %lpad.loopexit.us, %.loopexit.split.us ], [ %lpad.loopexit.us77, %.loopexit.split.split.us ], [ %lpad.loopexit, %.loopexit.split.split.split ], [ %lpad.loopexit.us86, %.loopexit.split.split.split.us ], [ %lpad.loopexit64, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp65, %.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %17) #9
  br label %113

113:                                              ; preds = %.loopexit, %49
  %.pn.pn = phi { ptr, i32 } [ %.pn, %.loopexit ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %17) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %16) #9
  br label %114

114:                                              ; preds = %113, %47
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %113 ], [ %48, %47 ]
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %16) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %15) #9
  br label %115

115:                                              ; preds = %114, %45
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %114 ], [ %46, %45 ]
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %15) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %14) #9
  br label %116

116:                                              ; preds = %115, %43
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %115 ], [ %44, %43 ]
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %14) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %13) #9
  br label %117

117:                                              ; preds = %116, %41
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %116 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %13) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %12) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #9
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn
}

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

declare void @_Z12makeVTFfilesRSt14basic_ofstreamIcSt11char_traitsIcEES3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(248)) local_unnamed_addr #4

; Function Attrs: nounwind
declare i64 @clock() local_unnamed_addr #5

declare void @_Z6calVeldddR5Field(double noundef, double noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(64896)) local_unnamed_addr #4

declare void @_Z11cavityBoxBCR5Field(ptr noundef nonnull align 8 dereferenceable(64896)) local_unnamed_addr #4

declare void @_Z18flowAroundSquareBCR5Field(ptr noundef nonnull align 8 dereferenceable(64896)) local_unnamed_addr #4

declare void @_Z18flowAroundVPlateBCR5Field(ptr noundef nonnull align 8 dereferenceable(64896)) local_unnamed_addr #4

declare void @_Z5piterddddR5FieldRiPd(double noundef, double noundef, double noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(64896), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) local_unnamed_addr #4

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

declare void @_Z16calculateAverageRK5FieldR9Field_Val(ptr noundef nonnull align 8 dereferenceable(64896), ptr noundef nonnull align 8 dereferenceable(80808)) local_unnamed_addr #4

declare void @_Z14streamFunctionRK5FieldR9Field_Vald(ptr noundef nonnull align 8 dereferenceable(64896), ptr noundef nonnull align 8 dereferenceable(80808), double noundef) local_unnamed_addr #4

declare void @_Z12writeResults9Field_ValRSt14basic_ofstreamIcSt11char_traitsIcEES4_S4_S4_i(ptr noundef byval(%struct.Field_Val) align 8, ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(248), i32 noundef) local_unnamed_addr #4

declare void @_Z14calculateForceiRK5FieldRSt14basic_ofstreamIcSt11char_traitsIcEES6_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(64896), ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(248)) local_unnamed_addr #4

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #7

declare void @_Z14appendVTFstepsRSt14basic_ofstreamIcSt11char_traitsIcEES3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(248)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #8 align 2

attributes #0 = { mustprogress 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nobuiltin 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 #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 "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 #6 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nobuiltin 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 #8 = { mustprogress 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 #9 = { nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { builtin 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass