; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/VK Cup 2016 Round 1 /Problem D (D)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.9" = type { ptr }
%"struct.std::pair" = type { i64, i64 }

@n = external dso_local global i32, align 4
@p = external dso_local global %"class.std::vector", align 8
@strt = external dso_local global [200100 x i64], align 16
@e = external dso_local global [200100 x i64], align 16
@T = external dso_local global i64, align 8
@group = external dso_local global [200100 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3cmpRKSt4pairIxxES2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z1fe(x86_fp80 noundef) #1

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.9", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.9", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca x86_fp80, align 16
  %10 = alloca x86_fp80, align 16
  %11 = alloca x86_fp80, align 16
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  %14 = load i32, ptr @n, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %15)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %29, %0
  %17 = load i32, ptr %3, align 4, !tbaa !5
  %18 = load i32, ptr @n, align 4, !tbaa !5
  %19 = icmp slt i32 %17, %18
  br i1 %19, label %21, label %20

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

21:                                               ; preds = %16
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = load i32, ptr %3, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %26) #6
  %28 = getelementptr inbounds %"struct.std::pair", ptr %27, i32 0, i32 0
  store i64 %24, ptr %28, align 8, !tbaa !9
  br label %29

29:                                               ; preds = %21
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %3, align 4, !tbaa !5
  br label %16, !llvm.loop !12

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

33:                                               ; preds = %50, %32
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = load i32, ptr @n, align 4, !tbaa !5
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %53

38:                                               ; preds = %33
  %39 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %43) #6
  %45 = getelementptr inbounds %"struct.std::pair", ptr %44, i32 0, i32 1
  store i64 %41, ptr %45, align 8, !tbaa !14
  %46 = load i32, ptr %2, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = load i64, ptr @T, align 8, !tbaa !15
  %49 = add nsw i64 %48, %47
  store i64 %49, ptr @T, align 8, !tbaa !15
  br label %50

50:                                               ; preds = %38
  %51 = load i32, ptr %4, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %4, align 4, !tbaa !5
  br label %33, !llvm.loop !16

53:                                               ; preds = %37
  %54 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #6
  %55 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.9", ptr %5, i32 0, i32 0
  store ptr %54, ptr %55, align 8
  %56 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #6
  %57 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.9", ptr %6, i32 0, i32 0
  store ptr %56, ptr %57, align 8
  %58 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.9", ptr %5, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8
  %60 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.9", ptr %6, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS3_SaIS3_EEEEPFbRKS3_SA_EEvT_SD_T0_(ptr %59, ptr %61, ptr noundef @_Z3cmpRKSt4pairIxxES2_)
  store i32 1, ptr @group, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %113, %53
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = load i32, ptr @n, align 4, !tbaa !5
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %116

67:                                               ; preds = %62
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %69) #6
  %71 = getelementptr inbounds %"struct.std::pair", ptr %70, i32 0, i32 0
  %72 = load i64, ptr %71, align 8, !tbaa !9
  %73 = load i32, ptr %7, align 4, !tbaa !5
  %74 = sub nsw i32 %73, 1
  %75 = sext i32 %74 to i64
  %76 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %75) #6
  %77 = getelementptr inbounds %"struct.std::pair", ptr %76, i32 0, i32 1
  %78 = load i64, ptr %77, align 8, !tbaa !14
  %79 = mul nsw i64 %72, %78
  %80 = load i32, ptr %7, align 4, !tbaa !5
  %81 = sub nsw i32 %80, 1
  %82 = sext i32 %81 to i64
  %83 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %82) #6
  %84 = getelementptr inbounds %"struct.std::pair", ptr %83, i32 0, i32 0
  %85 = load i64, ptr %84, align 8, !tbaa !9
  %86 = load i32, ptr %7, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %87) #6
  %89 = getelementptr inbounds %"struct.std::pair", ptr %88, i32 0, i32 1
  %90 = load i64, ptr %89, align 8, !tbaa !14
  %91 = mul nsw i64 %85, %90
  %92 = icmp eq i64 %79, %91
  br i1 %92, label %93, label %102

93:                                               ; preds = %67
  %94 = load i32, ptr %7, align 4, !tbaa !5
  %95 = sub nsw i32 %94, 1
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [200100 x i32], ptr @group, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = load i32, ptr %7, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [200100 x i32], ptr @group, i64 0, i64 %100
  store i32 %98, ptr %101, align 4, !tbaa !5
  br label %112

102:                                              ; preds = %67
  %103 = load i32, ptr %7, align 4, !tbaa !5
  %104 = sub nsw i32 %103, 1
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [200100 x i32], ptr @group, i64 0, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  %109 = load i32, ptr %7, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [200100 x i32], ptr @group, i64 0, i64 %110
  store i32 %108, ptr %111, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %102, %93
  br label %113

113:                                              ; preds = %112
  %114 = load i32, ptr %7, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %7, align 4, !tbaa !5
  br label %62, !llvm.loop !17

116:                                              ; preds = %66
  store i64 0, ptr getelementptr inbounds ([200100 x i64], ptr @strt, i64 0, i64 1), align 8, !tbaa !15
  %117 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef 0) #6
  %118 = getelementptr inbounds %"struct.std::pair", ptr %117, i32 0, i32 1
  %119 = load i64, ptr %118, align 8, !tbaa !14
  store i64 %119, ptr getelementptr inbounds ([200100 x i64], ptr @e, i64 0, i64 1), align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %185, %116
  %121 = load i32, ptr %8, align 4, !tbaa !5
  %122 = load i32, ptr @n, align 4, !tbaa !5
  %123 = icmp slt i32 %121, %122
  br i1 %123, label %125, label %124

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

125:                                              ; preds = %120
  %126 = load i32, ptr %8, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [200100 x i32], ptr @group, i64 0, i64 %127
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = load i32, ptr %8, align 4, !tbaa !5
  %131 = sub nsw i32 %130, 1
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [200100 x i32], ptr @group, i64 0, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = icmp eq i32 %129, %134
  br i1 %135, label %136, label %150

136:                                              ; preds = %125
  %137 = load i32, ptr %8, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %138) #6
  %140 = getelementptr inbounds %"struct.std::pair", ptr %139, i32 0, i32 1
  %141 = load i64, ptr %140, align 8, !tbaa !14
  %142 = load i32, ptr %8, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [200100 x i32], ptr @group, i64 0, i64 %143
  %145 = load i32, ptr %144, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [200100 x i64], ptr @e, i64 0, i64 %146
  %148 = load i64, ptr %147, align 8, !tbaa !15
  %149 = add nsw i64 %148, %141
  store i64 %149, ptr %147, align 8, !tbaa !15
  br label %184

150:                                              ; preds = %125
  %151 = load i32, ptr %8, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [200100 x i32], ptr @group, i64 0, i64 %152
  %154 = load i32, ptr %153, align 4, !tbaa !5
  %155 = sub nsw i32 %154, 1
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [200100 x i64], ptr @e, i64 0, i64 %156
  %158 = load i64, ptr %157, align 8, !tbaa !15
  %159 = load i32, ptr %8, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [200100 x i32], ptr @group, i64 0, i64 %160
  %162 = load i32, ptr %161, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [200100 x i64], ptr @strt, i64 0, i64 %163
  store i64 %158, ptr %164, align 8, !tbaa !15
  %165 = load i32, ptr %8, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [200100 x i32], ptr @group, i64 0, i64 %166
  %168 = load i32, ptr %167, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [200100 x i64], ptr @strt, i64 0, i64 %169
  %171 = load i64, ptr %170, align 8, !tbaa !15
  %172 = load i32, ptr %8, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %173) #6
  %175 = getelementptr inbounds %"struct.std::pair", ptr %174, i32 0, i32 1
  %176 = load i64, ptr %175, align 8, !tbaa !14
  %177 = add nsw i64 %171, %176
  %178 = load i32, ptr %8, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [200100 x i32], ptr @group, i64 0, i64 %179
  %181 = load i32, ptr %180, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [200100 x i64], ptr @e, i64 0, i64 %182
  store i64 %177, ptr %183, align 8, !tbaa !15
  br label %184

184:                                              ; preds = %150, %136
  br label %185

185:                                              ; preds = %184
  %186 = load i32, ptr %8, align 4, !tbaa !5
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %8, align 4, !tbaa !5
  br label %120, !llvm.loop !18

188:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  store x86_fp80 0xK00000000000000000000, ptr %9, align 16, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  store x86_fp80 0xK3FFF8000000000000000, ptr %10, align 16, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %189

189:                                              ; preds = %205, %188
  %190 = load i32, ptr %12, align 4, !tbaa !5
  %191 = icmp slt i32 %190, 30
  br i1 %191, label %193, label %192

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

193:                                              ; preds = %189
  %194 = load x86_fp80, ptr %9, align 16, !tbaa !19
  %195 = load x86_fp80, ptr %10, align 16, !tbaa !19
  %196 = fadd x86_fp80 %194, %195
  %197 = fdiv x86_fp80 %196, 0xK40008000000000000000
  store x86_fp80 %197, ptr %11, align 16, !tbaa !19
  %198 = load x86_fp80, ptr %11, align 16, !tbaa !19
  %199 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %198)
  br i1 %199, label %200, label %202

200:                                              ; preds = %193
  %201 = load x86_fp80, ptr %11, align 16, !tbaa !19
  store x86_fp80 %201, ptr %9, align 16, !tbaa !19
  br label %204

202:                                              ; preds = %193
  %203 = load x86_fp80, ptr %11, align 16, !tbaa !19
  store x86_fp80 %203, ptr %10, align 16, !tbaa !19
  br label %204

204:                                              ; preds = %202, %200
  br label %205

205:                                              ; preds = %204
  %206 = load i32, ptr %12, align 4, !tbaa !5
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr %12, align 4, !tbaa !5
  br label %189, !llvm.loop !21

208:                                              ; preds = %192
  %209 = load x86_fp80, ptr %9, align 16, !tbaa !19
  %210 = fptrunc x86_fp80 %209 to double
  %211 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, double noundef %210)
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  ret i32 0
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS3_SaIS3_EEEEPFbRKS3_SA_EEvT_SD_T0_(ptr, ptr, ptr noundef) #5

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

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

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

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


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@n = external dso_local global i32, align 4
@p = external dso_local global %"class.std::vector", align 8
@strt = external dso_local local_unnamed_addr global [200100 x i64], align 16
@e = external dso_local local_unnamed_addr global [200100 x i64], align 16
@T = external dso_local local_unnamed_addr global i64, align 8
@group = external dso_local local_unnamed_addr global [200100 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3cmpRKSt4pairIxxES2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z1fe(x86_fp80 noundef) local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i32, align 4
  %2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %3 = load i32, ptr @n, align 4, !tbaa !5
  %4 = sext i32 %3 to i64
  tail call void @_ZNSt6vectorISt4pairIxxESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph, label %._crit_edge

.preheader44:                                     ; preds = %.lr.ph
  %7 = icmp sgt i32 %12, 0
  br i1 %7, label %.lr.ph47, label %._crit_edge

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %10 = sext i32 %9 to i64
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %indvars.iv) #6
  store i64 %10, ptr %11, align 8, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = icmp slt i64 %indvars.iv.next, %13
  br i1 %14, label %.lr.ph, label %.preheader44, !llvm.loop !12

._crit_edge:                                      ; preds = %.lr.ph47, %0, %.preheader44
  %15 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #6
  %16 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #6
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS3_SaIS3_EEEEPFbRKS3_SA_EEvT_SD_T0_(ptr %15, ptr %16, ptr noundef nonnull @_Z3cmpRKSt4pairIxxES2_)
  store i32 1, ptr @group, align 16, !tbaa !5
  %17 = load i32, ptr @n, align 4, !tbaa !5
  %18 = icmp sgt i32 %17, 1
  br i1 %18, label %.lr.ph50, label %._crit_edge51

.lr.ph47:                                         ; preds = %.preheader44, %.lr.ph47
  %indvars.iv59 = phi i64 [ %indvars.iv.next60, %.lr.ph47 ], [ 0, %.preheader44 ]
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %20 = load i32, ptr %1, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %indvars.iv59) #6
  %23 = getelementptr inbounds i8, ptr %22, i64 8
  store i64 %21, ptr %23, align 8, !tbaa !14
  %24 = load i32, ptr %1, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = load i64, ptr @T, align 8, !tbaa !15
  %27 = add nsw i64 %26, %25
  store i64 %27, ptr @T, align 8, !tbaa !15
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %28 = load i32, ptr @n, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = icmp slt i64 %indvars.iv.next60, %29
  br i1 %30, label %.lr.ph47, label %._crit_edge, !llvm.loop !16

._crit_edge51:                                    ; preds = %.lr.ph50, %._crit_edge
  store i64 0, ptr getelementptr inbounds (i8, ptr @strt, i64 8), align 8, !tbaa !15
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef 0) #6
  %32 = getelementptr inbounds i8, ptr %31, i64 8
  %33 = load i64, ptr %32, align 8, !tbaa !14
  store i64 %33, ptr getelementptr inbounds (i8, ptr @e, i64 8), align 8, !tbaa !15
  %34 = load i32, ptr @n, align 4, !tbaa !5
  %35 = icmp sgt i32 %34, 1
  br i1 %35, label %.lr.ph54.preheader, label %.preheader

.lr.ph54.preheader:                               ; preds = %._crit_edge51
  %.pre = load i32, ptr @group, align 16, !tbaa !5
  br label %.lr.ph54

.lr.ph50:                                         ; preds = %._crit_edge, %.lr.ph50
  %indvars.iv62 = phi i64 [ %indvars.iv.next63, %.lr.ph50 ], [ 1, %._crit_edge ]
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %indvars.iv62) #6
  %37 = load i64, ptr %36, align 8, !tbaa !9
  %38 = add nsw i64 %indvars.iv62, -1
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %38) #6
  %40 = getelementptr inbounds i8, ptr %39, i64 8
  %41 = load i64, ptr %40, align 8, !tbaa !14
  %42 = mul nsw i64 %41, %37
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %38) #6
  %44 = load i64, ptr %43, align 8, !tbaa !9
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %indvars.iv62) #6
  %46 = getelementptr inbounds i8, ptr %45, i64 8
  %47 = load i64, ptr %46, align 8, !tbaa !14
  %48 = mul nsw i64 %47, %44
  %49 = icmp ne i64 %42, %48
  %50 = getelementptr inbounds [200100 x i32], ptr @group, i64 0, i64 %38
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = zext i1 %49 to i32
  %.sink = add nsw i32 %51, %52
  %53 = getelementptr inbounds [200100 x i32], ptr @group, i64 0, i64 %indvars.iv62
  store i32 %.sink, ptr %53, align 4
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %54 = load i32, ptr @n, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = icmp slt i64 %indvars.iv.next63, %55
  br i1 %56, label %.lr.ph50, label %._crit_edge51, !llvm.loop !17

.preheader:                                       ; preds = %173, %._crit_edge51
  %57 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef 0xK3FFE8000000000000000)
  %..040 = select i1 %57, x86_fp80 0xK3FFE8000000000000000, x86_fp80 0xK00000000000000000000
  %.038. = select i1 %57, x86_fp80 0xK3FFF8000000000000000, x86_fp80 0xK3FFE8000000000000000
  %58 = select i1 %57, x86_fp80 0xK3FFEC000000000000000, x86_fp80 0xK3FFD8000000000000000
  %59 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %58)
  %..040.1 = select i1 %59, x86_fp80 %58, x86_fp80 %..040
  %.038..1 = select i1 %59, x86_fp80 %.038., x86_fp80 %58
  %60 = fadd x86_fp80 %..040.1, %.038..1
  %61 = fmul x86_fp80 %60, 0xK3FFE8000000000000000
  %62 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %61)
  %..040.2 = select i1 %62, x86_fp80 %61, x86_fp80 %..040.1
  %.038..2 = select i1 %62, x86_fp80 %.038..1, x86_fp80 %61
  %63 = fadd x86_fp80 %..040.2, %.038..2
  %64 = fmul x86_fp80 %63, 0xK3FFE8000000000000000
  %65 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %64)
  %..040.3 = select i1 %65, x86_fp80 %64, x86_fp80 %..040.2
  %.038..3 = select i1 %65, x86_fp80 %.038..2, x86_fp80 %64
  %66 = fadd x86_fp80 %..040.3, %.038..3
  %67 = fmul x86_fp80 %66, 0xK3FFE8000000000000000
  %68 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %67)
  %..040.4 = select i1 %68, x86_fp80 %67, x86_fp80 %..040.3
  %.038..4 = select i1 %68, x86_fp80 %.038..3, x86_fp80 %67
  %69 = fadd x86_fp80 %..040.4, %.038..4
  %70 = fmul x86_fp80 %69, 0xK3FFE8000000000000000
  %71 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %70)
  %..040.5 = select i1 %71, x86_fp80 %70, x86_fp80 %..040.4
  %.038..5 = select i1 %71, x86_fp80 %.038..4, x86_fp80 %70
  %72 = fadd x86_fp80 %..040.5, %.038..5
  %73 = fmul x86_fp80 %72, 0xK3FFE8000000000000000
  %74 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %73)
  %..040.6 = select i1 %74, x86_fp80 %73, x86_fp80 %..040.5
  %.038..6 = select i1 %74, x86_fp80 %.038..5, x86_fp80 %73
  %75 = fadd x86_fp80 %..040.6, %.038..6
  %76 = fmul x86_fp80 %75, 0xK3FFE8000000000000000
  %77 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %76)
  %..040.7 = select i1 %77, x86_fp80 %76, x86_fp80 %..040.6
  %.038..7 = select i1 %77, x86_fp80 %.038..6, x86_fp80 %76
  %78 = fadd x86_fp80 %..040.7, %.038..7
  %79 = fmul x86_fp80 %78, 0xK3FFE8000000000000000
  %80 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %79)
  %..040.8 = select i1 %80, x86_fp80 %79, x86_fp80 %..040.7
  %.038..8 = select i1 %80, x86_fp80 %.038..7, x86_fp80 %79
  %81 = fadd x86_fp80 %..040.8, %.038..8
  %82 = fmul x86_fp80 %81, 0xK3FFE8000000000000000
  %83 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %82)
  %..040.9 = select i1 %83, x86_fp80 %82, x86_fp80 %..040.8
  %.038..9 = select i1 %83, x86_fp80 %.038..8, x86_fp80 %82
  %84 = fadd x86_fp80 %..040.9, %.038..9
  %85 = fmul x86_fp80 %84, 0xK3FFE8000000000000000
  %86 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %85)
  %..040.10 = select i1 %86, x86_fp80 %85, x86_fp80 %..040.9
  %.038..10 = select i1 %86, x86_fp80 %.038..9, x86_fp80 %85
  %87 = fadd x86_fp80 %..040.10, %.038..10
  %88 = fmul x86_fp80 %87, 0xK3FFE8000000000000000
  %89 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %88)
  %..040.11 = select i1 %89, x86_fp80 %88, x86_fp80 %..040.10
  %.038..11 = select i1 %89, x86_fp80 %.038..10, x86_fp80 %88
  %90 = fadd x86_fp80 %..040.11, %.038..11
  %91 = fmul x86_fp80 %90, 0xK3FFE8000000000000000
  %92 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %91)
  %..040.12 = select i1 %92, x86_fp80 %91, x86_fp80 %..040.11
  %.038..12 = select i1 %92, x86_fp80 %.038..11, x86_fp80 %91
  %93 = fadd x86_fp80 %..040.12, %.038..12
  %94 = fmul x86_fp80 %93, 0xK3FFE8000000000000000
  %95 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %94)
  %..040.13 = select i1 %95, x86_fp80 %94, x86_fp80 %..040.12
  %.038..13 = select i1 %95, x86_fp80 %.038..12, x86_fp80 %94
  %96 = fadd x86_fp80 %..040.13, %.038..13
  %97 = fmul x86_fp80 %96, 0xK3FFE8000000000000000
  %98 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %97)
  %..040.14 = select i1 %98, x86_fp80 %97, x86_fp80 %..040.13
  %.038..14 = select i1 %98, x86_fp80 %.038..13, x86_fp80 %97
  %99 = fadd x86_fp80 %..040.14, %.038..14
  %100 = fmul x86_fp80 %99, 0xK3FFE8000000000000000
  %101 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %100)
  %..040.15 = select i1 %101, x86_fp80 %100, x86_fp80 %..040.14
  %.038..15 = select i1 %101, x86_fp80 %.038..14, x86_fp80 %100
  %102 = fadd x86_fp80 %..040.15, %.038..15
  %103 = fmul x86_fp80 %102, 0xK3FFE8000000000000000
  %104 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %103)
  %..040.16 = select i1 %104, x86_fp80 %103, x86_fp80 %..040.15
  %.038..16 = select i1 %104, x86_fp80 %.038..15, x86_fp80 %103
  %105 = fadd x86_fp80 %..040.16, %.038..16
  %106 = fmul x86_fp80 %105, 0xK3FFE8000000000000000
  %107 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %106)
  %..040.17 = select i1 %107, x86_fp80 %106, x86_fp80 %..040.16
  %.038..17 = select i1 %107, x86_fp80 %.038..16, x86_fp80 %106
  %108 = fadd x86_fp80 %..040.17, %.038..17
  %109 = fmul x86_fp80 %108, 0xK3FFE8000000000000000
  %110 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %109)
  %..040.18 = select i1 %110, x86_fp80 %109, x86_fp80 %..040.17
  %.038..18 = select i1 %110, x86_fp80 %.038..17, x86_fp80 %109
  %111 = fadd x86_fp80 %..040.18, %.038..18
  %112 = fmul x86_fp80 %111, 0xK3FFE8000000000000000
  %113 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %112)
  %..040.19 = select i1 %113, x86_fp80 %112, x86_fp80 %..040.18
  %.038..19 = select i1 %113, x86_fp80 %.038..18, x86_fp80 %112
  %114 = fadd x86_fp80 %..040.19, %.038..19
  %115 = fmul x86_fp80 %114, 0xK3FFE8000000000000000
  %116 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %115)
  %..040.20 = select i1 %116, x86_fp80 %115, x86_fp80 %..040.19
  %.038..20 = select i1 %116, x86_fp80 %.038..19, x86_fp80 %115
  %117 = fadd x86_fp80 %..040.20, %.038..20
  %118 = fmul x86_fp80 %117, 0xK3FFE8000000000000000
  %119 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %118)
  %..040.21 = select i1 %119, x86_fp80 %118, x86_fp80 %..040.20
  %.038..21 = select i1 %119, x86_fp80 %.038..20, x86_fp80 %118
  %120 = fadd x86_fp80 %..040.21, %.038..21
  %121 = fmul x86_fp80 %120, 0xK3FFE8000000000000000
  %122 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %121)
  %..040.22 = select i1 %122, x86_fp80 %121, x86_fp80 %..040.21
  %.038..22 = select i1 %122, x86_fp80 %.038..21, x86_fp80 %121
  %123 = fadd x86_fp80 %..040.22, %.038..22
  %124 = fmul x86_fp80 %123, 0xK3FFE8000000000000000
  %125 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %124)
  %..040.23 = select i1 %125, x86_fp80 %124, x86_fp80 %..040.22
  %.038..23 = select i1 %125, x86_fp80 %.038..22, x86_fp80 %124
  %126 = fadd x86_fp80 %..040.23, %.038..23
  %127 = fmul x86_fp80 %126, 0xK3FFE8000000000000000
  %128 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %127)
  %..040.24 = select i1 %128, x86_fp80 %127, x86_fp80 %..040.23
  %.038..24 = select i1 %128, x86_fp80 %.038..23, x86_fp80 %127
  %129 = fadd x86_fp80 %..040.24, %.038..24
  %130 = fmul x86_fp80 %129, 0xK3FFE8000000000000000
  %131 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %130)
  %..040.25 = select i1 %131, x86_fp80 %130, x86_fp80 %..040.24
  %.038..25 = select i1 %131, x86_fp80 %.038..24, x86_fp80 %130
  %132 = fadd x86_fp80 %..040.25, %.038..25
  %133 = fmul x86_fp80 %132, 0xK3FFE8000000000000000
  %134 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %133)
  %..040.26 = select i1 %134, x86_fp80 %133, x86_fp80 %..040.25
  %.038..26 = select i1 %134, x86_fp80 %.038..25, x86_fp80 %133
  %135 = fadd x86_fp80 %..040.26, %.038..26
  %136 = fmul x86_fp80 %135, 0xK3FFE8000000000000000
  %137 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %136)
  %..040.27 = select i1 %137, x86_fp80 %136, x86_fp80 %..040.26
  %.038..27 = select i1 %137, x86_fp80 %.038..26, x86_fp80 %136
  %138 = fadd x86_fp80 %..040.27, %.038..27
  %139 = fmul x86_fp80 %138, 0xK3FFE8000000000000000
  %140 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %139)
  %..040.28 = select i1 %140, x86_fp80 %139, x86_fp80 %..040.27
  %.038..28 = select i1 %140, x86_fp80 %.038..27, x86_fp80 %139
  %141 = fadd x86_fp80 %..040.28, %.038..28
  %142 = fmul x86_fp80 %141, 0xK3FFE8000000000000000
  %143 = call noundef zeroext i1 @_Z1fe(x86_fp80 noundef %142)
  %..040.29 = select i1 %143, x86_fp80 %142, x86_fp80 %..040.28
  %144 = fptrunc x86_fp80 %..040.29 to double
  %145 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %144)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

.lr.ph54:                                         ; preds = %.lr.ph54.preheader, %173
  %146 = phi i32 [ %.pre, %.lr.ph54.preheader ], [ %174, %173 ]
  %indvars.iv65 = phi i64 [ 1, %.lr.ph54.preheader ], [ %indvars.iv.next66, %173 ]
  %147 = getelementptr inbounds [200100 x i32], ptr @group, i64 0, i64 %indvars.iv65
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = icmp eq i32 %148, %146
  br i1 %149, label %150, label %159

150:                                              ; preds = %.lr.ph54
  %151 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %indvars.iv65) #6
  %152 = getelementptr inbounds i8, ptr %151, i64 8
  %153 = load i64, ptr %152, align 8, !tbaa !14
  %154 = load i32, ptr %147, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [200100 x i64], ptr @e, i64 0, i64 %155
  %157 = load i64, ptr %156, align 8, !tbaa !15
  %158 = add nsw i64 %157, %153
  store i64 %158, ptr %156, align 8, !tbaa !15
  br label %173

159:                                              ; preds = %.lr.ph54
  %160 = add nsw i32 %148, -1
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [200100 x i64], ptr @e, i64 0, i64 %161
  %163 = load i64, ptr %162, align 8, !tbaa !15
  %164 = sext i32 %148 to i64
  %165 = getelementptr inbounds [200100 x i64], ptr @strt, i64 0, i64 %164
  store i64 %163, ptr %165, align 8, !tbaa !15
  %166 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %indvars.iv65) #6
  %167 = getelementptr inbounds i8, ptr %166, i64 8
  %168 = load i64, ptr %167, align 8, !tbaa !14
  %169 = add nsw i64 %168, %163
  %170 = load i32, ptr %147, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [200100 x i64], ptr @e, i64 0, i64 %171
  store i64 %169, ptr %172, align 8, !tbaa !15
  br label %173

173:                                              ; preds = %150, %159
  %174 = phi i32 [ %154, %150 ], [ %170, %159 ]
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %175 = load i32, ptr @n, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = icmp slt i64 %indvars.iv.next66, %176
  br i1 %177, label %.lr.ph54, label %.preheader, !llvm.loop !18
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS3_SaIS3_EEEEPFbRKS3_SA_EEvT_SD_T0_(ptr, ptr, ptr noundef) local_unnamed_addr #5

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

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

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

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


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass