; LLVM IR from LukeMcCulloch/cfd_solvers_cpp :: src (gridGen2D)

; 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_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" }
%"class.std::locale" = type { ptr }
%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.1 }
%union.anon.1 = type { i32 }
%"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.Grid2D::gridGen2D" = type <{ float, float, float, float, float, float, i32, i32, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", ptr, ptr, i32, i32, i32, i32, ptr, ptr, ptr, ptr, float, float, i32, i32, i32, [4 x i8] }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [30 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIfEclEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Grid2D9gridGen2D18write_tecplot_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(276) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::basic_ofstream", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 512, ptr %5) #5
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %5)
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %5, ptr noundef nonnull align 8 dereferenceable(32) %12, i32 noundef 16)
          to label %13 unwind label %41

13:                                               ; preds = %2
  %14 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.35)
          to label %15 unwind label %41

15:                                               ; preds = %13
  %16 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.36)
          to label %17 unwind label %41

17:                                               ; preds = %15
  %18 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.37)
          to label %19 unwind label %41

19:                                               ; preds = %17
  %20 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %11, i32 0, i32 15
  %21 = load i32, ptr %20, align 8, !tbaa !9
  %22 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %18, i32 noundef %21)
          to label %23 unwind label %41

23:                                               ; preds = %19
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef @.str.38)
          to label %25 unwind label %41

25:                                               ; preds = %23
  %26 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %11, i32 0, i32 16
  %27 = load i32, ptr %26, align 4, !tbaa !16
  %28 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %11, i32 0, i32 17
  %29 = load i32, ptr %28, align 8, !tbaa !17
  %30 = add nsw i32 %27, %29
  %31 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %24, i32 noundef %30)
          to label %32 unwind label %41

32:                                               ; preds = %25
  %33 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef @.str.39)
          to label %34 unwind label %41

34:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !18
  br label %35

35:                                               ; preds = %66, %34
  %36 = load i32, ptr %8, align 4, !tbaa !18
  %37 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %11, i32 0, i32 15
  %38 = load i32, ptr %37, align 8, !tbaa !9
  %39 = icmp slt i32 %36, %38
  br i1 %39, label %45, label %40

40:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %73

41:                                               ; preds = %193, %32, %25, %23, %19, %17, %15, %13, %2
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %6, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %7, align 4
  br label %195

45:                                               ; preds = %35
  %46 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %11, i32 0, i32 21
  %47 = load ptr, ptr %46, align 8, !tbaa !19
  %48 = load i32, ptr %8, align 4, !tbaa !18
  %49 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIfEclEi(ptr noundef nonnull align 8 dereferenceable(40) %47, i32 noundef %48)
          to label %50 unwind label %69

50:                                               ; preds = %45
  %51 = load float, ptr %49, align 4, !tbaa !20
  %52 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %5, float noundef %51)
          to label %53 unwind label %69

53:                                               ; preds = %50
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %52, i8 noundef signext 9)
          to label %55 unwind label %69

55:                                               ; preds = %53
  %56 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %11, i32 0, i32 22
  %57 = load ptr, ptr %56, align 8, !tbaa !21
  %58 = load i32, ptr %8, align 4, !tbaa !18
  %59 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIfEclEi(ptr noundef nonnull align 8 dereferenceable(40) %57, i32 noundef %58)
          to label %60 unwind label %69

60:                                               ; preds = %55
  %61 = load float, ptr %59, align 4, !tbaa !20
  %62 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %54, float noundef %61)
          to label %63 unwind label %69

63:                                               ; preds = %60
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef @.str.8)
          to label %65 unwind label %69

65:                                               ; preds = %63
  br label %66

66:                                               ; preds = %65
  %67 = load i32, ptr %8, align 4, !tbaa !18
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %8, align 4, !tbaa !18
  br label %35, !llvm.loop !22

69:                                               ; preds = %63, %60, %55, %53, %50, %45
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %6, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %195

73:                                               ; preds = %40
  %74 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %11, i32 0, i32 16
  %75 = load i32, ptr %74, align 4, !tbaa !16
  %76 = icmp sgt i32 %75, 0
  br i1 %76, label %77, label %133

77:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !18
  br label %78

78:                                               ; preds = %125, %77
  %79 = load i32, ptr %9, align 4, !tbaa !18
  %80 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %11, i32 0, i32 16
  %81 = load i32, ptr %80, align 4, !tbaa !16
  %82 = icmp slt i32 %79, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %132

84:                                               ; preds = %78
  %85 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %11, i32 0, i32 19
  %86 = load ptr, ptr %85, align 8, !tbaa !24
  %87 = load i32, ptr %9, align 4, !tbaa !18
  %88 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %86, i32 noundef %87, i32 noundef 0)
          to label %89 unwind label %128

89:                                               ; preds = %84
  %90 = load i32, ptr %88, align 4, !tbaa !18
  %91 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %90)
          to label %92 unwind label %128

92:                                               ; preds = %89
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %91, i8 noundef signext 9)
          to label %94 unwind label %128

94:                                               ; preds = %92
  %95 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %11, i32 0, i32 19
  %96 = load ptr, ptr %95, align 8, !tbaa !24
  %97 = load i32, ptr %9, align 4, !tbaa !18
  %98 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %96, i32 noundef %97, i32 noundef 1)
          to label %99 unwind label %128

99:                                               ; preds = %94
  %100 = load i32, ptr %98, align 4, !tbaa !18
  %101 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %93, i32 noundef %100)
          to label %102 unwind label %128

102:                                              ; preds = %99
  %103 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %101, i8 noundef signext 9)
          to label %104 unwind label %128

104:                                              ; preds = %102
  %105 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %11, i32 0, i32 19
  %106 = load ptr, ptr %105, align 8, !tbaa !24
  %107 = load i32, ptr %9, align 4, !tbaa !18
  %108 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %106, i32 noundef %107, i32 noundef 2)
          to label %109 unwind label %128

109:                                              ; preds = %104
  %110 = load i32, ptr %108, align 4, !tbaa !18
  %111 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %103, i32 noundef %110)
          to label %112 unwind label %128

112:                                              ; preds = %109
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %111, i8 noundef signext 9)
          to label %114 unwind label %128

114:                                              ; preds = %112
  %115 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %11, i32 0, i32 19
  %116 = load ptr, ptr %115, align 8, !tbaa !24
  %117 = load i32, ptr %9, align 4, !tbaa !18
  %118 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %116, i32 noundef %117, i32 noundef 2)
          to label %119 unwind label %128

119:                                              ; preds = %114
  %120 = load i32, ptr %118, align 4, !tbaa !18
  %121 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %113, i32 noundef %120)
          to label %122 unwind label %128

122:                                              ; preds = %119
  %123 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %121, ptr noundef @.str.8)
          to label %124 unwind label %128

124:                                              ; preds = %122
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %9, align 4, !tbaa !18
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %9, align 4, !tbaa !18
  br label %78, !llvm.loop !25

128:                                              ; preds = %122, %119, %114, %112, %109, %104, %102, %99, %94, %92, %89, %84
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %6, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %195

132:                                              ; preds = %83
  br label %133

133:                                              ; preds = %132, %73
  %134 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %11, i32 0, i32 17
  %135 = load i32, ptr %134, align 8, !tbaa !17
  %136 = icmp sgt i32 %135, 0
  br i1 %136, label %137, label %193

137:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !18
  br label %138

138:                                              ; preds = %185, %137
  %139 = load i32, ptr %10, align 4, !tbaa !18
  %140 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %11, i32 0, i32 17
  %141 = load i32, ptr %140, align 8, !tbaa !17
  %142 = icmp slt i32 %139, %141
  br i1 %142, label %144, label %143

143:                                              ; preds = %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %192

144:                                              ; preds = %138
  %145 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %11, i32 0, i32 20
  %146 = load ptr, ptr %145, align 8, !tbaa !26
  %147 = load i32, ptr %10, align 4, !tbaa !18
  %148 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %146, i32 noundef %147, i32 noundef 0)
          to label %149 unwind label %188

149:                                              ; preds = %144
  %150 = load i32, ptr %148, align 4, !tbaa !18
  %151 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %150)
          to label %152 unwind label %188

152:                                              ; preds = %149
  %153 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %151, i8 noundef signext 9)
          to label %154 unwind label %188

154:                                              ; preds = %152
  %155 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %11, i32 0, i32 20
  %156 = load ptr, ptr %155, align 8, !tbaa !26
  %157 = load i32, ptr %10, align 4, !tbaa !18
  %158 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %156, i32 noundef %157, i32 noundef 1)
          to label %159 unwind label %188

159:                                              ; preds = %154
  %160 = load i32, ptr %158, align 4, !tbaa !18
  %161 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %153, i32 noundef %160)
          to label %162 unwind label %188

162:                                              ; preds = %159
  %163 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %161, i8 noundef signext 9)
          to label %164 unwind label %188

164:                                              ; preds = %162
  %165 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %11, i32 0, i32 20
  %166 = load ptr, ptr %165, align 8, !tbaa !26
  %167 = load i32, ptr %10, align 4, !tbaa !18
  %168 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %166, i32 noundef %167, i32 noundef 2)
          to label %169 unwind label %188

169:                                              ; preds = %164
  %170 = load i32, ptr %168, align 4, !tbaa !18
  %171 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %163, i32 noundef %170)
          to label %172 unwind label %188

172:                                              ; preds = %169
  %173 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %171, i8 noundef signext 9)
          to label %174 unwind label %188

174:                                              ; preds = %172
  %175 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %11, i32 0, i32 20
  %176 = load ptr, ptr %175, align 8, !tbaa !26
  %177 = load i32, ptr %10, align 4, !tbaa !18
  %178 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %176, i32 noundef %177, i32 noundef 3)
          to label %179 unwind label %188

179:                                              ; preds = %174
  %180 = load i32, ptr %178, align 4, !tbaa !18
  %181 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %173, i32 noundef %180)
          to label %182 unwind label %188

182:                                              ; preds = %179
  %183 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %181, ptr noundef @.str.8)
          to label %184 unwind label %188

184:                                              ; preds = %182
  br label %185

185:                                              ; preds = %184
  %186 = load i32, ptr %10, align 4, !tbaa !18
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %10, align 4, !tbaa !18
  br label %138, !llvm.loop !27

188:                                              ; preds = %182, %179, %174, %172, %169, %164, %162, %159, %154, %152, %149, %144
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %6, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %195

192:                                              ; preds = %143
  br label %193

193:                                              ; preds = %192, %133
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %5)
          to label %194 unwind label %41

194:                                              ; preds = %193
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %5) #5
  call void @llvm.lifetime.end.p0(i64 512, ptr %5) #5
  ret void

195:                                              ; preds = %188, %128, %69, %41
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %5) #5
  call void @llvm.lifetime.end.p0(i64 512, ptr %5) #5
  br label %196

196:                                              ; preds = %195
  %197 = load ptr, ptr %6, align 8
  %198 = load i32, ptr %7, align 4
  %199 = insertvalue { ptr, i32 } poison, ptr %197, 0
  %200 = insertvalue { ptr, i32 } %199, i32 %198, 1
  resume { ptr, i32 } %200
}

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #1 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) #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef) #1 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8), float noundef) #1 align 2

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

!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++ TBAA"}
!9 = !{!10, !12, i64 208}
!10 = !{!"_ZTSN6Grid2D9gridGen2DE", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !12, i64 24, !12, i64 28, !13, i64 32, !13, i64 64, !13, i64 96, !13, i64 128, !13, i64 160, !6, i64 192, !6, i64 200, !12, i64 208, !12, i64 212, !12, i64 216, !12, i64 220, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !11, i64 256, !11, i64 260, !12, i64 264, !12, i64 268, !12, i64 272}
!11 = !{!"float", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!10, !12, i64 212}
!17 = !{!10, !12, i64 216}
!18 = !{!12, !12, i64 0}
!19 = !{!10, !6, i64 240}
!20 = !{!11, !11, i64 0}
!21 = !{!10, !6, i64 248}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!10, !6, i64 224}
!25 = distinct !{!25, !23}
!26 = !{!10, !6, i64 232}
!27 = distinct !{!27, !23}


; 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_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" }
%"class.std::locale" = type { ptr }
%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.1 }
%union.anon.1 = type { i32 }
%"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 }

@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [30 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIfEclEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Grid2D9gridGen2D18write_tecplot_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(276) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::basic_ofstream", align 8
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %3) #5
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3)
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 16)
          to label %4 unwind label %32

4:                                                ; preds = %2
  %5 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.35)
          to label %6 unwind label %32

6:                                                ; preds = %4
  %7 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.36)
          to label %8 unwind label %32

8:                                                ; preds = %6
  %9 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.37)
          to label %10 unwind label %32

10:                                               ; preds = %8
  %11 = getelementptr inbounds i8, ptr %0, i64 208
  %12 = load i32, ptr %11, align 8, !tbaa !5
  %13 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %9, i32 noundef %12)
          to label %14 unwind label %32

14:                                               ; preds = %10
  %15 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull @.str.38)
          to label %16 unwind label %32

16:                                               ; preds = %14
  %17 = getelementptr inbounds i8, ptr %0, i64 212
  %18 = load i32, ptr %17, align 4, !tbaa !15
  %19 = getelementptr inbounds i8, ptr %0, i64 216
  %20 = load i32, ptr %19, align 8, !tbaa !16
  %21 = add nsw i32 %20, %18
  %22 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %15, i32 noundef %21)
          to label %23 unwind label %32

23:                                               ; preds = %16
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull @.str.39)
          to label %.preheader26 unwind label %32

.preheader26:                                     ; preds = %23
  %25 = load i32, ptr %11, align 8, !tbaa !5
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader26
  %27 = getelementptr inbounds i8, ptr %0, i64 240
  %28 = getelementptr inbounds i8, ptr %0, i64 248
  br label %34

._crit_edge:                                      ; preds = %50, %.preheader26
  %29 = load i32, ptr %17, align 4
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %.lr.ph29, label %.loopexit25

.lr.ph29:                                         ; preds = %._crit_edge
  %31 = getelementptr inbounds i8, ptr %0, i64 224
  br label %56

32:                                               ; preds = %.loopexit, %23, %16, %14, %10, %8, %6, %4, %2
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %136

34:                                               ; preds = %.lr.ph, %50
  %.02027 = phi i32 [ 0, %.lr.ph ], [ %51, %50 ]
  %35 = load ptr, ptr %27, align 8, !tbaa !17
  %36 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIfEclEi(ptr noundef nonnull align 8 dereferenceable(40) %35, i32 noundef %.02027)
          to label %37 unwind label %54

37:                                               ; preds = %34
  %38 = load float, ptr %36, align 4, !tbaa !18
  %39 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %3, float noundef %38)
          to label %40 unwind label %54

40:                                               ; preds = %37
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %39, i8 noundef signext 9)
          to label %42 unwind label %54

42:                                               ; preds = %40
  %43 = load ptr, ptr %28, align 8, !tbaa !19
  %44 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIfEclEi(ptr noundef nonnull align 8 dereferenceable(40) %43, i32 noundef %.02027)
          to label %45 unwind label %54

45:                                               ; preds = %42
  %46 = load float, ptr %44, align 4, !tbaa !18
  %47 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %41, float noundef %46)
          to label %48 unwind label %54

48:                                               ; preds = %45
  %49 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull @.str.8)
          to label %50 unwind label %54

50:                                               ; preds = %48
  %51 = add nuw nsw i32 %.02027, 1
  %52 = load i32, ptr %11, align 8, !tbaa !5
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %34, label %._crit_edge, !llvm.loop !20

54:                                               ; preds = %48, %45, %42, %40, %37, %34
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %136

56:                                               ; preds = %.lr.ph29, %88
  %.01928 = phi i32 [ 0, %.lr.ph29 ], [ %89, %88 ]
  %57 = load ptr, ptr %31, align 8, !tbaa !22
  %58 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %57, i32 noundef %.01928, i32 noundef 0)
          to label %59 unwind label %92

59:                                               ; preds = %56
  %60 = load i32, ptr %58, align 4, !tbaa !23
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %60)
          to label %62 unwind label %92

62:                                               ; preds = %59
  %63 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %61, i8 noundef signext 9)
          to label %64 unwind label %92

64:                                               ; preds = %62
  %65 = load ptr, ptr %31, align 8, !tbaa !22
  %66 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %65, i32 noundef %.01928, i32 noundef 1)
          to label %67 unwind label %92

67:                                               ; preds = %64
  %68 = load i32, ptr %66, align 4, !tbaa !23
  %69 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %63, i32 noundef %68)
          to label %70 unwind label %92

70:                                               ; preds = %67
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %69, i8 noundef signext 9)
          to label %72 unwind label %92

72:                                               ; preds = %70
  %73 = load ptr, ptr %31, align 8, !tbaa !22
  %74 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %73, i32 noundef %.01928, i32 noundef 2)
          to label %75 unwind label %92

75:                                               ; preds = %72
  %76 = load i32, ptr %74, align 4, !tbaa !23
  %77 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %71, i32 noundef %76)
          to label %78 unwind label %92

78:                                               ; preds = %75
  %79 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %77, i8 noundef signext 9)
          to label %80 unwind label %92

80:                                               ; preds = %78
  %81 = load ptr, ptr %31, align 8, !tbaa !22
  %82 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %81, i32 noundef %.01928, i32 noundef 2)
          to label %83 unwind label %92

83:                                               ; preds = %80
  %84 = load i32, ptr %82, align 4, !tbaa !23
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %79, i32 noundef %84)
          to label %86 unwind label %92

86:                                               ; preds = %83
  %87 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %85, ptr noundef nonnull @.str.8)
          to label %88 unwind label %92

88:                                               ; preds = %86
  %89 = add nuw nsw i32 %.01928, 1
  %90 = load i32, ptr %17, align 4, !tbaa !15
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %56, label %.loopexit25, !llvm.loop !24

92:                                               ; preds = %86, %83, %80, %78, %75, %72, %70, %67, %64, %62, %59, %56
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %136

.loopexit25:                                      ; preds = %88, %._crit_edge
  %94 = load i32, ptr %19, align 8
  %95 = icmp sgt i32 %94, 0
  br i1 %95, label %.lr.ph31, label %.loopexit

.lr.ph31:                                         ; preds = %.loopexit25
  %96 = getelementptr inbounds i8, ptr %0, i64 232
  br label %97

97:                                               ; preds = %.lr.ph31, %129
  %.030 = phi i32 [ 0, %.lr.ph31 ], [ %130, %129 ]
  %98 = load ptr, ptr %96, align 8, !tbaa !25
  %99 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %98, i32 noundef %.030, i32 noundef 0)
          to label %100 unwind label %133

100:                                              ; preds = %97
  %101 = load i32, ptr %99, align 4, !tbaa !23
  %102 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %101)
          to label %103 unwind label %133

103:                                              ; preds = %100
  %104 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %102, i8 noundef signext 9)
          to label %105 unwind label %133

105:                                              ; preds = %103
  %106 = load ptr, ptr %96, align 8, !tbaa !25
  %107 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %106, i32 noundef %.030, i32 noundef 1)
          to label %108 unwind label %133

108:                                              ; preds = %105
  %109 = load i32, ptr %107, align 4, !tbaa !23
  %110 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %104, i32 noundef %109)
          to label %111 unwind label %133

111:                                              ; preds = %108
  %112 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %110, i8 noundef signext 9)
          to label %113 unwind label %133

113:                                              ; preds = %111
  %114 = load ptr, ptr %96, align 8, !tbaa !25
  %115 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %114, i32 noundef %.030, i32 noundef 2)
          to label %116 unwind label %133

116:                                              ; preds = %113
  %117 = load i32, ptr %115, align 4, !tbaa !23
  %118 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %112, i32 noundef %117)
          to label %119 unwind label %133

119:                                              ; preds = %116
  %120 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %118, i8 noundef signext 9)
          to label %121 unwind label %133

121:                                              ; preds = %119
  %122 = load ptr, ptr %96, align 8, !tbaa !25
  %123 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %122, i32 noundef %.030, i32 noundef 3)
          to label %124 unwind label %133

124:                                              ; preds = %121
  %125 = load i32, ptr %123, align 4, !tbaa !23
  %126 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %120, i32 noundef %125)
          to label %127 unwind label %133

127:                                              ; preds = %124
  %128 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %126, ptr noundef nonnull @.str.8)
          to label %129 unwind label %133

129:                                              ; preds = %127
  %130 = add nuw nsw i32 %.030, 1
  %131 = load i32, ptr %19, align 8, !tbaa !16
  %132 = icmp slt i32 %130, %131
  br i1 %132, label %97, label %.loopexit, !llvm.loop !26

133:                                              ; preds = %127, %124, %121, %119, %116, %113, %111, %108, %105, %103, %100, %97
  %134 = landingpad { ptr, i32 }
          cleanup
  br label %136

.loopexit:                                        ; preds = %129, %.loopexit25
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %3)
          to label %135 unwind label %32

135:                                              ; preds = %.loopexit
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #5
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #5
  ret void

136:                                              ; preds = %133, %92, %54, %32
  %.pn = phi { ptr, i32 } [ %55, %54 ], [ %93, %92 ], [ %134, %133 ], [ %33, %32 ]
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #5
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn
}

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #1 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 #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8), float noundef) local_unnamed_addr #1 align 2

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

!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, !10, i64 208}
!6 = !{!"_ZTSN6Grid2D9gridGen2DE", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !10, i64 24, !10, i64 28, !11, i64 32, !11, i64 64, !11, i64 96, !11, i64 128, !11, i64 160, !13, i64 192, !13, i64 200, !10, i64 208, !10, i64 212, !10, i64 216, !10, i64 220, !13, i64 224, !13, i64 232, !13, i64 240, !13, i64 248, !7, i64 256, !7, i64 260, !10, i64 264, !10, i64 268, !10, i64 272}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !14, i64 8, !8, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !13, i64 0}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"long", !8, i64 0}
!15 = !{!6, !10, i64 212}
!16 = !{!6, !10, i64 216}
!17 = !{!6, !13, i64 240}
!18 = !{!7, !7, i64 0}
!19 = !{!6, !13, i64 248}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!6, !13, i64 224}
!23 = !{!10, !10, i64 0}
!24 = distinct !{!24, !21}
!25 = !{!6, !13, i64 232}
!26 = distinct !{!26, !21}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass