; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/SNACKDOWN/16/Pre-Elimination A/Problem D (brute)

; 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::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<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 }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@a = external dso_local global [101 x i32], align 16
@cnt = external dso_local global [101 x i32], align 16
@len = external dso_local global [101 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [129 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::set", align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair", align 8
  %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
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  %20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %224, %0
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = icmp sle i32 %22, %23
  br i1 %24, label %26, label %25

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

26:                                               ; preds = %21
  %27 = load i32, ptr %3, align 4, !tbaa !5
  %28 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %27)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @cnt, ptr noundef getelementptr inbounds (i32, ptr @cnt, i64 101), ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @len, ptr noundef getelementptr inbounds (i32, ptr @len, i64 101), ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef @n, ptr noundef @k)
  %30 = load i32, ptr @n, align 4, !tbaa !5
  %31 = icmp sle i32 1, %30
  br i1 %31, label %32, label %35

32:                                               ; preds = %26
  %33 = load i32, ptr @n, align 4, !tbaa !5
  %34 = icmp sle i32 %33, 100
  br label %35

35:                                               ; preds = %32, %26
  %36 = phi i1 [ false, %26 ], [ %34, %32 ]
  br i1 %36, label %37, label %38

37:                                               ; preds = %35
  br label %40

38:                                               ; preds = %35
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 54, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

39:                                               ; No predecessors!
  br label %40

40:                                               ; preds = %39, %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %51, %40
  %42 = load i32, ptr %7, align 4, !tbaa !5
  %43 = load i32, ptr @n, align 4, !tbaa !5
  %44 = icmp sle i32 %42, %43
  br i1 %44, label %46, label %45

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

46:                                               ; preds = %41
  %47 = load i32, ptr %7, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %48
  %50 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %49)
  br label %51

51:                                               ; preds = %46
  %52 = load i32, ptr %7, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %7, align 4, !tbaa !5
  br label %41, !llvm.loop !9

54:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 48, ptr %8) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %70, %54
  %56 = load i32, ptr %9, align 4, !tbaa !5
  %57 = load i32, ptr @n, align 4, !tbaa !5
  %58 = icmp sle i32 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %77

60:                                               ; preds = %55
  %61 = load i32, ptr %9, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %62
  %64 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 4 dereferenceable(4) %63)
          to label %65 unwind label %73

65:                                               ; preds = %60
  %66 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 0
  %67 = extractvalue { ptr, i8 } %64, 0
  store ptr %67, ptr %66, align 8
  %68 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 1
  %69 = extractvalue { ptr, i8 } %64, 1
  store i8 %69, ptr %68, align 8
  br label %70

70:                                               ; preds = %65
  %71 = load i32, ptr %9, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %9, align 4, !tbaa !5
  br label %55, !llvm.loop !11

73:                                               ; preds = %60
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %10, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %227

77:                                               ; preds = %59
  %78 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %8) #8
  %79 = load i32, ptr @n, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = icmp eq i64 %78, %80
  br i1 %81, label %82, label %83

82:                                               ; preds = %77
  br label %85

83:                                               ; preds = %77
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.4, i32 noundef 65, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

84:                                               ; No predecessors!
  br label %85

85:                                               ; preds = %84, %82
  store i32 1, ptr @cnt, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %188, %85
  %87 = load i32, ptr %14, align 4, !tbaa !5
  %88 = load i32, ptr @n, align 4, !tbaa !5
  %89 = icmp sle i32 %87, %88
  br i1 %89, label %91, label %90

90:                                               ; preds = %86
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %192

91:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 0, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 1, ptr %16, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %119, %91
  %93 = load i32, ptr %16, align 4, !tbaa !5
  %94 = load i32, ptr %14, align 4, !tbaa !5
  %95 = icmp slt i32 %93, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %92
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %122

97:                                               ; preds = %92
  %98 = load i32, ptr %16, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = load i32, ptr %14, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = icmp slt i32 %101, %105
  br i1 %106, label %107, label %118

107:                                              ; preds = %97
  %108 = load i32, ptr %16, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [101 x i32], ptr @len, i64 0, i64 %109
  %111 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %110)
          to label %112 unwind label %114

112:                                              ; preds = %107
  %113 = load i32, ptr %111, align 4, !tbaa !5
  store i32 %113, ptr %15, align 4, !tbaa !5
  br label %118

114:                                              ; preds = %107
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %10, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %191

118:                                              ; preds = %112, %97
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %16, align 4, !tbaa !5
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %16, align 4, !tbaa !5
  br label %92, !llvm.loop !12

122:                                              ; preds = %96
  %123 = load i32, ptr %15, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  %125 = load i32, ptr %14, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [101 x i32], ptr @len, i64 0, i64 %126
  store i32 %124, ptr %127, align 4, !tbaa !5
  %128 = load i32, ptr %14, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [101 x i32], ptr @len, i64 0, i64 %129
  %131 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %130)
          to label %132 unwind label %143

132:                                              ; preds = %122
  %133 = load i32, ptr %131, align 4, !tbaa !5
  store i32 %133, ptr %13, align 4, !tbaa !5
  %134 = load i32, ptr %14, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [101 x i32], ptr @len, i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = icmp eq i32 %137, 1
  br i1 %138, label %139, label %147

139:                                              ; preds = %132
  %140 = load i32, ptr %14, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [101 x i32], ptr @cnt, i64 0, i64 %141
  store i32 1, ptr %142, align 4, !tbaa !5
  store i32 13, ptr %4, align 4
  br label %185

143:                                              ; preds = %122
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %10, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %11, align 4
  br label %191

147:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 1, ptr %17, align 4, !tbaa !5
  br label %148

148:                                              ; preds = %181, %147
  %149 = load i32, ptr %17, align 4, !tbaa !5
  %150 = load i32, ptr %14, align 4, !tbaa !5
  %151 = icmp slt i32 %149, %150
  br i1 %151, label %153, label %152

152:                                              ; preds = %148
  store i32 17, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %184

153:                                              ; preds = %148
  %154 = load i32, ptr %17, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [101 x i32], ptr @len, i64 0, i64 %155
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = load i32, ptr %15, align 4, !tbaa !5
  %159 = icmp eq i32 %157, %158
  br i1 %159, label %160, label %180

160:                                              ; preds = %153
  %161 = load i32, ptr %17, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !5
  %165 = load i32, ptr %14, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %166
  %168 = load i32, ptr %167, align 4, !tbaa !5
  %169 = icmp slt i32 %164, %168
  br i1 %169, label %170, label %180

170:                                              ; preds = %160
  %171 = load i32, ptr %17, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [101 x i32], ptr @cnt, i64 0, i64 %172
  %174 = load i32, ptr %173, align 4, !tbaa !5
  %175 = load i32, ptr %14, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [101 x i32], ptr @cnt, i64 0, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !5
  %179 = add nsw i32 %178, %174
  store i32 %179, ptr %177, align 4, !tbaa !5
  br label %180

180:                                              ; preds = %170, %160, %153
  br label %181

181:                                              ; preds = %180
  %182 = load i32, ptr %17, align 4, !tbaa !5
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %17, align 4, !tbaa !5
  br label %148, !llvm.loop !13

184:                                              ; preds = %152
  store i32 0, ptr %4, align 4
  br label %185

185:                                              ; preds = %184, %139
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  %186 = load i32, ptr %4, align 4
  switch i32 %186, label %235 [
    i32 0, label %187
    i32 13, label %188
  ]

187:                                              ; preds = %185
  br label %188

188:                                              ; preds = %187, %185
  %189 = load i32, ptr %14, align 4, !tbaa !5
  %190 = add nsw i32 %189, 1
  store i32 %190, ptr %14, align 4, !tbaa !5
  br label %86, !llvm.loop !14

191:                                              ; preds = %143, %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %227

192:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 1, ptr %19, align 4, !tbaa !5
  br label %193

193:                                              ; preds = %213, %192
  %194 = load i32, ptr %19, align 4, !tbaa !5
  %195 = load i32, ptr @n, align 4, !tbaa !5
  %196 = icmp sle i32 %194, %195
  br i1 %196, label %198, label %197

197:                                              ; preds = %193
  store i32 20, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %216

198:                                              ; preds = %193
  %199 = load i32, ptr %19, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [101 x i32], ptr @len, i64 0, i64 %200
  %202 = load i32, ptr %201, align 4, !tbaa !5
  %203 = load i32, ptr %13, align 4, !tbaa !5
  %204 = icmp eq i32 %202, %203
  br i1 %204, label %205, label %212

205:                                              ; preds = %198
  %206 = load i32, ptr %19, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [101 x i32], ptr @cnt, i64 0, i64 %207
  %209 = load i32, ptr %208, align 4, !tbaa !5
  %210 = load i32, ptr %18, align 4, !tbaa !5
  %211 = add nsw i32 %210, %209
  store i32 %211, ptr %18, align 4, !tbaa !5
  br label %212

212:                                              ; preds = %205, %198
  br label %213

213:                                              ; preds = %212
  %214 = load i32, ptr %19, align 4, !tbaa !5
  %215 = add nsw i32 %214, 1
  store i32 %215, ptr %19, align 4, !tbaa !5
  br label %193, !llvm.loop !15

216:                                              ; preds = %197
  %217 = load i32, ptr %18, align 4, !tbaa !5
  %218 = load i32, ptr @k, align 4, !tbaa !5
  %219 = icmp eq i32 %217, %218
  br i1 %219, label %220, label %221

220:                                              ; preds = %216
  br label %223

221:                                              ; preds = %216
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.4, i32 noundef 100, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

222:                                              ; No predecessors!
  br label %223

223:                                              ; preds = %222, %220
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #8
  br label %224

224:                                              ; preds = %223
  %225 = load i32, ptr %3, align 4, !tbaa !5
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %3, align 4, !tbaa !5
  br label %21, !llvm.loop !16

227:                                              ; preds = %191, %73
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %230

228:                                              ; preds = %25
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %229 = load i32, ptr %1, align 4
  ret i32 %229

230:                                              ; preds = %227
  %231 = load ptr, ptr %10, align 8
  %232 = load i32, ptr %11, align 4
  %233 = insertvalue { ptr, i32 } poison, ptr %231, 0
  %234 = insertvalue { ptr, i32 } %233, i32 %232, 1
  resume { ptr, i32 } %234

235:                                              ; preds = %185
  unreachable
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #6 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5 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 = { "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 = { 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 #4 = { 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 #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { nounwind }
attributes #9 = { 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 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !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"

%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<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 }

@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@a = external dso_local global [101 x i32], align 16
@cnt = external dso_local global [101 x i32], align 16
@len = external dso_local global [101 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [129 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::set", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %.not74 = icmp slt i32 %8, 1
  br i1 %.not74, label %._crit_edge78, label %.lr.ph77

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

.lr.ph77:                                         ; preds = %0, %105
  %.04175 = phi i32 [ %106, %105 ], [ 1, %0 ]
  %9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.04175)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @cnt, ptr noundef nonnull getelementptr inbounds (i8, ptr @cnt, i64 404), ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @len, ptr noundef nonnull getelementptr inbounds (i8, ptr @len, i64 404), ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull @n, ptr noundef nonnull @k)
  %11 = load i32, ptr @n, align 4
  %12 = add i32 %11, -1
  %13 = icmp ult i32 %12, 100
  br i1 %13, label %.lr.ph, label %14

14:                                               ; preds = %.lr.ph77
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 54, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

._crit_edge:                                      ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  %15 = load i32, ptr @n, align 4, !tbaa !5
  %.not4552 = icmp slt i32 %15, 1
  br i1 %.not4552, label %._crit_edge56, label %.lr.ph55

.lr.ph:                                           ; preds = %.lr.ph77, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.lr.ph77 ]
  %16 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %indvars.iv
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %16)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %18 = load i32, ptr @n, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %.not44.not = icmp slt i64 %indvars.iv, %19
  br i1 %.not44.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge56:                                    ; preds = %26, %._crit_edge
  %20 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  %21 = load i32, ptr @n, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = icmp eq i64 %20, %22
  br i1 %23, label %32, label %31

.lr.ph55:                                         ; preds = %._crit_edge, %26
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %26 ], [ 1, %._crit_edge ]
  %24 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %indvars.iv81
  %25 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %26 unwind label %29

26:                                               ; preds = %.lr.ph55
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %27 = load i32, ptr @n, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %.not45.not = icmp slt i64 %indvars.iv81, %28
  br i1 %.not45.not, label %.lr.ph55, label %._crit_edge56, !llvm.loop !11

29:                                               ; preds = %.lr.ph55
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %30

31:                                               ; preds = %._crit_edge56
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.4, i32 noundef 65, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

32:                                               ; preds = %._crit_edge56
  store i32 1, ptr @cnt, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  store i32 0, ptr %5, align 4, !tbaa !5
  %.not4663 = icmp slt i32 %21, 1
  br i1 %.not4663, label %._crit_edge72, label %.lr.ph67

.preheader48:                                     ; preds = %.loopexit
  %.not4768 = icmp slt i32 %76, 1
  br i1 %.not4768, label %._crit_edge72, label %.lr.ph71

.lr.ph71:                                         ; preds = %.preheader48
  %33 = zext nneg i32 %76 to i64
  %xtraiter = and i64 %33, 1
  %34 = icmp eq i32 %76, 1
  br i1 %34, label %._crit_edge72.loopexit.unr-lcssa, label %.lr.ph71.new

.lr.ph71.new:                                     ; preds = %.lr.ph71
  %unroll_iter = and i64 %33, 2147483646
  br label %87

.lr.ph67:                                         ; preds = %32, %.loopexit
  %indvars.iv92 = phi i64 [ %indvars.iv.next93, %.loopexit ], [ 1, %32 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  store i32 0, ptr %6, align 4, !tbaa !5
  %35 = icmp ugt i64 %indvars.iv92, 1
  br i1 %35, label %.lr.ph59, label %._crit_edge60

.lr.ph59:                                         ; preds = %.lr.ph67
  %36 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %indvars.iv92
  br label %47

._crit_edge60:                                    ; preds = %57, %.lr.ph67
  %37 = phi i32 [ 0, %.lr.ph67 ], [ %58, %57 ]
  %38 = add nsw i32 %37, 1
  %39 = getelementptr inbounds [101 x i32], ptr @len, i64 0, i64 %indvars.iv92
  store i32 %38, ptr %39, align 4, !tbaa !5
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %39)
  %41 = load i32, ptr %40, align 4, !tbaa !5
  store i32 %41, ptr %5, align 4, !tbaa !5
  %42 = load i32, ptr %39, align 4, !tbaa !5
  %43 = icmp eq i32 %42, 1
  br i1 %43, label %59, label %.preheader

.preheader:                                       ; preds = %._crit_edge60
  br i1 %35, label %.lr.ph62, label %.loopexit

.lr.ph62:                                         ; preds = %.preheader
  %44 = load i32, ptr %6, align 4, !tbaa !5
  %45 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %indvars.iv92
  %46 = getelementptr inbounds [101 x i32], ptr @cnt, i64 0, i64 %indvars.iv92
  br label %61

47:                                               ; preds = %.lr.ph59, %57
  %48 = phi i32 [ 0, %.lr.ph59 ], [ %58, %57 ]
  %indvars.iv84 = phi i64 [ 1, %.lr.ph59 ], [ %indvars.iv.next85, %57 ]
  %49 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %indvars.iv84
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = load i32, ptr %36, align 4, !tbaa !5
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %53, label %57

53:                                               ; preds = %47
  %54 = getelementptr inbounds [101 x i32], ptr @len, i64 0, i64 %indvars.iv84
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %54)
  %56 = load i32, ptr %55, align 4, !tbaa !5
  store i32 %56, ptr %6, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %47, %53
  %58 = phi i32 [ %48, %47 ], [ %56, %53 ]
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next85, %indvars.iv92
  br i1 %exitcond.not, label %._crit_edge60, label %47, !llvm.loop !12

59:                                               ; preds = %._crit_edge60
  %60 = getelementptr inbounds [101 x i32], ptr @cnt, i64 0, i64 %indvars.iv92
  store i32 1, ptr %60, align 4, !tbaa !5
  br label %.loopexit

61:                                               ; preds = %.lr.ph62, %75
  %indvars.iv87 = phi i64 [ 1, %.lr.ph62 ], [ %indvars.iv.next88, %75 ]
  %62 = getelementptr inbounds [101 x i32], ptr @len, i64 0, i64 %indvars.iv87
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = icmp eq i32 %63, %44
  br i1 %64, label %65, label %75

65:                                               ; preds = %61
  %66 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %indvars.iv87
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = load i32, ptr %45, align 4, !tbaa !5
  %69 = icmp slt i32 %67, %68
  br i1 %69, label %70, label %75

70:                                               ; preds = %65
  %71 = getelementptr inbounds [101 x i32], ptr @cnt, i64 0, i64 %indvars.iv87
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = load i32, ptr %46, align 4, !tbaa !5
  %74 = add nsw i32 %73, %72
  store i32 %74, ptr %46, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %61, %65, %70
  %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1
  %exitcond91.not = icmp eq i64 %indvars.iv.next88, %indvars.iv92
  br i1 %exitcond91.not, label %.loopexit, label %61, !llvm.loop !13

.loopexit:                                        ; preds = %75, %.preheader, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %76 = load i32, ptr @n, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %.not46.not = icmp slt i64 %indvars.iv92, %77
  br i1 %.not46.not, label %.lr.ph67, label %.preheader48, !llvm.loop !14

._crit_edge72.loopexit.unr-lcssa:                 ; preds = %103, %.lr.ph71
  %.1.lcssa.ph = phi i32 [ poison, %.lr.ph71 ], [ %.1.1, %103 ]
  %indvars.iv95.unr = phi i64 [ 1, %.lr.ph71 ], [ %indvars.iv.next96.1, %103 ]
  %.03769.unr = phi i32 [ 0, %.lr.ph71 ], [ %.1.1, %103 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge72, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge72.loopexit.unr-lcssa
  %78 = getelementptr inbounds [101 x i32], ptr @len, i64 0, i64 %indvars.iv95.unr
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = icmp eq i32 %79, %41
  br i1 %80, label %81, label %._crit_edge72

81:                                               ; preds = %.epil.preheader
  %82 = getelementptr inbounds [101 x i32], ptr @cnt, i64 0, i64 %indvars.iv95.unr
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = add nsw i32 %83, %.03769.unr
  br label %._crit_edge72

._crit_edge72:                                    ; preds = %._crit_edge72.loopexit.unr-lcssa, %81, %.epil.preheader, %32, %.preheader48
  %.037.lcssa = phi i32 [ 0, %.preheader48 ], [ 0, %32 ], [ %.1.lcssa.ph, %._crit_edge72.loopexit.unr-lcssa ], [ %84, %81 ], [ %.03769.unr, %.epil.preheader ]
  %85 = load i32, ptr @k, align 4, !tbaa !5
  %86 = icmp eq i32 %.037.lcssa, %85
  br i1 %86, label %105, label %104

87:                                               ; preds = %103, %.lr.ph71.new
  %indvars.iv95 = phi i64 [ 1, %.lr.ph71.new ], [ %indvars.iv.next96.1, %103 ]
  %.03769 = phi i32 [ 0, %.lr.ph71.new ], [ %.1.1, %103 ]
  %niter = phi i64 [ 0, %.lr.ph71.new ], [ %niter.next.1, %103 ]
  %88 = getelementptr inbounds [101 x i32], ptr @len, i64 0, i64 %indvars.iv95
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = icmp eq i32 %89, %41
  br i1 %90, label %91, label %95

91:                                               ; preds = %87
  %92 = getelementptr inbounds [101 x i32], ptr @cnt, i64 0, i64 %indvars.iv95
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = add nsw i32 %93, %.03769
  br label %95

95:                                               ; preds = %87, %91
  %.1 = phi i32 [ %94, %91 ], [ %.03769, %87 ]
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %96 = getelementptr inbounds [101 x i32], ptr @len, i64 0, i64 %indvars.iv.next96
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = icmp eq i32 %97, %41
  br i1 %98, label %99, label %103

99:                                               ; preds = %95
  %100 = getelementptr inbounds [101 x i32], ptr @cnt, i64 0, i64 %indvars.iv.next96
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = add nsw i32 %101, %.1
  br label %103

103:                                              ; preds = %99, %95
  %.1.1 = phi i32 [ %102, %99 ], [ %.1, %95 ]
  %indvars.iv.next96.1 = add nuw nsw i64 %indvars.iv95, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge72.loopexit.unr-lcssa, label %87, !llvm.loop !15

104:                                              ; preds = %._crit_edge72
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.4, i32 noundef 100, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

105:                                              ; preds = %._crit_edge72
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #8
  %106 = add nuw nsw i32 %.04175, 1
  %107 = load i32, ptr %1, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.04175, %107
  br i1 %.not.not, label %.lr.ph77, label %._crit_edge78, !llvm.loop !16
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5 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 = { 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 #3 = { 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 #4 = { 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 #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { nounwind }
attributes #9 = { 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 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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