; LLVM IR from tangjz/acm-icpc :: 51nod (1775)

; 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::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::pair" = type { i64, i64 }

@pre = external dso_local global %"class.std::unordered_map", align 8
@cur = external dso_local global %"class.std::unordered_map", align 8
@n = external dso_local global i32, align 4
@a = external dso_local global [37 x i32], align 16
@bits = external dso_local global [262145 x i32], align 16
@lbt = external dso_local global [262145 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

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

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

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

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

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

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

28:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %60

29:                                               ; preds = %25
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = ashr i32 %30, 1
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [262145 x i32], ptr @bits, i64 0, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = and i32 %35, 1
  %37 = add nsw i32 %34, %36
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [262145 x i32], ptr @bits, i64 0, i64 %39
  store i32 %37, ptr %40, align 4, !tbaa !5
  %41 = load i32, ptr %2, align 4, !tbaa !5
  %42 = and i32 %41, 1
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %44, label %45

44:                                               ; preds = %29
  br label %52

45:                                               ; preds = %29
  %46 = load i32, ptr %2, align 4, !tbaa !5
  %47 = ashr i32 %46, 1
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [262145 x i32], ptr @lbt, i64 0, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  br label %52

52:                                               ; preds = %45, %44
  %53 = phi i32 [ 0, %44 ], [ %51, %45 ]
  %54 = load i32, ptr %2, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [262145 x i32], ptr @lbt, i64 0, i64 %55
  store i32 %53, ptr %56, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %52
  %58 = load i32, ptr %2, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %2, align 4, !tbaa !5
  br label %25, !llvm.loop !9

60:                                               ; preds = %28
  %61 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %77, %60
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %64 = load i32, ptr @n, align 4, !tbaa !5
  %65 = icmp sle i32 %63, %64
  br i1 %65, label %67, label %66

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

67:                                               ; preds = %62
  %68 = load i32, ptr %3, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds i32, ptr @a, i64 %69
  %71 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %70)
  %72 = load i32, ptr %3, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [37 x i32], ptr @a, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = add nsw i32 %75, -1
  store i32 %76, ptr %74, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %67
  %78 = load i32, ptr %3, align 4, !tbaa !5
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %3, align 4, !tbaa !5
  br label %62, !llvm.loop !11

80:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  store i64 0, ptr %4, align 8, !tbaa !12
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEixEOx(ptr noundef nonnull align 8 dereferenceable(56) @cur, ptr noundef nonnull align 8 dereferenceable(8) %4)
  store i64 1, ptr %81, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %244, %80
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = load i32, ptr @n, align 4, !tbaa !5
  %85 = icmp sle i32 %83, %84
  br i1 %85, label %87, label %86

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

87:                                               ; preds = %82
  call void @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEE4swapERS8_(ptr noundef nonnull align 8 dereferenceable(56) @cur, ptr noundef nonnull align 8 dereferenceable(56) @pre) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %7) #7
  call void @llvm.memset.p0.i64(ptr align 8 %7, i8 0, i64 56, i1 false)
  call void @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #7
  call void @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEE4swapERS8_(ptr noundef nonnull align 8 dereferenceable(56) %7, ptr noundef nonnull align 8 dereferenceable(56) @cur) #7
  call void @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 -1, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %88 = load i32, ptr %5, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [37 x i32], ptr @a, i64 0, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !5
  store i32 %91, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %92 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %92, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %93 = load i32, ptr %5, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %11, align 4, !tbaa !5
  br label %95

95:                                               ; preds = %134, %87
  %96 = load i32, ptr %11, align 4, !tbaa !5
  %97 = load i32, ptr @n, align 4, !tbaa !5
  %98 = icmp sle i32 %96, %97
  br i1 %98, label %100, label %99

99:                                               ; preds = %95
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %137

100:                                              ; preds = %95
  %101 = load i32, ptr %11, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [37 x i32], ptr @a, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = load i32, ptr %9, align 4, !tbaa !5
  %106 = icmp slt i32 %104, %105
  br i1 %106, label %107, label %120

107:                                              ; preds = %100
  %108 = load i32, ptr %8, align 4, !tbaa !5
  %109 = load i32, ptr %11, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [37 x i32], ptr @a, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = icmp slt i32 %108, %112
  br i1 %113, label %114, label %119

114:                                              ; preds = %107
  %115 = load i32, ptr %11, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [37 x i32], ptr @a, i64 0, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !5
  store i32 %118, ptr %8, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %114, %107
  br label %133

120:                                              ; preds = %100
  %121 = load i32, ptr %11, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [37 x i32], ptr @a, i64 0, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = load i32, ptr %10, align 4, !tbaa !5
  %126 = icmp slt i32 %124, %125
  br i1 %126, label %127, label %132

127:                                              ; preds = %120
  %128 = load i32, ptr %11, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [37 x i32], ptr @a, i64 0, i64 %129
  %131 = load i32, ptr %130, align 4, !tbaa !5
  store i32 %131, ptr %10, align 4, !tbaa !5
  br label %132

132:                                              ; preds = %127, %120
  br label %133

133:                                              ; preds = %132, %119
  br label %134

134:                                              ; preds = %133
  %135 = load i32, ptr %11, align 4, !tbaa !5
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %11, align 4, !tbaa !5
  br label %95, !llvm.loop !14

137:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store ptr @pre, ptr %12, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %138 = call ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) @pre) #7
  %139 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %13, i32 0, i32 0
  %140 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %139, i32 0, i32 0
  store ptr %138, ptr %140, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %141 = call ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) @pre) #7
  %142 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %14, i32 0, i32 0
  %143 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %142, i32 0, i32 0
  store ptr %141, ptr %143, align 8
  br label %144

144:                                              ; preds = %241, %137
  %145 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKxxELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  br i1 %145, label %147, label %146

146:                                              ; preds = %144
  store i32 14, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %243

147:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %148 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKxxELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  store ptr %148, ptr %15, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %149 = load ptr, ptr %15, align 8, !tbaa !15
  %150 = getelementptr inbounds %"struct.std::pair", ptr %149, i32 0, i32 0
  %151 = load i64, ptr %150, align 8, !tbaa !17
  store i64 %151, ptr %16, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %152 = load ptr, ptr %15, align 8, !tbaa !15
  %153 = getelementptr inbounds %"struct.std::pair", ptr %152, i32 0, i32 1
  %154 = load i64, ptr %153, align 8, !tbaa !19
  store i64 %154, ptr %17, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %155 = load i64, ptr %16, align 8, !tbaa !12
  store i64 %155, ptr %18, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %156 = load i64, ptr %18, align 8, !tbaa !12
  %157 = load i32, ptr %8, align 4, !tbaa !5
  %158 = add nsw i32 %157, 1
  %159 = zext i32 %158 to i64
  %160 = ashr i64 %156, %159
  %161 = load i32, ptr %10, align 4, !tbaa !5
  %162 = load i32, ptr %8, align 4, !tbaa !5
  %163 = sub nsw i32 %161, %162
  %164 = sub nsw i32 %163, 1
  %165 = zext i32 %164 to i64
  %166 = shl i64 1, %165
  %167 = sub nsw i64 %166, 1
  %168 = and i64 %160, %167
  store i64 %168, ptr %19, align 8, !tbaa !12
  %169 = load i64, ptr %19, align 8, !tbaa !12
  %170 = load i64, ptr %19, align 8, !tbaa !12
  %171 = call noundef i32 @_Z8popcountx(i64 noundef %170)
  %172 = zext i32 %171 to i64
  %173 = shl i64 1, %172
  %174 = sub nsw i64 %173, 1
  %175 = xor i64 %169, %174
  %176 = load i32, ptr %8, align 4, !tbaa !5
  %177 = add nsw i32 %176, 1
  %178 = zext i32 %177 to i64
  %179 = shl i64 %175, %178
  %180 = load i64, ptr %18, align 8, !tbaa !12
  %181 = xor i64 %180, %179
  store i64 %181, ptr %18, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %182 = load i64, ptr %16, align 8, !tbaa !12
  %183 = load i32, ptr %9, align 4, !tbaa !5
  %184 = add nsw i32 %183, 1
  %185 = call noundef i32 @_Z6lowbitxi(i64 noundef %182, i32 noundef %184)
  store i32 %185, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %186 = load i32, ptr %20, align 4, !tbaa !5
  %187 = load i32, ptr %9, align 4, !tbaa !5
  %188 = add nsw i32 %187, 1
  %189 = icmp eq i32 %186, %188
  br i1 %189, label %190, label %193

190:                                              ; preds = %147
  %191 = load i64, ptr %17, align 8, !tbaa !12
  %192 = shl i64 %191, 1
  br label %195

193:                                              ; preds = %147
  %194 = load i64, ptr %17, align 8, !tbaa !12
  br label %195

195:                                              ; preds = %193, %190
  %196 = phi i64 [ %192, %190 ], [ %194, %193 ]
  %197 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @cur, ptr noundef nonnull align 8 dereferenceable(8) %18)
  %198 = load i64, ptr %197, align 8, !tbaa !12
  %199 = add nsw i64 %198, %196
  store i64 %199, ptr %197, align 8, !tbaa !12
  %200 = load i32, ptr %20, align 4, !tbaa !5
  %201 = load i32, ptr %9, align 4, !tbaa !5
  %202 = add nsw i32 %201, 1
  %203 = icmp ne i32 %200, %202
  br i1 %203, label %204, label %240

204:                                              ; preds = %195
  %205 = load i32, ptr %20, align 4, !tbaa !5
  %206 = icmp ne i32 %205, -1
  br i1 %206, label %207, label %221

207:                                              ; preds = %204
  %208 = load i64, ptr %18, align 8, !tbaa !12
  %209 = load i32, ptr %20, align 4, !tbaa !5
  %210 = zext i32 %209 to i64
  %211 = shl i64 1, %210
  %212 = add nsw i64 %208, %211
  %213 = load i32, ptr %20, align 4, !tbaa !5
  %214 = call noundef i32 @_Z6lowbitxi(i64 noundef %212, i32 noundef %213)
  %215 = sub nsw i32 %214, 1
  store i32 %215, ptr %21, align 4, !tbaa !5
  %216 = load i32, ptr %21, align 4, !tbaa !5
  %217 = zext i32 %216 to i64
  %218 = shl i64 1, %217
  %219 = load i64, ptr %18, align 8, !tbaa !12
  %220 = xor i64 %219, %218
  store i64 %220, ptr %18, align 8, !tbaa !12
  br label %221

221:                                              ; preds = %207, %204
  %222 = load i64, ptr %18, align 8, !tbaa !12
  %223 = load i32, ptr %8, align 4, !tbaa !5
  %224 = add nsw i32 %223, 1
  %225 = zext i32 %224 to i64
  %226 = shl i64 1, %225
  %227 = add nsw i64 %222, %226
  %228 = load i32, ptr %8, align 4, !tbaa !5
  %229 = add nsw i32 %228, 1
  %230 = call noundef i32 @_Z6lowbitxi(i64 noundef %227, i32 noundef %229)
  store i32 %230, ptr %21, align 4, !tbaa !5
  %231 = load i32, ptr %21, align 4, !tbaa !5
  %232 = zext i32 %231 to i64
  %233 = shl i64 1, %232
  %234 = load i64, ptr %18, align 8, !tbaa !12
  %235 = xor i64 %234, %233
  store i64 %235, ptr %18, align 8, !tbaa !12
  %236 = load i64, ptr %17, align 8, !tbaa !12
  %237 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @cur, ptr noundef nonnull align 8 dereferenceable(8) %18)
  %238 = load i64, ptr %237, align 8, !tbaa !12
  %239 = add nsw i64 %238, %236
  store i64 %239, ptr %237, align 8, !tbaa !12
  br label %240

240:                                              ; preds = %221, %195
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %241

241:                                              ; preds = %240
  %242 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKxxELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br label %144

243:                                              ; preds = %146
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %244

244:                                              ; preds = %243
  %245 = load i32, ptr %5, align 4, !tbaa !5
  %246 = add nsw i32 %245, 1
  store i32 %246, ptr %5, align 4, !tbaa !5
  br label %82, !llvm.loop !20

247:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %248

248:                                              ; preds = %271, %247
  %249 = load i32, ptr %22, align 4, !tbaa !5
  %250 = load i32, ptr @n, align 4, !tbaa !5
  %251 = icmp sle i32 %249, %250
  br i1 %251, label %253, label %252

252:                                              ; preds = %248
  store i32 16, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %274

253:                                              ; preds = %248
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %254 = load i32, ptr %22, align 4, !tbaa !5
  %255 = zext i32 %254 to i64
  %256 = shl i64 1, %255
  %257 = sub nsw i64 %256, 1
  store i64 %257, ptr %23, align 8, !tbaa !12
  %258 = call noundef i64 @_ZNKSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(56) @cur, ptr noundef nonnull align 8 dereferenceable(8) %23)
  %259 = icmp ne i64 %258, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  br i1 %259, label %260, label %267

260:                                              ; preds = %253
  %261 = load i32, ptr %22, align 4, !tbaa !5
  %262 = zext i32 %261 to i64
  %263 = shl i64 1, %262
  %264 = sub nsw i64 %263, 1
  store i64 %264, ptr %24, align 8, !tbaa !12
  %265 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEixEOx(ptr noundef nonnull align 8 dereferenceable(56) @cur, ptr noundef nonnull align 8 dereferenceable(8) %24)
  %266 = load i64, ptr %265, align 8, !tbaa !12
  br label %268

267:                                              ; preds = %253
  br label %268

268:                                              ; preds = %267, %260
  %269 = phi i64 [ %266, %260 ], [ 0, %267 ]
  %270 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %269)
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %271

271:                                              ; preds = %268
  %272 = load i32, ptr %22, align 4, !tbaa !5
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr %22, align 4, !tbaa !5
  br label %248, !llvm.loop !21

274:                                              ; preds = %252
  ret i32 0
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEixEOx(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) #5 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 = { 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 #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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }

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

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

%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }

@pre = external dso_local global %"class.std::unordered_map", align 8
@cur = external dso_local global %"class.std::unordered_map", align 8
@n = external dso_local global i32, align 4
@a = external dso_local global [37 x i32], align 16
@bits = external dso_local local_unnamed_addr global [262145 x i32], align 16
@lbt = external dso_local local_unnamed_addr global [262145 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

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

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

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

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

; 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 norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i64, align 8
  %2 = alloca %"class.std::unordered_map", align 8
  %3 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %4 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  br label %11

8:                                                ; preds = %24
  %9 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %10 = load i32, ptr @n, align 4, !tbaa !5
  %.not74 = icmp slt i32 %10, 1
  br i1 %.not74, label %._crit_edge, label %.lr.ph

11:                                               ; preds = %0, %24
  %indvars.iv = phi i64 [ 1, %0 ], [ %indvars.iv.next, %24 ]
  %12 = trunc nuw nsw i64 %indvars.iv to i32
  %13 = lshr i64 %indvars.iv, 1
  %14 = and i64 %13, 2147483647
  %15 = getelementptr inbounds [262145 x i32], ptr @bits, i64 0, i64 %14
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = and i32 %12, 1
  %18 = add nsw i32 %16, %17
  %19 = getelementptr inbounds [262145 x i32], ptr @bits, i64 0, i64 %indvars.iv
  store i32 %18, ptr %19, align 4, !tbaa !5
  %.not71 = icmp eq i32 %17, 0
  br i1 %.not71, label %20, label %24

20:                                               ; preds = %11
  %21 = getelementptr inbounds [262145 x i32], ptr @lbt, i64 0, i64 %14
  %22 = load i32, ptr %21, align 4, !tbaa !5
  %23 = add nsw i32 %22, 1
  br label %24

24:                                               ; preds = %11, %20
  %25 = phi i32 [ %23, %20 ], [ 0, %11 ]
  %26 = getelementptr inbounds [262145 x i32], ptr @lbt, i64 0, i64 %indvars.iv
  store i32 %25, ptr %26, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 262144
  br i1 %exitcond.not, label %8, label %11, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph, %8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  store i64 0, ptr %1, align 8, !tbaa !11
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEixEOx(ptr noundef nonnull align 8 dereferenceable(56) @cur, ptr noundef nonnull align 8 dereferenceable(8) %1)
  store i64 1, ptr %27, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  %28 = load i32, ptr @n, align 4, !tbaa !5
  %.not6387 = icmp slt i32 %28, 1
  br i1 %.not6387, label %.preheader, label %.lr.ph90

.lr.ph:                                           ; preds = %8, %.lr.ph
  %indvars.iv96 = phi i64 [ %indvars.iv.next97, %.lr.ph ], [ 1, %8 ]
  %29 = getelementptr inbounds i32, ptr @a, i64 %indvars.iv96
  %30 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %29)
  %31 = load i32, ptr %29, align 4, !tbaa !5
  %32 = add nsw i32 %31, -1
  store i32 %32, ptr %29, align 4, !tbaa !5
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %33 = load i32, ptr @n, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %.not.not = icmp slt i64 %indvars.iv96, %34
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !13

.preheader:                                       ; preds = %._crit_edge86, %._crit_edge
  %35 = phi i32 [ %28, %._crit_edge ], [ %63, %._crit_edge86 ]
  %.not6491 = icmp slt i32 %35, 0
  br i1 %.not6491, label %._crit_edge94, label %.lr.ph93

.lr.ph90:                                         ; preds = %._crit_edge, %._crit_edge86
  %indvar = phi i32 [ %indvar.next, %._crit_edge86 ], [ 0, %._crit_edge ]
  %indvars.iv105 = phi i64 [ %indvars.iv.next106, %._crit_edge86 ], [ 1, %._crit_edge ]
  %indvars.iv99 = phi i64 [ %indvars.iv.next100, %._crit_edge86 ], [ 2, %._crit_edge ]
  call void @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEE4swapERS8_(ptr noundef nonnull align 8 dereferenceable(56) @cur, ptr noundef nonnull align 8 dereferenceable(56) @pre) #8
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %2) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %2, i8 0, i64 56, i1 false)
  call void @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #8
  call void @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEE4swapERS8_(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 8 dereferenceable(56) @cur) #8
  call void @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #8
  %36 = getelementptr inbounds [37 x i32], ptr @a, i64 0, i64 %indvars.iv105
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = load i32, ptr @n, align 4, !tbaa !5
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %39 = sext i32 %38 to i64
  %.not6676.not = icmp slt i64 %indvars.iv105, %39
  br i1 %.not6676.not, label %.lr.ph81.preheader, label %._crit_edge82

.lr.ph81.preheader:                               ; preds = %.lr.ph90
  %40 = xor i32 %indvar, -1
  %41 = add i32 %38, %40
  %reass.sub = sub i32 %38, %indvar
  %xtraiter = and i32 %41, 1
  %42 = icmp eq i32 %reass.sub, 2
  br i1 %42, label %._crit_edge82.loopexit.unr-lcssa, label %.lr.ph81.preheader.new

.lr.ph81.preheader.new:                           ; preds = %.lr.ph81.preheader
  %unroll_iter = and i32 %41, -2
  br label %.lr.ph81

._crit_edge82.loopexit.unr-lcssa:                 ; preds = %.lr.ph81, %.lr.ph81.preheader
  %.159.lcssa.ph = phi i32 [ poison, %.lr.ph81.preheader ], [ %.159.1, %.lr.ph81 ]
  %.1.lcssa.ph = phi i32 [ poison, %.lr.ph81.preheader ], [ %.1.1, %.lr.ph81 ]
  %indvars.iv101.unr = phi i64 [ %indvars.iv99, %.lr.ph81.preheader ], [ %indvars.iv.next102.1, %.lr.ph81 ]
  %.05779.unr = phi i32 [ -1, %.lr.ph81.preheader ], [ %.1.1, %.lr.ph81 ]
  %.05878.unr = phi i32 [ %38, %.lr.ph81.preheader ], [ %.159.1, %.lr.ph81 ]
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge82, label %.lr.ph81.epil

.lr.ph81.epil:                                    ; preds = %._crit_edge82.loopexit.unr-lcssa
  %43 = getelementptr inbounds [37 x i32], ptr @a, i64 0, i64 %indvars.iv101.unr
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = icmp slt i32 %44, %37
  %spec.select.epil = call i32 @llvm.smax.i32(i32 %.05779.unr, i32 %44)
  %spec.select72.epil = call i32 @llvm.smin.i32(i32 %44, i32 %.05878.unr)
  %.159.epil = select i1 %45, i32 %.05878.unr, i32 %spec.select72.epil
  %.1.epil = select i1 %45, i32 %spec.select.epil, i32 %.05779.unr
  br label %._crit_edge82

._crit_edge82:                                    ; preds = %.lr.ph81.epil, %._crit_edge82.loopexit.unr-lcssa, %.lr.ph90
  %.058.lcssa = phi i32 [ %38, %.lr.ph90 ], [ %.159.lcssa.ph, %._crit_edge82.loopexit.unr-lcssa ], [ %.159.epil, %.lr.ph81.epil ]
  %.057.lcssa = phi i32 [ -1, %.lr.ph90 ], [ %.1.lcssa.ph, %._crit_edge82.loopexit.unr-lcssa ], [ %.1.epil, %.lr.ph81.epil ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %46 = call ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) @pre) #8
  store ptr %46, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %47 = call ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) @pre) #8
  store ptr %47, ptr %4, align 8
  %48 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKxxELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  br i1 %48, label %.lr.ph85, label %._crit_edge86

.lr.ph85:                                         ; preds = %._crit_edge82
  %49 = add nsw i32 %.057.lcssa, 1
  %50 = zext nneg i32 %49 to i64
  %51 = xor i32 %.057.lcssa, -1
  %52 = add i32 %.058.lcssa, %51
  %53 = zext nneg i32 %52 to i64
  %notmask67 = shl nsw i64 -1, %53
  %54 = xor i64 %notmask67, -1
  %55 = add nsw i32 %37, 1
  %56 = shl nuw i64 1, %50
  br label %65

.lr.ph81:                                         ; preds = %.lr.ph81, %.lr.ph81.preheader.new
  %indvars.iv101 = phi i64 [ %indvars.iv99, %.lr.ph81.preheader.new ], [ %indvars.iv.next102.1, %.lr.ph81 ]
  %.05779 = phi i32 [ -1, %.lr.ph81.preheader.new ], [ %.1.1, %.lr.ph81 ]
  %.05878 = phi i32 [ %38, %.lr.ph81.preheader.new ], [ %.159.1, %.lr.ph81 ]
  %niter = phi i32 [ 0, %.lr.ph81.preheader.new ], [ %niter.next.1, %.lr.ph81 ]
  %57 = getelementptr inbounds [37 x i32], ptr @a, i64 0, i64 %indvars.iv101
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = icmp slt i32 %58, %37
  %spec.select = call i32 @llvm.smax.i32(i32 %.05779, i32 %58)
  %spec.select72 = call i32 @llvm.smin.i32(i32 %58, i32 %.05878)
  %.159 = select i1 %59, i32 %.05878, i32 %spec.select72
  %.1 = select i1 %59, i32 %spec.select, i32 %.05779
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %60 = getelementptr inbounds [37 x i32], ptr @a, i64 0, i64 %indvars.iv.next102
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = icmp slt i32 %61, %37
  %spec.select.1 = call i32 @llvm.smax.i32(i32 %.1, i32 %61)
  %spec.select72.1 = call i32 @llvm.smin.i32(i32 %61, i32 %.159)
  %.159.1 = select i1 %62, i32 %.159, i32 %spec.select72.1
  %.1.1 = select i1 %62, i32 %spec.select.1, i32 %.1
  %indvars.iv.next102.1 = add nuw nsw i64 %indvars.iv101, 2
  %niter.next.1 = add i32 %niter, 2
  %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge82.loopexit.unr-lcssa, label %.lr.ph81, !llvm.loop !14

._crit_edge86:                                    ; preds = %108, %._crit_edge82
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  %63 = load i32, ptr @n, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %.not63.not = icmp slt i64 %indvars.iv105, %64
  %indvars.iv.next100 = add nuw nsw i64 %indvars.iv99, 1
  %indvar.next = add i32 %indvar, 1
  br i1 %.not63.not, label %.lr.ph90, label %.preheader, !llvm.loop !15

65:                                               ; preds = %.lr.ph85, %108
  %66 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKxxELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  %67 = load i64, ptr %66, align 8, !tbaa !16
  %68 = getelementptr inbounds i8, ptr %66, i64 8
  %69 = load i64, ptr %68, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  store i64 %67, ptr %5, align 8, !tbaa !11
  %70 = ashr i64 %67, %50
  %71 = and i64 %70, %54
  %72 = call noundef i32 @_Z8popcountx(i64 noundef %71)
  %73 = zext nneg i32 %72 to i64
  %notmask68 = shl nsw i64 -1, %73
  %74 = xor i64 %71, %notmask68
  %75 = xor i64 %74, -1
  %76 = shl i64 %75, %50
  %77 = load i64, ptr %5, align 8, !tbaa !11
  %78 = xor i64 %76, %77
  store i64 %78, ptr %5, align 8, !tbaa !11
  %79 = call noundef i32 @_Z6lowbitxi(i64 noundef %67, i32 noundef %55)
  %80 = icmp eq i32 %79, %55
  %81 = zext i1 %80 to i64
  %82 = shl i64 %69, %81
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @cur, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %84 = load i64, ptr %83, align 8, !tbaa !11
  %85 = add nsw i64 %82, %84
  store i64 %85, ptr %83, align 8, !tbaa !11
  br i1 %80, label %108, label %86

86:                                               ; preds = %65
  %.not70 = icmp eq i32 %79, -1
  %.pre = load i64, ptr %5, align 8, !tbaa !11
  br i1 %.not70, label %97, label %87

87:                                               ; preds = %86
  %88 = zext nneg i32 %79 to i64
  %89 = shl nuw i64 1, %88
  %90 = add nsw i64 %.pre, %89
  %91 = call noundef i32 @_Z6lowbitxi(i64 noundef %90, i32 noundef %79)
  %92 = add nsw i32 %91, -1
  %93 = zext nneg i32 %92 to i64
  %94 = shl nuw i64 1, %93
  %95 = load i64, ptr %5, align 8, !tbaa !11
  %96 = xor i64 %94, %95
  store i64 %96, ptr %5, align 8, !tbaa !11
  br label %97

97:                                               ; preds = %87, %86
  %98 = phi i64 [ %96, %87 ], [ %.pre, %86 ]
  %99 = add nsw i64 %98, %56
  %100 = call noundef i32 @_Z6lowbitxi(i64 noundef %99, i32 noundef %49)
  %101 = zext nneg i32 %100 to i64
  %102 = shl nuw i64 1, %101
  %103 = load i64, ptr %5, align 8, !tbaa !11
  %104 = xor i64 %102, %103
  store i64 %104, ptr %5, align 8, !tbaa !11
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @cur, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %106 = load i64, ptr %105, align 8, !tbaa !11
  %107 = add nsw i64 %106, %69
  store i64 %107, ptr %105, align 8, !tbaa !11
  br label %108

108:                                              ; preds = %97, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKxxELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  %110 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKxxELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  br i1 %110, label %65, label %._crit_edge86

._crit_edge94:                                    ; preds = %116, %.preheader
  ret i32 0

.lr.ph93:                                         ; preds = %.preheader, %116
  %indvars.iv108 = phi i64 [ %indvars.iv.next109, %116 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %notmask = shl nsw i64 -1, %indvars.iv108
  %111 = xor i64 %notmask, -1
  store i64 %111, ptr %6, align 8, !tbaa !11
  %112 = call noundef i64 @_ZNKSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(56) @cur, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %.not65 = icmp eq i64 %112, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  br i1 %.not65, label %116, label %113

113:                                              ; preds = %.lr.ph93
  store i64 %111, ptr %7, align 8, !tbaa !11
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEixEOx(ptr noundef nonnull align 8 dereferenceable(56) @cur, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %115 = load i64, ptr %114, align 8, !tbaa !11
  br label %116

116:                                              ; preds = %.lr.ph93, %113
  %117 = phi i64 [ %115, %113 ], [ 0, %.lr.ph93 ]
  %118 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %117)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %119 = load i32, ptr @n, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %.not64.not = icmp slt i64 %indvars.iv108, %120
  br i1 %.not64.not, label %.lr.ph93, label %._crit_edge94, !llvm.loop !19
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEixEOx(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

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

; 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 @_ZNKSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

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

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

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 = { 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 #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 = { 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }

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

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


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