; 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

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 @_ZN6Grid2D9gridGen2D15write_grid_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
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %16 = 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)
  %17 = 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) %17, i32 noundef 16)
          to label %18 unwind label %43

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

22:                                               ; preds = %18
  %23 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %21, i8 noundef signext 9)
          to label %24 unwind label %43

24:                                               ; preds = %22
  %25 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 16
  %26 = load i32, ptr %25, align 4, !tbaa !16
  %27 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %23, i32 noundef %26)
          to label %28 unwind label %43

28:                                               ; preds = %24
  %29 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %27, i8 noundef signext 9)
          to label %30 unwind label %43

30:                                               ; preds = %28
  %31 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 17
  %32 = load i32, ptr %31, align 8, !tbaa !17
  %33 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %29, i32 noundef %32)
          to label %34 unwind label %43

34:                                               ; preds = %30
  %35 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef @.str.8)
          to label %36 unwind label %43

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

37:                                               ; preds = %68, %36
  %38 = load i32, ptr %8, align 4, !tbaa !18
  %39 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 15
  %40 = load i32, ptr %39, align 8, !tbaa !9
  %41 = icmp slt i32 %38, %40
  br i1 %41, label %47, label %42

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

43:                                               ; preds = %381, %223, %221, %217, %215, %211, %209, %205, %203, %196, %194, %187, %185, %183, %34, %30, %28, %24, %22, %18, %2
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %6, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %7, align 4
  br label %383

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

52:                                               ; preds = %47
  %53 = load float, ptr %51, align 4, !tbaa !20
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %5, float noundef %53)
          to label %55 unwind label %71

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

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

62:                                               ; preds = %57
  %63 = load float, ptr %61, align 4, !tbaa !20
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %56, float noundef %63)
          to label %65 unwind label %71

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

67:                                               ; preds = %65
  br label %68

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

71:                                               ; preds = %65, %62, %57, %55, %52, %47
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %6, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %383

75:                                               ; preds = %42
  %76 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 16
  %77 = load i32, ptr %76, align 4, !tbaa !16
  %78 = icmp sgt i32 %77, 0
  br i1 %78, label %79, label %127

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

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

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

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

91:                                               ; preds = %86
  %92 = load i32, ptr %90, align 4, !tbaa !18
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %92)
          to label %94 unwind label %122

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

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

101:                                              ; preds = %96
  %102 = load i32, ptr %100, align 4, !tbaa !18
  %103 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %95, i32 noundef %102)
          to label %104 unwind label %122

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

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

111:                                              ; preds = %106
  %112 = load i32, ptr %110, align 4, !tbaa !18
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %105, i32 noundef %112)
          to label %114 unwind label %122

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

116:                                              ; preds = %114
  %117 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef @.str.8)
          to label %118 unwind label %122

118:                                              ; preds = %116
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %9, align 4, !tbaa !18
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %9, align 4, !tbaa !18
  br label %80, !llvm.loop !25

122:                                              ; preds = %116, %114, %111, %106, %104, %101, %96, %94, %91, %86
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %6, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %383

126:                                              ; preds = %85
  br label %127

127:                                              ; preds = %126, %75
  %128 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 17
  %129 = load i32, ptr %128, align 8, !tbaa !17
  %130 = icmp sgt i32 %129, 0
  br i1 %130, label %131, label %183

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

132:                                              ; preds = %175, %131
  %133 = load i32, ptr %10, align 4, !tbaa !18
  %134 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 17
  %135 = load i32, ptr %134, align 8, !tbaa !17
  %136 = icmp slt i32 %133, %135
  br i1 %136, label %138, label %137

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

138:                                              ; preds = %132
  %139 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 20
  %140 = load ptr, ptr %139, align 8, !tbaa !26
  %141 = load i32, ptr %10, align 4, !tbaa !18
  %142 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %140, i32 noundef %141, i32 noundef 0)
          to label %143 unwind label %178

143:                                              ; preds = %138
  %144 = load i32, ptr %142, align 4, !tbaa !18
  %145 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %144)
          to label %146 unwind label %178

146:                                              ; preds = %143
  %147 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %145, i8 noundef signext 9)
          to label %148 unwind label %178

148:                                              ; preds = %146
  %149 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 20
  %150 = load ptr, ptr %149, align 8, !tbaa !26
  %151 = load i32, ptr %10, align 4, !tbaa !18
  %152 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %150, i32 noundef %151, i32 noundef 1)
          to label %153 unwind label %178

153:                                              ; preds = %148
  %154 = load i32, ptr %152, align 4, !tbaa !18
  %155 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %147, i32 noundef %154)
          to label %156 unwind label %178

156:                                              ; preds = %153
  %157 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 20
  %158 = load ptr, ptr %157, align 8, !tbaa !26
  %159 = load i32, ptr %10, align 4, !tbaa !18
  %160 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %158, i32 noundef %159, i32 noundef 2)
          to label %161 unwind label %178

161:                                              ; preds = %156
  %162 = load i32, ptr %160, align 4, !tbaa !18
  %163 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %155, i32 noundef %162)
          to label %164 unwind label %178

164:                                              ; preds = %161
  %165 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, 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 3)
          to label %169 unwind label %178

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 %178

172:                                              ; preds = %169
  %173 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %171, ptr noundef @.str.8)
          to label %174 unwind label %178

174:                                              ; preds = %172
  br label %175

175:                                              ; preds = %174
  %176 = load i32, ptr %10, align 4, !tbaa !18
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %10, align 4, !tbaa !18
  br label %132, !llvm.loop !27

178:                                              ; preds = %172, %169, %164, %161, %156, %153, %148, %146, %143, %138
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %6, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %383

182:                                              ; preds = %137
  br label %183

183:                                              ; preds = %182, %127
  %184 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef 5)
          to label %185 unwind label %43

185:                                              ; preds = %183
  %186 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %184, ptr noundef @.str.8)
          to label %187 unwind label %43

187:                                              ; preds = %185
  %188 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 7
  %189 = load i32, ptr %188, align 4, !tbaa !28
  %190 = sub nsw i32 %189, 1
  %191 = sdiv i32 %190, 2
  %192 = add nsw i32 %191, 1
  %193 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %192)
          to label %194 unwind label %43

194:                                              ; preds = %187
  %195 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %193, ptr noundef @.str.8)
          to label %196 unwind label %43

196:                                              ; preds = %194
  %197 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 7
  %198 = load i32, ptr %197, align 4, !tbaa !28
  %199 = sub nsw i32 %198, 1
  %200 = sdiv i32 %199, 2
  %201 = add nsw i32 %200, 1
  %202 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %201)
          to label %203 unwind label %43

203:                                              ; preds = %196
  %204 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %202, ptr noundef @.str.8)
          to label %205 unwind label %43

205:                                              ; preds = %203
  %206 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 6
  %207 = load i32, ptr %206, align 8, !tbaa !29
  %208 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %207)
          to label %209 unwind label %43

209:                                              ; preds = %205
  %210 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %208, ptr noundef @.str.8)
          to label %211 unwind label %43

211:                                              ; preds = %209
  %212 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 7
  %213 = load i32, ptr %212, align 4, !tbaa !28
  %214 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %213)
          to label %215 unwind label %43

215:                                              ; preds = %211
  %216 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %214, ptr noundef @.str.8)
          to label %217 unwind label %43

217:                                              ; preds = %215
  %218 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 6
  %219 = load i32, ptr %218, align 8, !tbaa !29
  %220 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %219)
          to label %221 unwind label %43

221:                                              ; preds = %217
  %222 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %220, ptr noundef @.str.8)
          to label %223 unwind label %43

223:                                              ; preds = %221
  %224 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.8)
          to label %225 unwind label %43

225:                                              ; preds = %223
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %226 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 7
  %227 = load i32, ptr %226, align 4, !tbaa !28
  %228 = sub nsw i32 %227, 1
  store i32 %228, ptr %11, align 4, !tbaa !18
  br label %229

229:                                              ; preds = %252, %225
  %230 = load i32, ptr %11, align 4, !tbaa !18
  %231 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 7
  %232 = load i32, ptr %231, align 4, !tbaa !28
  %233 = sub nsw i32 %232, 1
  %234 = sdiv i32 %233, 2
  %235 = add nsw i32 %234, 1
  %236 = icmp slt i32 %230, %235
  br i1 %236, label %238, label %237

237:                                              ; preds = %229
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %259

238:                                              ; preds = %229
  %239 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 25
  store i32 1, ptr %239, align 8, !tbaa !30
  %240 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 25
  %241 = load i32, ptr %240, align 8, !tbaa !30
  %242 = load i32, ptr %11, align 4, !tbaa !18
  %243 = sub nsw i32 %242, 1
  %244 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 6
  %245 = load i32, ptr %244, align 8, !tbaa !29
  %246 = mul nsw i32 %243, %245
  %247 = add nsw i32 %241, %246
  %248 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %247)
          to label %249 unwind label %255

249:                                              ; preds = %238
  %250 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %248, ptr noundef @.str.8)
          to label %251 unwind label %255

251:                                              ; preds = %249
  br label %252

252:                                              ; preds = %251
  %253 = load i32, ptr %11, align 4, !tbaa !18
  %254 = add nsw i32 %253, 1
  store i32 %254, ptr %11, align 4, !tbaa !18
  br label %229, !llvm.loop !31

255:                                              ; preds = %249, %238
  %256 = landingpad { ptr, i32 }
          cleanup
  %257 = extractvalue { ptr, i32 } %256, 0
  store ptr %257, ptr %6, align 8
  %258 = extractvalue { ptr, i32 } %256, 1
  store i32 %258, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %383

259:                                              ; preds = %237
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %260 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 7
  %261 = load i32, ptr %260, align 4, !tbaa !28
  %262 = sub nsw i32 %261, 1
  %263 = sdiv i32 %262, 2
  %264 = add nsw i32 %263, 1
  store i32 %264, ptr %12, align 4, !tbaa !18
  br label %265

265:                                              ; preds = %283, %259
  %266 = load i32, ptr %12, align 4, !tbaa !18
  %267 = icmp sge i32 %266, 1
  br i1 %267, label %269, label %268

268:                                              ; preds = %265
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %290

269:                                              ; preds = %265
  %270 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 25
  store i32 1, ptr %270, align 8, !tbaa !30
  %271 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 25
  %272 = load i32, ptr %271, align 8, !tbaa !30
  %273 = load i32, ptr %12, align 4, !tbaa !18
  %274 = sub nsw i32 %273, 1
  %275 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 6
  %276 = load i32, ptr %275, align 8, !tbaa !29
  %277 = mul nsw i32 %274, %276
  %278 = add nsw i32 %272, %277
  %279 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %278)
          to label %280 unwind label %286

280:                                              ; preds = %269
  %281 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %279, ptr noundef @.str.8)
          to label %282 unwind label %286

282:                                              ; preds = %280
  br label %283

283:                                              ; preds = %282
  %284 = load i32, ptr %12, align 4, !tbaa !18
  %285 = add nsw i32 %284, -1
  store i32 %285, ptr %12, align 4, !tbaa !18
  br label %265, !llvm.loop !32

286:                                              ; preds = %280, %269
  %287 = landingpad { ptr, i32 }
          cleanup
  %288 = extractvalue { ptr, i32 } %287, 0
  store ptr %288, ptr %6, align 8
  %289 = extractvalue { ptr, i32 } %287, 1
  store i32 %289, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %383

290:                                              ; preds = %268
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %291 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 6
  %292 = load i32, ptr %291, align 8, !tbaa !29
  %293 = sub nsw i32 %292, 1
  store i32 %293, ptr %13, align 4, !tbaa !18
  br label %294

294:                                              ; preds = %314, %290
  %295 = load i32, ptr %13, align 4, !tbaa !18
  %296 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 6
  %297 = load i32, ptr %296, align 8, !tbaa !29
  %298 = icmp slt i32 %295, %297
  br i1 %298, label %300, label %299

299:                                              ; preds = %294
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %321

300:                                              ; preds = %294
  %301 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 26
  store i32 1, ptr %301, align 4, !tbaa !33
  %302 = load i32, ptr %13, align 4, !tbaa !18
  %303 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 26
  %304 = load i32, ptr %303, align 4, !tbaa !33
  %305 = sub nsw i32 %304, 1
  %306 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 6
  %307 = load i32, ptr %306, align 8, !tbaa !29
  %308 = mul nsw i32 %305, %307
  %309 = add nsw i32 %302, %308
  %310 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %309)
          to label %311 unwind label %317

311:                                              ; preds = %300
  %312 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %310, ptr noundef @.str.8)
          to label %313 unwind label %317

313:                                              ; preds = %311
  br label %314

314:                                              ; preds = %313
  %315 = load i32, ptr %13, align 4, !tbaa !18
  %316 = add nsw i32 %315, 1
  store i32 %316, ptr %13, align 4, !tbaa !18
  br label %294, !llvm.loop !34

317:                                              ; preds = %311, %300
  %318 = landingpad { ptr, i32 }
          cleanup
  %319 = extractvalue { ptr, i32 } %318, 0
  store ptr %319, ptr %6, align 8
  %320 = extractvalue { ptr, i32 } %318, 1
  store i32 %320, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %383

321:                                              ; preds = %299
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 1, ptr %14, align 4, !tbaa !18
  br label %322

322:                                              ; preds = %344, %321
  %323 = load i32, ptr %14, align 4, !tbaa !18
  %324 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 7
  %325 = load i32, ptr %324, align 4, !tbaa !28
  %326 = icmp slt i32 %323, %325
  br i1 %326, label %328, label %327

327:                                              ; preds = %322
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %351

328:                                              ; preds = %322
  %329 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 6
  %330 = load i32, ptr %329, align 8, !tbaa !29
  %331 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 25
  store i32 %330, ptr %331, align 8, !tbaa !30
  %332 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 25
  %333 = load i32, ptr %332, align 8, !tbaa !30
  %334 = load i32, ptr %14, align 4, !tbaa !18
  %335 = sub nsw i32 %334, 1
  %336 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 6
  %337 = load i32, ptr %336, align 8, !tbaa !29
  %338 = mul nsw i32 %335, %337
  %339 = add nsw i32 %333, %338
  %340 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %339)
          to label %341 unwind label %347

341:                                              ; preds = %328
  %342 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %340, ptr noundef @.str.8)
          to label %343 unwind label %347

343:                                              ; preds = %341
  br label %344

344:                                              ; preds = %343
  %345 = load i32, ptr %14, align 4, !tbaa !18
  %346 = add nsw i32 %345, 1
  store i32 %346, ptr %14, align 4, !tbaa !18
  br label %322, !llvm.loop !35

347:                                              ; preds = %341, %328
  %348 = landingpad { ptr, i32 }
          cleanup
  %349 = extractvalue { ptr, i32 } %348, 0
  store ptr %349, ptr %6, align 8
  %350 = extractvalue { ptr, i32 } %348, 1
  store i32 %350, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %383

351:                                              ; preds = %327
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !18
  br label %352

352:                                              ; preds = %374, %351
  %353 = load i32, ptr %15, align 4, !tbaa !18
  %354 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 6
  %355 = load i32, ptr %354, align 8, !tbaa !29
  %356 = icmp slt i32 %353, %355
  br i1 %356, label %358, label %357

357:                                              ; preds = %352
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %381

358:                                              ; preds = %352
  %359 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 7
  %360 = load i32, ptr %359, align 4, !tbaa !28
  %361 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 26
  store i32 %360, ptr %361, align 4, !tbaa !33
  %362 = load i32, ptr %15, align 4, !tbaa !18
  %363 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 26
  %364 = load i32, ptr %363, align 4, !tbaa !33
  %365 = sub nsw i32 %364, 1
  %366 = getelementptr inbounds %"class.Grid2D::gridGen2D", ptr %16, i32 0, i32 6
  %367 = load i32, ptr %366, align 8, !tbaa !29
  %368 = mul nsw i32 %365, %367
  %369 = add nsw i32 %362, %368
  %370 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %369)
          to label %371 unwind label %377

371:                                              ; preds = %358
  %372 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %370, ptr noundef @.str.8)
          to label %373 unwind label %377

373:                                              ; preds = %371
  br label %374

374:                                              ; preds = %373
  %375 = load i32, ptr %15, align 4, !tbaa !18
  %376 = add nsw i32 %375, 1
  store i32 %376, ptr %15, align 4, !tbaa !18
  br label %352, !llvm.loop !36

377:                                              ; preds = %371, %358
  %378 = landingpad { ptr, i32 }
          cleanup
  %379 = extractvalue { ptr, i32 } %378, 0
  store ptr %379, ptr %6, align 8
  %380 = extractvalue { ptr, i32 } %378, 1
  store i32 %380, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %383

381:                                              ; preds = %357
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %5)
          to label %382 unwind label %43

382:                                              ; preds = %381
  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

383:                                              ; preds = %377, %347, %317, %286, %255, %178, %122, %71, %43
  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 %384

384:                                              ; preds = %383
  %385 = load ptr, ptr %6, align 8
  %386 = load i32, ptr %7, align 4
  %387 = insertvalue { ptr, i32 } poison, ptr %385, 0
  %388 = insertvalue { ptr, i32 } %387, i32 %386, 1
  resume { ptr, i32 } %388
}

; 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}
!28 = !{!10, !12, i64 28}
!29 = !{!10, !12, i64 24}
!30 = !{!10, !12, i64 264}
!31 = distinct !{!31, !23}
!32 = distinct !{!32, !23}
!33 = !{!10, !12, i64 268}
!34 = distinct !{!34, !23}
!35 = distinct !{!35, !23}
!36 = distinct !{!36, !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

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 @_ZN6Grid2D9gridGen2D15write_grid_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr nocapture noundef nonnull 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 %29

4:                                                ; preds = %2
  %5 = getelementptr inbounds i8, ptr %0, i64 208
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %6)
          to label %8 unwind label %29

8:                                                ; preds = %4
  %9 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %7, i8 noundef signext 9)
          to label %10 unwind label %29

10:                                               ; preds = %8
  %11 = getelementptr inbounds i8, ptr %0, i64 212
  %12 = load i32, ptr %11, align 4, !tbaa !15
  %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 %29

14:                                               ; preds = %10
  %15 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %13, i8 noundef signext 9)
          to label %16 unwind label %29

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

20:                                               ; preds = %16
  %21 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull @.str.8)
          to label %.preheader48 unwind label %29

.preheader48:                                     ; preds = %20
  %22 = load i32, ptr %5, align 8, !tbaa !5
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader48
  %24 = getelementptr inbounds i8, ptr %0, i64 240
  %25 = getelementptr inbounds i8, ptr %0, i64 248
  br label %31

._crit_edge:                                      ; preds = %47, %.preheader48
  %26 = load i32, ptr %11, align 4
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %.lr.ph52, label %.loopexit47

.lr.ph52:                                         ; preds = %._crit_edge
  %28 = getelementptr inbounds i8, ptr %0, i64 224
  br label %53

29:                                               ; preds = %._crit_edge67, %158, %156, %153, %151, %148, %146, %142, %140, %134, %132, %125, %123, %.loopexit, %20, %16, %14, %10, %8, %4, %2
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %239

31:                                               ; preds = %.lr.ph, %47
  %.03950 = phi i32 [ 0, %.lr.ph ], [ %48, %47 ]
  %32 = load ptr, ptr %24, align 8, !tbaa !17
  %33 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIfEclEi(ptr noundef nonnull align 8 dereferenceable(40) %32, i32 noundef %.03950)
          to label %34 unwind label %51

34:                                               ; preds = %31
  %35 = load float, ptr %33, align 4, !tbaa !18
  %36 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %3, float noundef %35)
          to label %37 unwind label %51

37:                                               ; preds = %34
  %38 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %36, i8 noundef signext 9)
          to label %39 unwind label %51

39:                                               ; preds = %37
  %40 = load ptr, ptr %25, align 8, !tbaa !19
  %41 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIfEclEi(ptr noundef nonnull align 8 dereferenceable(40) %40, i32 noundef %.03950)
          to label %42 unwind label %51

42:                                               ; preds = %39
  %43 = load float, ptr %41, align 4, !tbaa !18
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEf(ptr noundef nonnull align 8 dereferenceable(8) %38, float noundef %43)
          to label %45 unwind label %51

45:                                               ; preds = %42
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull @.str.8)
          to label %47 unwind label %51

47:                                               ; preds = %45
  %48 = add nuw nsw i32 %.03950, 1
  %49 = load i32, ptr %5, align 8, !tbaa !5
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %31, label %._crit_edge, !llvm.loop !20

51:                                               ; preds = %45, %42, %39, %37, %34, %31
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %239

53:                                               ; preds = %.lr.ph52, %79
  %.03851 = phi i32 [ 0, %.lr.ph52 ], [ %80, %79 ]
  %54 = load ptr, ptr %28, align 8, !tbaa !22
  %55 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %54, i32 noundef %.03851, i32 noundef 0)
          to label %56 unwind label %83

56:                                               ; preds = %53
  %57 = load i32, ptr %55, align 4, !tbaa !23
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %57)
          to label %59 unwind label %83

59:                                               ; preds = %56
  %60 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %58, i8 noundef signext 9)
          to label %61 unwind label %83

61:                                               ; preds = %59
  %62 = load ptr, ptr %28, align 8, !tbaa !22
  %63 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %62, i32 noundef %.03851, i32 noundef 1)
          to label %64 unwind label %83

64:                                               ; preds = %61
  %65 = load i32, ptr %63, align 4, !tbaa !23
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %60, i32 noundef %65)
          to label %67 unwind label %83

67:                                               ; preds = %64
  %68 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %66, i8 noundef signext 9)
          to label %69 unwind label %83

69:                                               ; preds = %67
  %70 = load ptr, ptr %28, align 8, !tbaa !22
  %71 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %70, i32 noundef %.03851, i32 noundef 2)
          to label %72 unwind label %83

72:                                               ; preds = %69
  %73 = load i32, ptr %71, align 4, !tbaa !23
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %68, i32 noundef %73)
          to label %75 unwind label %83

75:                                               ; preds = %72
  %76 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %74, i8 noundef signext 9)
          to label %77 unwind label %83

77:                                               ; preds = %75
  %78 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef nonnull @.str.8)
          to label %79 unwind label %83

79:                                               ; preds = %77
  %80 = add nuw nsw i32 %.03851, 1
  %81 = load i32, ptr %11, align 4, !tbaa !15
  %82 = icmp slt i32 %80, %81
  br i1 %82, label %53, label %.loopexit47, !llvm.loop !24

83:                                               ; preds = %77, %75, %72, %69, %67, %64, %61, %59, %56, %53
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %239

.loopexit47:                                      ; preds = %79, %._crit_edge
  %85 = load i32, ptr %17, align 8
  %86 = icmp sgt i32 %85, 0
  br i1 %86, label %.lr.ph54, label %.loopexit

.lr.ph54:                                         ; preds = %.loopexit47
  %87 = getelementptr inbounds i8, ptr %0, i64 232
  br label %88

88:                                               ; preds = %.lr.ph54, %116
  %.03753 = phi i32 [ 0, %.lr.ph54 ], [ %117, %116 ]
  %89 = load ptr, ptr %87, align 8, !tbaa !25
  %90 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %89, i32 noundef %.03753, i32 noundef 0)
          to label %91 unwind label %120

91:                                               ; preds = %88
  %92 = load i32, ptr %90, align 4, !tbaa !23
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %92)
          to label %94 unwind label %120

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

96:                                               ; preds = %94
  %97 = load ptr, ptr %87, align 8, !tbaa !25
  %98 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %97, i32 noundef %.03753, i32 noundef 1)
          to label %99 unwind label %120

99:                                               ; preds = %96
  %100 = load i32, ptr %98, align 4, !tbaa !23
  %101 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %95, i32 noundef %100)
          to label %102 unwind label %120

102:                                              ; preds = %99
  %103 = load ptr, ptr %87, align 8, !tbaa !25
  %104 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %103, i32 noundef %.03753, i32 noundef 2)
          to label %105 unwind label %120

105:                                              ; preds = %102
  %106 = load i32, ptr %104, align 4, !tbaa !23
  %107 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %101, i32 noundef %106)
          to label %108 unwind label %120

108:                                              ; preds = %105
  %109 = load ptr, ptr %87, align 8, !tbaa !25
  %110 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Array2DIiEclEii(ptr noundef nonnull align 8 dereferenceable(40) %109, i32 noundef %.03753, i32 noundef 3)
          to label %111 unwind label %120

111:                                              ; preds = %108
  %112 = load i32, ptr %110, align 4, !tbaa !23
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %107, i32 noundef %112)
          to label %114 unwind label %120

114:                                              ; preds = %111
  %115 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %113, ptr noundef nonnull @.str.8)
          to label %116 unwind label %120

116:                                              ; preds = %114
  %117 = add nuw nsw i32 %.03753, 1
  %118 = load i32, ptr %17, align 8, !tbaa !16
  %119 = icmp slt i32 %117, %118
  br i1 %119, label %88, label %.loopexit, !llvm.loop !26

120:                                              ; preds = %114, %111, %108, %105, %102, %99, %96, %94, %91, %88
  %121 = landingpad { ptr, i32 }
          cleanup
  br label %239

.loopexit:                                        ; preds = %116, %.loopexit47
  %122 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef 5)
          to label %123 unwind label %29

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

125:                                              ; preds = %123
  %126 = getelementptr inbounds i8, ptr %0, i64 28
  %127 = load i32, ptr %126, align 4, !tbaa !27
  %128 = add nsw i32 %127, -1
  %129 = sdiv i32 %128, 2
  %130 = add nsw i32 %129, 1
  %131 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %130)
          to label %132 unwind label %29

132:                                              ; preds = %125
  %133 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %131, ptr noundef nonnull @.str.8)
          to label %134 unwind label %29

134:                                              ; preds = %132
  %135 = load i32, ptr %126, align 4, !tbaa !27
  %136 = add nsw i32 %135, -1
  %137 = sdiv i32 %136, 2
  %138 = add nsw i32 %137, 1
  %139 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %138)
          to label %140 unwind label %29

140:                                              ; preds = %134
  %141 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %139, ptr noundef nonnull @.str.8)
          to label %142 unwind label %29

142:                                              ; preds = %140
  %143 = getelementptr inbounds i8, ptr %0, i64 24
  %144 = load i32, ptr %143, align 8, !tbaa !28
  %145 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %144)
          to label %146 unwind label %29

146:                                              ; preds = %142
  %147 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %145, ptr noundef nonnull @.str.8)
          to label %148 unwind label %29

148:                                              ; preds = %146
  %149 = load i32, ptr %126, align 4, !tbaa !27
  %150 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %149)
          to label %151 unwind label %29

151:                                              ; preds = %148
  %152 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %150, ptr noundef nonnull @.str.8)
          to label %153 unwind label %29

153:                                              ; preds = %151
  %154 = load i32, ptr %143, align 8, !tbaa !28
  %155 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %154)
          to label %156 unwind label %29

156:                                              ; preds = %153
  %157 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %155, ptr noundef nonnull @.str.8)
          to label %158 unwind label %29

158:                                              ; preds = %156
  %159 = 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.8)
          to label %160 unwind label %29

160:                                              ; preds = %158
  %161 = load i32, ptr %126, align 4, !tbaa !27
  %162 = add nsw i32 %161, -1
  %163 = lshr i32 %162, 1
  %.not55 = icmp sgt i32 %161, 1
  br i1 %.not55, label %._crit_edge59, label %.lr.ph58

.lr.ph58:                                         ; preds = %160
  %164 = getelementptr inbounds i8, ptr %0, i64 264
  br label %167

._crit_edge59:                                    ; preds = %175, %160
  %.lcssa = phi i32 [ %163, %160 ], [ %179, %175 ]
  %165 = add nsw i32 %.lcssa, 1
  %166 = getelementptr inbounds i8, ptr %0, i64 264
  br label %182

167:                                              ; preds = %.lr.ph58, %175
  %.03656 = phi i32 [ %162, %.lr.ph58 ], [ %176, %175 ]
  store i32 1, ptr %164, align 8, !tbaa !29
  %168 = add nsw i32 %.03656, -1
  %169 = load i32, ptr %143, align 8, !tbaa !28
  %170 = mul nsw i32 %169, %168
  %171 = add nsw i32 %170, 1
  %172 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %171)
          to label %173 unwind label %180

173:                                              ; preds = %167
  %174 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %172, ptr noundef nonnull @.str.8)
          to label %175 unwind label %180

175:                                              ; preds = %173
  %176 = add nsw i32 %.03656, 1
  %177 = load i32, ptr %126, align 4, !tbaa !27
  %178 = add nsw i32 %177, -1
  %179 = sdiv i32 %178, 2
  %.not.not = icmp slt i32 %.03656, %179
  br i1 %.not.not, label %167, label %._crit_edge59, !llvm.loop !30

180:                                              ; preds = %173, %167
  %181 = landingpad { ptr, i32 }
          cleanup
  br label %239

182:                                              ; preds = %193, %._crit_edge59
  %.035 = phi i32 [ %165, %._crit_edge59 ], [ %188, %193 ]
  %183 = icmp sgt i32 %.035, 0
  br i1 %183, label %187, label %.lr.ph62

.lr.ph62:                                         ; preds = %182
  %184 = load i32, ptr %143, align 8, !tbaa !28
  %185 = add nsw i32 %184, -1
  %186 = getelementptr inbounds i8, ptr %0, i64 268
  br label %199

187:                                              ; preds = %182
  store i32 1, ptr %166, align 8, !tbaa !29
  %188 = add nsw i32 %.035, -1
  %189 = load i32, ptr %143, align 8, !tbaa !28
  %190 = mul nsw i32 %189, %188
  %191 = add nsw i32 %190, 1
  %192 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %191)
          to label %193 unwind label %195

193:                                              ; preds = %187
  %194 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %192, ptr noundef nonnull @.str.8)
          to label %182 unwind label %195, !llvm.loop !31

195:                                              ; preds = %193, %187
  %196 = landingpad { ptr, i32 }
          cleanup
  br label %239

.preheader44:                                     ; preds = %203
  %197 = load i32, ptr %126, align 4, !tbaa !27
  %198 = icmp sgt i32 %197, 1
  br i1 %198, label %.lr.ph64, label %.preheader

199:                                              ; preds = %.lr.ph62, %203
  %.03460 = phi i32 [ %185, %.lr.ph62 ], [ %204, %203 ]
  store i32 1, ptr %186, align 4, !tbaa !32
  %200 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %.03460)
          to label %201 unwind label %207

201:                                              ; preds = %199
  %202 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %200, ptr noundef nonnull @.str.8)
          to label %203 unwind label %207

203:                                              ; preds = %201
  %204 = add nsw i32 %.03460, 1
  %205 = load i32, ptr %143, align 8, !tbaa !28
  %206 = icmp slt i32 %204, %205
  br i1 %206, label %199, label %.preheader44, !llvm.loop !33

207:                                              ; preds = %201, %199
  %208 = landingpad { ptr, i32 }
          cleanup
  br label %239

.preheaderthread-pre-split:                       ; preds = %217
  %.pr = load i32, ptr %143, align 8, !tbaa !28
  br label %.preheader

.preheader:                                       ; preds = %.preheaderthread-pre-split, %.preheader44
  %209 = phi i32 [ %.pr, %.preheaderthread-pre-split ], [ %205, %.preheader44 ]
  %210 = icmp sgt i32 %209, 0
  br i1 %210, label %.lr.ph66, label %._crit_edge67

.lr.ph66:                                         ; preds = %.preheader
  %211 = getelementptr inbounds i8, ptr %0, i64 268
  br label %223

.lr.ph64:                                         ; preds = %.preheader44, %217
  %.03363 = phi i32 [ %218, %217 ], [ 1, %.preheader44 ]
  %212 = load i32, ptr %143, align 8, !tbaa !28
  store i32 %212, ptr %166, align 8, !tbaa !29
  %213 = mul i32 %212, %.03363
  %214 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %213)
          to label %215 unwind label %221

215:                                              ; preds = %.lr.ph64
  %216 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %214, ptr noundef nonnull @.str.8)
          to label %217 unwind label %221

217:                                              ; preds = %215
  %218 = add nuw nsw i32 %.03363, 1
  %219 = load i32, ptr %126, align 4, !tbaa !27
  %220 = icmp slt i32 %218, %219
  br i1 %220, label %.lr.ph64, label %.preheaderthread-pre-split, !llvm.loop !34

221:                                              ; preds = %215, %.lr.ph64
  %222 = landingpad { ptr, i32 }
          cleanup
  br label %239

._crit_edge67:                                    ; preds = %232, %.preheader
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %3)
          to label %238 unwind label %29

223:                                              ; preds = %.lr.ph66, %232
  %224 = phi i32 [ %209, %.lr.ph66 ], [ %234, %232 ]
  %.065 = phi i32 [ 0, %.lr.ph66 ], [ %233, %232 ]
  %225 = load i32, ptr %126, align 4, !tbaa !27
  store i32 %225, ptr %211, align 4, !tbaa !32
  %226 = add nsw i32 %225, -1
  %227 = mul nsw i32 %226, %224
  %228 = add nsw i32 %227, %.065
  %229 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %228)
          to label %230 unwind label %236

230:                                              ; preds = %223
  %231 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %229, ptr noundef nonnull @.str.8)
          to label %232 unwind label %236

232:                                              ; preds = %230
  %233 = add nuw nsw i32 %.065, 1
  %234 = load i32, ptr %143, align 8, !tbaa !28
  %235 = icmp slt i32 %233, %234
  br i1 %235, label %223, label %._crit_edge67, !llvm.loop !35

236:                                              ; preds = %230, %223
  %237 = landingpad { ptr, i32 }
          cleanup
  br label %239

238:                                              ; preds = %._crit_edge67
  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

239:                                              ; preds = %236, %221, %207, %195, %180, %120, %83, %51, %29
  %.pn = phi { ptr, i32 } [ %52, %51 ], [ %84, %83 ], [ %121, %120 ], [ %181, %180 ], [ %196, %195 ], [ %208, %207 ], [ %222, %221 ], [ %237, %236 ], [ %30, %29 ]
  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}
!27 = !{!6, !10, i64 28}
!28 = !{!6, !10, i64 24}
!29 = !{!6, !10, i64 264}
!30 = distinct !{!30, !21}
!31 = distinct !{!31, !21}
!32 = !{!6, !10, i64 268}
!33 = distinct !{!33, !21}
!34 = distinct !{!34, !21}
!35 = distinct !{!35, !21}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass