; LLVM IR from kazunetakahashi/atcoder :: 2018/1124_dowcon5th-prelims (B)

; 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::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<long long, std::allocator<long long>>::_List_impl" }
%"struct.std::__cxx11::_List_base<long long, std::allocator<long long>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::_List_iterator" = type { ptr }
%"struct.std::_List_const_iterator" = type { ptr }

@N = external dso_local global i32, align 4
@K = external dso_local global i32, align 4
@a = external dso_local global [1010 x i64], align 16
@sum = external dso_local global [1010 x i64], align 16
@_Z1VB5cxx11 = external dso_local global %"class.std::__cxx11::list", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

26:                                               ; preds = %36, %0
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = load i32, ptr @N, align 4, !tbaa !5
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %31, label %30

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

31:                                               ; preds = %26
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [1010 x i64], ptr @a, i64 0, i64 %33
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %34)
  br label %36

36:                                               ; preds = %31
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %2, align 4, !tbaa !5
  br label %26, !llvm.loop !9

39:                                               ; preds = %30
  store i64 0, ptr @sum, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %59, %39
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = load i32, ptr @N, align 4, !tbaa !5
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %45, label %44

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

45:                                               ; preds = %40
  %46 = load i32, ptr %3, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [1010 x i64], ptr @sum, i64 0, i64 %47
  %49 = load i64, ptr %48, align 8, !tbaa !11
  %50 = load i32, ptr %3, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [1010 x i64], ptr @a, i64 0, i64 %51
  %53 = load i64, ptr %52, align 8, !tbaa !11
  %54 = add nsw i64 %49, %53
  %55 = load i32, ptr %3, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [1010 x i64], ptr @sum, i64 0, i64 %57
  store i64 %54, ptr %58, align 8, !tbaa !11
  br label %59

59:                                               ; preds = %45
  %60 = load i32, ptr %3, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %3, align 4, !tbaa !5
  br label %40, !llvm.loop !13

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

63:                                               ; preds = %88, %62
  %64 = load i32, ptr %4, align 4, !tbaa !5
  %65 = load i32, ptr @N, align 4, !tbaa !5
  %66 = icmp sle i32 %64, %65
  br i1 %66, label %68, label %67

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

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

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

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

74:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %75 = load i32, ptr %4, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [1010 x i64], ptr @sum, i64 0, i64 %76
  %78 = load i64, ptr %77, align 8, !tbaa !11
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [1010 x i64], ptr @sum, i64 0, i64 %80
  %82 = load i64, ptr %81, align 8, !tbaa !11
  %83 = sub nsw i64 %78, %82
  store i64 %83, ptr %7, align 8, !tbaa !11
  call void @_ZNSt7__cxx114listIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) @_Z1VB5cxx11, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %84

84:                                               ; preds = %74
  %85 = load i32, ptr %6, align 4, !tbaa !5
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %6, align 4, !tbaa !5
  br label %69, !llvm.loop !14

87:                                               ; preds = %73
  br label %88

88:                                               ; preds = %87
  %89 = load i32, ptr %4, align 4, !tbaa !5
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %4, align 4, !tbaa !5
  br label %63, !llvm.loop !15

91:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 45, ptr %8, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %152, %91
  %93 = load i32, ptr %8, align 4, !tbaa !5
  %94 = icmp sge i32 %93, 0
  br i1 %94, label %96, label %95

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

96:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %97 = call noundef i64 @_ZNKSt7__cxx114listIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z1VB5cxx11) #7
  %98 = trunc i64 %97 to i32
  store i32 %98, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %99 = call ptr @_ZNSt7__cxx114listIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z1VB5cxx11) #7
  %100 = getelementptr inbounds %"struct.std::_List_iterator", ptr %11, i32 0, i32 0
  store ptr %99, ptr %100, align 8
  br label %101

101:                                              ; preds = %118, %96
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %102 = call ptr @_ZNSt7__cxx114listIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z1VB5cxx11) #7
  %103 = getelementptr inbounds %"struct.std::_List_iterator", ptr %12, i32 0, i32 0
  store ptr %102, ptr %103, align 8
  %104 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br i1 %104, label %106, label %105

105:                                              ; preds = %101
  store i32 17, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %121

106:                                              ; preds = %101
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  %108 = load i64, ptr %107, align 8, !tbaa !11
  %109 = load i32, ptr %8, align 4, !tbaa !5
  %110 = zext i32 %109 to i64
  %111 = ashr i64 %108, %110
  %112 = and i64 %111, 1
  %113 = icmp ne i64 %112, 0
  br i1 %113, label %114, label %117

114:                                              ; preds = %106
  %115 = load i32, ptr %9, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %9, align 4, !tbaa !5
  br label %117

117:                                              ; preds = %114, %106
  br label %118

118:                                              ; preds = %117
  %119 = call ptr @_ZNSt14_List_iteratorIxEppEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 0) #7
  %120 = getelementptr inbounds %"struct.std::_List_iterator", ptr %13, i32 0, i32 0
  store ptr %119, ptr %120, align 8
  br label %101, !llvm.loop !16

121:                                              ; preds = %105
  %122 = load i32, ptr %9, align 4, !tbaa !5
  %123 = load i32, ptr @K, align 4, !tbaa !5
  %124 = icmp sge i32 %122, %123
  br i1 %124, label %125, label %151

125:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %126 = call ptr @_ZNSt7__cxx114listIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z1VB5cxx11) #7
  %127 = getelementptr inbounds %"struct.std::_List_iterator", ptr %14, i32 0, i32 0
  store ptr %126, ptr %127, align 8
  br label %128

128:                                              ; preds = %149, %125
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %129 = call ptr @_ZNSt7__cxx114listIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z1VB5cxx11) #7
  %130 = getelementptr inbounds %"struct.std::_List_iterator", ptr %15, i32 0, i32 0
  store ptr %129, ptr %130, align 8
  %131 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br i1 %131, label %132, label %150

132:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %134 = load i64, ptr %133, align 8, !tbaa !11
  store i64 %134, ptr %16, align 8, !tbaa !11
  %135 = load i64, ptr %16, align 8, !tbaa !11
  %136 = load i32, ptr %8, align 4, !tbaa !5
  %137 = zext i32 %136 to i64
  %138 = ashr i64 %135, %137
  %139 = and i64 %138, 1
  %140 = icmp ne i64 %139, 0
  br i1 %140, label %141, label %144

141:                                              ; preds = %132
  %142 = call ptr @_ZNSt14_List_iteratorIxEppEi(ptr noundef nonnull align 8 dereferenceable(8) %14, i32 noundef 0) #7
  %143 = getelementptr inbounds %"struct.std::_List_iterator", ptr %17, i32 0, i32 0
  store ptr %142, ptr %143, align 8
  br label %149

144:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @_ZNSt20_List_const_iteratorIxEC2ERKSt14_List_iteratorIxE(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %145 = getelementptr inbounds %"struct.std::_List_const_iterator", ptr %19, i32 0, i32 0
  %146 = load ptr, ptr %145, align 8
  %147 = call ptr @_ZNSt7__cxx114listIxSaIxEE5eraseESt20_List_const_iteratorIxE(ptr noundef nonnull align 8 dereferenceable(24) @_Z1VB5cxx11, ptr %146) #7
  %148 = getelementptr inbounds %"struct.std::_List_iterator", ptr %18, i32 0, i32 0
  store ptr %147, ptr %148, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %18, i64 8, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %149

149:                                              ; preds = %144, %141
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %128, !llvm.loop !20

150:                                              ; preds = %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %151

151:                                              ; preds = %150, %121
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %152

152:                                              ; preds = %151
  %153 = load i32, ptr %8, align 4, !tbaa !5
  %154 = add nsw i32 %153, -1
  store i32 %154, ptr %8, align 4, !tbaa !5
  br label %92, !llvm.loop !21

155:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %156 = call ptr @_ZNSt7__cxx114listIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z1VB5cxx11) #7
  %157 = getelementptr inbounds %"struct.std::_List_iterator", ptr %20, i32 0, i32 0
  store ptr %156, ptr %157, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %158 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  %159 = load i64, ptr %158, align 8, !tbaa !11
  store i64 %159, ptr %21, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %160

160:                                              ; preds = %172, %155
  %161 = load i32, ptr %22, align 4, !tbaa !5
  %162 = load i32, ptr @K, align 4, !tbaa !5
  %163 = icmp slt i32 %161, %162
  br i1 %163, label %165, label %164

164:                                              ; preds = %160
  store i32 22, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %175

165:                                              ; preds = %160
  %166 = load i64, ptr %21, align 8, !tbaa !11
  %167 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  %168 = load i64, ptr %167, align 8, !tbaa !11
  %169 = and i64 %166, %168
  store i64 %169, ptr %21, align 8, !tbaa !11
  %170 = call ptr @_ZNSt14_List_iteratorIxEppEi(ptr noundef nonnull align 8 dereferenceable(8) %20, i32 noundef 0) #7
  %171 = getelementptr inbounds %"struct.std::_List_iterator", ptr %23, i32 0, i32 0
  store ptr %170, ptr %171, align 8
  br label %172

172:                                              ; preds = %165
  %173 = load i32, ptr %22, align 4, !tbaa !5
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %22, align 4, !tbaa !5
  br label %160, !llvm.loop !22

175:                                              ; preds = %164
  %176 = load i64, ptr %21, align 8, !tbaa !11
  %177 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %176)
  %178 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %177, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  %179 = load i32, ptr %1, align 4
  ret i32 %179
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #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 noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #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: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx114listIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = !{i64 0, i64 8, !18}
!18 = !{!19, !19, i64 0}
!19 = !{!"any pointer", !7, i64 0}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !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::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<long long, std::allocator<long long>>::_List_impl" }
%"struct.std::__cxx11::_List_base<long long, std::allocator<long long>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::_List_iterator" = type { ptr }
%"struct.std::_List_const_iterator" = type { ptr }

@N = external dso_local global i32, align 4
@K = external dso_local global i32, align 4
@a = external dso_local global [1010 x i64], align 16
@sum = external dso_local local_unnamed_addr global [1010 x i64], align 16
@_Z1VB5cxx11 = external dso_local global %"class.std::__cxx11::list", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca %"struct.std::_List_iterator", align 8
  %3 = alloca %"struct.std::_List_iterator", align 8
  %4 = alloca %"struct.std::_List_iterator", align 8
  %5 = alloca %"struct.std::_List_iterator", align 8
  %6 = alloca %"struct.std::_List_const_iterator", align 8
  %7 = alloca %"struct.std::_List_iterator", align 8
  %8 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %9 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(4) @K)
  %10 = load i32, ptr @N, align 4, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %0
  store i64 0, ptr @sum, align 16, !tbaa !9
  br label %.preheader41

._crit_edge:                                      ; preds = %.lr.ph
  store i64 0, ptr @sum, align 16, !tbaa !9
  %12 = icmp sgt i32 %16, 0
  br i1 %12, label %.lr.ph45.preheader, label %.preheader41

.lr.ph45.preheader:                               ; preds = %._crit_edge
  %wide.trip.count = zext nneg i32 %16 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %13 = icmp ult i32 %16, 4
  br i1 %13, label %.preheader41.loopexit.unr-lcssa, label %.lr.ph45.preheader.new

.lr.ph45.preheader.new:                           ; preds = %.lr.ph45.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph45

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %14 = getelementptr inbounds [1010 x i64], ptr @a, i64 0, i64 %indvars.iv
  %15 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %16 = load i32, ptr @N, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = icmp slt i64 %indvars.iv.next, %17
  br i1 %18, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.preheader41.loopexit.unr-lcssa:                  ; preds = %.lr.ph45, %.lr.ph45.preheader
  %.unr = phi i64 [ 0, %.lr.ph45.preheader ], [ %40, %.lr.ph45 ]
  %indvars.iv71.unr = phi i64 [ 0, %.lr.ph45.preheader ], [ %indvars.iv.next72.3, %.lr.ph45 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader41, label %.lr.ph45.epil

.lr.ph45.epil:                                    ; preds = %.preheader41.loopexit.unr-lcssa, %.lr.ph45.epil
  %19 = phi i64 [ %22, %.lr.ph45.epil ], [ %.unr, %.preheader41.loopexit.unr-lcssa ]
  %indvars.iv71.epil = phi i64 [ %indvars.iv.next72.epil, %.lr.ph45.epil ], [ %indvars.iv71.unr, %.preheader41.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph45.epil ], [ 0, %.preheader41.loopexit.unr-lcssa ]
  %20 = getelementptr inbounds [1010 x i64], ptr @a, i64 0, i64 %indvars.iv71.epil
  %21 = load i64, ptr %20, align 8, !tbaa !9
  %22 = add nsw i64 %21, %19
  %indvars.iv.next72.epil = add nuw nsw i64 %indvars.iv71.epil, 1
  %23 = getelementptr inbounds [1010 x i64], ptr @sum, i64 0, i64 %indvars.iv.next72.epil
  store i64 %22, ptr %23, align 8, !tbaa !9
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader41, label %.lr.ph45.epil, !llvm.loop !13

.preheader41:                                     ; preds = %.preheader41.loopexit.unr-lcssa, %.lr.ph45.epil, %._crit_edge.thread, %._crit_edge
  %24 = phi i32 [ %10, %._crit_edge.thread ], [ %16, %._crit_edge ], [ %16, %.lr.ph45.epil ], [ %16, %.preheader41.loopexit.unr-lcssa ]
  %.not49 = icmp slt i32 %24, 0
  br i1 %.not49, label %.preheader.preheader, label %.preheader40

.preheader.preheader:                             ; preds = %._crit_edge48, %.preheader41
  br label %.preheader

.lr.ph45:                                         ; preds = %.lr.ph45, %.lr.ph45.preheader.new
  %25 = phi i64 [ 0, %.lr.ph45.preheader.new ], [ %40, %.lr.ph45 ]
  %indvars.iv71 = phi i64 [ 0, %.lr.ph45.preheader.new ], [ %indvars.iv.next72.3, %.lr.ph45 ]
  %niter = phi i64 [ 0, %.lr.ph45.preheader.new ], [ %niter.next.3, %.lr.ph45 ]
  %26 = getelementptr inbounds [1010 x i64], ptr @a, i64 0, i64 %indvars.iv71
  %27 = load i64, ptr %26, align 16, !tbaa !9
  %28 = add nsw i64 %27, %25
  %indvars.iv.next72 = or disjoint i64 %indvars.iv71, 1
  %29 = getelementptr inbounds [1010 x i64], ptr @sum, i64 0, i64 %indvars.iv.next72
  store i64 %28, ptr %29, align 8, !tbaa !9
  %30 = getelementptr inbounds [1010 x i64], ptr @a, i64 0, i64 %indvars.iv.next72
  %31 = load i64, ptr %30, align 8, !tbaa !9
  %32 = add nsw i64 %31, %28
  %indvars.iv.next72.1 = or disjoint i64 %indvars.iv71, 2
  %33 = getelementptr inbounds [1010 x i64], ptr @sum, i64 0, i64 %indvars.iv.next72.1
  store i64 %32, ptr %33, align 16, !tbaa !9
  %34 = getelementptr inbounds [1010 x i64], ptr @a, i64 0, i64 %indvars.iv.next72.1
  %35 = load i64, ptr %34, align 16, !tbaa !9
  %36 = add nsw i64 %35, %32
  %indvars.iv.next72.2 = or disjoint i64 %indvars.iv71, 3
  %37 = getelementptr inbounds [1010 x i64], ptr @sum, i64 0, i64 %indvars.iv.next72.2
  store i64 %36, ptr %37, align 8, !tbaa !9
  %38 = getelementptr inbounds [1010 x i64], ptr @a, i64 0, i64 %indvars.iv.next72.2
  %39 = load i64, ptr %38, align 8, !tbaa !9
  %40 = add nsw i64 %39, %36
  %indvars.iv.next72.3 = add nuw nsw i64 %indvars.iv71, 4
  %41 = getelementptr inbounds [1010 x i64], ptr @sum, i64 0, i64 %indvars.iv.next72.3
  store i64 %40, ptr %41, align 16, !tbaa !9
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader41.loopexit.unr-lcssa, label %.lr.ph45, !llvm.loop !15

.preheader40:                                     ; preds = %.preheader41, %._crit_edge48
  %42 = phi i32 [ %44, %._crit_edge48 ], [ %24, %.preheader41 ]
  %indvars.iv79 = phi i64 [ %indvars.iv.next80, %._crit_edge48 ], [ 0, %.preheader41 ]
  %.not67 = icmp eq i64 %indvars.iv79, 0
  br i1 %.not67, label %._crit_edge48, label %.lr.ph47

.lr.ph47:                                         ; preds = %.preheader40
  %43 = getelementptr inbounds [1010 x i64], ptr @sum, i64 0, i64 %indvars.iv79
  br label %46

._crit_edge48.loopexit:                           ; preds = %46
  %.pre = load i32, ptr @N, align 4, !tbaa !5
  br label %._crit_edge48

._crit_edge48:                                    ; preds = %._crit_edge48.loopexit, %.preheader40
  %44 = phi i32 [ %.pre, %._crit_edge48.loopexit ], [ %42, %.preheader40 ]
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %45 = sext i32 %44 to i64
  %.not.not = icmp slt i64 %indvars.iv79, %45
  br i1 %.not.not, label %.preheader40, label %.preheader.preheader, !llvm.loop !16

46:                                               ; preds = %.lr.ph47, %46
  %indvars.iv74 = phi i64 [ 0, %.lr.ph47 ], [ %indvars.iv.next75, %46 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  %47 = load i64, ptr %43, align 8, !tbaa !9
  %48 = getelementptr inbounds [1010 x i64], ptr @sum, i64 0, i64 %indvars.iv74
  %49 = load i64, ptr %48, align 8, !tbaa !9
  %50 = sub nsw i64 %47, %49
  store i64 %50, ptr %1, align 8, !tbaa !9
  call void @_ZNSt7__cxx114listIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) @_Z1VB5cxx11, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %exitcond78.not = icmp eq i64 %indvars.iv.next75, %indvars.iv79
  br i1 %exitcond78.not, label %._crit_edge48.loopexit, label %46, !llvm.loop !17

51:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %52 = call ptr @_ZNSt7__cxx114listIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z1VB5cxx11) #6
  store ptr %52, ptr %7, align 8
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %54 = load i64, ptr %53, align 8, !tbaa !9
  %55 = load i32, ptr @K, align 4, !tbaa !5
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %.lr.ph64, label %._crit_edge65

.preheader:                                       ; preds = %.preheader.preheader, %88
  %indvars.iv82 = phi i64 [ %indvars.iv.next83, %88 ], [ 45, %.preheader.preheader ]
  %57 = call noundef i64 @_ZNKSt7__cxx114listIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z1VB5cxx11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %58 = call ptr @_ZNSt7__cxx114listIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z1VB5cxx11) #6
  store ptr %58, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %59 = call ptr @_ZNSt7__cxx114listIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z1VB5cxx11) #6
  store ptr %59, ptr %3, align 8
  %60 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  br i1 %60, label %.lr.ph53, label %._crit_edge54

.lr.ph53:                                         ; preds = %.preheader
  %61 = shl nuw i64 1, %indvars.iv82
  br label %63

._crit_edge54:                                    ; preds = %63, %.preheader
  %.036.lcssa = phi i32 [ 0, %.preheader ], [ %spec.select, %63 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  %62 = load i32, ptr @K, align 4, !tbaa !5
  %.not37 = icmp slt i32 %.036.lcssa, %62
  br i1 %.not37, label %88, label %71

63:                                               ; preds = %.lr.ph53, %63
  %.03651 = phi i32 [ 0, %.lr.ph53 ], [ %spec.select, %63 ]
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  %65 = load i64, ptr %64, align 8, !tbaa !9
  %66 = and i64 %65, %61
  %.not39 = icmp ne i64 %66, 0
  %67 = zext i1 %.not39 to i32
  %spec.select = add nuw nsw i32 %.03651, %67
  %68 = call ptr @_ZNSt14_List_iteratorIxEppEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef 0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %69 = call ptr @_ZNSt7__cxx114listIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z1VB5cxx11) #6
  store ptr %69, ptr %3, align 8
  %70 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  br i1 %70, label %63, label %._crit_edge54, !llvm.loop !18

71:                                               ; preds = %._crit_edge54
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %72 = call ptr @_ZNSt7__cxx114listIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z1VB5cxx11) #6
  store ptr %72, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %73 = call ptr @_ZNSt7__cxx114listIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z1VB5cxx11) #6
  store ptr %73, ptr %5, align 8
  %74 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br i1 %74, label %.lr.ph57, label %._crit_edge58

.lr.ph57:                                         ; preds = %71
  %75 = shl nuw i64 1, %indvars.iv82
  br label %76

76:                                               ; preds = %.lr.ph57, %85
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %78 = load i64, ptr %77, align 8, !tbaa !9
  %79 = and i64 %78, %75
  %.not38 = icmp eq i64 %79, 0
  br i1 %.not38, label %82, label %80

80:                                               ; preds = %76
  %81 = call ptr @_ZNSt14_List_iteratorIxEppEi(ptr noundef nonnull align 8 dereferenceable(8) %4, i32 noundef 0) #6
  br label %85

82:                                               ; preds = %76
  call void @_ZNSt20_List_const_iteratorIxEC2ERKSt14_List_iteratorIxE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %83 = load ptr, ptr %6, align 8
  %84 = call ptr @_ZNSt7__cxx114listIxSaIxEE5eraseESt20_List_const_iteratorIxE(ptr noundef nonnull align 8 dereferenceable(24) @_Z1VB5cxx11, ptr %83) #6
  store ptr %84, ptr %4, align 8, !tbaa !19
  br label %85

85:                                               ; preds = %82, %80
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %86 = call ptr @_ZNSt7__cxx114listIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z1VB5cxx11) #6
  store ptr %86, ptr %5, align 8
  %87 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br i1 %87, label %76, label %._crit_edge58, !llvm.loop !21

._crit_edge58:                                    ; preds = %85, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %88

88:                                               ; preds = %._crit_edge58, %._crit_edge54
  %indvars.iv.next83 = add nsw i64 %indvars.iv82, -1
  %.not = icmp eq i64 %indvars.iv82, 0
  br i1 %.not, label %51, label %.preheader, !llvm.loop !22

._crit_edge65:                                    ; preds = %.lr.ph64, %51
  %.031.lcssa = phi i64 [ %54, %51 ], [ %93, %.lr.ph64 ]
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.031.lcssa)
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %89, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  ret i32 0

.lr.ph64:                                         ; preds = %51, %.lr.ph64
  %.03062 = phi i32 [ %95, %.lr.ph64 ], [ 0, %51 ]
  %.03161 = phi i64 [ %93, %.lr.ph64 ], [ %54, %51 ]
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %92 = load i64, ptr %91, align 8, !tbaa !9
  %93 = and i64 %92, %.03161
  %94 = call ptr @_ZNSt14_List_iteratorIxEppEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef 0) #6
  %95 = add nuw nsw i32 %.03062, 1
  %96 = load i32, ptr @K, align 4, !tbaa !5
  %97 = icmp slt i32 %95, %96
  br i1 %97, label %.lr.ph64, label %._crit_edge65, !llvm.loop !23
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) 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 noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) 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 uwtable
declare dso_local void @_ZNSt7__cxx114listIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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 = { 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 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 #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.unroll.disable"}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = !{!20, !20, i64 0}
!20 = !{!"any pointer", !7, i64 0}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}


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