; LLVM IR from UtkarshPathrabe/Competitive-Coding :: SPOJ Solutions (CISTFILL)

; 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"

%struct.Cistern = type { i32, i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Cistern, std::allocator<Cistern>>::_Vector_impl" }
%"struct.std::_Vector_base<Cistern, std::allocator<Cistern>>::_Vector_impl" = type { %"struct.std::_Vector_base<Cistern, std::allocator<Cistern>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Cistern, std::allocator<Cistern>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.0" = type { ptr }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca %struct.Cistern, align 4
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #8
  call void @_ZNSt6vectorI7CisternSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  call void @_ZN9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %23 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
          to label %24 unwind label %37

24:                                               ; preds = %0
  br label %25

25:                                               ; preds = %192, %24
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = add nsw i32 %26, -1
  store i32 %27, ptr %2, align 4, !tbaa !5
  %28 = icmp ne i32 %26, 0
  br i1 %28, label %29, label %198

29:                                               ; preds = %25
  store double 0.000000e+00, ptr %5, align 8, !tbaa !9
  %30 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3)
          to label %31 unwind label %37

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

32:                                               ; preds = %60, %31
  %33 = load i32, ptr %14, align 4, !tbaa !5
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %41, label %36

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

37:                                               ; preds = %178, %73, %67, %29, %0
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %12, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %13, align 4
  br label %200

41:                                               ; preds = %32
  %42 = getelementptr inbounds %struct.Cistern, ptr %9, i32 0, i32 0
  %43 = getelementptr inbounds %struct.Cistern, ptr %9, i32 0, i32 1
  %44 = getelementptr inbounds %struct.Cistern, ptr %9, i32 0, i32 2
  %45 = getelementptr inbounds %struct.Cistern, ptr %9, i32 0, i32 3
  %46 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %42, ptr noundef %43, ptr noundef %44, ptr noundef %45)
          to label %47 unwind label %63

47:                                               ; preds = %41
  %48 = getelementptr inbounds %struct.Cistern, ptr %9, i32 0, i32 1
  %49 = load i32, ptr %48, align 4, !tbaa !11
  %50 = getelementptr inbounds %struct.Cistern, ptr %9, i32 0, i32 2
  %51 = load i32, ptr %50, align 4, !tbaa !13
  %52 = mul nsw i32 %49, %51
  %53 = getelementptr inbounds %struct.Cistern, ptr %9, i32 0, i32 3
  %54 = load i32, ptr %53, align 4, !tbaa !14
  %55 = mul nsw i32 %52, %54
  %56 = sitofp i32 %55 to double
  %57 = load double, ptr %5, align 8, !tbaa !9
  %58 = fadd double %57, %56
  store double %58, ptr %5, align 8, !tbaa !9
  invoke void @_ZNSt6vectorI7CisternSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 4 dereferenceable(16) %9)
          to label %59 unwind label %63

59:                                               ; preds = %47
  br label %60

60:                                               ; preds = %59
  %61 = load i32, ptr %14, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %14, align 4, !tbaa !5
  br label %32, !llvm.loop !15

63:                                               ; preds = %47, %41
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %12, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %200

67:                                               ; preds = %36
  %68 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %4)
          to label %69 unwind label %37

69:                                               ; preds = %67
  %70 = load double, ptr %5, align 8, !tbaa !9
  %71 = load double, ptr %4, align 8, !tbaa !9
  %72 = fcmp olt double %70, %71
  br i1 %72, label %73, label %76

73:                                               ; preds = %69
  %74 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3)
          to label %75 unwind label %37

75:                                               ; preds = %73
  br label %182

76:                                               ; preds = %69
  store double 0.000000e+00, ptr %7, align 8, !tbaa !9
  store double 1.000000e+07, ptr %6, align 8, !tbaa !9
  br label %77

77:                                               ; preds = %177, %76
  %78 = load double, ptr %6, align 8, !tbaa !9
  %79 = load double, ptr %7, align 8, !tbaa !9
  %80 = fsub double %78, %79
  %81 = fcmp ogt double %80, 0x3EB0C6F7A0B5ED8D
  br i1 %81, label %82, label %178

82:                                               ; preds = %77
  %83 = load double, ptr %6, align 8, !tbaa !9
  %84 = load double, ptr %7, align 8, !tbaa !9
  %85 = fadd double %83, %84
  %86 = fdiv double %85, 2.000000e+00
  store double %86, ptr %8, align 8, !tbaa !9
  store double 0.000000e+00, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %87 = call ptr @_ZNSt6vectorI7CisternSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  %88 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %87, ptr %88, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %15, i64 8, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %89

89:                                               ; preds = %166, %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %90 = call ptr @_ZNSt6vectorI7CisternSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  %91 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %90, ptr %91, align 8
  %92 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP7CisternSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br i1 %92, label %93, label %169

93:                                               ; preds = %89
  %94 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %95 = getelementptr inbounds %struct.Cistern, ptr %94, i32 0, i32 0
  %96 = load i32, ptr %95, align 4, !tbaa !20
  %97 = sitofp i32 %96 to double
  %98 = load double, ptr %8, align 8, !tbaa !9
  %99 = fcmp oge double %97, %98
  br i1 %99, label %100, label %101

100:                                              ; preds = %93
  br label %166

101:                                              ; preds = %93
  %102 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %103 = getelementptr inbounds %struct.Cistern, ptr %102, i32 0, i32 0
  %104 = load i32, ptr %103, align 4, !tbaa !20
  %105 = sitofp i32 %104 to double
  %106 = load double, ptr %8, align 8, !tbaa !9
  %107 = fcmp olt double %105, %106
  br i1 %107, label %108, label %137

108:                                              ; preds = %101
  %109 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %110 = getelementptr inbounds %struct.Cistern, ptr %109, i32 0, i32 0
  %111 = load i32, ptr %110, align 4, !tbaa !20
  %112 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %113 = getelementptr inbounds %struct.Cistern, ptr %112, i32 0, i32 1
  %114 = load i32, ptr %113, align 4, !tbaa !11
  %115 = add nsw i32 %111, %114
  %116 = sitofp i32 %115 to double
  %117 = load double, ptr %8, align 8, !tbaa !9
  %118 = fcmp oge double %116, %117
  br i1 %118, label %119, label %137

119:                                              ; preds = %108
  %120 = load double, ptr %8, align 8, !tbaa !9
  %121 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %122 = getelementptr inbounds %struct.Cistern, ptr %121, i32 0, i32 0
  %123 = load i32, ptr %122, align 4, !tbaa !20
  %124 = sitofp i32 %123 to double
  %125 = fsub double %120, %124
  %126 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %127 = getelementptr inbounds %struct.Cistern, ptr %126, i32 0, i32 2
  %128 = load i32, ptr %127, align 4, !tbaa !13
  %129 = sitofp i32 %128 to double
  %130 = fmul double %125, %129
  %131 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %132 = getelementptr inbounds %struct.Cistern, ptr %131, i32 0, i32 3
  %133 = load i32, ptr %132, align 4, !tbaa !14
  %134 = sitofp i32 %133 to double
  %135 = load double, ptr %5, align 8, !tbaa !9
  %136 = call double @llvm.fmuladd.f64(double %130, double %134, double %135)
  store double %136, ptr %5, align 8, !tbaa !9
  br label %164

137:                                              ; preds = %108, %101
  %138 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %139 = getelementptr inbounds %struct.Cistern, ptr %138, i32 0, i32 0
  %140 = load i32, ptr %139, align 4, !tbaa !20
  %141 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %142 = getelementptr inbounds %struct.Cistern, ptr %141, i32 0, i32 1
  %143 = load i32, ptr %142, align 4, !tbaa !11
  %144 = add nsw i32 %140, %143
  %145 = sitofp i32 %144 to double
  %146 = load double, ptr %8, align 8, !tbaa !9
  %147 = fcmp olt double %145, %146
  br i1 %147, label %148, label %163

148:                                              ; preds = %137
  %149 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %150 = getelementptr inbounds %struct.Cistern, ptr %149, i32 0, i32 1
  %151 = load i32, ptr %150, align 4, !tbaa !11
  %152 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %153 = getelementptr inbounds %struct.Cistern, ptr %152, i32 0, i32 2
  %154 = load i32, ptr %153, align 4, !tbaa !13
  %155 = mul nsw i32 %151, %154
  %156 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %157 = getelementptr inbounds %struct.Cistern, ptr %156, i32 0, i32 3
  %158 = load i32, ptr %157, align 4, !tbaa !14
  %159 = mul nsw i32 %155, %158
  %160 = sitofp i32 %159 to double
  %161 = load double, ptr %5, align 8, !tbaa !9
  %162 = fadd double %161, %160
  store double %162, ptr %5, align 8, !tbaa !9
  br label %163

163:                                              ; preds = %148, %137
  br label %164

164:                                              ; preds = %163, %119
  br label %165

165:                                              ; preds = %164
  br label %166

166:                                              ; preds = %165, %100
  %167 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 0) #8
  %168 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %167, ptr %168, align 8
  br label %89, !llvm.loop !21

169:                                              ; preds = %89
  %170 = load double, ptr %5, align 8, !tbaa !9
  %171 = load double, ptr %4, align 8, !tbaa !9
  %172 = fcmp oge double %170, %171
  br i1 %172, label %173, label %175

173:                                              ; preds = %169
  %174 = load double, ptr %8, align 8, !tbaa !9
  store double %174, ptr %6, align 8, !tbaa !9
  br label %177

175:                                              ; preds = %169
  %176 = load double, ptr %8, align 8, !tbaa !9
  store double %176, ptr %7, align 8, !tbaa !9
  br label %177

177:                                              ; preds = %175, %173
  br label %77, !llvm.loop !22

178:                                              ; preds = %77
  %179 = load double, ptr %8, align 8, !tbaa !9
  %180 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.4, double noundef %179)
          to label %181 unwind label %37

181:                                              ; preds = %178
  br label %182

182:                                              ; preds = %181, %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %183 = call ptr @_ZNSt6vectorI7CisternSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  %184 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %183, ptr %184, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPK7CisternSt6vectorIS1_SaIS1_EEEC2IPS1_vEERKNS0_IT_S6_EE(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %185 = call ptr @_ZNSt6vectorI7CisternSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  %186 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %185, ptr %186, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPK7CisternSt6vectorIS1_SaIS1_EEEC2IPS1_vEERKNS0_IT_S6_EE(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #8
  %187 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %18, i32 0, i32 0
  %188 = load ptr, ptr %187, align 8
  %189 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %20, i32 0, i32 0
  %190 = load ptr, ptr %189, align 8
  %191 = invoke ptr @_ZNSt6vectorI7CisternSaIS0_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EES7_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr %188, ptr %190)
          to label %192 unwind label %194

192:                                              ; preds = %182
  %193 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %191, ptr %193, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %25, !llvm.loop !23

194:                                              ; preds = %182
  %195 = landingpad { ptr, i32 }
          cleanup
  %196 = extractvalue { ptr, i32 } %195, 0
  store ptr %196, ptr %12, align 8
  %197 = extractvalue { ptr, i32 } %195, 1
  store i32 %197, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %200

198:                                              ; preds = %25
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @_ZNSt6vectorI7CisternSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %199 = load i32, ptr %1, align 4
  ret i32 %199

200:                                              ; preds = %194, %63, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @_ZNSt6vectorI7CisternSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %201

201:                                              ; preds = %200
  %202 = load ptr, ptr %12, align 8
  %203 = load i32, ptr %13, align 4
  %204 = insertvalue { ptr, i32 } poison, ptr %202, 0
  %205 = insertvalue { ptr, i32 } %204, i32 %203, 1
  resume { ptr, i32 } %205
}

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

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

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI7CisternSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(16)) #4 align 2

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

declare i32 @printf(ptr noundef, ...) #3

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIP7CisternSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #7

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

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

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "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 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !6, i64 4}
!12 = !{!"_ZTS7Cistern", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!13 = !{!12, !6, i64 8}
!14 = !{!12, !6, i64 12}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{i64 0, i64 8, !18}
!18 = !{!19, !19, i64 0}
!19 = !{!"any pointer", !7, i64 0}
!20 = !{!12, !6, i64 0}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}
!23 = distinct !{!23, !16}


; 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"

%struct.Cistern = type { i32, i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Cistern, std::allocator<Cistern>>::_Vector_impl" }
%"struct.std::_Vector_base<Cistern, std::allocator<Cistern>>::_Vector_impl" = type { %"struct.std::_Vector_base<Cistern, std::allocator<Cistern>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Cistern, std::allocator<Cistern>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.0" = type { ptr }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca double, align 8
  %4 = alloca %struct.Cistern, align 4
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  call void @_ZNSt6vectorI7CisternSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  call void @_ZN9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %13 = load i32, ptr %1, align 4, !tbaa !5
  %14 = add nsw i32 %13, -1
  store i32 %14, ptr %1, align 4, !tbaa !5
  %.not45 = icmp eq i32 %13, 0
  br i1 %.not45, label %._crit_edge49, label %.lr.ph48

.lr.ph48:                                         ; preds = %0
  %15 = getelementptr inbounds i8, ptr %4, i64 4
  %16 = getelementptr inbounds i8, ptr %4, i64 8
  %17 = getelementptr inbounds i8, ptr %4, i64 12
  br label %18

18:                                               ; preds = %.lr.ph48, %118
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2)
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %29, %18
  %.0.lcssa = phi double [ 0.000000e+00, %18 ], [ %33, %29 ]
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %3)
  %23 = load double, ptr %3, align 8, !tbaa !9
  %24 = fcmp olt double %.0.lcssa, %23
  br i1 %24, label %39, label %.preheader

.lr.ph:                                           ; preds = %18, %29
  %.037 = phi double [ %33, %29 ], [ 0.000000e+00, %18 ]
  %.02536 = phi i32 [ %34, %29 ], [ 0, %18 ]
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %4, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %17)
  %26 = load i32, ptr %15, align 4, !tbaa !11
  %27 = load i32, ptr %16, align 4, !tbaa !13
  %28 = load i32, ptr %17, align 4, !tbaa !14
  invoke void @_ZNSt6vectorI7CisternSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(16) %4)
          to label %29 unwind label %37

29:                                               ; preds = %.lr.ph
  %30 = mul nsw i32 %27, %26
  %31 = mul nsw i32 %30, %28
  %32 = sitofp i32 %31 to double
  %33 = fadd double %.037, %32
  %34 = add nuw nsw i32 %.02536, 1
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %.lr.ph, label %._crit_edge, !llvm.loop !15

37:                                               ; preds = %.lr.ph
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %123

39:                                               ; preds = %._crit_edge
  %40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %112

.preheader:                                       ; preds = %._crit_edge, %._crit_edge41
  %.02344 = phi double [ %.023., %._crit_edge41 ], [ 1.000000e+07, %._crit_edge ]
  %.03143 = phi double [ %..031, %._crit_edge41 ], [ 0.000000e+00, %._crit_edge ]
  %41 = fadd double %.03143, %.02344
  %42 = fmul double %41, 5.000000e-01
  %43 = call ptr @_ZNSt6vectorI7CisternSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  store ptr %43, ptr %6, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %44 = call ptr @_ZNSt6vectorI7CisternSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  store ptr %44, ptr %7, align 8
  %45 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP7CisternSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br i1 %45, label %.lr.ph40, label %._crit_edge41

.lr.ph40:                                         ; preds = %.preheader, %102
  %.138 = phi double [ %.2, %102 ], [ 0.000000e+00, %.preheader ]
  %46 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %47 = load i32, ptr %46, align 4, !tbaa !19
  %48 = sitofp i32 %47 to double
  %49 = fcmp ugt double %42, %48
  br i1 %49, label %50, label %102

50:                                               ; preds = %.lr.ph40
  %51 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %52 = load i32, ptr %51, align 4, !tbaa !19
  %53 = sitofp i32 %52 to double
  %54 = fcmp ogt double %42, %53
  br i1 %54, label %55, label %79

55:                                               ; preds = %50
  %56 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %57 = load i32, ptr %56, align 4, !tbaa !19
  %58 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %59 = getelementptr inbounds i8, ptr %58, i64 4
  %60 = load i32, ptr %59, align 4, !tbaa !11
  %61 = add nsw i32 %60, %57
  %62 = sitofp i32 %61 to double
  %63 = fcmp ugt double %42, %62
  br i1 %63, label %79, label %64

64:                                               ; preds = %55
  %65 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %66 = load i32, ptr %65, align 4, !tbaa !19
  %67 = sitofp i32 %66 to double
  %68 = fsub double %42, %67
  %69 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %70 = getelementptr inbounds i8, ptr %69, i64 8
  %71 = load i32, ptr %70, align 4, !tbaa !13
  %72 = sitofp i32 %71 to double
  %73 = fmul double %68, %72
  %74 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %75 = getelementptr inbounds i8, ptr %74, i64 12
  %76 = load i32, ptr %75, align 4, !tbaa !14
  %77 = sitofp i32 %76 to double
  %78 = call double @llvm.fmuladd.f64(double %73, double %77, double %.138)
  br label %102

79:                                               ; preds = %55, %50
  %80 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %81 = load i32, ptr %80, align 4, !tbaa !19
  %82 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %83 = getelementptr inbounds i8, ptr %82, i64 4
  %84 = load i32, ptr %83, align 4, !tbaa !11
  %85 = add nsw i32 %84, %81
  %86 = sitofp i32 %85 to double
  %87 = fcmp ogt double %42, %86
  br i1 %87, label %88, label %102

88:                                               ; preds = %79
  %89 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %90 = getelementptr inbounds i8, ptr %89, i64 4
  %91 = load i32, ptr %90, align 4, !tbaa !11
  %92 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %93 = getelementptr inbounds i8, ptr %92, i64 8
  %94 = load i32, ptr %93, align 4, !tbaa !13
  %95 = mul nsw i32 %94, %91
  %96 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %97 = getelementptr inbounds i8, ptr %96, i64 12
  %98 = load i32, ptr %97, align 4, !tbaa !14
  %99 = mul nsw i32 %95, %98
  %100 = sitofp i32 %99 to double
  %101 = fadd double %.138, %100
  br label %102

102:                                              ; preds = %79, %88, %64, %.lr.ph40
  %.2 = phi double [ %.138, %.lr.ph40 ], [ %78, %64 ], [ %101, %88 ], [ %.138, %79 ]
  %103 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIP7CisternSt6vectorIS1_SaIS1_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %104 = call ptr @_ZNSt6vectorI7CisternSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  store ptr %104, ptr %7, align 8
  %105 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP7CisternSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br i1 %105, label %.lr.ph40, label %._crit_edge41, !llvm.loop !20

._crit_edge41:                                    ; preds = %102, %.preheader
  %.1.lcssa = phi double [ 0.000000e+00, %.preheader ], [ %.2, %102 ]
  %106 = load double, ptr %3, align 8, !tbaa !9
  %107 = fcmp ult double %.1.lcssa, %106
  %..031 = select i1 %107, double %42, double %.03143
  %.023. = select i1 %107, double %.02344, double %42
  %108 = fsub double %.023., %..031
  %109 = fcmp ogt double %108, 0x3EB0C6F7A0B5ED8D
  br i1 %109, label %.preheader, label %110, !llvm.loop !21

110:                                              ; preds = %._crit_edge41
  %111 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, double noundef %42)
  br label %112

112:                                              ; preds = %110, %39
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %113 = call ptr @_ZNSt6vectorI7CisternSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  store ptr %113, ptr %9, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPK7CisternSt6vectorIS1_SaIS1_EEEC2IPS1_vEERKNS0_IT_S6_EE(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %114 = call ptr @_ZNSt6vectorI7CisternSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  store ptr %114, ptr %11, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPK7CisternSt6vectorIS1_SaIS1_EEEC2IPS1_vEERKNS0_IT_S6_EE(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  %115 = load ptr, ptr %8, align 8
  %116 = load ptr, ptr %10, align 8
  %117 = invoke ptr @_ZNSt6vectorI7CisternSaIS0_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EES7_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr %115, ptr %116)
          to label %118 unwind label %121

118:                                              ; preds = %112
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  %119 = load i32, ptr %1, align 4, !tbaa !5
  %120 = add nsw i32 %119, -1
  store i32 %120, ptr %1, align 4, !tbaa !5
  %.not = icmp eq i32 %119, 0
  br i1 %.not, label %._crit_edge49, label %18, !llvm.loop !22

121:                                              ; preds = %112
  %122 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %123

._crit_edge49:                                    ; preds = %118, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @_ZNSt6vectorI7CisternSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

123:                                              ; preds = %121, %37
  %.pn = phi { ptr, i32 } [ %38, %37 ], [ %122, %121 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @_ZNSt6vectorI7CisternSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn
}

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI7CisternSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #4 align 2

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIP7CisternSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #6

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

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

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nofree 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 #4 = { 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 #5 = { 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 #6 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !6, i64 4}
!12 = !{!"_ZTS7Cistern", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!13 = !{!12, !6, i64 8}
!14 = !{!12, !6, i64 12}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !18, i64 0}
!18 = !{!"any pointer", !7, i64 0}
!19 = !{!12, !6, i64 0}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}


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