; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/150 Division 1/Problem A (A)

; 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 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { 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 }
%"struct.std::pair.3" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@pos = external dso_local global [20 x i32], align 16
@a = external dso_local global [100001 x i32], align 16
@num = external dso_local global i32, align 4
@v = external dso_local global %"class.std::set", align 8
@tmp = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

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

21:                                               ; preds = %16
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %23
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %24)
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %27
  %29 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @v, ptr noundef nonnull align 4 dereferenceable(4) %28)
  %30 = getelementptr inbounds { ptr, i8 }, ptr %3, i32 0, i32 0
  %31 = extractvalue { ptr, i8 } %29, 0
  store ptr %31, ptr %30, align 8
  %32 = getelementptr inbounds { ptr, i8 }, ptr %3, i32 0, i32 1
  %33 = extractvalue { ptr, i8 } %29, 1
  store i8 %33, ptr %32, align 8
  br label %34

34:                                               ; preds = %21
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %2, align 4, !tbaa !5
  br label %16, !llvm.loop !9

37:                                               ; preds = %20
  call void @llvm.memset.p0.i64(ptr align 16 @pos, i8 -1, i64 80, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %53, %37
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = icmp slt i32 %39, 20
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %56

42:                                               ; preds = %38
  %43 = load i32, ptr getelementptr inbounds ([100001 x i32], ptr @a, i64 0, i64 1), align 4, !tbaa !5
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = shl i32 1, %44
  %46 = and i32 %43, %45
  %47 = icmp sgt i32 %46, 0
  br i1 %47, label %48, label %52

48:                                               ; preds = %42
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [20 x i32], ptr @pos, i64 0, i64 %50
  store i32 1, ptr %51, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %48, %42
  br label %53

53:                                               ; preds = %52
  %54 = load i32, ptr %4, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %4, align 4, !tbaa !5
  br label %38, !llvm.loop !11

56:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 2, ptr %5, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %169, %56
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = load i32, ptr @n, align 4, !tbaa !5
  %60 = icmp sle i32 %58, %59
  br i1 %60, label %62, label %61

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

62:                                               ; preds = %57
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @tmp) #7
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = icmp eq i32 %66, 0
  br i1 %67, label %68, label %69

68:                                               ; preds = %62
  br label %169

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

70:                                               ; preds = %95, %69
  %71 = load i32, ptr %7, align 4, !tbaa !5
  %72 = icmp slt i32 %71, 20
  br i1 %72, label %74, label %73

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

74:                                               ; preds = %70
  %75 = load i32, ptr %5, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = load i32, ptr %7, align 4, !tbaa !5
  %80 = shl i32 1, %79
  %81 = and i32 %78, %80
  %82 = icmp sgt i32 %81, 0
  br i1 %82, label %83, label %88

83:                                               ; preds = %74
  %84 = load i32, ptr %5, align 4, !tbaa !5
  %85 = load i32, ptr %7, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [20 x i32], ptr @pos, i64 0, i64 %86
  store i32 %84, ptr %87, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %83, %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %89 = load i32, ptr %7, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [20 x i32], ptr @pos, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = sub nsw i32 0, %92
  store i32 %93, ptr %9, align 4, !tbaa !5
  %94 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %7)
  store i64 %94, ptr %8, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @tmp, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %95

95:                                               ; preds = %88
  %96 = load i32, ptr %7, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %7, align 4, !tbaa !5
  br label %70, !llvm.loop !12

98:                                               ; preds = %73
  %99 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @tmp) #7
  %100 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %99, ptr %100, align 8
  %101 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @tmp) #7
  %102 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %101, ptr %102, align 8
  %103 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  %104 = load ptr, ptr %103, align 8
  %105 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %104, ptr %106)
  %107 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef 0) #7
  %108 = getelementptr inbounds %"struct.std::pair.3", ptr %107, i32 0, i32 0
  %109 = load i32, ptr %108, align 4, !tbaa !13
  %110 = icmp sle i32 %109, 0
  br i1 %110, label %111, label %116

111:                                              ; preds = %98
  %112 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef 0) #7
  %113 = getelementptr inbounds %"struct.std::pair.3", ptr %112, i32 0, i32 1
  %114 = load i32, ptr %113, align 4, !tbaa !15
  %115 = shl i32 1, %114
  store i32 %115, ptr @num, align 4, !tbaa !5
  br label %117

116:                                              ; preds = %98
  store i32 0, ptr @num, align 4, !tbaa !5
  br label %117

117:                                              ; preds = %116, %111
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %160, %117
  %119 = load i32, ptr %12, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @tmp) #7
  %122 = icmp ult i64 %120, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %118
  store i32 14, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %163

124:                                              ; preds = %118
  %125 = load i32, ptr %12, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef %126) #7
  %128 = getelementptr inbounds %"struct.std::pair.3", ptr %127, i32 0, i32 0
  %129 = load i32, ptr %128, align 4, !tbaa !13
  %130 = load i32, ptr %12, align 4, !tbaa !5
  %131 = sub nsw i32 %130, 1
  %132 = sext i32 %131 to i64
  %133 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef %132) #7
  %134 = getelementptr inbounds %"struct.std::pair.3", ptr %133, i32 0, i32 0
  %135 = load i32, ptr %134, align 4, !tbaa !13
  %136 = icmp ne i32 %129, %135
  br i1 %136, label %137, label %143

137:                                              ; preds = %124
  %138 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @v, ptr noundef nonnull align 4 dereferenceable(4) @num)
  %139 = getelementptr inbounds { ptr, i8 }, ptr %13, i32 0, i32 0
  %140 = extractvalue { ptr, i8 } %138, 0
  store ptr %140, ptr %139, align 8
  %141 = getelementptr inbounds { ptr, i8 }, ptr %13, i32 0, i32 1
  %142 = extractvalue { ptr, i8 } %138, 1
  store i8 %142, ptr %141, align 8
  br label %143

143:                                              ; preds = %137, %124
  %144 = load i32, ptr %12, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef %145) #7
  %147 = getelementptr inbounds %"struct.std::pair.3", ptr %146, i32 0, i32 0
  %148 = load i32, ptr %147, align 4, !tbaa !13
  %149 = icmp sle i32 %148, 0
  br i1 %149, label %150, label %159

150:                                              ; preds = %143
  %151 = load i32, ptr %12, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef %152) #7
  %154 = getelementptr inbounds %"struct.std::pair.3", ptr %153, i32 0, i32 1
  %155 = load i32, ptr %154, align 4, !tbaa !15
  %156 = shl i32 1, %155
  %157 = load i32, ptr @num, align 4, !tbaa !5
  %158 = or i32 %157, %156
  store i32 %158, ptr @num, align 4, !tbaa !5
  br label %159

159:                                              ; preds = %150, %143
  br label %160

160:                                              ; preds = %159
  %161 = load i32, ptr %12, align 4, !tbaa !5
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %12, align 4, !tbaa !5
  br label %118, !llvm.loop !16

163:                                              ; preds = %123
  %164 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @v, ptr noundef nonnull align 4 dereferenceable(4) @num)
  %165 = getelementptr inbounds { ptr, i8 }, ptr %14, i32 0, i32 0
  %166 = extractvalue { ptr, i8 } %164, 0
  store ptr %166, ptr %165, align 8
  %167 = getelementptr inbounds { ptr, i8 }, ptr %14, i32 0, i32 1
  %168 = extractvalue { ptr, i8 } %164, 1
  store i8 %168, ptr %167, align 8
  br label %169

169:                                              ; preds = %163, %68
  %170 = load i32, ptr %5, align 4, !tbaa !5
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %5, align 4, !tbaa !5
  br label %57, !llvm.loop !17

172:                                              ; preds = %61
  %173 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @v) #7
  %174 = trunc i64 %173 to i32
  %175 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %174)
  ret i32 0
}

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr, ptr) #6

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) #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 = { "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 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #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 = distinct !{!12, !10}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!15 = !{!14, !6, i64 4}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !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 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.3" = type { i32, i32 }

@n = external dso_local global i32, align 4
@pos = external dso_local local_unnamed_addr global [20 x i32], align 16
@a = external dso_local global [100001 x i32], align 16
@num = external dso_local global i32, align 4
@v = external dso_local global %"class.std::set", align 8
@tmp = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca %"struct.std::pair.3", align 8
  %3 = alloca i32, align 4
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %.not35 = icmp slt i32 %5, 1
  br i1 %.not35, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %6 = phi i32 [ %5, %0 ], [ %12, %.lr.ph ]
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(80) @pos, i8 -1, i64 80, i1 false)
  %7 = load i32, ptr getelementptr inbounds (i8, ptr @a, i64 4), align 4, !tbaa !5
  %8 = and i32 %7, 1
  %.not34 = icmp eq i32 %8, 0
  br i1 %.not34, label %15, label %14

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %9 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %indvars.iv
  %10 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %9)
  %11 = tail call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @v, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %.not.not = icmp slt i64 %indvars.iv, %13
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

14:                                               ; preds = %._crit_edge
  store i32 1, ptr @pos, align 16, !tbaa !5
  br label %15

15:                                               ; preds = %._crit_edge, %14
  %16 = and i32 %7, 2
  %.not34.1 = icmp eq i32 %16, 0
  br i1 %.not34.1, label %18, label %17

17:                                               ; preds = %15
  store i32 1, ptr getelementptr inbounds (i8, ptr @pos, i64 4), align 4, !tbaa !5
  br label %18

18:                                               ; preds = %17, %15
  %19 = and i32 %7, 4
  %.not34.2 = icmp eq i32 %19, 0
  br i1 %.not34.2, label %21, label %20

20:                                               ; preds = %18
  store i32 1, ptr getelementptr inbounds (i8, ptr @pos, i64 8), align 8, !tbaa !5
  br label %21

21:                                               ; preds = %20, %18
  %22 = and i32 %7, 8
  %.not34.3 = icmp eq i32 %22, 0
  br i1 %.not34.3, label %24, label %23

23:                                               ; preds = %21
  store i32 1, ptr getelementptr inbounds (i8, ptr @pos, i64 12), align 4, !tbaa !5
  br label %24

24:                                               ; preds = %23, %21
  %25 = and i32 %7, 16
  %.not34.4 = icmp eq i32 %25, 0
  br i1 %.not34.4, label %27, label %26

26:                                               ; preds = %24
  store i32 1, ptr getelementptr inbounds (i8, ptr @pos, i64 16), align 16, !tbaa !5
  br label %27

27:                                               ; preds = %26, %24
  %28 = and i32 %7, 32
  %.not34.5 = icmp eq i32 %28, 0
  br i1 %.not34.5, label %30, label %29

29:                                               ; preds = %27
  store i32 1, ptr getelementptr inbounds (i8, ptr @pos, i64 20), align 4, !tbaa !5
  br label %30

30:                                               ; preds = %29, %27
  %31 = and i32 %7, 64
  %.not34.6 = icmp eq i32 %31, 0
  br i1 %.not34.6, label %33, label %32

32:                                               ; preds = %30
  store i32 1, ptr getelementptr inbounds (i8, ptr @pos, i64 24), align 8, !tbaa !5
  br label %33

33:                                               ; preds = %32, %30
  %34 = and i32 %7, 128
  %.not34.7 = icmp eq i32 %34, 0
  br i1 %.not34.7, label %36, label %35

35:                                               ; preds = %33
  store i32 1, ptr getelementptr inbounds (i8, ptr @pos, i64 28), align 4, !tbaa !5
  br label %36

36:                                               ; preds = %35, %33
  %37 = and i32 %7, 256
  %.not34.8 = icmp eq i32 %37, 0
  br i1 %.not34.8, label %39, label %38

38:                                               ; preds = %36
  store i32 1, ptr getelementptr inbounds (i8, ptr @pos, i64 32), align 16, !tbaa !5
  br label %39

39:                                               ; preds = %38, %36
  %40 = and i32 %7, 512
  %.not34.9 = icmp eq i32 %40, 0
  br i1 %.not34.9, label %42, label %41

41:                                               ; preds = %39
  store i32 1, ptr getelementptr inbounds (i8, ptr @pos, i64 36), align 4, !tbaa !5
  br label %42

42:                                               ; preds = %41, %39
  %43 = and i32 %7, 1024
  %.not34.10 = icmp eq i32 %43, 0
  br i1 %.not34.10, label %45, label %44

44:                                               ; preds = %42
  store i32 1, ptr getelementptr inbounds (i8, ptr @pos, i64 40), align 8, !tbaa !5
  br label %45

45:                                               ; preds = %44, %42
  %46 = and i32 %7, 2048
  %.not34.11 = icmp eq i32 %46, 0
  br i1 %.not34.11, label %48, label %47

47:                                               ; preds = %45
  store i32 1, ptr getelementptr inbounds (i8, ptr @pos, i64 44), align 4, !tbaa !5
  br label %48

48:                                               ; preds = %47, %45
  %49 = and i32 %7, 4096
  %.not34.12 = icmp eq i32 %49, 0
  br i1 %.not34.12, label %51, label %50

50:                                               ; preds = %48
  store i32 1, ptr getelementptr inbounds (i8, ptr @pos, i64 48), align 16, !tbaa !5
  br label %51

51:                                               ; preds = %50, %48
  %52 = and i32 %7, 8192
  %.not34.13 = icmp eq i32 %52, 0
  br i1 %.not34.13, label %54, label %53

53:                                               ; preds = %51
  store i32 1, ptr getelementptr inbounds (i8, ptr @pos, i64 52), align 4, !tbaa !5
  br label %54

54:                                               ; preds = %53, %51
  %55 = and i32 %7, 16384
  %.not34.14 = icmp eq i32 %55, 0
  br i1 %.not34.14, label %57, label %56

56:                                               ; preds = %54
  store i32 1, ptr getelementptr inbounds (i8, ptr @pos, i64 56), align 8, !tbaa !5
  br label %57

57:                                               ; preds = %56, %54
  %58 = and i32 %7, 32768
  %.not34.15 = icmp eq i32 %58, 0
  br i1 %.not34.15, label %60, label %59

59:                                               ; preds = %57
  store i32 1, ptr getelementptr inbounds (i8, ptr @pos, i64 60), align 4, !tbaa !5
  br label %60

60:                                               ; preds = %59, %57
  %61 = and i32 %7, 65536
  %.not34.16 = icmp eq i32 %61, 0
  br i1 %.not34.16, label %63, label %62

62:                                               ; preds = %60
  store i32 1, ptr getelementptr inbounds (i8, ptr @pos, i64 64), align 16, !tbaa !5
  br label %63

63:                                               ; preds = %62, %60
  %64 = and i32 %7, 131072
  %.not34.17 = icmp eq i32 %64, 0
  br i1 %.not34.17, label %66, label %65

65:                                               ; preds = %63
  store i32 1, ptr getelementptr inbounds (i8, ptr @pos, i64 68), align 4, !tbaa !5
  br label %66

66:                                               ; preds = %65, %63
  %67 = and i32 %7, 262144
  %.not34.18 = icmp eq i32 %67, 0
  br i1 %.not34.18, label %69, label %68

68:                                               ; preds = %66
  store i32 1, ptr getelementptr inbounds (i8, ptr @pos, i64 72), align 8, !tbaa !5
  br label %69

69:                                               ; preds = %68, %66
  %70 = and i32 %7, 524288
  %.not34.19 = icmp eq i32 %70, 0
  br i1 %.not34.19, label %.preheader, label %71

71:                                               ; preds = %69
  store i32 1, ptr getelementptr inbounds (i8, ptr @pos, i64 76), align 4, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %71, %69
  %.not3043 = icmp slt i32 %6, 2
  br i1 %.not3043, label %._crit_edge46, label %.lr.ph45

._crit_edge46:                                    ; preds = %128, %.preheader
  %72 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @v) #7
  %73 = trunc i64 %72 to i32
  %74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %73)
  ret i32 0

.lr.ph45:                                         ; preds = %.preheader, %128
  %indvars.iv54 = phi i64 [ %indvars.iv.next55, %128 ], [ 2, %.preheader ]
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @tmp) #7
  %75 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %indvars.iv54
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %128, label %78

78:                                               ; preds = %.lr.ph45
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 0, ptr %1, align 4, !tbaa !5
  %79 = trunc nuw nsw i64 %indvars.iv54 to i32
  br label %86

80:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %81 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @tmp) #7
  %82 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @tmp) #7
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %81, ptr %82)
  %83 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef 0) #7
  %84 = load i32, ptr %83, align 4, !tbaa !11
  %85 = icmp slt i32 %84, 1
  br i1 %85, label %98, label %103

86:                                               ; preds = %78, %91
  %storemerge38 = phi i32 [ 0, %78 ], [ %96, %91 ]
  %87 = load i32, ptr %75, align 4, !tbaa !5
  %88 = shl nuw nsw i32 1, %storemerge38
  %89 = and i32 %87, %88
  %.not33 = icmp eq i32 %89, 0
  %.phi.trans.insert = sext i32 %storemerge38 to i64
  %.phi.trans.insert58 = getelementptr inbounds [20 x i32], ptr @pos, i64 0, i64 %.phi.trans.insert
  br i1 %.not33, label %._crit_edge57, label %90

._crit_edge57:                                    ; preds = %86
  %.pre = load i32, ptr %.phi.trans.insert58, align 4, !tbaa !5
  br label %91

90:                                               ; preds = %86
  store i32 %79, ptr %.phi.trans.insert58, align 4, !tbaa !5
  br label %91

91:                                               ; preds = %._crit_edge57, %90
  %92 = phi i32 [ %.pre, %._crit_edge57 ], [ %79, %90 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %93 = sub nsw i32 0, %92
  store i32 %93, ptr %3, align 4, !tbaa !5
  %94 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %1)
  store i64 %94, ptr %2, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @tmp, ptr noundef nonnull align 4 dereferenceable(8) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %95 = load i32, ptr %1, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %1, align 4, !tbaa !5
  %97 = icmp slt i32 %95, 19
  br i1 %97, label %86, label %80, !llvm.loop !13

98:                                               ; preds = %80
  %99 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef 0) #7
  %100 = getelementptr inbounds i8, ptr %99, i64 4
  %101 = load i32, ptr %100, align 4, !tbaa !14
  %102 = shl nuw i32 1, %101
  br label %103

103:                                              ; preds = %80, %98
  %storemerge31 = phi i32 [ %102, %98 ], [ 0, %80 ]
  store i32 %storemerge31, ptr @num, align 4, !tbaa !5
  %104 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @tmp) #7
  %105 = icmp ugt i64 %104, 1
  br i1 %105, label %.lr.ph41, label %._crit_edge42

._crit_edge42:                                    ; preds = %125, %103
  %106 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @v, ptr noundef nonnull align 4 dereferenceable(4) @num)
  br label %128

.lr.ph41:                                         ; preds = %103, %125
  %indvars.iv51 = phi i64 [ %indvars.iv.next52, %125 ], [ 1, %103 ]
  %107 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef %indvars.iv51) #7
  %108 = load i32, ptr %107, align 4, !tbaa !11
  %109 = add nsw i64 %indvars.iv51, -1
  %110 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef %109) #7
  %111 = load i32, ptr %110, align 4, !tbaa !11
  %.not32 = icmp eq i32 %108, %111
  br i1 %.not32, label %114, label %112

112:                                              ; preds = %.lr.ph41
  %113 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @v, ptr noundef nonnull align 4 dereferenceable(4) @num)
  br label %114

114:                                              ; preds = %112, %.lr.ph41
  %115 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef %indvars.iv51) #7
  %116 = load i32, ptr %115, align 4, !tbaa !11
  %117 = icmp slt i32 %116, 1
  br i1 %117, label %118, label %125

118:                                              ; preds = %114
  %119 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef %indvars.iv51) #7
  %120 = getelementptr inbounds i8, ptr %119, i64 4
  %121 = load i32, ptr %120, align 4, !tbaa !14
  %122 = shl nuw i32 1, %121
  %123 = load i32, ptr @num, align 4, !tbaa !5
  %124 = or i32 %123, %122
  store i32 %124, ptr @num, align 4, !tbaa !5
  br label %125

125:                                              ; preds = %114, %118
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %126 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @tmp) #7
  %127 = icmp ugt i64 %126, %indvars.iv.next52
  br i1 %127, label %.lr.ph41, label %._crit_edge42, !llvm.loop !15

128:                                              ; preds = %.lr.ph45, %._crit_edge42
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %129 = load i32, ptr @n, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %.not30.not = icmp slt i64 %indvars.iv54, %130
  br i1 %.not30.not, label %.lr.ph45, label %._crit_edge46, !llvm.loop !16
}

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr, ptr) local_unnamed_addr #6

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) local_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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #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 = !{!12, !6, i64 0}
!12 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!13 = distinct !{!13, !10}
!14 = !{!12, !6, i64 4}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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