; LLVM IR from tangjz/acm-icpc :: lydsy (4636)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::multiset" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::reverse_iterator" = type { %"struct.std::_Rb_tree_const_iterator" }

@n = external dso_local global i32, align 4
@a = external dso_local global [40001 x i32], align 16
@b = external dso_local global [40001 x i32], align 16
@c = external dso_local global [40001 x i32], align 16
@tot = external dso_local global i32, align 4
@que = external dso_local global [80002 x i32], align 16
@e = external dso_local global [80002 x %"class.std::vector"], align 16
@sp = external dso_local global %"class.std::multiset", align 8
@ans = external dso_local global i64, align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 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 i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %12 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %15 = alloca %"class.std::reverse_iterator", align 8
  store i32 0, ptr %1, align 4
  %16 = 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 %17

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

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

22:                                               ; preds = %17
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds i32, ptr @a, i64 %24
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds i32, ptr @b, i64 %27
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds i32, ptr @c, i64 %30
  %32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %25, ptr noundef %28, ptr noundef %31)
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [40001 x i32], ptr @a, i64 0, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = load i32, ptr @tot, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr @tot, align 4, !tbaa !5
  %39 = sext i32 %37 to i64
  %40 = getelementptr inbounds [80002 x i32], ptr @que, i64 0, i64 %39
  store i32 %36, ptr %40, align 4, !tbaa !5
  %41 = load i32, ptr %2, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [40001 x i32], ptr @b, i64 0, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = load i32, ptr @tot, align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr @tot, align 4, !tbaa !5
  %47 = sext i32 %45 to i64
  %48 = getelementptr inbounds [80002 x i32], ptr @que, i64 0, i64 %47
  store i32 %44, ptr %48, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %22
  %50 = load i32, ptr %2, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %2, align 4, !tbaa !5
  br label %17, !llvm.loop !9

52:                                               ; preds = %21
  %53 = load i32, ptr @tot, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds i32, ptr @que, i64 %54
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef @que, ptr noundef %55)
  %56 = load i32, ptr @tot, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds i32, ptr @que, i64 %57
  %59 = call noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef @que, ptr noundef %58)
  %60 = ptrtoint ptr %59 to i64
  %61 = sub i64 %60, ptrtoint (ptr @que to i64)
  %62 = sdiv exact i64 %61, 4
  %63 = trunc i64 %62 to i32
  store i32 %63, ptr @tot, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %100, %52
  %65 = load i32, ptr %3, align 4, !tbaa !5
  %66 = load i32, ptr @n, align 4, !tbaa !5
  %67 = icmp sle i32 %65, %66
  br i1 %67, label %69, label %68

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

69:                                               ; preds = %64
  %70 = load i32, ptr @tot, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr @que, i64 %71
  %73 = load i32, ptr %3, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [40001 x i32], ptr @a, i64 0, i64 %74
  %76 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef @que, ptr noundef %72, ptr noundef nonnull align 4 dereferenceable(4) %75)
  %77 = ptrtoint ptr %76 to i64
  %78 = sub i64 %77, ptrtoint (ptr @que to i64)
  %79 = sdiv exact i64 %78, 4
  %80 = getelementptr inbounds [80002 x %"class.std::vector"], ptr @e, i64 0, i64 %79
  %81 = load i32, ptr %3, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [40001 x i32], ptr @c, i64 0, i64 %82
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %80, ptr noundef nonnull align 4 dereferenceable(4) %83)
  %84 = load i32, ptr @tot, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i32, ptr @que, i64 %85
  %87 = load i32, ptr %3, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [40001 x i32], ptr @b, i64 0, i64 %88
  %90 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef @que, ptr noundef %86, ptr noundef nonnull align 4 dereferenceable(4) %89)
  %91 = ptrtoint ptr %90 to i64
  %92 = sub i64 %91, ptrtoint (ptr @que to i64)
  %93 = sdiv exact i64 %92, 4
  %94 = getelementptr inbounds [80002 x %"class.std::vector"], ptr @e, i64 0, i64 %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %95 = load i32, ptr %3, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [40001 x i32], ptr @c, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = sub nsw i32 0, %98
  store i32 %99, ptr %4, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %94, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %100

100:                                              ; preds = %69
  %101 = load i32, ptr %3, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %3, align 4, !tbaa !5
  br label %64, !llvm.loop !11

103:                                              ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  %104 = call ptr @_ZNSt8multisetIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) @sp, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %105 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %6, i32 0, i32 0
  store ptr %104, ptr %105, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %106

106:                                              ; preds = %165, %103
  %107 = load i32, ptr %7, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  %109 = load i32, ptr @tot, align 4, !tbaa !5
  %110 = icmp slt i32 %108, %109
  br i1 %110, label %112, label %111

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

112:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %113 = load i32, ptr %7, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [80002 x %"class.std::vector"], ptr @e, i64 0, i64 %114
  %116 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %115) #7
  %117 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %116, ptr %117, align 8
  br label %118

118:                                              ; preds = %145, %112
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %119 = load i32, ptr %7, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [80002 x %"class.std::vector"], ptr @e, i64 0, i64 %120
  %122 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %121) #7
  %123 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %122, ptr %123, align 8
  %124 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br i1 %124, label %126, label %125

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

126:                                              ; preds = %118
  %127 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = icmp sgt i32 %128, 0
  br i1 %129, label %130, label %134

130:                                              ; preds = %126
  %131 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %132 = call ptr @_ZNSt8multisetIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @sp, ptr noundef nonnull align 4 dereferenceable(4) %131)
  %133 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %11, i32 0, i32 0
  store ptr %132, ptr %133, align 8
  br label %144

134:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %135 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %136 = load i32, ptr %135, align 4, !tbaa !5
  %137 = sub nsw i32 0, %136
  store i32 %137, ptr %13, align 4, !tbaa !5
  %138 = call ptr @_ZNSt8multisetIiSt4lessIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(48) @sp, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %139 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %12, i32 0, i32 0
  store ptr %138, ptr %139, align 8
  %140 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %12, i32 0, i32 0
  %141 = load ptr, ptr %140, align 8
  %142 = call ptr @_ZNSt8multisetIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE(ptr noundef nonnull align 8 dereferenceable(48) @sp, ptr %141)
  %143 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %14, i32 0, i32 0
  store ptr %142, ptr %143, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %144

144:                                              ; preds = %134, %130
  br label %145

145:                                              ; preds = %144
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  br label %118, !llvm.loop !12

147:                                              ; preds = %125
  %148 = load i32, ptr %7, align 4, !tbaa !5
  %149 = add nsw i32 %148, 1
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [80002 x i32], ptr @que, i64 0, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !5
  %153 = load i32, ptr %7, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [80002 x i32], ptr @que, i64 0, i64 %154
  %156 = load i32, ptr %155, align 4, !tbaa !5
  %157 = sub nsw i32 %152, %156
  %158 = sext i32 %157 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  call void @_ZNKSt8multisetIiSt4lessIiESaIiEE6rbeginEv(ptr dead_on_unwind writable sret(%"class.std::reverse_iterator") align 8 %15, ptr noundef nonnull align 8 dereferenceable(48) @sp) #7
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorIiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
  %160 = load i32, ptr %159, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = mul nsw i64 %158, %161
  %163 = load i64, ptr @ans, align 8, !tbaa !13
  %164 = add nsw i64 %163, %162
  store i64 %164, ptr @ans, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %165

165:                                              ; preds = %147
  %166 = load i32, ptr %7, align 4, !tbaa !5
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %7, align 4, !tbaa !5
  br label %106, !llvm.loop !15

168:                                              ; preds = %111
  %169 = load i64, ptr @ans, align 8, !tbaa !13
  %170 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i64 noundef %169)
  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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef, ptr noundef) #3

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt8multisetIiSt4lessIiESaIiEE6rbeginEv(ptr dead_on_unwind noalias writable sret(%"class.std::reverse_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(48)) #5 align 2

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

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

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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #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 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 #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, !14, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = distinct !{!15, !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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::multiset" = 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.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::reverse_iterator" = type { %"struct.std::_Rb_tree_const_iterator" }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@a = external dso_local global [40001 x i32], align 16
@b = external dso_local global [40001 x i32], align 16
@c = external dso_local global [40001 x i32], align 16
@tot = external dso_local local_unnamed_addr global i32, align 4
@que = external dso_local global [80002 x i32], align 16
@e = external dso_local global [80002 x %"class.std::vector"], align 16
@sp = external dso_local global %"class.std::multiset", align 8
@ans = external dso_local local_unnamed_addr global i64, align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 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 i32, align 4
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::reverse_iterator", align 8
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %8 = load i32, ptr @n, align 4, !tbaa !5
  %.not26 = icmp slt i32 %8, 1
  br i1 %.not26, label %.._crit_edge_crit_edge, label %.lr.ph

.._crit_edge_crit_edge:                           ; preds = %0
  %.pre = load i32, ptr @tot, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.._crit_edge_crit_edge
  %9 = phi i32 [ %.pre, %.._crit_edge_crit_edge ], [ %31, %.lr.ph ]
  %10 = sext i32 %9 to i64
  %11 = getelementptr inbounds i32, ptr @que, i64 %10
  tail call void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull @que, ptr noundef nonnull %11)
  %12 = load i32, ptr @tot, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds i32, ptr @que, i64 %13
  %15 = tail call noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef nonnull @que, ptr noundef nonnull %14)
  %16 = ptrtoint ptr %15 to i64
  %17 = sub i64 %16, ptrtoint (ptr @que to i64)
  %18 = lshr exact i64 %17, 2
  %19 = trunc i64 %18 to i32
  store i32 %19, ptr @tot, align 4, !tbaa !5
  %20 = load i32, ptr @n, align 4, !tbaa !5
  %.not2528 = icmp slt i32 %20, 1
  br i1 %.not2528, label %._crit_edge32, label %.lr.ph31

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %21 = getelementptr inbounds i32, ptr @a, i64 %indvars.iv
  %22 = getelementptr inbounds i32, ptr @b, i64 %indvars.iv
  %23 = getelementptr inbounds i32, ptr @c, i64 %indvars.iv
  %24 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %21, ptr noundef nonnull %22, ptr noundef nonnull %23)
  %25 = load i32, ptr %21, align 4, !tbaa !5
  %26 = load i32, ptr @tot, align 4, !tbaa !5
  %27 = add nsw i32 %26, 1
  %28 = sext i32 %26 to i64
  %29 = getelementptr inbounds [80002 x i32], ptr @que, i64 0, i64 %28
  store i32 %25, ptr %29, align 4, !tbaa !5
  %30 = load i32, ptr %22, align 4, !tbaa !5
  %31 = add nsw i32 %26, 2
  store i32 %31, ptr @tot, align 4, !tbaa !5
  %32 = sext i32 %27 to i64
  %33 = getelementptr inbounds [80002 x i32], ptr @que, i64 0, i64 %32
  store i32 %30, ptr %33, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %34 = load i32, ptr @n, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %.not.not = icmp slt i64 %indvars.iv, %35
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge32:                                    ; preds = %.lr.ph31, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  %36 = call ptr @_ZNSt8multisetIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) @sp, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  %37 = load i32, ptr @tot, align 4, !tbaa !5
  %38 = icmp sgt i32 %37, 1
  br i1 %38, label %.lr.ph38, label %._crit_edge32.._crit_edge39_crit_edge

._crit_edge32.._crit_edge39_crit_edge:            ; preds = %._crit_edge32
  %.pre51 = load i64, ptr @ans, align 8, !tbaa !11
  br label %._crit_edge39

.lr.ph31:                                         ; preds = %._crit_edge, %.lr.ph31
  %indvars.iv41 = phi i64 [ %indvars.iv.next42, %.lr.ph31 ], [ 1, %._crit_edge ]
  %39 = load i32, ptr @tot, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i32, ptr @que, i64 %40
  %42 = getelementptr inbounds [40001 x i32], ptr @a, i64 0, i64 %indvars.iv41
  %43 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef nonnull @que, ptr noundef nonnull %41, ptr noundef nonnull align 4 dereferenceable(4) %42)
  %44 = ptrtoint ptr %43 to i64
  %45 = sub i64 %44, ptrtoint (ptr @que to i64)
  %46 = ashr exact i64 %45, 2
  %47 = getelementptr inbounds [80002 x %"class.std::vector"], ptr @e, i64 0, i64 %46
  %48 = getelementptr inbounds [40001 x i32], ptr @c, i64 0, i64 %indvars.iv41
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %47, ptr noundef nonnull align 4 dereferenceable(4) %48)
  %49 = load i32, ptr @tot, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds i32, ptr @que, i64 %50
  %52 = getelementptr inbounds [40001 x i32], ptr @b, i64 0, i64 %indvars.iv41
  %53 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef nonnull @que, ptr noundef nonnull %51, ptr noundef nonnull align 4 dereferenceable(4) %52)
  %54 = ptrtoint ptr %53 to i64
  %55 = sub i64 %54, ptrtoint (ptr @que to i64)
  %56 = ashr exact i64 %55, 2
  %57 = getelementptr inbounds [80002 x %"class.std::vector"], ptr @e, i64 0, i64 %56
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %58 = load i32, ptr %48, align 4, !tbaa !5
  %59 = sub nsw i32 0, %58
  store i32 %59, ptr %1, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %57, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %indvars.iv.next42 = add nuw nsw i64 %indvars.iv41, 1
  %60 = load i32, ptr @n, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %.not25.not = icmp slt i64 %indvars.iv41, %61
  br i1 %.not25.not, label %.lr.ph31, label %._crit_edge32, !llvm.loop !13

._crit_edge39:                                    ; preds = %._crit_edge35, %._crit_edge32.._crit_edge39_crit_edge
  %62 = phi i64 [ %.pre51, %._crit_edge32.._crit_edge39_crit_edge ], [ %79, %._crit_edge35 ]
  %63 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %62)
  ret i32 0

.lr.ph38:                                         ; preds = %._crit_edge32, %._crit_edge35
  %indvars.iv46 = phi i64 [ %indvars.iv.next47, %._crit_edge35 ], [ 0, %._crit_edge32 ]
  %indvars.iv44 = phi i64 [ %indvars.iv.next45, %._crit_edge35 ], [ 1, %._crit_edge32 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %64 = getelementptr inbounds [80002 x %"class.std::vector"], ptr @e, i64 0, i64 %indvars.iv46
  %65 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %64) #7
  store ptr %65, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %66 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %64) #7
  store ptr %66, ptr %4, align 8
  %67 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br i1 %67, label %.lr.ph34, label %._crit_edge35

._crit_edge35:                                    ; preds = %95, %.lr.ph38
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %68 = getelementptr inbounds [80002 x i32], ptr @que, i64 0, i64 %indvars.iv44
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = getelementptr inbounds [80002 x i32], ptr @que, i64 0, i64 %indvars.iv46
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = sub nsw i32 %69, %71
  %73 = sext i32 %72 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  call void @_ZNKSt8multisetIiSt4lessIiESaIiEE6rbeginEv(ptr dead_on_unwind nonnull writable sret(%"class.std::reverse_iterator") align 8 %6, ptr noundef nonnull align 8 dereferenceable(48) @sp) #7
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorIiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = mul nsw i64 %76, %73
  %78 = load i64, ptr @ans, align 8, !tbaa !11
  %79 = add nsw i64 %77, %78
  store i64 %79, ptr @ans, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %indvars.iv.next45 = add nuw nsw i64 %indvars.iv44, 1
  %80 = load i32, ptr @tot, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = icmp slt i64 %indvars.iv.next45, %81
  %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1
  br i1 %82, label %.lr.ph38, label %._crit_edge39, !llvm.loop !14

.lr.ph34:                                         ; preds = %.lr.ph38, %95
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = icmp sgt i32 %84, 0
  br i1 %85, label %86, label %89

86:                                               ; preds = %.lr.ph34
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  %88 = call ptr @_ZNSt8multisetIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @sp, ptr noundef nonnull align 4 dereferenceable(4) %87)
  br label %95

89:                                               ; preds = %.lr.ph34
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = sub nsw i32 0, %91
  store i32 %92, ptr %5, align 4, !tbaa !5
  %93 = call ptr @_ZNSt8multisetIiSt4lessIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(48) @sp, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %94 = call ptr @_ZNSt8multisetIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE(ptr noundef nonnull align 8 dereferenceable(48) @sp, ptr %93)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  br label %95

95:                                               ; preds = %86, %89
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %97 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %64) #7
  store ptr %97, ptr %4, align 8
  %98 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br i1 %98, label %.lr.ph34, label %._crit_edge35, !llvm.loop !15
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE3endEv(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(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt8multisetIiSt4lessIiESaIiEE6rbeginEv(ptr dead_on_unwind noalias writable sret(%"class.std::reverse_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #5 align 2

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

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

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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #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 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 #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, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}


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