; LLVM IR from Lut1n/ImpGears :: tests/grids/test.ll (Z10test_layerRN3imp5LayerIcEERNS_9DimensionILi2EEE)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.imp::Dimension.0" = type { %"class.imp::Vec.1" }
%"class.imp::Vec.1" = type { %"class.imp::Object", [2 x i32] }
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [9 x i8], align 1

; 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) #0

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #0

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z10test_layerRN3imp5LayerIcEERNS_9DimensionILi2EEE(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.imp::Dimension.0", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.imp::Dimension.0", align 8
  %9 = alloca %"class.imp::Dimension.0", align 8
  %10 = alloca float, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.imp::Dimension.0", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"class.imp::Dimension.0", align 8
  %19 = alloca %"class.imp::Dimension.0", align 8
  %20 = alloca %"class.imp::Dimension.0", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.10)
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = call noundef i32 @_ZN3imp3VecILi2EiE4sizeEv()
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %21, i32 noundef %23)
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.11)
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #5
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZNK3imp4GridILi2EcE4sizeEv(ptr dead_on_unwind writable sret(%"class.imp::Dimension.0") align 8 %5, ptr noundef nonnull align 8 dereferenceable(112) %27)
  %28 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 0)
          to label %29 unwind label %54

29:                                               ; preds = %2
  %30 = load i32, ptr %28, align 4, !tbaa !9
  %31 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %26, i32 noundef %30)
          to label %32 unwind label %54

32:                                               ; preds = %29
  %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.2)
          to label %34 unwind label %54

34:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #5
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  invoke void @_ZNK3imp4GridILi2EcE4sizeEv(ptr dead_on_unwind writable sret(%"class.imp::Dimension.0") align 8 %8, ptr noundef nonnull align 8 dereferenceable(112) %35)
          to label %36 unwind label %58

36:                                               ; preds = %34
  %37 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef 1)
          to label %38 unwind label %62

38:                                               ; preds = %36
  %39 = load i32, ptr %37, align 4, !tbaa !9
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %33, i32 noundef %39)
          to label %41 unwind label %62

41:                                               ; preds = %38
  %42 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef @.str.3)
          to label %43 unwind label %62

43:                                               ; preds = %41
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %45 unwind label %62

45:                                               ; preds = %43
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #5
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #5
  call void @_ZN3imp9DimensionILi2EEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store float 0.000000e+00, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %101, %45
  %47 = load i32, ptr %11, align 4, !tbaa !9
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %48, i32 noundef 0)
          to label %50 unwind label %68

50:                                               ; preds = %46
  %51 = load i32, ptr %49, align 4, !tbaa !9
  %52 = icmp slt i32 %47, %51
  br i1 %52, label %72, label %53

53:                                               ; preds = %50
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %105

54:                                               ; preds = %32, %29, %2
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %6, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %7, align 4
  br label %67

58:                                               ; preds = %34
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %6, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %7, align 4
  br label %66

62:                                               ; preds = %43, %41, %38, %36
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %6, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %7, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  br label %66

66:                                               ; preds = %62, %58
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #5
  br label %67

67:                                               ; preds = %66, %54
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #5
  br label %286

68:                                               ; preds = %72, %46
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %6, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %7, align 4
  br label %104

72:                                               ; preds = %50
  %73 = load i32, ptr %11, align 4, !tbaa !9
  %74 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 0)
          to label %75 unwind label %68

75:                                               ; preds = %72
  store i32 %73, ptr %74, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %97, %75
  %77 = load i32, ptr %13, align 4, !tbaa !9
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %78, i32 noundef 1)
          to label %80 unwind label %84

80:                                               ; preds = %76
  %81 = load i32, ptr %79, align 4, !tbaa !9
  %82 = icmp slt i32 %77, %81
  br i1 %82, label %88, label %83

83:                                               ; preds = %80
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %100

84:                                               ; preds = %91, %88, %76
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %6, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %104

88:                                               ; preds = %80
  %89 = load i32, ptr %13, align 4, !tbaa !9
  %90 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 1)
          to label %91 unwind label %84

91:                                               ; preds = %88
  store i32 %89, ptr %90, align 4, !tbaa !9
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = load float, ptr %10, align 4, !tbaa !11
  %94 = fadd float %93, 1.000000e+00
  store float %94, ptr %10, align 4, !tbaa !11
  %95 = fptosi float %94 to i8
  invoke void @_ZN3imp5LayerIcE3setERKNS_9DimensionILi2EEEc(ptr noundef nonnull align 8 dereferenceable(112) %92, ptr noundef nonnull align 8 dereferenceable(32) %9, i8 noundef signext %95)
          to label %96 unwind label %84

96:                                               ; preds = %91
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %13, align 4, !tbaa !9
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %13, align 4, !tbaa !9
  br label %76, !llvm.loop !13

100:                                              ; preds = %83
  br label %101

101:                                              ; preds = %100
  %102 = load i32, ptr %11, align 4, !tbaa !9
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %11, align 4, !tbaa !9
  br label %46, !llvm.loop !15

104:                                              ; preds = %84, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %285

105:                                              ; preds = %53
  %106 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 0)
          to label %107 unwind label %171

107:                                              ; preds = %105
  store i32 2, ptr %106, align 4, !tbaa !9
  %108 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 1)
          to label %109 unwind label %171

109:                                              ; preds = %107
  store i32 7, ptr %108, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = invoke noundef i32 @_ZNK3imp4GridILi2EcE5indexERKNS_9DimensionILi2EEE(ptr noundef nonnull align 8 dereferenceable(112) %110, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %112 unwind label %175

112:                                              ; preds = %109
  store i32 %111, ptr %14, align 4, !tbaa !9
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.12)
          to label %114 unwind label %175

114:                                              ; preds = %112
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = invoke noundef signext i8 @_ZNK3imp4GridILi2EcE3getERKNS_9DimensionILi2EEE(ptr noundef nonnull align 8 dereferenceable(112) %115, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %117 unwind label %175

117:                                              ; preds = %114
  %118 = sext i8 %116 to i32
  %119 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %113, i32 noundef %118)
          to label %120 unwind label %175

120:                                              ; preds = %117
  %121 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %119, ptr noundef @.str.5)
          to label %122 unwind label %175

122:                                              ; preds = %120
  %123 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 0)
          to label %124 unwind label %175

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

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 @.str.2)
          to label %129 unwind label %175

129:                                              ; preds = %127
  %130 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 1)
          to label %131 unwind label %175

131:                                              ; preds = %129
  %132 = load i32, ptr %130, align 4, !tbaa !9
  %133 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %128, i32 noundef %132)
          to label %134 unwind label %175

134:                                              ; preds = %131
  %135 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %133, ptr noundef @.str.6)
          to label %136 unwind label %175

136:                                              ; preds = %134
  %137 = load i32, ptr %14, align 4, !tbaa !9
  %138 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %135, i32 noundef %137)
          to label %139 unwind label %175

139:                                              ; preds = %136
  %140 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %138, ptr noundef @.str.7)
          to label %141 unwind label %175

141:                                              ; preds = %139
  %142 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %140, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %143 unwind label %175

143:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #5
  %144 = load ptr, ptr %3, align 8, !tbaa !5
  %145 = load i32, ptr %14, align 4, !tbaa !9
  invoke void @_ZNK3imp4GridILi2EcE6vectorEj(ptr dead_on_unwind writable sret(%"class.imp::Dimension.0") align 8 %15, ptr noundef nonnull align 8 dereferenceable(112) %144, i32 noundef %145)
          to label %146 unwind label %179

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

148:                                              ; preds = %146
  %149 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef 0)
          to label %150 unwind label %183

150:                                              ; preds = %148
  %151 = load i32, ptr %149, align 4, !tbaa !9
  %152 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %147, i32 noundef %151)
          to label %153 unwind label %183

153:                                              ; preds = %150
  %154 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %152, ptr noundef @.str.2)
          to label %155 unwind label %183

155:                                              ; preds = %153
  %156 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef 1)
          to label %157 unwind label %183

157:                                              ; preds = %155
  %158 = load i32, ptr %156, align 4, !tbaa !9
  %159 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %154, i32 noundef %158)
          to label %160 unwind label %183

160:                                              ; preds = %157
  %161 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %159, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %162 unwind label %183

162:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %163

163:                                              ; preds = %225, %162
  %164 = load i32, ptr %16, align 4, !tbaa !9
  %165 = load ptr, ptr %4, align 8, !tbaa !5
  %166 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %165, i32 noundef 0)
          to label %167 unwind label %187

167:                                              ; preds = %163
  %168 = load i32, ptr %166, align 4, !tbaa !9
  %169 = icmp slt i32 %164, %168
  br i1 %169, label %191, label %170

170:                                              ; preds = %167
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %229

171:                                              ; preds = %107, %105
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %6, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %7, align 4
  br label %285

175:                                              ; preds = %141, %139, %136, %134, %131, %129, %127, %124, %122, %120, %117, %114, %112, %109
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %6, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %7, align 4
  br label %284

179:                                              ; preds = %143
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %6, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %7, align 4
  br label %283

183:                                              ; preds = %160, %157, %155, %153, %150, %148, %146
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %6, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %7, align 4
  br label %282

187:                                              ; preds = %222, %191, %163
  %188 = landingpad { ptr, i32 }
          cleanup
  %189 = extractvalue { ptr, i32 } %188, 0
  store ptr %189, ptr %6, align 8
  %190 = extractvalue { ptr, i32 } %188, 1
  store i32 %190, ptr %7, align 4
  br label %228

191:                                              ; preds = %167
  %192 = load i32, ptr %16, align 4, !tbaa !9
  %193 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 0)
          to label %194 unwind label %187

194:                                              ; preds = %191
  store i32 %192, ptr %193, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %195

195:                                              ; preds = %219, %194
  %196 = load i32, ptr %17, align 4, !tbaa !9
  %197 = load ptr, ptr %4, align 8, !tbaa !5
  %198 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %197, i32 noundef 1)
          to label %199 unwind label %203

199:                                              ; preds = %195
  %200 = load i32, ptr %198, align 4, !tbaa !9
  %201 = icmp slt i32 %196, %200
  br i1 %201, label %207, label %202

202:                                              ; preds = %199
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %222

203:                                              ; preds = %216, %213, %210, %207, %195
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %6, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %228

207:                                              ; preds = %199
  %208 = load i32, ptr %17, align 4, !tbaa !9
  %209 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 1)
          to label %210 unwind label %203

210:                                              ; preds = %207
  store i32 %208, ptr %209, align 4, !tbaa !9
  %211 = load ptr, ptr %3, align 8, !tbaa !5
  %212 = invoke noundef signext i8 @_ZNK3imp4GridILi2EcE3getERKNS_9DimensionILi2EEE(ptr noundef nonnull align 8 dereferenceable(112) %211, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %213 unwind label %203

213:                                              ; preds = %210
  %214 = sext i8 %212 to i32
  %215 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %214)
          to label %216 unwind label %203

216:                                              ; preds = %213
  %217 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %215, ptr noundef @.str.9)
          to label %218 unwind label %203

218:                                              ; preds = %216
  br label %219

219:                                              ; preds = %218
  %220 = load i32, ptr %17, align 4, !tbaa !9
  %221 = add nsw i32 %220, 1
  store i32 %221, ptr %17, align 4, !tbaa !9
  br label %195, !llvm.loop !16

222:                                              ; preds = %202
  %223 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %224 unwind label %187

224:                                              ; preds = %222
  br label %225

225:                                              ; preds = %224
  %226 = load i32, ptr %16, align 4, !tbaa !9
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr %16, align 4, !tbaa !9
  br label %163, !llvm.loop !17

228:                                              ; preds = %203, %187
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %282

229:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #5
  invoke void @_ZN3imp9DimensionILi2EEC2IJiEEEiDpT_(ptr noundef nonnull align 8 dereferenceable(32) %18, i32 noundef 0, i32 noundef 0)
          to label %230 unwind label %263

230:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #5
  invoke void @_ZN3imp9DimensionILi2EEC2IJiEEEiDpT_(ptr noundef nonnull align 8 dereferenceable(32) %19, i32 noundef 0, i32 noundef 1)
          to label %231 unwind label %267

231:                                              ; preds = %230
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #5
  invoke void @_ZN3imp9DimensionILi2EEC2IJiEEEiDpT_(ptr noundef nonnull align 8 dereferenceable(32) %20, i32 noundef 1, i32 noundef 0)
          to label %232 unwind label %271

232:                                              ; preds = %231
  %233 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.13)
          to label %234 unwind label %275

234:                                              ; preds = %232
  %235 = load ptr, ptr %3, align 8, !tbaa !5
  %236 = invoke noundef signext i8 @_ZNK3imp4GridILi2EcE3getERKNS_9DimensionILi2EEE(ptr noundef nonnull align 8 dereferenceable(112) %235, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %237 unwind label %275

237:                                              ; preds = %234
  %238 = sext i8 %236 to i32
  %239 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %233, i32 noundef %238)
          to label %240 unwind label %275

240:                                              ; preds = %237
  %241 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %239, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %242 unwind label %275

242:                                              ; preds = %240
  %243 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.14)
          to label %244 unwind label %275

244:                                              ; preds = %242
  %245 = load ptr, ptr %3, align 8, !tbaa !5
  %246 = invoke noundef signext i8 @_ZNK3imp4GridILi2EcE3getERKNS_9DimensionILi2EEE(ptr noundef nonnull align 8 dereferenceable(112) %245, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %247 unwind label %275

247:                                              ; preds = %244
  %248 = sext i8 %246 to i32
  %249 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %243, i32 noundef %248)
          to label %250 unwind label %275

250:                                              ; preds = %247
  %251 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %249, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %252 unwind label %275

252:                                              ; preds = %250
  %253 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.15)
          to label %254 unwind label %275

254:                                              ; preds = %252
  %255 = load ptr, ptr %3, align 8, !tbaa !5
  %256 = invoke noundef signext i8 @_ZNK3imp4GridILi2EcE3getERKNS_9DimensionILi2EEE(ptr noundef nonnull align 8 dereferenceable(112) %255, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %257 unwind label %275

257:                                              ; preds = %254
  %258 = sext i8 %256 to i32
  %259 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %253, i32 noundef %258)
          to label %260 unwind label %275

260:                                              ; preds = %257
  %261 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %259, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %262 unwind label %275

262:                                              ; preds = %260
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #5
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #5
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  ret void

263:                                              ; preds = %229
  %264 = landingpad { ptr, i32 }
          cleanup
  %265 = extractvalue { ptr, i32 } %264, 0
  store ptr %265, ptr %6, align 8
  %266 = extractvalue { ptr, i32 } %264, 1
  store i32 %266, ptr %7, align 4
  br label %281

267:                                              ; preds = %230
  %268 = landingpad { ptr, i32 }
          cleanup
  %269 = extractvalue { ptr, i32 } %268, 0
  store ptr %269, ptr %6, align 8
  %270 = extractvalue { ptr, i32 } %268, 1
  store i32 %270, ptr %7, align 4
  br label %280

271:                                              ; preds = %231
  %272 = landingpad { ptr, i32 }
          cleanup
  %273 = extractvalue { ptr, i32 } %272, 0
  store ptr %273, ptr %6, align 8
  %274 = extractvalue { ptr, i32 } %272, 1
  store i32 %274, ptr %7, align 4
  br label %279

275:                                              ; preds = %260, %257, %254, %252, %250, %247, %244, %242, %240, %237, %234, %232
  %276 = landingpad { ptr, i32 }
          cleanup
  %277 = extractvalue { ptr, i32 } %276, 0
  store ptr %277, ptr %6, align 8
  %278 = extractvalue { ptr, i32 } %276, 1
  store i32 %278, ptr %7, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #5
  br label %279

279:                                              ; preds = %275, %271
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #5
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  br label %280

280:                                              ; preds = %279, %267
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  br label %281

281:                                              ; preds = %280, %263
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #5
  br label %282

282:                                              ; preds = %281, %228, %183
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  br label %283

283:                                              ; preds = %282, %179
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  br label %284

284:                                              ; preds = %283, %175
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %285

285:                                              ; preds = %284, %171, %104
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  br label %286

286:                                              ; preds = %285, %67
  %287 = load ptr, ptr %6, align 8
  %288 = load i32, ptr %7, align 4
  %289 = insertvalue { ptr, i32 } poison, ptr %287, 0
  %290 = insertvalue { ptr, i32 } %289, i32 %288, 1
  resume { ptr, i32 } %290
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3imp3VecILi2EiE4sizeEv() #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3imp4GridILi2EcE4sizeEv(ptr dead_on_unwind noalias writable sret(%"class.imp::Dimension.0") align 8, ptr noundef nonnull align 8 dereferenceable(112)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp9DimensionILi2EEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp5LayerIcE3setERKNS_9DimensionILi2EEEc(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3imp4GridILi2EcE5indexERKNS_9DimensionILi2EEE(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef signext i8 @_ZNK3imp4GridILi2EcE3getERKNS_9DimensionILi2EEE(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3imp4GridILi2EcE6vectorEj(ptr dead_on_unwind noalias writable sret(%"class.imp::Dimension.0") align 8, ptr noundef nonnull align 8 dereferenceable(112), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp9DimensionILi2EEC2IJiEEEiDpT_(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

attributes #0 = { 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 #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.imp::Dimension.0" = type { %"class.imp::Vec.1" }
%"class.imp::Vec.1" = type { %"class.imp::Object", [2 x i32] }
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [9 x i8], align 1

; 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 #0

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #0

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z10test_layerRN3imp5LayerIcEERNS_9DimensionILi2EEE(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.imp::Dimension.0", align 8
  %4 = alloca %"class.imp::Dimension.0", align 8
  %5 = alloca %"class.imp::Dimension.0", align 8
  %6 = alloca %"class.imp::Dimension.0", align 8
  %7 = alloca %"class.imp::Dimension.0", align 8
  %8 = alloca %"class.imp::Dimension.0", align 8
  %9 = alloca %"class.imp::Dimension.0", align 8
  %10 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.10)
  %11 = tail call noundef i32 @_ZN3imp3VecILi2EiE4sizeEv()
  %12 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %10, i32 noundef %11)
  %13 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %14 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.11)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #5
  call void @_ZNK3imp4GridILi2EcE4sizeEv(ptr dead_on_unwind nonnull writable sret(%"class.imp::Dimension.0") align 8 %3, ptr noundef nonnull align 8 dereferenceable(112) %0)
  %15 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef 0)
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %14, i32 noundef %16)
          to label %18 unwind label %36

18:                                               ; preds = %2
  %19 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull @.str.2)
          to label %20 unwind label %36

20:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  invoke void @_ZNK3imp4GridILi2EcE4sizeEv(ptr dead_on_unwind nonnull writable sret(%"class.imp::Dimension.0") align 8 %4, ptr noundef nonnull align 8 dereferenceable(112) %0)
          to label %21 unwind label %38

21:                                               ; preds = %20
  %22 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef 1)
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %19, i32 noundef %23)
          to label %25 unwind label %40

25:                                               ; preds = %21
  %26 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull @.str.3)
          to label %27 unwind label %40

27:                                               ; preds = %25
  %28 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %29 unwind label %40

29:                                               ; preds = %27
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  call void @_ZN3imp9DimensionILi2EEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 0)
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %.lr.ph68, label %._crit_edge69

._crit_edge69:                                    ; preds = %._crit_edge, %29
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 0)
  store i32 2, ptr %33, align 4, !tbaa !5
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 1)
  store i32 7, ptr %34, align 4, !tbaa !5
  %35 = invoke noundef i32 @_ZNK3imp4GridILi2EcE5indexERKNS_9DimensionILi2EEE(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %62 unwind label %107

36:                                               ; preds = %18, %2
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %43

38:                                               ; preds = %20
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %42

40:                                               ; preds = %27, %25, %21
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  br label %42

42:                                               ; preds = %40, %38
  %.pn = phi { ptr, i32 } [ %41, %40 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  br label %43

43:                                               ; preds = %42, %36
  %.pn.pn = phi { ptr, i32 } [ %.pn, %42 ], [ %37, %36 ]
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  br label %183

.lr.ph68:                                         ; preds = %29, %._crit_edge
  %.03466 = phi i32 [ %48, %._crit_edge ], [ 0, %29 ]
  %.03565 = phi float [ %.136.lcssa, %._crit_edge ], [ 0.000000e+00, %29 ]
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 0)
  store i32 %.03466, ptr %44, align 4, !tbaa !5
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 1)
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = icmp sgt i32 %46, 0
  br i1 %47, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %57, %.lr.ph68
  %.136.lcssa = phi float [ %.03565, %.lr.ph68 ], [ %55, %57 ]
  %48 = add nuw nsw i32 %.03466, 1
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 0)
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = icmp slt i32 %48, %50
  br i1 %51, label %.lr.ph68, label %._crit_edge69, !llvm.loop !9

52:                                               ; preds = %.lr.ph
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %182

.lr.ph:                                           ; preds = %.lr.ph68, %57
  %.03364 = phi i32 [ %58, %57 ], [ 0, %.lr.ph68 ]
  %.13663 = phi float [ %55, %57 ], [ %.03565, %.lr.ph68 ]
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 1)
  store i32 %.03364, ptr %54, align 4, !tbaa !5
  %55 = fadd float %.13663, 1.000000e+00
  %56 = fptosi float %55 to i8
  invoke void @_ZN3imp5LayerIcE3setERKNS_9DimensionILi2EEEc(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(32) %5, i8 noundef signext %56)
          to label %57 unwind label %52

57:                                               ; preds = %.lr.ph
  %58 = add nuw nsw i32 %.03364, 1
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 1)
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = icmp slt i32 %58, %60
  br i1 %61, label %.lr.ph, label %._crit_edge, !llvm.loop !11

62:                                               ; preds = %._crit_edge69
  %63 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.12)
          to label %64 unwind label %107

64:                                               ; preds = %62
  %65 = invoke noundef signext i8 @_ZNK3imp4GridILi2EcE3getERKNS_9DimensionILi2EEE(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %66 unwind label %107

66:                                               ; preds = %64
  %67 = sext i8 %65 to i32
  %68 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %63, i32 noundef %67)
          to label %69 unwind label %107

69:                                               ; preds = %66
  %70 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %68, ptr noundef nonnull @.str.5)
          to label %71 unwind label %107

71:                                               ; preds = %69
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 0)
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %70, i32 noundef %73)
          to label %75 unwind label %107

75:                                               ; preds = %71
  %76 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull @.str.2)
          to label %77 unwind label %107

77:                                               ; preds = %75
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 1)
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %76, i32 noundef %79)
          to label %81 unwind label %107

81:                                               ; preds = %77
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %80, ptr noundef nonnull @.str.6)
          to label %83 unwind label %107

83:                                               ; preds = %81
  %84 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %82, i32 noundef %35)
          to label %85 unwind label %107

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

87:                                               ; preds = %85
  %88 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %89 unwind label %107

89:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  invoke void @_ZNK3imp4GridILi2EcE6vectorEj(ptr dead_on_unwind nonnull writable sret(%"class.imp::Dimension.0") align 8 %6, ptr noundef nonnull align 8 dereferenceable(112) %0, i32 noundef %35)
          to label %90 unwind label %109

90:                                               ; preds = %89
  %91 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.8)
          to label %92 unwind label %111

92:                                               ; preds = %90
  %93 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %6, i32 noundef 0)
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %91, i32 noundef %94)
          to label %96 unwind label %111

96:                                               ; preds = %92
  %97 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %95, ptr noundef nonnull @.str.2)
          to label %98 unwind label %111

98:                                               ; preds = %96
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %6, i32 noundef 1)
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %97, i32 noundef %100)
          to label %102 unwind label %111

102:                                              ; preds = %98
  %103 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %101, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader unwind label %111

.preheader:                                       ; preds = %102
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 0)
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = icmp sgt i32 %105, 0
  br i1 %106, label %.lr.ph75, label %._crit_edge76

._crit_edge76:                                    ; preds = %134, %.preheader
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  invoke void @_ZN3imp9DimensionILi2EEC2IJiEEEiDpT_(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef 0, i32 noundef 0)
          to label %139 unwind label %169

107:                                              ; preds = %87, %85, %83, %81, %77, %75, %71, %69, %66, %64, %62, %._crit_edge69
  %108 = landingpad { ptr, i32 }
          cleanup
  br label %182

109:                                              ; preds = %89
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %181

111:                                              ; preds = %102, %98, %96, %92, %90
  %112 = landingpad { ptr, i32 }
          cleanup
  br label %180

113:                                              ; preds = %._crit_edge73
  %114 = landingpad { ptr, i32 }
          cleanup
  br label %180

.lr.ph75:                                         ; preds = %.preheader, %134
  %.03174 = phi i32 [ %135, %134 ], [ 0, %.preheader ]
  %115 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 0)
  store i32 %.03174, ptr %115, align 4, !tbaa !5
  %116 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 1)
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %118 = icmp sgt i32 %117, 0
  br i1 %118, label %.lr.ph72, label %._crit_edge73

._crit_edge73:                                    ; preds = %129, %.lr.ph75
  %119 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %134 unwind label %113

120:                                              ; preds = %127, %124, %.lr.ph72
  %121 = landingpad { ptr, i32 }
          cleanup
  br label %180

.lr.ph72:                                         ; preds = %.lr.ph75, %129
  %.070 = phi i32 [ %130, %129 ], [ 0, %.lr.ph75 ]
  %122 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 1)
  store i32 %.070, ptr %122, align 4, !tbaa !5
  %123 = invoke noundef signext i8 @_ZNK3imp4GridILi2EcE3getERKNS_9DimensionILi2EEE(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %124 unwind label %120

124:                                              ; preds = %.lr.ph72
  %125 = sext i8 %123 to i32
  %126 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %125)
          to label %127 unwind label %120

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.9)
          to label %129 unwind label %120

129:                                              ; preds = %127
  %130 = add nuw nsw i32 %.070, 1
  %131 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 1)
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = icmp slt i32 %130, %132
  br i1 %133, label %.lr.ph72, label %._crit_edge73, !llvm.loop !12

134:                                              ; preds = %._crit_edge73
  %135 = add nuw nsw i32 %.03174, 1
  %136 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 0)
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = icmp slt i32 %135, %137
  br i1 %138, label %.lr.ph75, label %._crit_edge76, !llvm.loop !13

139:                                              ; preds = %._crit_edge76
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #5
  invoke void @_ZN3imp9DimensionILi2EEC2IJiEEEiDpT_(ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef 0, i32 noundef 1)
          to label %140 unwind label %171

140:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #5
  invoke void @_ZN3imp9DimensionILi2EEC2IJiEEEiDpT_(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 1, i32 noundef 0)
          to label %141 unwind label %173

141:                                              ; preds = %140
  %142 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.13)
          to label %143 unwind label %175

143:                                              ; preds = %141
  %144 = invoke noundef signext i8 @_ZNK3imp4GridILi2EcE3getERKNS_9DimensionILi2EEE(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %145 unwind label %175

145:                                              ; preds = %143
  %146 = sext i8 %144 to i32
  %147 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %142, i32 noundef %146)
          to label %148 unwind label %175

148:                                              ; preds = %145
  %149 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %147, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %150 unwind label %175

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

152:                                              ; preds = %150
  %153 = invoke noundef signext i8 @_ZNK3imp4GridILi2EcE3getERKNS_9DimensionILi2EEE(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %154 unwind label %175

154:                                              ; preds = %152
  %155 = sext i8 %153 to i32
  %156 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %151, i32 noundef %155)
          to label %157 unwind label %175

157:                                              ; preds = %154
  %158 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %156, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %159 unwind label %175

159:                                              ; preds = %157
  %160 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.15)
          to label %161 unwind label %175

161:                                              ; preds = %159
  %162 = invoke noundef signext i8 @_ZNK3imp4GridILi2EcE3getERKNS_9DimensionILi2EEE(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %163 unwind label %175

163:                                              ; preds = %161
  %164 = sext i8 %162 to i32
  %165 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %160, i32 noundef %164)
          to label %166 unwind label %175

166:                                              ; preds = %163
  %167 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %165, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %168 unwind label %175

168:                                              ; preds = %166
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #5
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  ret void

169:                                              ; preds = %._crit_edge76
  %170 = landingpad { ptr, i32 }
          cleanup
  br label %179

171:                                              ; preds = %139
  %172 = landingpad { ptr, i32 }
          cleanup
  br label %178

173:                                              ; preds = %140
  %174 = landingpad { ptr, i32 }
          cleanup
  br label %177

175:                                              ; preds = %166, %163, %161, %159, %157, %154, %152, %150, %148, %145, %143, %141
  %176 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  br label %177

177:                                              ; preds = %175, %173
  %.pn50 = phi { ptr, i32 } [ %176, %175 ], [ %174, %173 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #5
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  br label %178

178:                                              ; preds = %177, %171
  %.pn50.pn = phi { ptr, i32 } [ %.pn50, %177 ], [ %172, %171 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  br label %179

179:                                              ; preds = %178, %169
  %.pn50.pn.pn = phi { ptr, i32 } [ %.pn50.pn, %178 ], [ %170, %169 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  br label %180

180:                                              ; preds = %113, %120, %179, %111
  %.pn54.pn = phi { ptr, i32 } [ %.pn50.pn.pn, %179 ], [ %112, %111 ], [ %121, %120 ], [ %114, %113 ]
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %181

181:                                              ; preds = %180, %109
  %.pn54.pn.pn = phi { ptr, i32 } [ %.pn54.pn, %180 ], [ %110, %109 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br label %182

182:                                              ; preds = %107, %181, %52
  %.pn59 = phi { ptr, i32 } [ %53, %52 ], [ %.pn54.pn.pn, %181 ], [ %108, %107 ]
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  br label %183

183:                                              ; preds = %182, %43
  %.pn59.pn = phi { ptr, i32 } [ %.pn59, %182 ], [ %.pn.pn, %43 ]
  resume { ptr, i32 } %.pn59.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3imp3VecILi2EiE4sizeEv() local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3imp4GridILi2EcE4sizeEv(ptr dead_on_unwind noalias writable sret(%"class.imp::Dimension.0") align 8, ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EiEixEj(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp9DimensionILi2EEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp5LayerIcE3setERKNS_9DimensionILi2EEEc(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3imp4GridILi2EcE5indexERKNS_9DimensionILi2EEE(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef signext i8 @_ZNK3imp4GridILi2EcE3getERKNS_9DimensionILi2EEE(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3imp4GridILi2EcE6vectorEj(ptr dead_on_unwind noalias writable sret(%"class.imp::Dimension.0") align 8, ptr noundef nonnull align 8 dereferenceable(112), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp9DimensionILi2EEC2IJiEEEiDpT_(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

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


; Effective O3 passes: GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass