; LLVM IR from xirc/cp-algorithm :: atcoder/abc032/D/main.ll (Z6solve1v)

; 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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long, std::pair<const long, long>, std::_Select1st<std::pair<const long, long>>, std::less<long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long, std::pair<const long, long>, std::_Select1st<std::pair<const long, long>>, std::less<long>>::_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_iterator" = type { ptr }
%"struct.std::pair" = type { i64, i64 }

@N = external dso_local global i32, align 4
@W = external dso_local global i32, align 4
@vs = external dso_local global %"class.std::vector", align 8
@cs = external dso_local global %"class.std::vector", align 8

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z6solve1v() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::map", align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %13 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  %21 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %22 = alloca i64, align 8
  %23 = alloca %"struct.std::_Rb_tree_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr %1) #4
  call void @_ZNSt3mapIllSt4lessIlESaISt4pairIKllEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  %24 = load i32, ptr @N, align 4, !tbaa !5
  %25 = sdiv i32 %24, 2
  store i32 %25, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %71, %0
  %27 = load i32, ptr %3, align 4, !tbaa !5
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = shl i32 1, %28
  %30 = icmp slt i32 %27, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %26
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %78

32:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store i64 0, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store i64 0, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %60, %32
  %34 = load i32, ptr %7, align 4, !tbaa !5
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %38, label %37

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

38:                                               ; preds = %33
  %39 = load i32, ptr %3, align 4, !tbaa !5
  %40 = load i32, ptr %7, align 4, !tbaa !5
  %41 = ashr i32 %39, %40
  %42 = and i32 %41, 1
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %44, label %59

44:                                               ; preds = %38
  %45 = load i32, ptr %7, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vs, i64 noundef %46) #4
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = load i64, ptr %5, align 8, !tbaa !9
  %51 = add nsw i64 %50, %49
  store i64 %51, ptr %5, align 8, !tbaa !9
  %52 = load i32, ptr %7, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @cs, i64 noundef %53) #4
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = load i64, ptr %6, align 8, !tbaa !9
  %58 = add nsw i64 %57, %56
  store i64 %58, ptr %6, align 8, !tbaa !9
  br label %59

59:                                               ; preds = %44, %38
  br label %60

60:                                               ; preds = %59
  %61 = load i32, ptr %7, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %7, align 4, !tbaa !5
  br label %33, !llvm.loop !11

63:                                               ; preds = %37
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIllSt4lessIlESaISt4pairIKllEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %65 unwind label %74

65:                                               ; preds = %63
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %67 unwind label %74

67:                                               ; preds = %65
  %68 = load i64, ptr %66, align 8, !tbaa !9
  %69 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIllSt4lessIlESaISt4pairIKllEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %70 unwind label %74

70:                                               ; preds = %67
  store i64 %68, ptr %69, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %71

71:                                               ; preds = %70
  %72 = load i32, ptr %3, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %3, align 4, !tbaa !5
  br label %26, !llvm.loop !13

74:                                               ; preds = %67, %65, %63
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %8, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %196

78:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store i64 0, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store ptr %1, ptr %11, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %79 = load ptr, ptr %11, align 8, !tbaa !14
  %80 = call ptr @_ZNSt3mapIllSt4lessIlESaISt4pairIKllEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %79) #4
  %81 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %12, i32 0, i32 0
  store ptr %80, ptr %81, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %82 = load ptr, ptr %11, align 8, !tbaa !14
  %83 = call ptr @_ZNSt3mapIllSt4lessIlESaISt4pairIKllEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %82) #4
  %84 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %13, i32 0, i32 0
  store ptr %83, ptr %84, align 8
  br label %85

85:                                               ; preds = %100, %78
  %86 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKllEES5_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  br i1 %86, label %88, label %87

87:                                               ; preds = %85
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %106

88:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %89 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKllEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  store ptr %89, ptr %14, align 8, !tbaa !14
  %90 = load ptr, ptr %14, align 8, !tbaa !14
  %91 = getelementptr inbounds %"struct.std::pair", ptr %90, i32 0, i32 1
  %92 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %91)
          to label %93 unwind label %102

93:                                               ; preds = %88
  %94 = load i64, ptr %92, align 8, !tbaa !9
  %95 = load ptr, ptr %14, align 8, !tbaa !14
  %96 = getelementptr inbounds %"struct.std::pair", ptr %95, i32 0, i32 1
  store i64 %94, ptr %96, align 8, !tbaa !16
  %97 = load ptr, ptr %14, align 8, !tbaa !14
  %98 = getelementptr inbounds %"struct.std::pair", ptr %97, i32 0, i32 1
  %99 = load i64, ptr %98, align 8, !tbaa !16
  store i64 %99, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %100

100:                                              ; preds = %93
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKllEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  br label %85

102:                                              ; preds = %88
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %8, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %196

106:                                              ; preds = %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store i64 0, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %107 = load i32, ptr @N, align 4, !tbaa !5
  %108 = load i32, ptr %2, align 4, !tbaa !5
  %109 = sub nsw i32 %107, %108
  store i32 %109, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %110

110:                                              ; preds = %186, %106
  %111 = load i32, ptr %17, align 4, !tbaa !5
  %112 = load i32, ptr %16, align 4, !tbaa !5
  %113 = shl i32 1, %112
  %114 = icmp slt i32 %111, %113
  br i1 %114, label %116, label %115

115:                                              ; preds = %110
  store i32 10, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %194

116:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  store i64 0, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  store i64 0, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %117

117:                                              ; preds = %148, %116
  %118 = load i32, ptr %20, align 4, !tbaa !5
  %119 = load i32, ptr %16, align 4, !tbaa !5
  %120 = icmp slt i32 %118, %119
  br i1 %120, label %122, label %121

121:                                              ; preds = %117
  store i32 13, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %151

122:                                              ; preds = %117
  %123 = load i32, ptr %17, align 4, !tbaa !5
  %124 = load i32, ptr %20, align 4, !tbaa !5
  %125 = ashr i32 %123, %124
  %126 = and i32 %125, 1
  %127 = icmp ne i32 %126, 0
  br i1 %127, label %128, label %147

128:                                              ; preds = %122
  %129 = load i32, ptr %2, align 4, !tbaa !5
  %130 = load i32, ptr %20, align 4, !tbaa !5
  %131 = add nsw i32 %129, %130
  %132 = sext i32 %131 to i64
  %133 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vs, i64 noundef %132) #4
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = load i64, ptr %18, align 8, !tbaa !9
  %137 = add nsw i64 %136, %135
  store i64 %137, ptr %18, align 8, !tbaa !9
  %138 = load i32, ptr %2, align 4, !tbaa !5
  %139 = load i32, ptr %20, align 4, !tbaa !5
  %140 = add nsw i32 %138, %139
  %141 = sext i32 %140 to i64
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @cs, i64 noundef %141) #4
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = load i64, ptr %19, align 8, !tbaa !9
  %146 = add nsw i64 %145, %144
  store i64 %146, ptr %19, align 8, !tbaa !9
  br label %147

147:                                              ; preds = %128, %122
  br label %148

148:                                              ; preds = %147
  %149 = load i32, ptr %20, align 4, !tbaa !5
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %20, align 4, !tbaa !5
  br label %117, !llvm.loop !18

151:                                              ; preds = %121
  %152 = load i64, ptr %19, align 8, !tbaa !9
  %153 = load i32, ptr @W, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = icmp sgt i64 %152, %154
  br i1 %155, label %156, label %157

156:                                              ; preds = %151
  store i32 12, ptr %4, align 4
  br label %183

157:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %158 = load i32, ptr @W, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = load i64, ptr %19, align 8, !tbaa !9
  %161 = sub nsw i64 %159, %160
  store i64 %161, ptr %22, align 8, !tbaa !9
  %162 = invoke ptr @_ZNSt3mapIllSt4lessIlESaISt4pairIKllEEE11upper_boundERS3_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %163 unwind label %175

163:                                              ; preds = %157
  %164 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %21, i32 0, i32 0
  store ptr %162, ptr %164, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %165 = call ptr @_ZNSt3mapIllSt4lessIlESaISt4pairIKllEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #4
  %166 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %23, i32 0, i32 0
  store ptr %165, ptr %166, align 8
  %167 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKllEES5_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  br i1 %167, label %168, label %179

168:                                              ; preds = %163
  %169 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKllEEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #4
  %170 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKllEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #4
  %171 = getelementptr inbounds %"struct.std::pair", ptr %170, i32 0, i32 1
  %172 = load i64, ptr %171, align 8, !tbaa !16
  %173 = load i64, ptr %18, align 8, !tbaa !9
  %174 = add nsw i64 %173, %172
  store i64 %174, ptr %18, align 8, !tbaa !9
  br label %179

175:                                              ; preds = %157
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %8, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  br label %193

179:                                              ; preds = %168, %163
  %180 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %181 unwind label %189

181:                                              ; preds = %179
  %182 = load i64, ptr %180, align 8, !tbaa !9
  store i64 %182, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  store i32 0, ptr %4, align 4
  br label %183

183:                                              ; preds = %181, %156
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  %184 = load i32, ptr %4, align 4
  switch i32 %184, label %202 [
    i32 0, label %185
    i32 12, label %186
  ]

185:                                              ; preds = %183
  br label %186

186:                                              ; preds = %185, %183
  %187 = load i32, ptr %17, align 4, !tbaa !5
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %17, align 4, !tbaa !5
  br label %110, !llvm.loop !19

189:                                              ; preds = %179
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %8, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %9, align 4
  br label %193

193:                                              ; preds = %189, %175
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %196

194:                                              ; preds = %115
  %195 = load i64, ptr %15, align 8, !tbaa !9
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  call void @_ZNSt3mapIllSt4lessIlESaISt4pairIKllEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %1) #4
  ret i64 %195

196:                                              ; preds = %193, %102, %74
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  call void @_ZNSt3mapIllSt4lessIlESaISt4pairIKllEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %1) #4
  br label %197

197:                                              ; preds = %196
  %198 = load ptr, ptr %8, align 8
  %199 = load i32, ptr %9, align 4
  %200 = insertvalue { ptr, i32 } poison, ptr %198, 0
  %201 = insertvalue { ptr, i32 } %200, i32 %199, 1
  resume { ptr, i32 } %201

202:                                              ; preds = %183
  unreachable
}

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!17, !10, i64 8}
!17 = !{!"_ZTSSt4pairIKllE", !10, i64 0, !10, i64 8}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}


; 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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long, std::pair<const long, long>, std::_Select1st<std::pair<const long, long>>, std::less<long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long, std::pair<const long, long>, std::_Select1st<std::pair<const long, long>>, std::less<long>>::_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_iterator" = type { ptr }

@N = external dso_local local_unnamed_addr global i32, align 4
@W = external dso_local local_unnamed_addr global i32, align 4
@vs = external dso_local global %"class.std::vector", align 8
@cs = external dso_local global %"class.std::vector", align 8

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z6solve1v() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::map", align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %6 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %10 = alloca i64, align 8
  %11 = alloca %"struct.std::_Rb_tree_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #5
  call void @_ZNSt3mapIllSt4lessIlESaISt4pairIKllEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #5
  %12 = load i32, ptr @N, align 4, !tbaa !5
  %13 = sdiv i32 %12, 2
  %14 = and i32 %12, -2
  %.not54 = icmp eq i32 %14, 62
  br i1 %.not54, label %._crit_edge44, label %.lr.ph43

.lr.ph43:                                         ; preds = %0
  %15 = shl nuw i32 1, %13
  %16 = icmp sgt i32 %12, 1
  %smax59 = call i32 @llvm.smax.i32(i32 %15, i32 1)
  br i1 %16, label %.lr.ph.us.preheader, label %.lr.ph43.split

.lr.ph.us.preheader:                              ; preds = %.lr.ph43
  %wide.trip.count = zext nneg i32 %13 to i64
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %21
  %.03441.us = phi i32 [ %22, %21 ], [ 0, %.lr.ph.us.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  store i64 0, ptr %2, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store i64 0, ptr %3, align 8, !tbaa !9
  br label %23

17:                                               ; preds = %._crit_edge.us
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %19 = load i64, ptr %18, align 8, !tbaa !9
  %20 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIllSt4lessIlESaISt4pairIKllEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %21 unwind label %.split.us

21:                                               ; preds = %17
  store i64 %19, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  %22 = add nuw nsw i32 %.03441.us, 1
  %exitcond60.not = icmp eq i32 %22, %smax59
  br i1 %exitcond60.not, label %._crit_edge44, label %.lr.ph.us, !llvm.loop !11

23:                                               ; preds = %.lr.ph.us, %38
  %indvars.iv = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next, %38 ]
  %24 = trunc nuw nsw i64 %indvars.iv to i32
  %25 = shl nuw i32 1, %24
  %26 = and i32 %25, %.03441.us
  %.not39.us = icmp eq i32 %26, 0
  br i1 %.not39.us, label %38, label %27

27:                                               ; preds = %23
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vs, i64 noundef %indvars.iv) #5
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = load i64, ptr %2, align 8, !tbaa !9
  %32 = add nsw i64 %31, %30
  store i64 %32, ptr %2, align 8, !tbaa !9
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @cs, i64 noundef %indvars.iv) #5
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = load i64, ptr %3, align 8, !tbaa !9
  %37 = add nsw i64 %36, %35
  store i64 %37, ptr %3, align 8, !tbaa !9
  br label %38

38:                                               ; preds = %27, %23
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond58.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond58.not, label %._crit_edge.us, label %23, !llvm.loop !13

._crit_edge.us:                                   ; preds = %38
  %39 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIllSt4lessIlESaISt4pairIKllEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %17 unwind label %.split.us

.split.us:                                        ; preds = %17, %._crit_edge.us
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %52

._crit_edge44:                                    ; preds = %49, %21, %0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  store i64 0, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %41 = call ptr @_ZNSt3mapIllSt4lessIlESaISt4pairIKllEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #5
  store ptr %41, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %42 = call ptr @_ZNSt3mapIllSt4lessIlESaISt4pairIKllEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #5
  store ptr %42, ptr %6, align 8
  %43 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKllEES5_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %43, label %.lr.ph, label %._crit_edge

.lr.ph43.split:                                   ; preds = %.lr.ph43, %49
  %.03441 = phi i32 [ %50, %49 ], [ 0, %.lr.ph43 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  store i64 0, ptr %2, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store i64 0, ptr %3, align 8, !tbaa !9
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIllSt4lessIlESaISt4pairIKllEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %45 unwind label %.split

45:                                               ; preds = %.lr.ph43.split
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %47 = load i64, ptr %46, align 8, !tbaa !9
  %48 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIllSt4lessIlESaISt4pairIKllEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %49 unwind label %.split

49:                                               ; preds = %45
  store i64 %47, ptr %48, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  %50 = add nuw nsw i32 %.03441, 1
  %exitcond.not = icmp eq i32 %50, %smax59
  br i1 %exitcond.not, label %._crit_edge44, label %.lr.ph43.split, !llvm.loop !11

.split:                                           ; preds = %45, %.lr.ph43.split
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %52

52:                                               ; preds = %.split.us, %.split
  %.us-phi = phi { ptr, i32 } [ %51, %.split ], [ %40, %.split.us ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  br label %104

._crit_edge:                                      ; preds = %.lr.ph, %._crit_edge44
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  store i64 0, ptr %7, align 8, !tbaa !9
  %53 = load i32, ptr @N, align 4, !tbaa !5
  %54 = sub nsw i32 %53, %13
  %.not55 = icmp eq i32 %54, 31
  br i1 %.not55, label %._crit_edge53, label %.lr.ph52

.lr.ph52:                                         ; preds = %._crit_edge
  %55 = shl nuw nsw i32 1, %54
  %56 = icmp sgt i32 %54, 0
  %57 = sext i32 %13 to i64
  %wide.trip.count64 = zext nneg i32 %54 to i64
  br label %65

.lr.ph:                                           ; preds = %._crit_edge44, %.lr.ph
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKllEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %59 = getelementptr inbounds i8, ptr %58, i64 8
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %59)
  %61 = load i64, ptr %60, align 8, !tbaa !9
  store i64 %61, ptr %59, align 8, !tbaa !14
  store i64 %61, ptr %4, align 8, !tbaa !9
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKllEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %63 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKllEES5_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %63, label %.lr.ph, label %._crit_edge

._crit_edge53.loopexit:                           ; preds = %102
  %.pre = load i64, ptr %7, align 8, !tbaa !9
  br label %._crit_edge53

._crit_edge53:                                    ; preds = %._crit_edge53.loopexit, %._crit_edge
  %64 = phi i64 [ %.pre, %._crit_edge53.loopexit ], [ 0, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @_ZNSt3mapIllSt4lessIlESaISt4pairIKllEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #5
  ret i64 %64

65:                                               ; preds = %.lr.ph52, %102
  %.03350 = phi i32 [ 0, %.lr.ph52 ], [ %103, %102 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  store i64 0, ptr %8, align 8, !tbaa !9
  br i1 %56, label %.lr.ph48, label %._crit_edge49

._crit_edge49:                                    ; preds = %83, %65
  %.032.lcssa = phi i64 [ 0, %65 ], [ %.1, %83 ]
  %66 = load i32, ptr @W, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = icmp sgt i64 %.032.lcssa, %67
  br i1 %68, label %102, label %84

.lr.ph48:                                         ; preds = %65, %83
  %indvars.iv61 = phi i64 [ %indvars.iv.next62, %83 ], [ 0, %65 ]
  %.03245 = phi i64 [ %.1, %83 ], [ 0, %65 ]
  %69 = trunc nuw nsw i64 %indvars.iv61 to i32
  %70 = shl nuw i32 1, %69
  %71 = and i32 %70, %.03350
  %.not = icmp eq i32 %71, 0
  br i1 %.not, label %83, label %72

72:                                               ; preds = %.lr.ph48
  %73 = add nsw i64 %indvars.iv61, %57
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vs, i64 noundef %73) #5
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = load i64, ptr %8, align 8, !tbaa !9
  %78 = add nsw i64 %77, %76
  store i64 %78, ptr %8, align 8, !tbaa !9
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @cs, i64 noundef %73) #5
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = add nsw i64 %.03245, %81
  br label %83

83:                                               ; preds = %.lr.ph48, %72
  %.1 = phi i64 [ %82, %72 ], [ %.03245, %.lr.ph48 ]
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %exitcond65.not = icmp eq i64 %indvars.iv.next62, %wide.trip.count64
  br i1 %exitcond65.not, label %._crit_edge49, label %.lr.ph48, !llvm.loop !16

84:                                               ; preds = %._crit_edge49
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %85 = sub nsw i64 %67, %.032.lcssa
  store i64 %85, ptr %10, align 8, !tbaa !9
  %86 = invoke ptr @_ZNSt3mapIllSt4lessIlESaISt4pairIKllEEE11upper_boundERS3_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %87 unwind label %97

87:                                               ; preds = %84
  store ptr %86, ptr %9, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %88 = call ptr @_ZNSt3mapIllSt4lessIlESaISt4pairIKllEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #5
  store ptr %88, ptr %11, align 8
  %89 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKllEES5_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  br i1 %89, label %90, label %99

90:                                               ; preds = %87
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKllEEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  %92 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKllEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  %93 = getelementptr inbounds i8, ptr %92, i64 8
  %94 = load i64, ptr %93, align 8, !tbaa !14
  %95 = load i64, ptr %8, align 8, !tbaa !9
  %96 = add nsw i64 %95, %94
  store i64 %96, ptr %8, align 8, !tbaa !9
  br label %99

97:                                               ; preds = %84
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br label %104

99:                                               ; preds = %90, %87
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %101 = load i64, ptr %100, align 8, !tbaa !9
  store i64 %101, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %102

102:                                              ; preds = %._crit_edge49, %99
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  %103 = add nuw nsw i32 %.03350, 1
  %exitcond67.not = icmp eq i32 %103, %55
  br i1 %exitcond67.not, label %._crit_edge53.loopexit, label %65, !llvm.loop !17

104:                                              ; preds = %97, %52
  %.pn = phi { ptr, i32 } [ %.us-phi, %52 ], [ %98, %97 ]
  call void @_ZNSt3mapIllSt4lessIlESaISt4pairIKllEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn
}

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !10, i64 8}
!15 = !{!"_ZTSSt4pairIKllE", !10, i64 0, !10, i64 8}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


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