; LLVM IR from ImperialCollegeLondon/pnflow :: src/pnm/pnflow/ElementPore.ll (ZN13InOutBoundary8prepare2Ev)

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Elem *, std::allocator<Elem *>>::_Vector_impl" }
%"struct.std::_Vector_base<Elem *, std::allocator<Elem *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Elem *, std::allocator<Elem *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Elem *, std::allocator<Elem *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%class.var3 = type { double, double, double }
%class.InOutBoundary = type { %class.Pore, %"class.std::vector.29" }
%class.Pore = type { %class.Elem }
%class.Elem = type { %class.Apex, [5 x %class.SlvrElm], i8, i32, ptr, double, double, i32, %"class.std::vector", ptr, double, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, %"struct.std::pair", %"struct.std::pair", %"struct.std::pair", i32, i32, i32, i32, %class.var3 }
%class.Apex = type { ptr, i8, double, double, ptr, i32, double, double, double, double, i8, i8, i8, i8, %"struct.std::pair" }
%class.SlvrElm = type { i8, i8, i8, double, double }
%"struct.std::pair" = type { i32, double }
%"class.std::vector.29" = type { %"struct.std::_Vector_base.30" }
%"struct.std::_Vector_base.30" = type { %"struct.std::_Vector_base<Pore *, std::allocator<Pore *>>::_Vector_impl" }
%"struct.std::_Vector_base<Pore *, std::allocator<Pore *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Pore *, std::allocator<Pore *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Pore *, std::allocator<Pore *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.ElemModel = type { ptr, double, double, ptr, ptr, double, ptr, i8, i8, i8, i8, i32, double, double, double, double, double, double, double, %"struct.std::pair.34", %"struct.std::pair.34" }
%"struct.std::pair.34" = type { double, double }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

declare noundef double @_ZNK4Elem3RRREv(ptr noundef nonnull align 8 dereferenceable(408)) #2

declare void @_ZNK4Elem16checkConnectionsEv(ptr noundef nonnull align 8 dereferenceable(408)) #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408)) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13InOutBoundary8prepare2Ev(ptr noundef nonnull align 8 dereferenceable(432) %0) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %class.var3, align 8
  %12 = alloca %class.var3, align 8
  %13 = alloca %"class.std::vector", align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca ptr, align 8
  %17 = alloca %class.var3, align 8
  %18 = alloca %class.var3, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %19 = load ptr, ptr %2, align 8
  call void @_ZNK4Elem16checkConnectionsEv(ptr noundef nonnull align 8 dereferenceable(408) %19)
  %20 = getelementptr inbounds %class.InOutBoundary, ptr %19, i32 0, i32 1
  %21 = call noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408) %19)
  %22 = sext i32 %21 to i64
  call void @_ZNSt6vectorIP4PoreSaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %22)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #9
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %23

23:                                               ; preds = %194, %1
  %24 = load i32, ptr %3, align 4, !tbaa !9
  %25 = call noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408) %19)
  %26 = icmp slt i32 %24, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  br label %198

28:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #9
  %29 = load i32, ptr %3, align 4, !tbaa !9
  %30 = call noundef ptr @_ZN4Pore4neiTEi(ptr noundef nonnull align 8 dereferenceable(408) %19, i32 noundef %29)
  store ptr %30, ptr %4, align 8, !tbaa !5
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = call noundef ptr @_ZNK6Throat4neiPEi(ptr noundef nonnull align 8 dereferenceable(456) %31, i32 noundef 0)
  %33 = load ptr, ptr %32, align 8, !tbaa !11
  %34 = getelementptr inbounds ptr, ptr %33, i64 12
  %35 = load ptr, ptr %34, align 8
  %36 = call noundef i32 %35(ptr noundef nonnull align 8 dereferenceable(408) %32)
  %37 = load ptr, ptr %19, align 8, !tbaa !11
  %38 = getelementptr inbounds ptr, ptr %37, i64 12
  %39 = load ptr, ptr %38, align 8
  %40 = call noundef i32 %39(ptr noundef nonnull align 8 dereferenceable(408) %19)
  %41 = icmp eq i32 %36, %40
  br i1 %41, label %42, label %102

42:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #9
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %43, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #9
  call void @_ZNSaIP4ElemEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  invoke void @_ZNSt6vectorIP4ElemSaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 1, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %44 unwind label %88

44:                                               ; preds = %42
  call void @_ZNSt15__new_allocatorIP4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %45 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 408) #10
          to label %46 unwind label %92

46:                                               ; preds = %44
  %47 = getelementptr inbounds %class.Elem, ptr %19, i32 0, i32 4
  %48 = load ptr, ptr %47, align 8, !tbaa !13
  %49 = load ptr, ptr %19, align 8, !tbaa !11
  %50 = getelementptr inbounds ptr, ptr %49, i64 12
  %51 = load ptr, ptr %50, align 8
  %52 = invoke noundef i32 %51(ptr noundef nonnull align 8 dereferenceable(408) %19)
          to label %53 unwind label %96

53:                                               ; preds = %46
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = invoke noundef ptr @_ZNK6Throat4neiPEi(ptr noundef nonnull align 8 dereferenceable(456) %54, i32 noundef 1)
          to label %56 unwind label %96

56:                                               ; preds = %53
  %57 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK4Elem4nodeEv(ptr noundef nonnull align 8 dereferenceable(408) %55)
          to label %58 unwind label %96

58:                                               ; preds = %56
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %57, i64 24, i1 false), !tbaa.struct !24
  %59 = load ptr, ptr %19, align 8, !tbaa !11
  %60 = getelementptr inbounds ptr, ptr %59, i64 12
  %61 = load ptr, ptr %60, align 8
  %62 = invoke noundef i32 %61(ptr noundef nonnull align 8 dereferenceable(408) %19)
          to label %63 unwind label %96

63:                                               ; preds = %58
  %64 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN4Elem4nodeEv(ptr noundef nonnull align 8 dereferenceable(408) %19)
          to label %65 unwind label %96

65:                                               ; preds = %63
  invoke void @_Z9projectAx4var3IdEiRKS0_(ptr dead_on_unwind writable sret(%class.var3) align 8 %11, ptr noundef byval(%class.var3) align 8 %12, i32 noundef %62, ptr noundef nonnull align 8 dereferenceable(24) %64)
          to label %66 unwind label %96

66:                                               ; preds = %65
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = invoke noundef double @_ZNK4Elem3RRREv(ptr noundef nonnull align 8 dereferenceable(408) %67)
          to label %69 unwind label %96

69:                                               ; preds = %66
  %70 = fmul double %68, 1.100000e+00
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = invoke noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %71)
          to label %73 unwind label %96

73:                                               ; preds = %69
  %74 = load ptr, ptr %72, align 8, !tbaa !11
  %75 = getelementptr inbounds ptr, ptr %74, i64 16
  %76 = load ptr, ptr %75, align 8
  %77 = invoke noundef double %76(ptr noundef nonnull align 8 dereferenceable(152) %72)
          to label %78 unwind label %96

78:                                               ; preds = %73
  invoke void @_ZN4PoreC1ERK10CommonDatai4var3IdEddddbbdRSt6vectorIP4ElemSaIS7_EEi(ptr noundef nonnull align 8 dereferenceable(408) %45, ptr noundef nonnull align 8 dereferenceable(1972) %48, i32 noundef %52, ptr noundef byval(%class.var3) align 8 %11, double noundef %70, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef %77, i1 noundef zeroext false, i1 noundef zeroext false, double noundef 0.000000e+00, ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 0)
          to label %79 unwind label %96

79:                                               ; preds = %78
  store ptr %45, ptr %10, align 8, !tbaa !5
  %80 = load ptr, ptr %10, align 8, !tbaa !5
  %81 = getelementptr inbounds %class.InOutBoundary, ptr %19, i32 0, i32 1
  %82 = load i32, ptr %3, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4PoreSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %83) #9
  store ptr %80, ptr %84, align 8, !tbaa !5
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN6Throat6neiSetEiP4Pore(ptr noundef nonnull align 8 dereferenceable(456) %85, i32 noundef 0, ptr noundef %86)
          to label %87 unwind label %92

87:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @_ZNSt6vectorIP4ElemSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #9
  br label %177

88:                                               ; preds = %42
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %8, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIP4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  br label %101

92:                                               ; preds = %79, %44
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %8, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %9, align 4
  br label %100

96:                                               ; preds = %78, %73, %69, %66, %65, %63, %58, %56, %53, %46
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %8, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %9, align 4
  call void @_ZdlPvm(ptr noundef %45, i64 noundef 408) #11
  br label %100

100:                                              ; preds = %96, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @_ZNSt6vectorIP4ElemSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #9
  br label %101

101:                                              ; preds = %100, %88
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #9
  br label %197

102:                                              ; preds = %28
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = call noundef ptr @_ZNK6Throat4neiPEi(ptr noundef nonnull align 8 dereferenceable(456) %103, i32 noundef 1)
  %105 = load ptr, ptr %104, align 8, !tbaa !11
  %106 = getelementptr inbounds ptr, ptr %105, i64 12
  %107 = load ptr, ptr %106, align 8
  %108 = call noundef i32 %107(ptr noundef nonnull align 8 dereferenceable(408) %104)
  %109 = load ptr, ptr %19, align 8, !tbaa !11
  %110 = getelementptr inbounds ptr, ptr %109, i64 12
  %111 = load ptr, ptr %110, align 8
  %112 = call noundef i32 %111(ptr noundef nonnull align 8 dereferenceable(408) %19)
  %113 = icmp eq i32 %108, %112
  br i1 %113, label %114, label %174

114:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %115, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #9
  call void @_ZNSaIP4ElemEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #9
  invoke void @_ZNSt6vectorIP4ElemSaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef 1, ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %116 unwind label %160

116:                                              ; preds = %114
  call void @_ZNSt15__new_allocatorIP4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  %117 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 408) #10
          to label %118 unwind label %164

118:                                              ; preds = %116
  %119 = getelementptr inbounds %class.Elem, ptr %19, i32 0, i32 4
  %120 = load ptr, ptr %119, align 8, !tbaa !13
  %121 = load ptr, ptr %19, align 8, !tbaa !11
  %122 = getelementptr inbounds ptr, ptr %121, i64 12
  %123 = load ptr, ptr %122, align 8
  %124 = invoke noundef i32 %123(ptr noundef nonnull align 8 dereferenceable(408) %19)
          to label %125 unwind label %168

125:                                              ; preds = %118
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = invoke noundef ptr @_ZNK6Throat4neiPEi(ptr noundef nonnull align 8 dereferenceable(456) %126, i32 noundef 0)
          to label %128 unwind label %168

128:                                              ; preds = %125
  %129 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK4Elem4nodeEv(ptr noundef nonnull align 8 dereferenceable(408) %127)
          to label %130 unwind label %168

130:                                              ; preds = %128
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %129, i64 24, i1 false), !tbaa.struct !24
  %131 = load ptr, ptr %19, align 8, !tbaa !11
  %132 = getelementptr inbounds ptr, ptr %131, i64 12
  %133 = load ptr, ptr %132, align 8
  %134 = invoke noundef i32 %133(ptr noundef nonnull align 8 dereferenceable(408) %19)
          to label %135 unwind label %168

135:                                              ; preds = %130
  %136 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN4Elem4nodeEv(ptr noundef nonnull align 8 dereferenceable(408) %19)
          to label %137 unwind label %168

137:                                              ; preds = %135
  invoke void @_Z9projectAx4var3IdEiRKS0_(ptr dead_on_unwind writable sret(%class.var3) align 8 %17, ptr noundef byval(%class.var3) align 8 %18, i32 noundef %134, ptr noundef nonnull align 8 dereferenceable(24) %136)
          to label %138 unwind label %168

138:                                              ; preds = %137
  %139 = load ptr, ptr %4, align 8, !tbaa !5
  %140 = invoke noundef double @_ZNK4Elem3RRREv(ptr noundef nonnull align 8 dereferenceable(408) %139)
          to label %141 unwind label %168

141:                                              ; preds = %138
  %142 = fmul double %140, 1.100000e+00
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = invoke noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %143)
          to label %145 unwind label %168

145:                                              ; preds = %141
  %146 = load ptr, ptr %144, align 8, !tbaa !11
  %147 = getelementptr inbounds ptr, ptr %146, i64 16
  %148 = load ptr, ptr %147, align 8
  %149 = invoke noundef double %148(ptr noundef nonnull align 8 dereferenceable(152) %144)
          to label %150 unwind label %168

150:                                              ; preds = %145
  invoke void @_ZN4PoreC1ERK10CommonDatai4var3IdEddddbbdRSt6vectorIP4ElemSaIS7_EEi(ptr noundef nonnull align 8 dereferenceable(408) %117, ptr noundef nonnull align 8 dereferenceable(1972) %120, i32 noundef %124, ptr noundef byval(%class.var3) align 8 %17, double noundef %142, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef %149, i1 noundef zeroext false, i1 noundef zeroext false, double noundef 0.000000e+00, ptr noundef nonnull align 8 dereferenceable(24) %13, i32 noundef 0)
          to label %151 unwind label %168

151:                                              ; preds = %150
  store ptr %117, ptr %16, align 8, !tbaa !5
  %152 = load ptr, ptr %16, align 8, !tbaa !5
  %153 = getelementptr inbounds %class.InOutBoundary, ptr %19, i32 0, i32 1
  %154 = load i32, ptr %3, align 4, !tbaa !9
  %155 = sext i32 %154 to i64
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4PoreSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %153, i64 noundef %155) #9
  store ptr %152, ptr %156, align 8, !tbaa !5
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = load ptr, ptr %16, align 8, !tbaa !5
  invoke void @_ZN6Throat6neiSetEiP4Pore(ptr noundef nonnull align 8 dereferenceable(456) %157, i32 noundef 1, ptr noundef %158)
          to label %159 unwind label %164

159:                                              ; preds = %151
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @_ZNSt6vectorIP4ElemSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #9
  br label %176

160:                                              ; preds = %114
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %8, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIP4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  br label %173

164:                                              ; preds = %151, %116
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %8, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %9, align 4
  br label %172

168:                                              ; preds = %150, %145, %141, %138, %137, %135, %130, %128, %125, %118
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %8, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %9, align 4
  call void @_ZdlPvm(ptr noundef %117, i64 noundef 408) #11
  br label %172

172:                                              ; preds = %168, %164
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @_ZNSt6vectorIP4ElemSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #9
  br label %173

173:                                              ; preds = %172, %160
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #9
  br label %197

174:                                              ; preds = %102
  %175 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.5)
  br label %176

176:                                              ; preds = %174, %159
  br label %177

177:                                              ; preds = %176, %87
  %178 = load ptr, ptr %19, align 8, !tbaa !11
  %179 = getelementptr inbounds ptr, ptr %178, i64 12
  %180 = load ptr, ptr %179, align 8
  %181 = call noundef i32 %180(ptr noundef nonnull align 8 dereferenceable(408) %19)
  %182 = icmp sgt i32 %181, 1
  br i1 %182, label %183, label %193

183:                                              ; preds = %177
  %184 = call noundef ptr @_ZN4Elem7ChModelEv(ptr noundef nonnull align 8 dereferenceable(408) %19)
  %185 = getelementptr inbounds %class.ElemModel, ptr %184, i32 0, i32 7
  store i8 0, ptr %185, align 8, !tbaa !26
  %186 = call noundef ptr @_ZN4Elem7ChModelEv(ptr noundef nonnull align 8 dereferenceable(408) %19)
  %187 = getelementptr inbounds %class.ElemModel, ptr %186, i32 0, i32 8
  store i8 0, ptr %187, align 1, !tbaa !29
  %188 = getelementptr inbounds %class.Elem, ptr %19, i32 0, i32 4
  %189 = load ptr, ptr %188, align 8, !tbaa !13
  %190 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK10CommonData7noFluidEv(ptr noundef nonnull align 8 dereferenceable(1972) %189)
  %191 = call noundef ptr @_ZN4Elem7ChModelEv(ptr noundef nonnull align 8 dereferenceable(408) %19)
  %192 = getelementptr inbounds %class.ElemModel, ptr %191, i32 0, i32 6
  store ptr %190, ptr %192, align 8, !tbaa !30
  br label %193

193:                                              ; preds = %183, %177
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #9
  br label %194

194:                                              ; preds = %193
  %195 = load i32, ptr %3, align 4, !tbaa !9
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %3, align 4, !tbaa !9
  br label %23, !llvm.loop !31

197:                                              ; preds = %173, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  br label %199

198:                                              ; preds = %27
  ret void

199:                                              ; preds = %197
  %200 = load ptr, ptr %8, align 8
  %201 = load i32, ptr %9, align 4
  %202 = insertvalue { ptr, i32 } poison, ptr %200, 0
  %203 = insertvalue { ptr, i32 } %202, i32 %201, 1
  resume { ptr, i32 } %203
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIP4PoreSaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4Pore4neiTEi(ptr noundef nonnull align 8 dereferenceable(408), i32 noundef) #6 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIP4ElemSaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9projectAx4var3IdEiRKS0_(ptr dead_on_unwind noalias writable sret(%class.var3) align 8, ptr noundef byval(%class.var3) align 8, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24)) #1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4PoreSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4Elem7ChModelEv(ptr noundef nonnull align 8 dereferenceable(408)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(80) ptr @_ZNK10CommonData7noFluidEv(ptr noundef nonnull align 8 dereferenceable(1972)) #4 align 2

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

declare void @_ZN4PoreC1ERK10CommonDatai4var3IdEddddbbdRSt6vectorIP4ElemSaIS7_EEi(ptr, ptr, i32, ptr, double, double, double, double, i1, i1, double, ptr, i32)

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !6, i64 232}
!14 = !{!"_ZTS4Elem", !15, i64 0, !7, i64 104, !16, i64 224, !10, i64 228, !6, i64 232, !17, i64 240, !17, i64 248, !10, i64 256, !19, i64 264, !6, i64 288, !17, i64 296, !16, i64 304, !16, i64 305, !16, i64 306, !16, i64 307, !16, i64 308, !16, i64 309, !16, i64 310, !16, i64 311, !16, i64 312, !16, i64 313, !18, i64 320, !18, i64 336, !18, i64 352, !10, i64 368, !10, i64 372, !10, i64 376, !10, i64 380, !23, i64 384}
!15 = !{!"_ZTS4Apex", !16, i64 8, !17, i64 16, !17, i64 24, !6, i64 32, !10, i64 40, !17, i64 48, !17, i64 56, !17, i64 64, !17, i64 72, !16, i64 80, !16, i64 81, !16, i64 82, !16, i64 83, !18, i64 88}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = !{!"_ZTSSt4pairIidE", !10, i64 0, !17, i64 8}
!19 = !{!"_ZTSSt6vectorIP4ElemSaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIP4ElemSaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIP4ElemSaIS1_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIP4ElemSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTS4var3IdE", !17, i64 0, !17, i64 8, !17, i64 16}
!24 = !{i64 0, i64 8, !25, i64 8, i64 8, !25, i64 16, i64 8, !25}
!25 = !{!17, !17, i64 0}
!26 = !{!27, !16, i64 56}
!27 = !{!"_ZTS9ElemModel", !17, i64 8, !17, i64 16, !6, i64 24, !6, i64 32, !17, i64 40, !6, i64 48, !16, i64 56, !16, i64 57, !16, i64 58, !16, i64 59, !10, i64 60, !17, i64 64, !17, i64 72, !17, i64 80, !17, i64 88, !17, i64 96, !17, i64 104, !17, i64 112, !28, i64 120, !28, i64 136}
!28 = !{!"_ZTSSt4pairIddE", !17, i64 0, !17, i64 8}
!29 = !{!27, !16, i64 57}
!30 = !{!27, !6, i64 48}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Elem *, std::allocator<Elem *>>::_Vector_impl" }
%"struct.std::_Vector_base<Elem *, std::allocator<Elem *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Elem *, std::allocator<Elem *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Elem *, std::allocator<Elem *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%class.var3 = type { double, double, double }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

declare noundef double @_ZNK4Elem3RRREv(ptr noundef nonnull align 8 dereferenceable(408)) local_unnamed_addr #2

declare void @_ZNK4Elem16checkConnectionsEv(ptr noundef nonnull align 8 dereferenceable(408)) local_unnamed_addr #2

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

; 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 nounwind uwtable
declare dso_local noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13InOutBoundary8prepare2Ev(ptr noundef nonnull align 8 dereferenceable(432) %0) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca ptr, align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %class.var3, align 8
  %6 = alloca %class.var3, align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca %class.var3, align 8
  %11 = alloca %class.var3, align 8
  tail call void @_ZNK4Elem16checkConnectionsEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %12 = getelementptr inbounds i8, ptr %0, i64 408
  %13 = tail call noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %14 = sext i32 %13 to i64
  tail call void @_ZNSt6vectorIP4PoreSaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %14)
  %15 = tail call noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %1
  %17 = getelementptr inbounds i8, ptr %0, i64 232
  br label %18

._crit_edge:                                      ; preds = %135, %1
  ret void

18:                                               ; preds = %.lr.ph, %135
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %135 ]
  %19 = trunc nuw nsw i64 %indvars.iv to i32
  %20 = call noundef ptr @_ZN4Pore4neiTEi(ptr noundef nonnull align 8 dereferenceable(408) %0, i32 noundef %19)
  %21 = call noundef ptr @_ZNK6Throat4neiPEi(ptr noundef nonnull align 8 dereferenceable(456) %20, i32 noundef 0)
  %22 = load ptr, ptr %21, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %22, i64 96
  %24 = load ptr, ptr %23, align 8
  %25 = call noundef i32 %24(ptr noundef nonnull align 8 dereferenceable(408) %21)
  %26 = load ptr, ptr %0, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %26, i64 96
  %28 = load ptr, ptr %27, align 8
  %29 = call noundef i32 %28(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %30 = icmp eq i32 %25, %29
  br i1 %30, label %31, label %69

31:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  store ptr %20, ptr %3, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #9
  call void @_ZNSaIP4ElemEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #9
  invoke void @_ZNSt6vectorIP4ElemSaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 1, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %32 unwind label %61

32:                                               ; preds = %31
  call void @_ZNSt15__new_allocatorIP4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  %33 = invoke noalias noundef nonnull dereferenceable(408) ptr @_Znwm(i64 noundef 408) #10
          to label %34 unwind label %63

34:                                               ; preds = %32
  %35 = load ptr, ptr %17, align 8, !tbaa !11
  %36 = load ptr, ptr %0, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 96
  %38 = load ptr, ptr %37, align 8
  %39 = invoke noundef i32 %38(ptr noundef nonnull align 8 dereferenceable(408) %0)
          to label %40 unwind label %65

40:                                               ; preds = %34
  %41 = call noundef ptr @_ZNK6Throat4neiPEi(ptr noundef nonnull align 8 dereferenceable(456) %20, i32 noundef 1)
  %42 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK4Elem4nodeEv(ptr noundef nonnull align 8 dereferenceable(408) %41)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %42, i64 24, i1 false), !tbaa.struct !23
  %43 = load ptr, ptr %0, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %43, i64 96
  %45 = load ptr, ptr %44, align 8
  %46 = invoke noundef i32 %45(ptr noundef nonnull align 8 dereferenceable(408) %0)
          to label %47 unwind label %65

47:                                               ; preds = %40
  %48 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN4Elem4nodeEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  invoke void @_Z9projectAx4var3IdEiRKS0_(ptr dead_on_unwind nonnull writable sret(%class.var3) align 8 %5, ptr noundef nonnull byval(%class.var3) align 8 %6, i32 noundef %46, ptr noundef nonnull align 8 dereferenceable(24) %48)
          to label %49 unwind label %65

49:                                               ; preds = %47
  %50 = invoke noundef double @_ZNK4Elem3RRREv(ptr noundef nonnull align 8 dereferenceable(408) %20)
          to label %51 unwind label %65

51:                                               ; preds = %49
  %52 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %20)
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %53, i64 128
  %55 = load ptr, ptr %54, align 8
  %56 = invoke noundef double %55(ptr noundef nonnull align 8 dereferenceable(152) %52)
          to label %57 unwind label %65

57:                                               ; preds = %51
  %58 = fmul double %50, 1.100000e+00
  invoke void @_ZN4PoreC1ERK10CommonDatai4var3IdEddddbbdRSt6vectorIP4ElemSaIS7_EEi(ptr noundef nonnull align 8 dereferenceable(408) %33, ptr noundef nonnull align 8 dereferenceable(1972) %35, i32 noundef %39, ptr noundef nonnull byval(%class.var3) align 8 %5, double noundef %58, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef %56, i1 noundef zeroext false, i1 noundef zeroext false, double noundef 0.000000e+00, ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef 0)
          to label %59 unwind label %65

59:                                               ; preds = %57
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4PoreSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %indvars.iv) #9
  store ptr %33, ptr %60, align 8, !tbaa !8
  call void @_ZN6Throat6neiSetEiP4Pore(ptr noundef nonnull align 8 dereferenceable(456) %20, i32 noundef 0, ptr noundef nonnull %33)
  call void @_ZNSt6vectorIP4ElemSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #9
  br label %120

61:                                               ; preds = %31
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIP4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  br label %68

63:                                               ; preds = %32
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %67

65:                                               ; preds = %57, %51, %49, %47, %40, %34
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %33, i64 noundef 408) #11
  br label %67

67:                                               ; preds = %65, %63
  %.pn31 = phi { ptr, i32 } [ %66, %65 ], [ %64, %63 ]
  call void @_ZNSt6vectorIP4ElemSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  br label %68

68:                                               ; preds = %67, %61
  %.pn31.pn = phi { ptr, i32 } [ %.pn31, %67 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #9
  br label %139

69:                                               ; preds = %18
  %70 = call noundef ptr @_ZNK6Throat4neiPEi(ptr noundef nonnull align 8 dereferenceable(456) %20, i32 noundef 1)
  %71 = load ptr, ptr %70, align 8, !tbaa !5
  %72 = getelementptr inbounds i8, ptr %71, i64 96
  %73 = load ptr, ptr %72, align 8
  %74 = call noundef i32 %73(ptr noundef nonnull align 8 dereferenceable(408) %70)
  %75 = load ptr, ptr %0, align 8, !tbaa !5
  %76 = getelementptr inbounds i8, ptr %75, i64 96
  %77 = load ptr, ptr %76, align 8
  %78 = call noundef i32 %77(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %79 = icmp eq i32 %74, %78
  br i1 %79, label %80, label %118

80:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  store ptr %20, ptr %8, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #9
  call void @_ZNSaIP4ElemEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #9
  invoke void @_ZNSt6vectorIP4ElemSaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 1, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %81 unwind label %110

81:                                               ; preds = %80
  call void @_ZNSt15__new_allocatorIP4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  %82 = invoke noalias noundef nonnull dereferenceable(408) ptr @_Znwm(i64 noundef 408) #10
          to label %83 unwind label %112

83:                                               ; preds = %81
  %84 = load ptr, ptr %17, align 8, !tbaa !11
  %85 = load ptr, ptr %0, align 8, !tbaa !5
  %86 = getelementptr inbounds i8, ptr %85, i64 96
  %87 = load ptr, ptr %86, align 8
  %88 = invoke noundef i32 %87(ptr noundef nonnull align 8 dereferenceable(408) %0)
          to label %89 unwind label %114

89:                                               ; preds = %83
  %90 = call noundef ptr @_ZNK6Throat4neiPEi(ptr noundef nonnull align 8 dereferenceable(456) %20, i32 noundef 0)
  %91 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK4Elem4nodeEv(ptr noundef nonnull align 8 dereferenceable(408) %90)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %91, i64 24, i1 false), !tbaa.struct !23
  %92 = load ptr, ptr %0, align 8, !tbaa !5
  %93 = getelementptr inbounds i8, ptr %92, i64 96
  %94 = load ptr, ptr %93, align 8
  %95 = invoke noundef i32 %94(ptr noundef nonnull align 8 dereferenceable(408) %0)
          to label %96 unwind label %114

96:                                               ; preds = %89
  %97 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN4Elem4nodeEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  invoke void @_Z9projectAx4var3IdEiRKS0_(ptr dead_on_unwind nonnull writable sret(%class.var3) align 8 %10, ptr noundef nonnull byval(%class.var3) align 8 %11, i32 noundef %95, ptr noundef nonnull align 8 dereferenceable(24) %97)
          to label %98 unwind label %114

98:                                               ; preds = %96
  %99 = invoke noundef double @_ZNK4Elem3RRREv(ptr noundef nonnull align 8 dereferenceable(408) %20)
          to label %100 unwind label %114

100:                                              ; preds = %98
  %101 = call noundef ptr @_ZNK4Elem5modelEv(ptr noundef nonnull align 8 dereferenceable(408) %20)
  %102 = load ptr, ptr %101, align 8, !tbaa !5
  %103 = getelementptr inbounds i8, ptr %102, i64 128
  %104 = load ptr, ptr %103, align 8
  %105 = invoke noundef double %104(ptr noundef nonnull align 8 dereferenceable(152) %101)
          to label %106 unwind label %114

106:                                              ; preds = %100
  %107 = fmul double %99, 1.100000e+00
  invoke void @_ZN4PoreC1ERK10CommonDatai4var3IdEddddbbdRSt6vectorIP4ElemSaIS7_EEi(ptr noundef nonnull align 8 dereferenceable(408) %82, ptr noundef nonnull align 8 dereferenceable(1972) %84, i32 noundef %88, ptr noundef nonnull byval(%class.var3) align 8 %10, double noundef %107, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef %105, i1 noundef zeroext false, i1 noundef zeroext false, double noundef 0.000000e+00, ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef 0)
          to label %108 unwind label %114

108:                                              ; preds = %106
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4PoreSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %indvars.iv) #9
  store ptr %82, ptr %109, align 8, !tbaa !8
  call void @_ZN6Throat6neiSetEiP4Pore(ptr noundef nonnull align 8 dereferenceable(456) %20, i32 noundef 1, ptr noundef nonnull %82)
  call void @_ZNSt6vectorIP4ElemSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #9
  br label %120

110:                                              ; preds = %80
  %111 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIP4ElemED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  br label %117

112:                                              ; preds = %81
  %113 = landingpad { ptr, i32 }
          cleanup
  br label %116

114:                                              ; preds = %106, %100, %98, %96, %89, %83
  %115 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %82, i64 noundef 408) #11
  br label %116

116:                                              ; preds = %114, %112
  %.pn = phi { ptr, i32 } [ %115, %114 ], [ %113, %112 ]
  call void @_ZNSt6vectorIP4ElemSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  br label %117

117:                                              ; preds = %116, %110
  %.pn.pn = phi { ptr, i32 } [ %.pn, %116 ], [ %111, %110 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #9
  br label %139

118:                                              ; preds = %69
  %119 = 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.5)
  br label %120

120:                                              ; preds = %108, %118, %59
  %121 = load ptr, ptr %0, align 8, !tbaa !5
  %122 = getelementptr inbounds i8, ptr %121, i64 96
  %123 = load ptr, ptr %122, align 8
  %124 = call noundef i32 %123(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %125 = icmp sgt i32 %124, 1
  br i1 %125, label %126, label %135

126:                                              ; preds = %120
  %127 = call noundef ptr @_ZN4Elem7ChModelEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %128 = getelementptr inbounds i8, ptr %127, i64 56
  store i8 0, ptr %128, align 8, !tbaa !25
  %129 = call noundef ptr @_ZN4Elem7ChModelEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %130 = getelementptr inbounds i8, ptr %129, i64 57
  store i8 0, ptr %130, align 1, !tbaa !28
  %131 = load ptr, ptr %17, align 8, !tbaa !11
  %132 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK10CommonData7noFluidEv(ptr noundef nonnull align 8 dereferenceable(1972) %131)
  %133 = call noundef ptr @_ZN4Elem7ChModelEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %134 = getelementptr inbounds i8, ptr %133, i64 48
  store ptr %132, ptr %134, align 8, !tbaa !29
  br label %135

135:                                              ; preds = %126, %120
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %136 = call noundef i32 @_ZNK4Elem6nCnctsEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %137 = sext i32 %136 to i64
  %138 = icmp slt i64 %indvars.iv.next, %137
  br i1 %138, label %18, label %._crit_edge, !llvm.loop !30

139:                                              ; preds = %117, %68
  %.pn31.pn.pn = phi { ptr, i32 } [ %.pn31.pn, %68 ], [ %.pn.pn, %117 ]
  resume { ptr, i32 } %.pn31.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIP4PoreSaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4Pore4neiTEi(ptr noundef nonnull align 8 dereferenceable(408), i32 noundef) local_unnamed_addr #6 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIP4ElemSaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9projectAx4var3IdEiRKS0_(ptr dead_on_unwind noalias writable sret(%class.var3) align 8, ptr noundef byval(%class.var3) align 8, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK4Elem4nodeEv(ptr noundef nonnull align 8 dereferenceable(408)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN4Elem4nodeEv(ptr noundef nonnull align 8 dereferenceable(408)) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4PoreSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4Elem7ChModelEv(ptr noundef nonnull align 8 dereferenceable(408)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(80) ptr @_ZNK10CommonData7noFluidEv(ptr noundef nonnull align 8 dereferenceable(1972)) local_unnamed_addr #4 align 2

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

declare void @_ZN4PoreC1ERK10CommonDatai4var3IdEddddbbdRSt6vectorIP4ElemSaIS7_EEi(ptr, ptr, i32, ptr, double, double, double, double, i1, i1, double, ptr, i32) local_unnamed_addr

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !9, i64 232}
!12 = !{!"_ZTS4Elem", !13, i64 0, !10, i64 104, !14, i64 224, !16, i64 228, !9, i64 232, !15, i64 240, !15, i64 248, !16, i64 256, !18, i64 264, !9, i64 288, !15, i64 296, !14, i64 304, !14, i64 305, !14, i64 306, !14, i64 307, !14, i64 308, !14, i64 309, !14, i64 310, !14, i64 311, !14, i64 312, !14, i64 313, !17, i64 320, !17, i64 336, !17, i64 352, !16, i64 368, !16, i64 372, !16, i64 376, !16, i64 380, !22, i64 384}
!13 = !{!"_ZTS4Apex", !14, i64 8, !15, i64 16, !15, i64 24, !9, i64 32, !16, i64 40, !15, i64 48, !15, i64 56, !15, i64 64, !15, i64 72, !14, i64 80, !14, i64 81, !14, i64 82, !14, i64 83, !17, i64 88}
!14 = !{!"bool", !10, i64 0}
!15 = !{!"double", !10, i64 0}
!16 = !{!"int", !10, i64 0}
!17 = !{!"_ZTSSt4pairIidE", !16, i64 0, !15, i64 8}
!18 = !{!"_ZTSSt6vectorIP4ElemSaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIP4ElemSaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIP4ElemSaIS1_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIP4ElemSaIS1_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!22 = !{!"_ZTS4var3IdE", !15, i64 0, !15, i64 8, !15, i64 16}
!23 = !{i64 0, i64 8, !24, i64 8, i64 8, !24, i64 16, i64 8, !24}
!24 = !{!15, !15, i64 0}
!25 = !{!26, !14, i64 56}
!26 = !{!"_ZTS9ElemModel", !15, i64 8, !15, i64 16, !9, i64 24, !9, i64 32, !15, i64 40, !9, i64 48, !14, i64 56, !14, i64 57, !14, i64 58, !14, i64 59, !16, i64 60, !15, i64 64, !15, i64 72, !15, i64 80, !15, i64 88, !15, i64 96, !15, i64 104, !15, i64 112, !27, i64 120, !27, i64 136}
!27 = !{!"_ZTSSt4pairIddE", !15, i64 0, !15, i64 8}
!28 = !{!26, !14, i64 57}
!29 = !{!26, !9, i64 48}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}


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