; LLVM IR from MtSaka/library :: test/yosupo/data_structure/range_chmin_chmax_add_range_sum.test (main)

; 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.fastio::Scanner" = type <{ i32, [131073 x i8], [3 x i8], i32, i32, i8, [3 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%struct.SegmentTreeBeats = type { %"class.std::vector.1", i32, i32 }
%"class.std::vector.1" = type { %"struct.std::_Vector_base.2" }
%"struct.std::_Vector_base.2" = type { %"struct.std::_Vector_base<SegmentTreeBeats<long long>::S, std::allocator<SegmentTreeBeats<long long>::S>>::_Vector_impl" }
%"struct.std::_Vector_base<SegmentTreeBeats<long long>::S, std::allocator<SegmentTreeBeats<long long>::S>>::_Vector_impl" = type { %"struct.std::_Vector_base<SegmentTreeBeats<long long>::S, std::allocator<SegmentTreeBeats<long long>::S>>::_Vector_impl_data" }
%"struct.std::_Vector_base<SegmentTreeBeats<long long>::S, std::allocator<SegmentTreeBeats<long long>::S>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZN6fastio2scE = external dso_local global %"struct.fastio::Scanner", align 4

; 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 %"class.std::vector", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %struct.SegmentTreeBeats, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %23 = call noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) @_ZN6fastio2scE, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %24 = call noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) %23, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #6
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #6
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %26, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %27 unwind label %37

27:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  %28 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsISt6vectorIxSaIxEEEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) @_ZN6fastio2scE, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %29 unwind label %41

29:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #6
  invoke void @_ZN16SegmentTreeBeatsIxEC2ERKSt6vectorIxSaIxEE(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %30 unwind label %45

30:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store i64 0, ptr %9, align 8, !tbaa !9
  br label %31

31:                                               ; preds = %131, %30
  %32 = load i64, ptr %9, align 8, !tbaa !9
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = icmp slt i64 %32, %34
  br i1 %35, label %49, label %36

36:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %135

37:                                               ; preds = %0
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %6, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  br label %139

41:                                               ; preds = %27
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %6, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %7, align 4
  br label %138

45:                                               ; preds = %29
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %6, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %7, align 4
  br label %137

49:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %50 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) @_ZN6fastio2scE, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %51 unwind label %65

51:                                               ; preds = %49
  %52 = load i32, ptr %10, align 4, !tbaa !5
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %73

54:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %55 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) @_ZN6fastio2scE, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %56 unwind label %69

56:                                               ; preds = %54
  %57 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) %55, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %58 unwind label %69

58:                                               ; preds = %56
  %59 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIxEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) %57, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %60 unwind label %69

60:                                               ; preds = %58
  %61 = load i32, ptr %11, align 4, !tbaa !5
  %62 = load i32, ptr %12, align 4, !tbaa !5
  %63 = load i64, ptr %13, align 8, !tbaa !9
  invoke void @_ZN16SegmentTreeBeatsIxE11range_chminEiix(ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef %61, i32 noundef %62, i64 noundef %63)
          to label %64 unwind label %69

64:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %130

65:                                               ; preds = %49
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %6, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %7, align 4
  br label %134

69:                                               ; preds = %60, %58, %56, %54
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %6, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %134

73:                                               ; preds = %51
  %74 = load i32, ptr %10, align 4, !tbaa !5
  %75 = icmp eq i32 %74, 1
  br i1 %75, label %76, label %91

76:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %77 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) @_ZN6fastio2scE, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %78 unwind label %87

78:                                               ; preds = %76
  %79 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) %77, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %80 unwind label %87

80:                                               ; preds = %78
  %81 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIxEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) %79, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %82 unwind label %87

82:                                               ; preds = %80
  %83 = load i32, ptr %14, align 4, !tbaa !5
  %84 = load i32, ptr %15, align 4, !tbaa !5
  %85 = load i64, ptr %16, align 8, !tbaa !9
  invoke void @_ZN16SegmentTreeBeatsIxE11range_chmaxEiix(ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef %83, i32 noundef %84, i64 noundef %85)
          to label %86 unwind label %87

86:                                               ; preds = %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %129

87:                                               ; preds = %82, %80, %78, %76
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %6, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %134

91:                                               ; preds = %73
  %92 = load i32, ptr %10, align 4, !tbaa !5
  %93 = icmp eq i32 %92, 2
  br i1 %93, label %94, label %109

94:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %95 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) @_ZN6fastio2scE, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %96 unwind label %105

96:                                               ; preds = %94
  %97 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) %95, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %98 unwind label %105

98:                                               ; preds = %96
  %99 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIxEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) %97, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %100 unwind label %105

100:                                              ; preds = %98
  %101 = load i32, ptr %17, align 4, !tbaa !5
  %102 = load i32, ptr %18, align 4, !tbaa !5
  %103 = load i64, ptr %19, align 8, !tbaa !9
  invoke void @_ZN16SegmentTreeBeatsIxE9range_addEiix(ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef %101, i32 noundef %102, i64 noundef %103)
          to label %104 unwind label %105

104:                                              ; preds = %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %128

105:                                              ; preds = %100, %98, %96, %94
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %6, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %134

109:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %110 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) @_ZN6fastio2scE, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %111 unwind label %119

111:                                              ; preds = %109
  %112 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) %110, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %113 unwind label %119

113:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %114 = load i32, ptr %20, align 4, !tbaa !5
  %115 = load i32, ptr %21, align 4, !tbaa !5
  %116 = invoke noundef i64 @_ZN16SegmentTreeBeatsIxE9range_sumEii(ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef %114, i32 noundef %115)
          to label %117 unwind label %123

117:                                              ; preds = %113
  store i64 %116, ptr %22, align 8, !tbaa !9
  invoke void @_Z5printIxEvRKT_(ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %118 unwind label %123

118:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %128

119:                                              ; preds = %111, %109
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %6, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %7, align 4
  br label %127

123:                                              ; preds = %117, %113
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %6, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %127

127:                                              ; preds = %123, %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %134

128:                                              ; preds = %118, %104
  br label %129

129:                                              ; preds = %128, %86
  br label %130

130:                                              ; preds = %129, %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %131

131:                                              ; preds = %130
  %132 = load i64, ptr %9, align 8, !tbaa !9
  %133 = add nsw i64 %132, 1
  store i64 %133, ptr %9, align 8, !tbaa !9
  br label %31, !llvm.loop !11

134:                                              ; preds = %127, %105, %87, %69, %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @_ZN16SegmentTreeBeatsIxED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %137

135:                                              ; preds = %36
  call void @_ZN16SegmentTreeBeatsIxED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %136 = load i32, ptr %1, align 4
  ret i32 %136

137:                                              ; preds = %134, %45
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  br label %138

138:                                              ; preds = %137, %41
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  br label %139

139:                                              ; preds = %138, %37
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %140

140:                                              ; preds = %139
  %141 = load ptr, ptr %6, align 8
  %142 = load i32, ptr %7, align 4
  %143 = insertvalue { ptr, i32 } poison, ptr %141, 0
  %144 = insertvalue { ptr, i32 } %143, i32 %142, 1
  resume { ptr, i32 } %144
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z5printIxEvRKT_(ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #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 = { 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 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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

%"struct.fastio::Scanner" = type <{ i32, [131073 x i8], [3 x i8], i32, i32, i8, [3 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%struct.SegmentTreeBeats = type { %"class.std::vector.1", i32, i32 }
%"class.std::vector.1" = type { %"struct.std::_Vector_base.2" }
%"struct.std::_Vector_base.2" = type { %"struct.std::_Vector_base<SegmentTreeBeats<long long>::S, std::allocator<SegmentTreeBeats<long long>::S>>::_Vector_impl" }
%"struct.std::_Vector_base<SegmentTreeBeats<long long>::S, std::allocator<SegmentTreeBeats<long long>::S>>::_Vector_impl" = type { %"struct.std::_Vector_base<SegmentTreeBeats<long long>::S, std::allocator<SegmentTreeBeats<long long>::S>>::_Vector_impl_data" }
%"struct.std::_Vector_base<SegmentTreeBeats<long long>::S, std::allocator<SegmentTreeBeats<long long>::S>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZN6fastio2scE = external dso_local global %"struct.fastio::Scanner", align 4

; 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 %"class.std::vector", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %struct.SegmentTreeBeats, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %19 = call noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) @_ZN6fastio2scE, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %20 = call noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) %19, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  %21 = load i32, ptr %1, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %22, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %23 unwind label %28

23:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  %24 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsISt6vectorIxSaIxEEEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) @_ZN6fastio2scE, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %25 unwind label %30

25:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  invoke void @_ZN16SegmentTreeBeatsIxEC2ERKSt6vectorIxSaIxEE(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %.preheader unwind label %32

.preheader:                                       ; preds = %25
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %93, %.preheader
  call void @_ZN16SegmentTreeBeatsIxED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

28:                                               ; preds = %0
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  br label %101

30:                                               ; preds = %23
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %100

32:                                               ; preds = %25
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %99

.lr.ph:                                           ; preds = %.preheader, %93
  %.017 = phi i64 [ %94, %93 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %34 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) @_ZN6fastio2scE, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %35 unwind label %48

35:                                               ; preds = %.lr.ph
  %36 = load i32, ptr %6, align 4, !tbaa !5
  switch i32 %36, label %78 [
    i32 0, label %37
    i32 1, label %52
    i32 2, label %65
  ]

37:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %38 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) @_ZN6fastio2scE, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %39 unwind label %50

39:                                               ; preds = %37
  %40 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) %38, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %41 unwind label %50

41:                                               ; preds = %39
  %42 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIxEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) %40, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %43 unwind label %50

43:                                               ; preds = %41
  %44 = load i32, ptr %7, align 4, !tbaa !5
  %45 = load i32, ptr %8, align 4, !tbaa !5
  %46 = load i64, ptr %9, align 8, !tbaa !9
  invoke void @_ZN16SegmentTreeBeatsIxE11range_chminEiix(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef %44, i32 noundef %45, i64 noundef %46)
          to label %47 unwind label %50

47:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  br label %93

48:                                               ; preds = %.lr.ph
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %98

50:                                               ; preds = %43, %41, %39, %37
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  br label %98

52:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  %53 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) @_ZN6fastio2scE, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %54 unwind label %63

54:                                               ; preds = %52
  %55 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) %53, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %56 unwind label %63

56:                                               ; preds = %54
  %57 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIxEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) %55, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %58 unwind label %63

58:                                               ; preds = %56
  %59 = load i32, ptr %10, align 4, !tbaa !5
  %60 = load i32, ptr %11, align 4, !tbaa !5
  %61 = load i64, ptr %12, align 8, !tbaa !9
  invoke void @_ZN16SegmentTreeBeatsIxE11range_chmaxEiix(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef %59, i32 noundef %60, i64 noundef %61)
          to label %62 unwind label %63

62:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  br label %93

63:                                               ; preds = %58, %56, %54, %52
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  br label %98

65:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #6
  %66 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) @_ZN6fastio2scE, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %67 unwind label %76

67:                                               ; preds = %65
  %68 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) %66, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %69 unwind label %76

69:                                               ; preds = %67
  %70 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIxEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) %68, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %71 unwind label %76

71:                                               ; preds = %69
  %72 = load i32, ptr %13, align 4, !tbaa !5
  %73 = load i32, ptr %14, align 4, !tbaa !5
  %74 = load i64, ptr %15, align 8, !tbaa !9
  invoke void @_ZN16SegmentTreeBeatsIxE9range_addEiix(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef %72, i32 noundef %73, i64 noundef %74)
          to label %75 unwind label %76

75:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #6
  br label %93

76:                                               ; preds = %71, %69, %67, %65
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #6
  br label %98

78:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #6
  %79 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) @_ZN6fastio2scE, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %80 unwind label %88

80:                                               ; preds = %78
  %81 = invoke noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089) %79, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %82 unwind label %88

82:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #6
  %83 = load i32, ptr %16, align 4, !tbaa !5
  %84 = load i32, ptr %17, align 4, !tbaa !5
  %85 = invoke noundef i64 @_ZN16SegmentTreeBeatsIxE9range_sumEii(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef %83, i32 noundef %84)
          to label %86 unwind label %90

86:                                               ; preds = %82
  store i64 %85, ptr %18, align 8, !tbaa !9
  invoke void @_Z5printIxEvRKT_(ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %87 unwind label %90

87:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  br label %93

88:                                               ; preds = %80, %78
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %92

90:                                               ; preds = %86, %82
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  br label %92

92:                                               ; preds = %90, %88
  %.pn = phi { ptr, i32 } [ %91, %90 ], [ %89, %88 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  br label %98

93:                                               ; preds = %62, %87, %75, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  %94 = add nuw nsw i64 %.017, 1
  %95 = load i32, ptr %2, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = icmp slt i64 %94, %96
  br i1 %97, label %.lr.ph, label %._crit_edge, !llvm.loop !11

98:                                               ; preds = %92, %76, %63, %50, %48
  %.pn12 = phi { ptr, i32 } [ %51, %50 ], [ %64, %63 ], [ %77, %76 ], [ %.pn, %92 ], [ %49, %48 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @_ZN16SegmentTreeBeatsIxED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br label %99

99:                                               ; preds = %98, %32
  %.pn12.pn = phi { ptr, i32 } [ %.pn12, %98 ], [ %33, %32 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  br label %100

100:                                              ; preds = %99, %30
  %.pn12.pn.pn = phi { ptr, i32 } [ %.pn12.pn, %99 ], [ %31, %30 ]
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  br label %101

101:                                              ; preds = %100, %28
  %.pn12.pn.pn.pn = phi { ptr, i32 } [ %.pn12.pn.pn, %100 ], [ %29, %28 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn12.pn.pn.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 uwtable
declare dso_local noundef nonnull align 4 dereferenceable(131089) ptr @_ZN6fastio7ScannerILm131072ELi16EErsIiEERS1_RT_(ptr noundef nonnull align 4 dereferenceable(131089), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z5printIxEvRKT_(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #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 = { 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 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass