; LLVM IR from ImperialCollegeLondon/pnflow :: src/pnm/pnflow/Element.ll (ZN4Elem35fillElemCentreWithWaterCreateLayersEb)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.7" = type { i8 }
%class.Apex = type { ptr, i8, double, double, ptr, i32, double, double, double, double, i8, i8, i8, i8, %"struct.std::pair" }
%"struct.std::pair" = type { i32, double }
%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.SlvrElm = type { i8, i8, i8, double, double }
%"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.var3 = type { double, double, double }

@.str.16 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [4 x i8], align 1
@__FUNCTION__._ZN4Elem35fillElemCentreWithWaterCreateLayersEb = external hidden unnamed_addr constant [36 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [2 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z6_cerr_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_i(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2_sIiENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 4 dereferenceable(4)) #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK9ElemModel9bulkFluidEv(ptr noundef nonnull align 8 dereferenceable(152)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5Fluid5isOilEv(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Elem35fillElemCentreWithWaterCreateLayersEb(ptr noundef nonnull align 8 dereferenceable(408) %0, i1 noundef zeroext %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca i1, align 1
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca i1, align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca i1, align 1
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca i1, align 1
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca i1, align 1
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca i1, align 1
  %18 = alloca %"class.std::allocator.7", align 1
  %19 = alloca i1, align 1
  %20 = alloca i1, align 1
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i1, align 1
  %24 = alloca i1, align 1
  %25 = alloca %"class.std::__cxx11::basic_string", align 8
  %26 = alloca i1, align 1
  %27 = alloca %"class.std::allocator.7", align 1
  %28 = alloca i1, align 1
  %29 = alloca i1, align 1
  %30 = alloca i1, align 1
  %31 = alloca i1, align 1
  %32 = alloca i1, align 1
  %33 = alloca %"class.std::__cxx11::basic_string", align 8
  %34 = alloca i1, align 1
  %35 = alloca %"class.std::allocator.7", align 1
  %36 = alloca i1, align 1
  %37 = alloca i1, align 1
  %38 = alloca i1, align 1
  %39 = alloca i1, align 1
  %40 = alloca i1, align 1
  %41 = alloca %"class.std::__cxx11::basic_string", align 8
  %42 = alloca i1, align 1
  %43 = alloca i32, align 4
  %44 = alloca i1, align 1
  %45 = alloca i1, align 1
  %46 = alloca %"class.std::__cxx11::basic_string", align 8
  %47 = alloca %"class.std::__cxx11::basic_string", align 8
  %48 = alloca i1, align 1
  %49 = alloca %"class.std::__cxx11::basic_string", align 8
  %50 = alloca i1, align 1
  %51 = alloca %"class.std::__cxx11::basic_string", align 8
  %52 = alloca i1, align 1
  %53 = alloca %"class.std::allocator.7", align 1
  %54 = alloca i1, align 1
  %55 = alloca i1, align 1
  %56 = alloca i1, align 1
  %57 = alloca i1, align 1
  %58 = alloca i1, align 1
  %59 = alloca i1, align 1
  %60 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %61 = zext i1 %1 to i8
  store i8 %61, ptr %4, align 1, !tbaa !9
  %62 = load ptr, ptr %3, align 8
  %63 = getelementptr inbounds %class.Apex, ptr %62, i32 0, i32 10
  store i8 0, ptr %63, align 8, !tbaa !11
  %64 = getelementptr inbounds %class.Elem, ptr %62, i32 0, i32 9
  %65 = load ptr, ptr %64, align 8, !tbaa !16
  %66 = call noundef ptr @_ZNK9ElemModel9bulkFluidEv(ptr noundef nonnull align 8 dereferenceable(152) %65)
  %67 = call noundef zeroext i1 @_ZNK5Fluid5isOilEv(ptr noundef nonnull align 8 dereferenceable(80) %66)
  store i1 false, ptr %7, align 1
  store i1 false, ptr %9, align 1
  store i1 false, ptr %11, align 1
  store i1 false, ptr %13, align 1
  store i1 false, ptr %15, align 1
  store i1 false, ptr %17, align 1
  store i1 false, ptr %19, align 1
  store i1 false, ptr %20, align 1
  store i1 false, ptr %23, align 1
  store i1 false, ptr %24, align 1
  store i1 false, ptr %26, align 1
  store i1 false, ptr %28, align 1
  store i1 false, ptr %29, align 1
  store i1 false, ptr %30, align 1
  store i1 false, ptr %31, align 1
  store i1 false, ptr %32, align 1
  store i1 false, ptr %34, align 1
  store i1 false, ptr %36, align 1
  store i1 false, ptr %37, align 1
  store i1 false, ptr %38, align 1
  store i1 false, ptr %39, align 1
  store i1 false, ptr %40, align 1
  store i1 false, ptr %42, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #4
  store i1 false, ptr %44, align 1
  store i1 false, ptr %45, align 1
  store i1 false, ptr %48, align 1
  store i1 false, ptr %50, align 1
  store i1 false, ptr %52, align 1
  store i1 false, ptr %54, align 1
  store i1 false, ptr %55, align 1
  store i1 false, ptr %56, align 1
  store i1 false, ptr %57, align 1
  store i1 false, ptr %58, align 1
  store i1 false, ptr %59, align 1
  br i1 %67, label %85, label %68

68:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #4
  store i1 true, ptr %7, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #4
  store i1 true, ptr %9, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #4
  store i1 true, ptr %11, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #4
  store i1 true, ptr %13, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #4
  store i1 true, ptr %15, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #4
  store i1 true, ptr %17, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #4
  store i1 true, ptr %19, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #4
  store i1 true, ptr %20, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.16, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %69 unwind label %203

69:                                               ; preds = %68
  store i1 true, ptr %23, align 1
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.17)
          to label %70 unwind label %207

70:                                               ; preds = %69
  store i1 true, ptr %24, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #4
  store i1 true, ptr %26, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #4
  store i1 true, ptr %28, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #4
  store i1 true, ptr %29, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef @__FUNCTION__._ZN4Elem35fillElemCentreWithWaterCreateLayersEb, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %71 unwind label %211

71:                                               ; preds = %70
  store i1 true, ptr %30, align 1
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %25)
          to label %72 unwind label %215

72:                                               ; preds = %71
  store i1 true, ptr %31, align 1
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.18)
          to label %73 unwind label %219

73:                                               ; preds = %72
  store i1 true, ptr %32, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %33) #4
  store i1 true, ptr %34, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %35) #4
  store i1 true, ptr %36, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #4
  store i1 true, ptr %37, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %33, ptr noundef @.str.19, ptr noundef nonnull align 1 dereferenceable(1) %35)
          to label %74 unwind label %223

74:                                               ; preds = %73
  store i1 true, ptr %38, align 1
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %33)
          to label %75 unwind label %227

75:                                               ; preds = %74
  store i1 true, ptr %39, align 1
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef @.str.20)
          to label %76 unwind label %231

76:                                               ; preds = %75
  store i1 true, ptr %40, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %41) #4
  store i1 true, ptr %42, align 1
  store i32 520, ptr %43, align 4, !tbaa !23
  invoke void @_Z2_sIiENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %41, ptr noundef nonnull align 4 dereferenceable(4) %43)
          to label %77 unwind label %235

77:                                               ; preds = %76
  store i1 true, ptr %44, align 1
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %41)
          to label %78 unwind label %239

78:                                               ; preds = %77
  store i1 true, ptr %45, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %47) #4
  store i1 true, ptr %48, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %49) #4
  store i1 true, ptr %50, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %51) #4
  store i1 true, ptr %52, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %53) #4
  store i1 true, ptr %54, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %53) #4
  store i1 true, ptr %55, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %51, ptr noundef @.str.21, ptr noundef nonnull align 1 dereferenceable(1) %53)
          to label %79 unwind label %243

79:                                               ; preds = %78
  store i1 true, ptr %56, align 1
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %49, ptr noundef nonnull align 8 dereferenceable(32) %51, ptr noundef @.str.26)
          to label %80 unwind label %247

80:                                               ; preds = %79
  store i1 true, ptr %57, align 1
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %47, ptr noundef nonnull align 8 dereferenceable(32) %49, ptr noundef @.str.27)
          to label %81 unwind label %251

81:                                               ; preds = %80
  store i1 true, ptr %58, align 1
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %46, ptr noundef nonnull align 8 dereferenceable(32) %47, ptr noundef @.str.28)
          to label %82 unwind label %255

82:                                               ; preds = %81
  store i1 true, ptr %59, align 1
  %83 = invoke noundef zeroext i1 @_Z6_cerr_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_i(ptr noundef %5, ptr noundef %46, i32 noundef 0)
          to label %84 unwind label %259

84:                                               ; preds = %82
  br label %85

85:                                               ; preds = %84, %2
  %86 = phi i1 [ true, %2 ], [ %83, %84 ]
  %87 = xor i1 %86, true
  %88 = load i1, ptr %59, align 1
  br i1 %88, label %89, label %90

89:                                               ; preds = %85
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %46) #4
  br label %90

90:                                               ; preds = %89, %85
  %91 = load i1, ptr %58, align 1
  br i1 %91, label %92, label %93

92:                                               ; preds = %90
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %47) #4
  br label %93

93:                                               ; preds = %92, %90
  %94 = load i1, ptr %57, align 1
  br i1 %94, label %95, label %96

95:                                               ; preds = %93
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %49) #4
  br label %96

96:                                               ; preds = %95, %93
  %97 = load i1, ptr %56, align 1
  br i1 %97, label %98, label %99

98:                                               ; preds = %96
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %51) #4
  br label %99

99:                                               ; preds = %98, %96
  %100 = load i1, ptr %55, align 1
  br i1 %100, label %101, label %102

101:                                              ; preds = %99
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %53) #4
  br label %102

102:                                              ; preds = %101, %99
  %103 = load i1, ptr %54, align 1
  br i1 %103, label %104, label %105

104:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 1, ptr %53) #4
  br label %105

105:                                              ; preds = %104, %102
  %106 = load i1, ptr %52, align 1
  br i1 %106, label %107, label %108

107:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 32, ptr %51) #4
  br label %108

108:                                              ; preds = %107, %105
  %109 = load i1, ptr %50, align 1
  br i1 %109, label %110, label %111

110:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 32, ptr %49) #4
  br label %111

111:                                              ; preds = %110, %108
  %112 = load i1, ptr %48, align 1
  br i1 %112, label %113, label %114

113:                                              ; preds = %111
  call void @llvm.lifetime.end.p0(i64 32, ptr %47) #4
  br label %114

114:                                              ; preds = %113, %111
  %115 = load i1, ptr %45, align 1
  br i1 %115, label %116, label %117

116:                                              ; preds = %114
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  br label %117

117:                                              ; preds = %116, %114
  %118 = load i1, ptr %44, align 1
  br i1 %118, label %119, label %120

119:                                              ; preds = %117
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %41) #4
  br label %120

120:                                              ; preds = %119, %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #4
  %121 = load i1, ptr %42, align 1
  br i1 %121, label %122, label %123

122:                                              ; preds = %120
  call void @llvm.lifetime.end.p0(i64 32, ptr %41) #4
  br label %123

123:                                              ; preds = %122, %120
  %124 = load i1, ptr %40, align 1
  br i1 %124, label %125, label %126

125:                                              ; preds = %123
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  br label %126

126:                                              ; preds = %125, %123
  %127 = load i1, ptr %39, align 1
  br i1 %127, label %128, label %129

128:                                              ; preds = %126
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  br label %129

129:                                              ; preds = %128, %126
  %130 = load i1, ptr %38, align 1
  br i1 %130, label %131, label %132

131:                                              ; preds = %129
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #4
  br label %132

132:                                              ; preds = %131, %129
  %133 = load i1, ptr %37, align 1
  br i1 %133, label %134, label %135

134:                                              ; preds = %132
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #4
  br label %135

135:                                              ; preds = %134, %132
  %136 = load i1, ptr %36, align 1
  br i1 %136, label %137, label %138

137:                                              ; preds = %135
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #4
  br label %138

138:                                              ; preds = %137, %135
  %139 = load i1, ptr %34, align 1
  br i1 %139, label %140, label %141

140:                                              ; preds = %138
  call void @llvm.lifetime.end.p0(i64 32, ptr %33) #4
  br label %141

141:                                              ; preds = %140, %138
  %142 = load i1, ptr %32, align 1
  br i1 %142, label %143, label %144

143:                                              ; preds = %141
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  br label %144

144:                                              ; preds = %143, %141
  %145 = load i1, ptr %31, align 1
  br i1 %145, label %146, label %147

146:                                              ; preds = %144
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  br label %147

147:                                              ; preds = %146, %144
  %148 = load i1, ptr %30, align 1
  br i1 %148, label %149, label %150

149:                                              ; preds = %147
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #4
  br label %150

150:                                              ; preds = %149, %147
  %151 = load i1, ptr %29, align 1
  br i1 %151, label %152, label %153

152:                                              ; preds = %150
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #4
  br label %153

153:                                              ; preds = %152, %150
  %154 = load i1, ptr %28, align 1
  br i1 %154, label %155, label %156

155:                                              ; preds = %153
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #4
  br label %156

156:                                              ; preds = %155, %153
  %157 = load i1, ptr %26, align 1
  br i1 %157, label %158, label %159

158:                                              ; preds = %156
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #4
  br label %159

159:                                              ; preds = %158, %156
  %160 = load i1, ptr %24, align 1
  br i1 %160, label %161, label %162

161:                                              ; preds = %159
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #4
  br label %162

162:                                              ; preds = %161, %159
  %163 = load i1, ptr %23, align 1
  br i1 %163, label %164, label %165

164:                                              ; preds = %162
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  br label %165

165:                                              ; preds = %164, %162
  %166 = load i1, ptr %20, align 1
  br i1 %166, label %167, label %168

167:                                              ; preds = %165
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #4
  br label %168

168:                                              ; preds = %167, %165
  %169 = load i1, ptr %19, align 1
  br i1 %169, label %170, label %171

170:                                              ; preds = %168
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #4
  br label %171

171:                                              ; preds = %170, %168
  %172 = load i1, ptr %17, align 1
  br i1 %172, label %173, label %174

173:                                              ; preds = %171
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #4
  br label %174

174:                                              ; preds = %173, %171
  %175 = load i1, ptr %15, align 1
  br i1 %175, label %176, label %177

176:                                              ; preds = %174
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #4
  br label %177

177:                                              ; preds = %176, %174
  %178 = load i1, ptr %13, align 1
  br i1 %178, label %179, label %180

179:                                              ; preds = %177
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #4
  br label %180

180:                                              ; preds = %179, %177
  %181 = load i1, ptr %11, align 1
  br i1 %181, label %182, label %183

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

183:                                              ; preds = %182, %180
  %184 = load i1, ptr %9, align 1
  br i1 %184, label %185, label %186

185:                                              ; preds = %183
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #4
  br label %186

186:                                              ; preds = %185, %183
  %187 = load i1, ptr %7, align 1
  br i1 %187, label %188, label %189

188:                                              ; preds = %186
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #4
  br label %189

189:                                              ; preds = %188, %186
  %190 = getelementptr inbounds %class.Elem, ptr %62, i32 0, i32 9
  %191 = load ptr, ptr %190, align 8, !tbaa !16
  %192 = load i8, ptr %4, align 1, !tbaa !9, !range !24, !noundef !25
  %193 = trunc i8 %192 to i1
  %194 = load ptr, ptr %191, align 8, !tbaa !26
  %195 = getelementptr inbounds ptr, ptr %194, i64 7
  %196 = load ptr, ptr %195, align 8
  call void %196(ptr noundef nonnull align 8 dereferenceable(152) %191, i1 noundef zeroext %193)
  call void @llvm.lifetime.start.p0(i64 4, ptr %60) #4
  store i32 0, ptr %60, align 4, !tbaa !23
  br label %197

197:                                              ; preds = %394, %189
  %198 = load i32, ptr %60, align 4, !tbaa !23
  %199 = getelementptr inbounds %class.Elem, ptr %62, i32 0, i32 7
  %200 = load i32, ptr %199, align 8, !tbaa !28
  %201 = icmp slt i32 %198, %200
  br i1 %201, label %379, label %202

202:                                              ; preds = %197
  call void @llvm.lifetime.end.p0(i64 4, ptr %60) #4
  br label %397

203:                                              ; preds = %68
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %21, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %22, align 4
  br label %354

207:                                              ; preds = %69
  %208 = landingpad { ptr, i32 }
          cleanup
  %209 = extractvalue { ptr, i32 } %208, 0
  store ptr %209, ptr %21, align 8
  %210 = extractvalue { ptr, i32 } %208, 1
  store i32 %210, ptr %22, align 4
  br label %350

211:                                              ; preds = %70
  %212 = landingpad { ptr, i32 }
          cleanup
  %213 = extractvalue { ptr, i32 } %212, 0
  store ptr %213, ptr %21, align 8
  %214 = extractvalue { ptr, i32 } %212, 1
  store i32 %214, ptr %22, align 4
  br label %337

215:                                              ; preds = %71
  %216 = landingpad { ptr, i32 }
          cleanup
  %217 = extractvalue { ptr, i32 } %216, 0
  store ptr %217, ptr %21, align 8
  %218 = extractvalue { ptr, i32 } %216, 1
  store i32 %218, ptr %22, align 4
  br label %333

219:                                              ; preds = %72
  %220 = landingpad { ptr, i32 }
          cleanup
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %21, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %22, align 4
  br label %329

223:                                              ; preds = %73
  %224 = landingpad { ptr, i32 }
          cleanup
  %225 = extractvalue { ptr, i32 } %224, 0
  store ptr %225, ptr %21, align 8
  %226 = extractvalue { ptr, i32 } %224, 1
  store i32 %226, ptr %22, align 4
  br label %316

227:                                              ; preds = %74
  %228 = landingpad { ptr, i32 }
          cleanup
  %229 = extractvalue { ptr, i32 } %228, 0
  store ptr %229, ptr %21, align 8
  %230 = extractvalue { ptr, i32 } %228, 1
  store i32 %230, ptr %22, align 4
  br label %312

231:                                              ; preds = %75
  %232 = landingpad { ptr, i32 }
          cleanup
  %233 = extractvalue { ptr, i32 } %232, 0
  store ptr %233, ptr %21, align 8
  %234 = extractvalue { ptr, i32 } %232, 1
  store i32 %234, ptr %22, align 4
  br label %308

235:                                              ; preds = %76
  %236 = landingpad { ptr, i32 }
          cleanup
  %237 = extractvalue { ptr, i32 } %236, 0
  store ptr %237, ptr %21, align 8
  %238 = extractvalue { ptr, i32 } %236, 1
  store i32 %238, ptr %22, align 4
  br label %301

239:                                              ; preds = %77
  %240 = landingpad { ptr, i32 }
          cleanup
  %241 = extractvalue { ptr, i32 } %240, 0
  store ptr %241, ptr %21, align 8
  %242 = extractvalue { ptr, i32 } %240, 1
  store i32 %242, ptr %22, align 4
  br label %297

243:                                              ; preds = %78
  %244 = landingpad { ptr, i32 }
          cleanup
  %245 = extractvalue { ptr, i32 } %244, 0
  store ptr %245, ptr %21, align 8
  %246 = extractvalue { ptr, i32 } %244, 1
  store i32 %246, ptr %22, align 4
  br label %278

247:                                              ; preds = %79
  %248 = landingpad { ptr, i32 }
          cleanup
  %249 = extractvalue { ptr, i32 } %248, 0
  store ptr %249, ptr %21, align 8
  %250 = extractvalue { ptr, i32 } %248, 1
  store i32 %250, ptr %22, align 4
  br label %274

251:                                              ; preds = %80
  %252 = landingpad { ptr, i32 }
          cleanup
  %253 = extractvalue { ptr, i32 } %252, 0
  store ptr %253, ptr %21, align 8
  %254 = extractvalue { ptr, i32 } %252, 1
  store i32 %254, ptr %22, align 4
  br label %270

255:                                              ; preds = %81
  %256 = landingpad { ptr, i32 }
          cleanup
  %257 = extractvalue { ptr, i32 } %256, 0
  store ptr %257, ptr %21, align 8
  %258 = extractvalue { ptr, i32 } %256, 1
  store i32 %258, ptr %22, align 4
  br label %266

259:                                              ; preds = %82
  %260 = landingpad { ptr, i32 }
          cleanup
  %261 = extractvalue { ptr, i32 } %260, 0
  store ptr %261, ptr %21, align 8
  %262 = extractvalue { ptr, i32 } %260, 1
  store i32 %262, ptr %22, align 4
  %263 = load i1, ptr %59, align 1
  br i1 %263, label %264, label %265

264:                                              ; preds = %259
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %46) #4
  br label %265

265:                                              ; preds = %264, %259
  br label %266

266:                                              ; preds = %265, %255
  %267 = load i1, ptr %58, align 1
  br i1 %267, label %268, label %269

268:                                              ; preds = %266
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %47) #4
  br label %269

269:                                              ; preds = %268, %266
  br label %270

270:                                              ; preds = %269, %251
  %271 = load i1, ptr %57, align 1
  br i1 %271, label %272, label %273

272:                                              ; preds = %270
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %49) #4
  br label %273

273:                                              ; preds = %272, %270
  br label %274

274:                                              ; preds = %273, %247
  %275 = load i1, ptr %56, align 1
  br i1 %275, label %276, label %277

276:                                              ; preds = %274
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %51) #4
  br label %277

277:                                              ; preds = %276, %274
  br label %278

278:                                              ; preds = %277, %243
  %279 = load i1, ptr %55, align 1
  br i1 %279, label %280, label %281

280:                                              ; preds = %278
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %53) #4
  br label %281

281:                                              ; preds = %280, %278
  %282 = load i1, ptr %54, align 1
  br i1 %282, label %283, label %284

283:                                              ; preds = %281
  call void @llvm.lifetime.end.p0(i64 1, ptr %53) #4
  br label %284

284:                                              ; preds = %283, %281
  %285 = load i1, ptr %52, align 1
  br i1 %285, label %286, label %287

286:                                              ; preds = %284
  call void @llvm.lifetime.end.p0(i64 32, ptr %51) #4
  br label %287

287:                                              ; preds = %286, %284
  %288 = load i1, ptr %50, align 1
  br i1 %288, label %289, label %290

289:                                              ; preds = %287
  call void @llvm.lifetime.end.p0(i64 32, ptr %49) #4
  br label %290

290:                                              ; preds = %289, %287
  %291 = load i1, ptr %48, align 1
  br i1 %291, label %292, label %293

292:                                              ; preds = %290
  call void @llvm.lifetime.end.p0(i64 32, ptr %47) #4
  br label %293

293:                                              ; preds = %292, %290
  %294 = load i1, ptr %45, align 1
  br i1 %294, label %295, label %296

295:                                              ; preds = %293
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  br label %296

296:                                              ; preds = %295, %293
  br label %297

297:                                              ; preds = %296, %239
  %298 = load i1, ptr %44, align 1
  br i1 %298, label %299, label %300

299:                                              ; preds = %297
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %41) #4
  br label %300

300:                                              ; preds = %299, %297
  br label %301

301:                                              ; preds = %300, %235
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #4
  %302 = load i1, ptr %42, align 1
  br i1 %302, label %303, label %304

303:                                              ; preds = %301
  call void @llvm.lifetime.end.p0(i64 32, ptr %41) #4
  br label %304

304:                                              ; preds = %303, %301
  %305 = load i1, ptr %40, align 1
  br i1 %305, label %306, label %307

306:                                              ; preds = %304
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  br label %307

307:                                              ; preds = %306, %304
  br label %308

308:                                              ; preds = %307, %231
  %309 = load i1, ptr %39, align 1
  br i1 %309, label %310, label %311

310:                                              ; preds = %308
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  br label %311

311:                                              ; preds = %310, %308
  br label %312

312:                                              ; preds = %311, %227
  %313 = load i1, ptr %38, align 1
  br i1 %313, label %314, label %315

314:                                              ; preds = %312
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #4
  br label %315

315:                                              ; preds = %314, %312
  br label %316

316:                                              ; preds = %315, %223
  %317 = load i1, ptr %37, align 1
  br i1 %317, label %318, label %319

318:                                              ; preds = %316
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #4
  br label %319

319:                                              ; preds = %318, %316
  %320 = load i1, ptr %36, align 1
  br i1 %320, label %321, label %322

321:                                              ; preds = %319
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #4
  br label %322

322:                                              ; preds = %321, %319
  %323 = load i1, ptr %34, align 1
  br i1 %323, label %324, label %325

324:                                              ; preds = %322
  call void @llvm.lifetime.end.p0(i64 32, ptr %33) #4
  br label %325

325:                                              ; preds = %324, %322
  %326 = load i1, ptr %32, align 1
  br i1 %326, label %327, label %328

327:                                              ; preds = %325
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  br label %328

328:                                              ; preds = %327, %325
  br label %329

329:                                              ; preds = %328, %219
  %330 = load i1, ptr %31, align 1
  br i1 %330, label %331, label %332

331:                                              ; preds = %329
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  br label %332

332:                                              ; preds = %331, %329
  br label %333

333:                                              ; preds = %332, %215
  %334 = load i1, ptr %30, align 1
  br i1 %334, label %335, label %336

335:                                              ; preds = %333
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #4
  br label %336

336:                                              ; preds = %335, %333
  br label %337

337:                                              ; preds = %336, %211
  %338 = load i1, ptr %29, align 1
  br i1 %338, label %339, label %340

339:                                              ; preds = %337
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #4
  br label %340

340:                                              ; preds = %339, %337
  %341 = load i1, ptr %28, align 1
  br i1 %341, label %342, label %343

342:                                              ; preds = %340
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #4
  br label %343

343:                                              ; preds = %342, %340
  %344 = load i1, ptr %26, align 1
  br i1 %344, label %345, label %346

345:                                              ; preds = %343
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #4
  br label %346

346:                                              ; preds = %345, %343
  %347 = load i1, ptr %24, align 1
  br i1 %347, label %348, label %349

348:                                              ; preds = %346
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #4
  br label %349

349:                                              ; preds = %348, %346
  br label %350

350:                                              ; preds = %349, %207
  %351 = load i1, ptr %23, align 1
  br i1 %351, label %352, label %353

352:                                              ; preds = %350
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  br label %353

353:                                              ; preds = %352, %350
  br label %354

354:                                              ; preds = %353, %203
  %355 = load i1, ptr %20, align 1
  br i1 %355, label %356, label %357

356:                                              ; preds = %354
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #4
  br label %357

357:                                              ; preds = %356, %354
  %358 = load i1, ptr %19, align 1
  br i1 %358, label %359, label %360

359:                                              ; preds = %357
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #4
  br label %360

360:                                              ; preds = %359, %357
  %361 = load i1, ptr %17, align 1
  br i1 %361, label %362, label %363

362:                                              ; preds = %360
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #4
  br label %363

363:                                              ; preds = %362, %360
  %364 = load i1, ptr %15, align 1
  br i1 %364, label %365, label %366

365:                                              ; preds = %363
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #4
  br label %366

366:                                              ; preds = %365, %363
  %367 = load i1, ptr %13, align 1
  br i1 %367, label %368, label %369

368:                                              ; preds = %366
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #4
  br label %369

369:                                              ; preds = %368, %366
  %370 = load i1, ptr %11, align 1
  br i1 %370, label %371, label %372

371:                                              ; preds = %369
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #4
  br label %372

372:                                              ; preds = %371, %369
  %373 = load i1, ptr %9, align 1
  br i1 %373, label %374, label %375

374:                                              ; preds = %372
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #4
  br label %375

375:                                              ; preds = %374, %372
  %376 = load i1, ptr %7, align 1
  br i1 %376, label %377, label %378

377:                                              ; preds = %375
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #4
  br label %378

378:                                              ; preds = %377, %375
  br label %412

379:                                              ; preds = %197
  %380 = getelementptr inbounds %class.Elem, ptr %62, i32 0, i32 8
  %381 = load i32, ptr %60, align 4, !tbaa !23
  %382 = sext i32 %381 to i64
  %383 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4ElemSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %380, i64 noundef %382) #4
  %384 = load ptr, ptr %383, align 8, !tbaa !5
  call void @_ZN4Elem28ReduceNumOilCentreFeederNeisEv(ptr noundef nonnull align 8 dereferenceable(408) %384)
  %385 = call noundef i32 @_ZNK4Elem9rockIndexEv(ptr noundef nonnull align 8 dereferenceable(408) %62)
  %386 = icmp ne i32 %385, 0
  br i1 %386, label %393, label %387

387:                                              ; preds = %379
  %388 = getelementptr inbounds %class.Elem, ptr %62, i32 0, i32 8
  %389 = load i32, ptr %60, align 4, !tbaa !23
  %390 = sext i32 %389 to i64
  %391 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4ElemSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %388, i64 noundef %390) #4
  %392 = load ptr, ptr %391, align 8, !tbaa !5
  call void @_ZN4Elem30IncreaseNumWatCentreFeederNeisEv(ptr noundef nonnull align 8 dereferenceable(408) %392)
  br label %393

393:                                              ; preds = %387, %379
  br label %394

394:                                              ; preds = %393
  %395 = load i32, ptr %60, align 4, !tbaa !23
  %396 = add nsw i32 %395, 1
  store i32 %396, ptr %60, align 4, !tbaa !23
  br label %197, !llvm.loop !29

397:                                              ; preds = %202
  %398 = getelementptr inbounds %class.Elem, ptr %62, i32 0, i32 9
  %399 = load ptr, ptr %398, align 8, !tbaa !16
  %400 = load ptr, ptr %399, align 8, !tbaa !26
  %401 = getelementptr inbounds ptr, ptr %400, i64 17
  %402 = load ptr, ptr %401, align 8
  %403 = call noundef signext i8 %402(ptr noundef nonnull align 8 dereferenceable(152) %399)
  %404 = sext i8 %403 to i32
  %405 = icmp eq i32 %404, 83
  br i1 %405, label %406, label %408

406:                                              ; preds = %397
  %407 = getelementptr inbounds %class.Elem, ptr %62, i32 0, i32 26
  store i32 -1, ptr %407, align 8, !tbaa !31
  br label %411

408:                                              ; preds = %397
  %409 = call noundef i32 @_ZNK4Elem22numOilCentreFeederNeisEv(ptr noundef nonnull align 8 dereferenceable(408) %62)
  %410 = getelementptr inbounds %class.Elem, ptr %62, i32 0, i32 26
  store i32 %409, ptr %410, align 8, !tbaa !31
  br label %411

411:                                              ; preds = %408, %406
  ret void

412:                                              ; preds = %378
  %413 = load ptr, ptr %21, align 8
  %414 = load i32, ptr %22, align 4
  %415 = insertvalue { ptr, i32 } poison, ptr %413, 0
  %416 = insertvalue { ptr, i32 } %415, i32 %414, 1
  resume { ptr, i32 } %416
}

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !10, i64 80}
!12 = !{!"_ZTS4Apex", !10, i64 8, !13, i64 16, !13, i64 24, !6, i64 32, !14, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !10, i64 80, !10, i64 81, !10, i64 82, !10, i64 83, !15, i64 88}
!13 = !{!"double", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSSt4pairIidE", !14, i64 0, !13, i64 8}
!16 = !{!17, !6, i64 288}
!17 = !{!"_ZTS4Elem", !12, i64 0, !7, i64 104, !10, i64 224, !14, i64 228, !6, i64 232, !13, i64 240, !13, i64 248, !14, i64 256, !18, i64 264, !6, i64 288, !13, i64 296, !10, i64 304, !10, i64 305, !10, i64 306, !10, i64 307, !10, i64 308, !10, i64 309, !10, i64 310, !10, i64 311, !10, i64 312, !10, i64 313, !15, i64 320, !15, i64 336, !15, i64 352, !14, i64 368, !14, i64 372, !14, i64 376, !14, i64 380, !22, i64 384}
!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", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTS4var3IdE", !13, i64 0, !13, i64 8, !13, i64 16}
!23 = !{!14, !14, i64 0}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{!27, !27, i64 0}
!27 = !{!"vtable pointer", !8, i64 0}
!28 = !{!17, !14, i64 256}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!17, !14, i64 376}


; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.7" = type { i8 }

@.str.16 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [4 x i8], align 1
@__FUNCTION__._ZN4Elem35fillElemCentreWithWaterCreateLayersEb = external hidden unnamed_addr constant [36 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [2 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z6_cerr_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_i(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2_sIiENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK9ElemModel9bulkFluidEv(ptr noundef nonnull align 8 dereferenceable(152)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5Fluid5isOilEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Elem35fillElemCentreWithWaterCreateLayersEb(ptr noundef nonnull align 8 dereferenceable(408) %0, i1 noundef zeroext %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator.7", align 1
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator.7", align 1
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator.7", align 1
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::allocator.7", align 1
  %22 = getelementptr inbounds i8, ptr %0, i64 80
  store i8 0, ptr %22, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %0, i64 288
  %24 = load ptr, ptr %23, align 8, !tbaa !14
  %25 = tail call noundef ptr @_ZNK9ElemModel9bulkFluidEv(ptr noundef nonnull align 8 dereferenceable(152) %24)
  %26 = tail call noundef zeroext i1 @_ZNK5Fluid5isOilEv(ptr noundef nonnull align 8 dereferenceable(80) %25)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #4
  br i1 %26, label %.thread, label %27

27:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.16, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %28 unwind label %57

28:                                               ; preds = %27
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.17)
          to label %29 unwind label %59

29:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull @__FUNCTION__._ZN4Elem35fillElemCentreWithWaterCreateLayersEb, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %30 unwind label %61

30:                                               ; preds = %29
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %31 unwind label %63

31:                                               ; preds = %30
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.18)
          to label %32 unwind label %65

32:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull @.str.19, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %33 unwind label %67

33:                                               ; preds = %32
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %34 unwind label %69

34:                                               ; preds = %33
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.20)
          to label %35 unwind label %71

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #4
  store i32 520, ptr %16, align 4, !tbaa !21
  invoke void @_Z2_sIiENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %36 unwind label %73

36:                                               ; preds = %35
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %3, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %37 unwind label %75

37:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %18) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %19) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %20) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %21) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull @.str.21, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %38 unwind label %77

38:                                               ; preds = %37
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %19, ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull @.str.26)
          to label %39 unwind label %79

39:                                               ; preds = %38
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %18, ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull @.str.27)
          to label %40 unwind label %81

40:                                               ; preds = %39
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %17, ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull @.str.28)
          to label %41 unwind label %83

41:                                               ; preds = %40
  %42 = invoke noundef zeroext i1 @_Z6_cerr_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_i(ptr noundef nonnull %3, ptr noundef nonnull %17, i32 noundef 0)
          to label %.critedge150 unwind label %85

.thread:                                          ; preds = %2
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #4
  br label %.critedge171

.critedge150:                                     ; preds = %41
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %18) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  br label %.critedge171

.critedge171:                                     ; preds = %.thread, %.critedge150
  %43 = load ptr, ptr %23, align 8, !tbaa !14
  %44 = load ptr, ptr %43, align 8, !tbaa !22
  %45 = getelementptr inbounds i8, ptr %44, i64 56
  %46 = load ptr, ptr %45, align 8
  call void %46(ptr noundef nonnull align 8 dereferenceable(152) %43, i1 noundef zeroext %1)
  %47 = getelementptr inbounds i8, ptr %0, i64 256
  %48 = load i32, ptr %47, align 8, !tbaa !24
  %49 = icmp sgt i32 %48, 0
  br i1 %49, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.critedge171
  %50 = getelementptr inbounds i8, ptr %0, i64 264
  br label %101

._crit_edge:                                      ; preds = %108, %.critedge171
  %51 = load ptr, ptr %23, align 8, !tbaa !14
  %52 = load ptr, ptr %51, align 8, !tbaa !22
  %53 = getelementptr inbounds i8, ptr %52, i64 136
  %54 = load ptr, ptr %53, align 8
  %55 = call noundef signext i8 %54(ptr noundef nonnull align 8 dereferenceable(152) %51)
  %56 = icmp eq i8 %55, 83
  br i1 %56, label %114, label %112

57:                                               ; preds = %27
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %100

59:                                               ; preds = %28
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %99

61:                                               ; preds = %29
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %98

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

65:                                               ; preds = %31
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %96

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

69:                                               ; preds = %33
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %94

71:                                               ; preds = %34
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %93

73:                                               ; preds = %35
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %92

75:                                               ; preds = %36
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %91

77:                                               ; preds = %37
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %90

79:                                               ; preds = %38
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %89

81:                                               ; preds = %39
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %88

83:                                               ; preds = %40
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %87

85:                                               ; preds = %41
  %86 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #4
  br label %87

87:                                               ; preds = %83, %85
  %.pn = phi { ptr, i32 } [ %86, %85 ], [ %84, %83 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #4
  br label %88

88:                                               ; preds = %81, %87
  %.pn.pn = phi { ptr, i32 } [ %.pn, %87 ], [ %82, %81 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #4
  br label %89

89:                                               ; preds = %79, %88
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %88 ], [ %80, %79 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #4
  br label %90

90:                                               ; preds = %77, %89
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %89 ], [ %78, %77 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %18) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  br label %91

91:                                               ; preds = %75, %90
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %90 ], [ %76, %75 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  br label %92

92:                                               ; preds = %91, %73
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %91 ], [ %74, %73 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  br label %93

93:                                               ; preds = %71, %92
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %92 ], [ %72, %71 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  br label %94

94:                                               ; preds = %69, %93
  %.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn, %93 ], [ %70, %69 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #4
  br label %95

95:                                               ; preds = %67, %94
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn, %94 ], [ %68, %67 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  br label %96

96:                                               ; preds = %65, %95
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn.pn, %95 ], [ %66, %65 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  br label %97

97:                                               ; preds = %63, %96
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %96 ], [ %64, %63 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  br label %98

98:                                               ; preds = %61, %97
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %97 ], [ %62, %61 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  br label %99

99:                                               ; preds = %59, %98
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %98 ], [ %60, %59 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  br label %100

100:                                              ; preds = %57, %99
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %99 ], [ %58, %57 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn

101:                                              ; preds = %.lr.ph, %108
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %108 ]
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4ElemSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %50, i64 noundef %indvars.iv) #4
  %103 = load ptr, ptr %102, align 8, !tbaa !25
  call void @_ZN4Elem28ReduceNumOilCentreFeederNeisEv(ptr noundef nonnull align 8 dereferenceable(408) %103)
  %104 = call noundef i32 @_ZNK4Elem9rockIndexEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %.not = icmp eq i32 %104, 0
  br i1 %.not, label %105, label %108

105:                                              ; preds = %101
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP4ElemSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %50, i64 noundef %indvars.iv) #4
  %107 = load ptr, ptr %106, align 8, !tbaa !25
  call void @_ZN4Elem30IncreaseNumWatCentreFeederNeisEv(ptr noundef nonnull align 8 dereferenceable(408) %107)
  br label %108

108:                                              ; preds = %101, %105
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %109 = load i32, ptr %47, align 8, !tbaa !24
  %110 = sext i32 %109 to i64
  %111 = icmp slt i64 %indvars.iv.next, %110
  br i1 %111, label %101, label %._crit_edge, !llvm.loop !26

112:                                              ; preds = %._crit_edge
  %113 = call noundef i32 @_ZNK4Elem22numOilCentreFeederNeisEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  br label %114

114:                                              ; preds = %._crit_edge, %112
  %.sink = phi i32 [ %113, %112 ], [ -1, %._crit_edge ]
  %115 = getelementptr inbounds i8, ptr %0, i64 376
  store i32 %.sink, ptr %115, align 8
  ret void
}

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !7, i64 80}
!6 = !{!"_ZTS4Apex", !7, i64 8, !10, i64 16, !10, i64 24, !11, i64 32, !12, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !7, i64 80, !7, i64 81, !7, i64 82, !7, i64 83, !13, i64 88}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!"_ZTSSt4pairIidE", !12, i64 0, !10, i64 8}
!14 = !{!15, !11, i64 288}
!15 = !{!"_ZTS4Elem", !6, i64 0, !8, i64 104, !7, i64 224, !12, i64 228, !11, i64 232, !10, i64 240, !10, i64 248, !12, i64 256, !16, i64 264, !11, i64 288, !10, i64 296, !7, i64 304, !7, i64 305, !7, i64 306, !7, i64 307, !7, i64 308, !7, i64 309, !7, i64 310, !7, i64 311, !7, i64 312, !7, i64 313, !13, i64 320, !13, i64 336, !13, i64 352, !12, i64 368, !12, i64 372, !12, i64 376, !12, i64 380, !20, i64 384}
!16 = !{!"_ZTSSt6vectorIP4ElemSaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIP4ElemSaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIP4ElemSaIS1_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIP4ElemSaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!20 = !{!"_ZTS4var3IdE", !10, i64 0, !10, i64 8, !10, i64 16}
!21 = !{!12, !12, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"vtable pointer", !9, i64 0}
!24 = !{!15, !12, i64 256}
!25 = !{!11, !11, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,SROAPass,SimplifyCFGPass,TailCallElimPass