; LLVM IR from reyadussalahin/problem-solving :: graph/lca/loj/F1101 (Solution)

; 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.E = type { i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

@e = external dso_local global [100010 x %struct.E], align 16
@p = external dso_local global [100020 x i32], align 16
@mst = external dso_local global [100020 x %"class.std::vector"], align 16
@wc = external dso_local global %"class.std::map", align 8
@spt = external dso_local global [100020 x [20 x i32]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [97 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3cmpRK1ES1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z4findi(i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsiii(i32 noundef, i32 noundef, i32 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3lcaii(i32 noundef, i32 noundef) #0

; 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 i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %211, %0
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %214

30:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %31 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef %5, ptr noundef %6)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %42, %30
  %33 = load i32, ptr %7, align 4, !tbaa !5
  %34 = load i32, ptr %5, align 4, !tbaa !5
  %35 = mul nsw i32 2, %34
  %36 = icmp sle i32 %33, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %32
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %45

38:                                               ; preds = %32
  %39 = load i32, ptr %7, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [100020 x %"class.std::vector"], ptr @mst, i64 0, i64 %40
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %41) #7
  br label %42

42:                                               ; preds = %38
  %43 = load i32, ptr %7, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %7, align 4, !tbaa !5
  br label %32, !llvm.loop !9

45:                                               ; preds = %37
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) @wc) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %46

46:                                               ; preds = %65, %45
  %47 = load i32, ptr %8, align 4, !tbaa !5
  %48 = load i32, ptr %6, align 4, !tbaa !5
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %46
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %68

51:                                               ; preds = %46
  %52 = load i32, ptr %8, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [100010 x %struct.E], ptr @e, i64 0, i64 %53
  %55 = getelementptr inbounds %struct.E, ptr %54, i32 0, i32 0
  %56 = load i32, ptr %8, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [100010 x %struct.E], ptr @e, i64 0, i64 %57
  %59 = getelementptr inbounds %struct.E, ptr %58, i32 0, i32 1
  %60 = load i32, ptr %8, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [100010 x %struct.E], ptr @e, i64 0, i64 %61
  %63 = getelementptr inbounds %struct.E, ptr %62, i32 0, i32 2
  %64 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.5, ptr noundef %55, ptr noundef %59, ptr noundef %63)
  br label %65

65:                                               ; preds = %51
  %66 = load i32, ptr %8, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %8, align 4, !tbaa !5
  br label %46, !llvm.loop !11

68:                                               ; preds = %50
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds %struct.E, ptr @e, i64 %70
  call void @_ZSt4sortIP1EPFbRKS0_S3_EEvT_S6_T0_(ptr noundef @e, ptr noundef %71, ptr noundef @_Z3cmpRK1ES1_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %83, %68
  %73 = load i32, ptr %9, align 4, !tbaa !5
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = mul nsw i32 2, %74
  %76 = icmp sle i32 %73, %75
  br i1 %76, label %78, label %77

77:                                               ; preds = %72
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %86

78:                                               ; preds = %72
  %79 = load i32, ptr %9, align 4, !tbaa !5
  %80 = load i32, ptr %9, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [100020 x i32], ptr @p, i64 0, i64 %81
  store i32 %79, ptr %82, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %78
  %84 = load i32, ptr %9, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %9, align 4, !tbaa !5
  br label %72, !llvm.loop !12

86:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %87 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %87, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %138, %86
  %89 = load i32, ptr %11, align 4, !tbaa !5
  %90 = load i32, ptr %6, align 4, !tbaa !5
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %141

93:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %94 = load i32, ptr %11, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [100010 x %struct.E], ptr @e, i64 0, i64 %95
  %97 = getelementptr inbounds %struct.E, ptr %96, i32 0, i32 0
  %98 = load i32, ptr %97, align 4, !tbaa !13
  store i32 %98, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %99 = load i32, ptr %11, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [100010 x %struct.E], ptr @e, i64 0, i64 %100
  %102 = getelementptr inbounds %struct.E, ptr %101, i32 0, i32 1
  %103 = load i32, ptr %102, align 4, !tbaa !15
  store i32 %103, ptr %13, align 4, !tbaa !5
  %104 = load i32, ptr %12, align 4, !tbaa !5
  %105 = call noundef i32 @_Z4findi(i32 noundef %104)
  %106 = load i32, ptr %13, align 4, !tbaa !5
  %107 = call noundef i32 @_Z4findi(i32 noundef %106)
  %108 = icmp ne i32 %105, %107
  br i1 %108, label %109, label %137

109:                                              ; preds = %93
  %110 = load i32, ptr %10, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %112 = load i32, ptr %12, align 4, !tbaa !5
  %113 = call noundef i32 @_Z4findi(i32 noundef %112)
  store i32 %113, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %114 = load i32, ptr %13, align 4, !tbaa !5
  %115 = call noundef i32 @_Z4findi(i32 noundef %114)
  store i32 %115, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %116 = load i32, ptr %10, align 4, !tbaa !5
  %117 = call noundef i32 @_Z4findi(i32 noundef %116)
  store i32 %117, ptr %16, align 4, !tbaa !5
  %118 = load i32, ptr %16, align 4, !tbaa !5
  %119 = load i32, ptr %15, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [100020 x i32], ptr @p, i64 0, i64 %120
  store i32 %118, ptr %121, align 4, !tbaa !5
  %122 = load i32, ptr %14, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [100020 x i32], ptr @p, i64 0, i64 %123
  store i32 %118, ptr %124, align 4, !tbaa !5
  %125 = load i32, ptr %11, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [100010 x %struct.E], ptr @e, i64 0, i64 %126
  %128 = getelementptr inbounds %struct.E, ptr %127, i32 0, i32 2
  %129 = load i32, ptr %128, align 4, !tbaa !16
  %130 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @wc, ptr noundef nonnull align 4 dereferenceable(4) %10)
  store i32 %129, ptr %130, align 4, !tbaa !5
  %131 = load i32, ptr %16, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [100020 x %"class.std::vector"], ptr @mst, i64 0, i64 %132
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %133, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %134 = load i32, ptr %16, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [100020 x %"class.std::vector"], ptr @mst, i64 0, i64 %135
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %136, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %137

137:                                              ; preds = %109, %93
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %11, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %11, align 4, !tbaa !5
  br label %88, !llvm.loop !17

141:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %142

142:                                              ; preds = %163, %141
  %143 = load i32, ptr %17, align 4, !tbaa !5
  %144 = load i32, ptr %10, align 4, !tbaa !5
  %145 = icmp sle i32 %143, %144
  br i1 %145, label %147, label %146

146:                                              ; preds = %142
  store i32 17, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %166

147:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %148

148:                                              ; preds = %159, %147
  %149 = load i32, ptr %18, align 4, !tbaa !5
  %150 = icmp slt i32 %149, 20
  br i1 %150, label %152, label %151

151:                                              ; preds = %148
  store i32 20, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %162

152:                                              ; preds = %148
  %153 = load i32, ptr %17, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [100020 x [20 x i32]], ptr @spt, i64 0, i64 %154
  %156 = load i32, ptr %18, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [20 x i32], ptr %155, i64 0, i64 %157
  store i32 -1, ptr %158, align 4, !tbaa !5
  br label %159

159:                                              ; preds = %152
  %160 = load i32, ptr %18, align 4, !tbaa !5
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %18, align 4, !tbaa !5
  br label %148, !llvm.loop !18

162:                                              ; preds = %151
  br label %163

163:                                              ; preds = %162
  %164 = load i32, ptr %17, align 4, !tbaa !5
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %17, align 4, !tbaa !5
  br label %142, !llvm.loop !19

166:                                              ; preds = %146
  %167 = load i32, ptr %10, align 4, !tbaa !5
  %168 = load i32, ptr %5, align 4, !tbaa !5
  %169 = mul nsw i32 2, %168
  %170 = icmp sle i32 %167, %169
  br i1 %170, label %171, label %172

171:                                              ; preds = %166
  br label %174

172:                                              ; preds = %166
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.7, i32 noundef 121, ptr noundef @__PRETTY_FUNCTION__.main) #8
  unreachable

173:                                              ; No predecessors!
  br label %174

174:                                              ; preds = %173, %171
  %175 = call noundef i32 @_Z4findi(i32 noundef 1)
  %176 = load i32, ptr %10, align 4, !tbaa !5
  %177 = call noundef i32 @_Z4findi(i32 noundef %176)
  %178 = icmp eq i32 %175, %177
  br i1 %178, label %179, label %180

179:                                              ; preds = %174
  br label %182

180:                                              ; preds = %174
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.7, i32 noundef 122, ptr noundef @__PRETTY_FUNCTION__.main) #8
  unreachable

181:                                              ; No predecessors!
  br label %182

182:                                              ; preds = %181, %179
  %183 = load i32, ptr %10, align 4, !tbaa !5
  call void @_Z3dfsiii(i32 noundef %183, i32 noundef -1, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %184 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %19)
  %185 = load i32, ptr %3, align 4, !tbaa !5
  %186 = add nsw i32 %185, 1
  %187 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, i32 noundef %186)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %188

188:                                              ; preds = %207, %182
  %189 = load i32, ptr %20, align 4, !tbaa !5
  %190 = load i32, ptr %19, align 4, !tbaa !5
  %191 = icmp slt i32 %189, %190
  br i1 %191, label %193, label %192

192:                                              ; preds = %188
  store i32 23, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %210

193:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %194 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef %21, ptr noundef %22)
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %195 = load i32, ptr %21, align 4, !tbaa !5
  %196 = load i32, ptr %22, align 4, !tbaa !5
  %197 = call noundef i32 @_Z3lcaii(i32 noundef %195, i32 noundef %196)
  store i32 %197, ptr %23, align 4, !tbaa !5
  %198 = call noundef i64 @_ZNKSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5countERS3_(ptr noundef nonnull align 8 dereferenceable(48) @wc, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %199 = icmp ne i64 %198, 0
  br i1 %199, label %200, label %201

200:                                              ; preds = %193
  br label %203

201:                                              ; preds = %193
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.7, i32 noundef 133, ptr noundef @__PRETTY_FUNCTION__.main) #8
  unreachable

202:                                              ; No predecessors!
  br label %203

203:                                              ; preds = %202, %200
  %204 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @wc, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %205 = load i32, ptr %204, align 4, !tbaa !5
  %206 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, i32 noundef %205)
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %207

207:                                              ; preds = %203
  %208 = load i32, ptr %20, align 4, !tbaa !5
  %209 = add nsw i32 %208, 1
  store i32 %209, ptr %20, align 4, !tbaa !5
  br label %188, !llvm.loop !20

210:                                              ; preds = %192
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %211

211:                                              ; preds = %210
  %212 = load i32, ptr %3, align 4, !tbaa !5
  %213 = add nsw i32 %212, 1
  store i32 %213, ptr %3, align 4, !tbaa !5
  br label %25, !llvm.loop !21

214:                                              ; preds = %29
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %215 = load i32, ptr %1, align 4
  ret i32 %215
}

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

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

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #6

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5countERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

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 = { noreturn 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 #7 = { nounwind }
attributes #8 = { noreturn 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTS1E", !6, i64 0, !6, i64 4, !6, i64 8}
!15 = !{!14, !6, i64 4}
!16 = !{!14, !6, i64 8}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}


; 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.E = type { i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

@e = external dso_local global [100010 x %struct.E], align 16
@p = external dso_local local_unnamed_addr global [100020 x i32], align 16
@mst = external dso_local global [100020 x %"class.std::vector"], align 16
@wc = external dso_local global %"class.std::map", align 8
@spt = external dso_local local_unnamed_addr global [100020 x [20 x i32]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [97 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3cmpRK1ES1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z4findi(i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsiii(i32 noundef, i32 noundef, i32 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3lcaii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #9
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %12 = load i32, ptr %1, align 4, !tbaa !5
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.lr.ph79, label %._crit_edge80

._crit_edge80:                                    ; preds = %._crit_edge76, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #9
  ret i32 0

.lr.ph79:                                         ; preds = %0, %._crit_edge76
  %.03877 = phi i32 [ %85, %._crit_edge76 ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %.not53 = icmp slt i32 %15, 0
  br i1 %.not53, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph79
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) @wc) #9
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph57, label %._crit_edge.._crit_edge58_crit_edge

._crit_edge.._crit_edge58_crit_edge:              ; preds = %._crit_edge
  %.pre96 = sext i32 %16 to i64
  br label %._crit_edge58

.lr.ph:                                           ; preds = %.lr.ph79, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph79 ]
  %18 = getelementptr inbounds [100020 x %"class.std::vector"], ptr @mst, i64 0, i64 %indvars.iv
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = shl nsw i32 %19, 1
  %21 = sext i32 %20 to i64
  %.not.not = icmp slt i64 %indvars.iv, %21
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge58:                                    ; preds = %.lr.ph57, %._crit_edge.._crit_edge58_crit_edge
  %.pre-phi = phi i64 [ %.pre96, %._crit_edge.._crit_edge58_crit_edge ], [ %35, %.lr.ph57 ]
  %22 = getelementptr inbounds %struct.E, ptr @e, i64 %.pre-phi
  call void @_ZSt4sortIP1EPFbRKS0_S3_EEvT_S6_T0_(ptr noundef nonnull @e, ptr noundef nonnull %22, ptr noundef nonnull @_Z3cmpRK1ES1_)
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %.not4559 = icmp slt i32 %23, 1
  br i1 %.not4559, label %._crit_edge63, label %.lr.ph62.preheader

.lr.ph62.preheader:                               ; preds = %._crit_edge58
  %24 = shl nuw i32 %23, 1
  %smax = call i32 @llvm.smax.i32(i32 %24, i32 1)
  %25 = add nuw nsw i32 %smax, 1
  %wide.trip.count = zext nneg i32 %25 to i64
  %26 = zext nneg i32 %smax to i64
  %min.iters.check = icmp slt i32 %24, 8
  br i1 %min.iters.check, label %.lr.ph62.preheader98, label %vector.ph

.lr.ph62.preheader98:                             ; preds = %middle.block, %.lr.ph62.preheader
  %indvars.iv86.ph = phi i64 [ 1, %.lr.ph62.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph62

vector.ph:                                        ; preds = %.lr.ph62.preheader
  %n.vec = and i64 %26, 2147483640
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 1, i32 2, i32 3, i32 4>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %offset.idx = or disjoint i64 %index, 1
  %27 = getelementptr inbounds [100020 x i32], ptr @p, i64 0, i64 %offset.idx
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  store <4 x i32> %vec.ind, ptr %27, align 4, !tbaa !5
  store <4 x i32> %step.add, ptr %28, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %29 = icmp eq i64 %index.next, %n.vec
  br i1 %29, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %26
  br i1 %cmp.n, label %._crit_edge63, label %.lr.ph62.preheader98

.lr.ph57:                                         ; preds = %._crit_edge, %.lr.ph57
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %.lr.ph57 ], [ 0, %._crit_edge ]
  %30 = getelementptr inbounds [100010 x %struct.E], ptr @e, i64 0, i64 %indvars.iv83
  %31 = getelementptr inbounds i8, ptr %30, i64 4
  %32 = getelementptr inbounds i8, ptr %30, i64 8
  %33 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull %30, ptr noundef nonnull %31, ptr noundef nonnull %32)
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = icmp slt i64 %indvars.iv.next84, %35
  br i1 %36, label %.lr.ph57, label %._crit_edge58, !llvm.loop !14

._crit_edge63:                                    ; preds = %.lr.ph62, %middle.block, %._crit_edge58
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  store i32 %23, ptr %4, align 4, !tbaa !5
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %.lr.ph67, label %.preheader50

.lr.ph62:                                         ; preds = %.lr.ph62.preheader98, %.lr.ph62
  %indvars.iv86 = phi i64 [ %indvars.iv.next87, %.lr.ph62 ], [ %indvars.iv86.ph, %.lr.ph62.preheader98 ]
  %39 = getelementptr inbounds [100020 x i32], ptr @p, i64 0, i64 %indvars.iv86
  %40 = trunc nuw nsw i64 %indvars.iv86 to i32
  store i32 %40, ptr %39, align 4, !tbaa !5
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next87, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge63, label %.lr.ph62, !llvm.loop !15

.preheader50.loopexit:                            ; preds = %69
  %.pre = load i32, ptr %4, align 4, !tbaa !5
  br label %.preheader50

.preheader50:                                     ; preds = %.preheader50.loopexit, %._crit_edge63
  %41 = phi i32 [ %.pre, %.preheader50.loopexit ], [ %23, %._crit_edge63 ]
  %.not4669 = icmp slt i32 %41, 0
  br i1 %.not4669, label %._crit_edge71, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader50
  %42 = add nuw i32 %41, 1
  %43 = zext i32 %42 to i64
  %44 = mul nuw nsw i64 %43, 80
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) @spt, i8 -1, i64 %44, i1 false), !tbaa !5
  br label %._crit_edge71

.lr.ph67:                                         ; preds = %._crit_edge63, %69
  %indvars.iv89 = phi i64 [ %indvars.iv.next90, %69 ], [ 0, %._crit_edge63 ]
  %45 = getelementptr inbounds [100010 x %struct.E], ptr @e, i64 0, i64 %indvars.iv89
  %46 = load i32, ptr %45, align 4, !tbaa !16
  %47 = getelementptr inbounds i8, ptr %45, i64 4
  %48 = load i32, ptr %47, align 4, !tbaa !18
  %49 = call noundef i32 @_Z4findi(i32 noundef %46)
  %50 = call noundef i32 @_Z4findi(i32 noundef %48)
  %.not49 = icmp eq i32 %49, %50
  br i1 %.not49, label %69, label %51

51:                                               ; preds = %.lr.ph67
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  %54 = call noundef i32 @_Z4findi(i32 noundef %46)
  store i32 %54, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #9
  %55 = call noundef i32 @_Z4findi(i32 noundef %48)
  store i32 %55, ptr %6, align 4, !tbaa !5
  %56 = load i32, ptr %4, align 4, !tbaa !5
  %57 = call noundef i32 @_Z4findi(i32 noundef %56)
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [100020 x i32], ptr @p, i64 0, i64 %59
  store i32 %57, ptr %60, align 4, !tbaa !5
  %61 = load i32, ptr %5, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [100020 x i32], ptr @p, i64 0, i64 %62
  store i32 %57, ptr %63, align 4, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %45, i64 8
  %65 = load i32, ptr %64, align 4, !tbaa !19
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @wc, ptr noundef nonnull align 4 dereferenceable(4) %4)
  store i32 %65, ptr %66, align 4, !tbaa !5
  %67 = sext i32 %57 to i64
  %68 = getelementptr inbounds [100020 x %"class.std::vector"], ptr @mst, i64 0, i64 %67
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  br label %69

69:                                               ; preds = %51, %.lr.ph67
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %70 = load i32, ptr %3, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = icmp slt i64 %indvars.iv.next90, %71
  br i1 %72, label %.lr.ph67, label %.preheader50.loopexit, !llvm.loop !20

._crit_edge71:                                    ; preds = %.preheader.preheader, %.preheader50
  %73 = load i32, ptr %2, align 4, !tbaa !5
  %74 = shl nsw i32 %73, 1
  %.not47 = icmp sgt i32 %41, %74
  br i1 %.not47, label %75, label %76

75:                                               ; preds = %._crit_edge71
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.7, i32 noundef 121, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

76:                                               ; preds = %._crit_edge71
  %77 = call noundef i32 @_Z4findi(i32 noundef 1)
  %78 = load i32, ptr %4, align 4, !tbaa !5
  %79 = call noundef i32 @_Z4findi(i32 noundef %78)
  %80 = icmp eq i32 %77, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %76
  call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.7, i32 noundef 122, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

82:                                               ; preds = %76
  %83 = load i32, ptr %4, align 4, !tbaa !5
  call void @_Z3dfsiii(i32 noundef %83, i32 noundef -1, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9
  %84 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %7)
  %85 = add nuw nsw i32 %.03877, 1
  %86 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, i32 noundef %85)
  %87 = load i32, ptr %7, align 4, !tbaa !5
  %88 = icmp sgt i32 %87, 0
  br i1 %88, label %.lr.ph75, label %._crit_edge76

._crit_edge76:                                    ; preds = %97, %82
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #9
  %89 = load i32, ptr %1, align 4, !tbaa !5
  %90 = icmp slt i32 %85, %89
  br i1 %90, label %.lr.ph79, label %._crit_edge80, !llvm.loop !21

.lr.ph75:                                         ; preds = %82, %97
  %.073 = phi i32 [ %101, %97 ], [ 0, %82 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #9
  %91 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %8, ptr noundef nonnull %9)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #9
  %92 = load i32, ptr %8, align 4, !tbaa !5
  %93 = load i32, ptr %9, align 4, !tbaa !5
  %94 = call noundef i32 @_Z3lcaii(i32 noundef %92, i32 noundef %93)
  store i32 %94, ptr %10, align 4, !tbaa !5
  %95 = call noundef i64 @_ZNKSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5countERS3_(ptr noundef nonnull align 8 dereferenceable(48) @wc, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %.not48 = icmp eq i64 %95, 0
  br i1 %.not48, label %96, label %97

96:                                               ; preds = %.lr.ph75
  call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.7, i32 noundef 133, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

97:                                               ; preds = %.lr.ph75
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @wc, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i32 noundef %99)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #9
  %101 = add nuw nsw i32 %.073, 1
  %102 = load i32, ptr %7, align 4, !tbaa !5
  %103 = icmp slt i32 %101, %102
  br i1 %103, label %.lr.ph75, label %._crit_edge76, !llvm.loop !22
}

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

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

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5countERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #8

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 = { noreturn 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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #9 = { nounwind }
attributes #10 = { noreturn 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10, !12, !13}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10, !13, !12}
!16 = !{!17, !6, i64 0}
!17 = !{!"_ZTS1E", !6, i64 0, !6, i64 4, !6, i64 8}
!18 = !{!17, !6, i64 4}
!19 = !{!17, !6, i64 8}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SCCPPass,SROAPass,SimplifyCFGPass