; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2007-08/bales.ll (Z2oki)

; 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<std::array<int, 3>, std::allocator<std::array<int, 3>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::array<int, 3>, std::allocator<std::array<int, 3>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::array<int, 3>, std::allocator<std::array<int, 3>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::array<int, 3>, std::allocator<std::array<int, 3>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::reverse_iterator" = type { %"class.__gnu_cxx::__normal_iterator" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::pair" = type { i32, i32 }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair.11" = type { i32, i32 }

@v = external dso_local global %"class.std::vector", align 8
@bad = external dso_local global %"class.std::map", align 8
@_ZL3MOD = external hidden constant i32, align 4

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7processii(i32 noundef, i32 noundef) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5ckmaxIiEvRT_S0_(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #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) #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt4prevISt17_Rb_tree_iteratorISt4pairIKiiEEET_S5_NSt15iterator_traitsIS5_E15difference_typeE(ptr, i64 noundef) #4

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z2oki(i32 noundef %0) #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::reverse_iterator", align 8
  %9 = alloca %"class.std::reverse_iterator", align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::pair", align 4
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %16 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %17 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %18 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %19 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) @bad) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #5
  call void @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %30, %1
  %21 = load i32, ptr %5, align 4, !tbaa !5
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = icmp slt i32 %21, %22
  br i1 %23, label %25, label %24

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

25:                                               ; preds = %20
  %26 = load i32, ptr %5, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %27) #5
  invoke void @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(12) %28)
          to label %29 unwind label %33

29:                                               ; preds = %25
  br label %30

30:                                               ; preds = %29
  %31 = load i32, ptr %5, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %5, align 4, !tbaa !5
  br label %20, !llvm.loop !9

33:                                               ; preds = %25
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %6, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %172

37:                                               ; preds = %24
  call void @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EE6rbeginEv(ptr dead_on_unwind writable sret(%"class.std::reverse_iterator") align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EE4rendEv(ptr dead_on_unwind writable sret(%"class.std::reverse_iterator") align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  invoke void @_ZSt4sortISt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIPSt5arrayIiLm3EESt6vectorIS4_SaIS4_EEEEEEvT_SB_(ptr noundef %8, ptr noundef %9)
          to label %38 unwind label %45

38:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %164, %38
  %40 = load i32, ptr %10, align 4, !tbaa !5
  %41 = call noundef i64 @_ZNKSt6vectorISt5arrayIiLm3EESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %42 = trunc i64 %41 to i32
  %43 = icmp slt i32 %40, %42
  br i1 %43, label %49, label %44

44:                                               ; preds = %39
  store i32 5, ptr %11, align 4
  br label %167

45:                                               ; preds = %37
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %6, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %7, align 4
  br label %172

49:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %50 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %50, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 -1000000007, ptr %14, align 4, !tbaa !5
  invoke void @_ZNSt4pairIiiEC2IiRKiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) @_ZL3MOD)
          to label %51 unwind label %88

51:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %52

52:                                               ; preds = %85, %51
  %53 = load i32, ptr %10, align 4, !tbaa !5
  %54 = call noundef i64 @_ZNKSt6vectorISt5arrayIiLm3EESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %55 = trunc i64 %54 to i32
  %56 = icmp slt i32 %53, %55
  br i1 %56, label %57, label %69

57:                                               ; preds = %52
  %58 = load i32, ptr %10, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %59) #5
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %60, i64 noundef 0) #5
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = load i32, ptr %12, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %64) #5
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %65, i64 noundef 0) #5
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = icmp eq i32 %62, %67
  br label %69

69:                                               ; preds = %57, %52
  %70 = phi i1 [ false, %52 ], [ %68, %57 ]
  br i1 %70, label %71, label %96

71:                                               ; preds = %69
  %72 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 0
  %73 = load i32, ptr %10, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %74) #5
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %75, i64 noundef 1) #5
  %77 = load i32, ptr %76, align 4, !tbaa !5
  invoke void @_Z5ckmaxIiEvRT_S0_(ptr noundef nonnull align 4 dereferenceable(4) %72, i32 noundef %77)
          to label %78 unwind label %92

78:                                               ; preds = %71
  %79 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 1
  %80 = load i32, ptr %10, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %81) #5
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %82, i64 noundef 2) #5
  %84 = load i32, ptr %83, align 4, !tbaa !5
  invoke void @_Z5ckminIiEvRT_S0_(ptr noundef nonnull align 4 dereferenceable(4) %79, i32 noundef %84)
          to label %85 unwind label %92

85:                                               ; preds = %78
  %86 = load i32, ptr %10, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %10, align 4, !tbaa !5
  br label %52, !llvm.loop !11

88:                                               ; preds = %49
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %6, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %166

92:                                               ; preds = %78, %71
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %6, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %7, align 4
  br label %166

96:                                               ; preds = %69
  %97 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 0
  %98 = load i32, ptr %97, align 4, !tbaa !12
  %99 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 1
  %100 = load i32, ptr %99, align 4, !tbaa !14
  %101 = icmp sgt i32 %98, %100
  br i1 %101, label %102, label %103

102:                                              ; preds = %96
  store i1 false, ptr %2, align 1
  store i32 1, ptr %11, align 4
  br label %162

103:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %104 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 0
  %105 = invoke ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE11upper_boundERS3_(ptr noundef nonnull align 8 dereferenceable(48) @bad, ptr noundef nonnull align 4 dereferenceable(4) %104)
          to label %106 unwind label %126

106:                                              ; preds = %103
  %107 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %15, i32 0, i32 0
  store ptr %105, ptr %107, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %108 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @bad) #5
  %109 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %16, i32 0, i32 0
  store ptr %108, ptr %109, align 8
  %110 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiiEES5_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  br i1 %110, label %111, label %123

111:                                              ; preds = %106
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %15, i64 8, i1 false), !tbaa.struct !15
  %112 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %18, i32 0, i32 0
  %113 = load ptr, ptr %112, align 8
  %114 = invoke ptr @_ZSt4prevISt17_Rb_tree_iteratorISt4pairIKiiEEET_S5_NSt15iterator_traitsIS5_E15difference_typeE(ptr %113, i64 noundef 1)
          to label %115 unwind label %130

115:                                              ; preds = %111
  %116 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %17, i32 0, i32 0
  store ptr %114, ptr %116, align 8
  %117 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #5
  %118 = getelementptr inbounds %"struct.std::pair.11", ptr %117, i32 0, i32 1
  %119 = load i32, ptr %118, align 4, !tbaa !18
  %120 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 1
  %121 = load i32, ptr %120, align 4, !tbaa !14
  %122 = icmp sge i32 %119, %121
  br label %123

123:                                              ; preds = %115, %106
  %124 = phi i1 [ false, %106 ], [ %122, %115 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br i1 %124, label %125, label %134

125:                                              ; preds = %123
  store i1 false, ptr %2, align 1
  store i32 1, ptr %11, align 4
  br label %161

126:                                              ; preds = %103
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %6, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %7, align 4
  br label %165

130:                                              ; preds = %111
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %6, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %165

134:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %135 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %135, ptr %19, align 4, !tbaa !5
  br label %136

136:                                              ; preds = %153, %134
  %137 = load i32, ptr %19, align 4, !tbaa !5
  %138 = load i32, ptr %10, align 4, !tbaa !5
  %139 = icmp slt i32 %137, %138
  br i1 %139, label %141, label %140

140:                                              ; preds = %136
  store i32 9, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %160

141:                                              ; preds = %136
  %142 = load i32, ptr %19, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %143) #5
  %145 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %144, i64 noundef 1) #5
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = load i32, ptr %19, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %148) #5
  %150 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %149, i64 noundef 2) #5
  %151 = load i32, ptr %150, align 4, !tbaa !5
  invoke void @_Z7processii(i32 noundef %146, i32 noundef %151)
          to label %152 unwind label %156

152:                                              ; preds = %141
  br label %153

153:                                              ; preds = %152
  %154 = load i32, ptr %19, align 4, !tbaa !5
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %19, align 4, !tbaa !5
  br label %136, !llvm.loop !20

156:                                              ; preds = %141
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %6, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %165

160:                                              ; preds = %140
  store i32 0, ptr %11, align 4
  br label %161

161:                                              ; preds = %160, %125
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %162

162:                                              ; preds = %161, %102
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  %163 = load i32, ptr %11, align 4
  switch i32 %163, label %167 [
    i32 0, label %164
  ]

164:                                              ; preds = %162
  br label %39, !llvm.loop !21

165:                                              ; preds = %156, %130, %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %166

166:                                              ; preds = %165, %92, %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %172

167:                                              ; preds = %162, %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  %168 = load i32, ptr %11, align 4
  switch i32 %168, label %170 [
    i32 5, label %169
  ]

169:                                              ; preds = %167
  store i1 true, ptr %2, align 1
  store i32 1, ptr %11, align 4
  br label %170

170:                                              ; preds = %169, %167
  call void @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  %171 = load i1, ptr %2, align 1
  ret i1 %171

172:                                              ; preds = %166, %45, %33
  call void @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  br label %173

173:                                              ; preds = %172
  %174 = load ptr, ptr %6, align 8
  %175 = load i32, ptr %7, align 4
  %176 = insertvalue { ptr, i32 } poison, ptr %174, 0
  %177 = insertvalue { ptr, i32 } %176, i32 %175, 1
  resume { ptr, i32 } %177
}

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12), i64 noundef) #1 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !6, i64 0}
!13 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!14 = !{!13, !6, i64 4}
!15 = !{i64 0, i64 8, !16}
!16 = !{!17, !17, i64 0}
!17 = !{!"any pointer", !7, i64 0}
!18 = !{!19, !6, i64 4}
!19 = !{!"_ZTSSt4pairIKiiE", !6, i64 0, !6, i64 4}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::array<int, 3>, std::allocator<std::array<int, 3>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::array<int, 3>, std::allocator<std::array<int, 3>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::array<int, 3>, std::allocator<std::array<int, 3>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::array<int, 3>, std::allocator<std::array<int, 3>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::reverse_iterator" = type { %"class.__gnu_cxx::__normal_iterator" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::pair" = type { i32, i32 }
%"struct.std::_Rb_tree_iterator" = type { ptr }

@v = external dso_local global %"class.std::vector", align 8
@bad = external dso_local global %"class.std::map", align 8
@_ZL3MOD = external hidden constant i32, align 4

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7processii(i32 noundef, i32 noundef) local_unnamed_addr #2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z2oki(i32 noundef %0) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %"class.std::reverse_iterator", align 8
  %4 = alloca %"class.std::reverse_iterator", align 8
  %5 = alloca %"struct.std::pair", align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %8 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %9 = alloca %"struct.std::_Rb_tree_iterator", align 8
  tail call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) @bad) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #4
  call void @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  %10 = icmp sgt i32 %0, 0
  br i1 %10, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %1
  %wide.trip.count = zext nneg i32 %0 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %15, %1
  call void @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EE6rbeginEv(ptr dead_on_unwind nonnull writable sret(%"class.std::reverse_iterator") align 8 %3, ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EE4rendEv(ptr dead_on_unwind nonnull writable sret(%"class.std::reverse_iterator") align 8 %4, ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  invoke void @_ZSt4sortISt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIPSt5arrayIiLm3EESt6vectorIS4_SaIS4_EEEEEEvT_SB_(ptr noundef nonnull %3, ptr noundef nonnull %4)
          to label %.preheader unwind label %18

.preheader:                                       ; preds = %._crit_edge
  %11 = call noundef i64 @_ZNKSt6vectorISt5arrayIiLm3EESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  %12 = trunc i64 %11 to i32
  %.not3969 = icmp slt i32 %12, 1
  br i1 %.not3969, label %.critedge45, label %.lr.ph72

.lr.ph72:                                         ; preds = %.preheader
  %13 = getelementptr inbounds i8, ptr %5, i64 4
  br label %20

.lr.ph:                                           ; preds = %.lr.ph.preheader, %15
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %15 ]
  %14 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv) #4
  invoke void @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(12) %14)
          to label %15 unwind label %16

15:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !5

16:                                               ; preds = %.lr.ph
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %82

18:                                               ; preds = %._crit_edge
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %82

20:                                               ; preds = %.lr.ph72, %._crit_edge68
  %.03070 = phi i32 [ 0, %.lr.ph72 ], [ %.131.lcssa, %._crit_edge68 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  store i32 -1000000007, ptr %6, align 4, !tbaa !7
  call void @_ZNSt4pairIiiEC2IiRKiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) @_ZL3MOD)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  %21 = call noundef i64 @_ZNKSt6vectorISt5arrayIiLm3EESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  %22 = trunc i64 %21 to i32
  %23 = icmp slt i32 %.03070, %22
  br i1 %23, label %.lr.ph62, label %.critedge

.lr.ph62:                                         ; preds = %20
  %24 = sext i32 %.03070 to i64
  br label %25

25:                                               ; preds = %.lr.ph62, %41
  %indvars.iv81 = phi i64 [ %24, %.lr.ph62 ], [ %indvars.iv.next82, %41 ]
  %26 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv81) #4
  %27 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %26, i64 noundef 0) #4
  %28 = load i32, ptr %27, align 4, !tbaa !7
  %29 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %24) #4
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %29, i64 noundef 0) #4
  %31 = load i32, ptr %30, align 4, !tbaa !7
  %32 = icmp eq i32 %28, %31
  br i1 %32, label %33, label %.critedge.loopexit

33:                                               ; preds = %25
  %34 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv81) #4
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %34, i64 noundef 1) #4
  %36 = load i32, ptr %35, align 4, !tbaa !7
  invoke void @_Z5ckmaxIiEvRT_S0_(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef %36)
          to label %37 unwind label %45

37:                                               ; preds = %33
  %38 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv81) #4
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %38, i64 noundef 2) #4
  %40 = load i32, ptr %39, align 4, !tbaa !7
  invoke void @_Z5ckminIiEvRT_S0_(ptr noundef nonnull align 4 dereferenceable(4) %13, i32 noundef %40)
          to label %41 unwind label %45

41:                                               ; preds = %37
  %indvars.iv.next82 = add nsw i64 %indvars.iv81, 1
  %42 = call noundef i64 @_ZNKSt6vectorISt5arrayIiLm3EESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  %sext = shl i64 %42, 32
  %43 = ashr exact i64 %sext, 32
  %44 = icmp slt i64 %indvars.iv.next82, %43
  br i1 %44, label %25, label %.critedge.loopexit, !llvm.loop !11

45:                                               ; preds = %37, %33
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %81

.critedge.loopexit:                               ; preds = %41, %25
  %.131.lcssa.ph.in = phi i64 [ %indvars.iv81, %25 ], [ %indvars.iv.next82, %41 ]
  %.131.lcssa.ph = trunc i64 %.131.lcssa.ph.in to i32
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %20
  %.131.lcssa = phi i32 [ %.03070, %20 ], [ %.131.lcssa.ph, %.critedge.loopexit ]
  %47 = load i32, ptr %5, align 4, !tbaa !12
  %48 = load i32, ptr %13, align 4, !tbaa !14
  %49 = icmp sgt i32 %47, %48
  br i1 %49, label %.thread, label %50

.thread:                                          ; preds = %.critedge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br label %.critedge45

50:                                               ; preds = %.critedge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %51 = invoke ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE11upper_boundERS3_(ptr noundef nonnull align 8 dereferenceable(48) @bad, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %52 unwind label %62

52:                                               ; preds = %50
  store ptr %51, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %53 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @bad) #4
  store ptr %53, ptr %8, align 8
  %54 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiiEES5_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  br i1 %54, label %55, label %.critedge3

55:                                               ; preds = %52
  %.sroa.0.0.copyload = load ptr, ptr %7, align 8, !tbaa !15
  %56 = invoke ptr @_ZSt4prevISt17_Rb_tree_iteratorISt4pairIKiiEEET_S5_NSt15iterator_traitsIS5_E15difference_typeE(ptr %.sroa.0.0.copyload, i64 noundef 1)
          to label %57 unwind label %64

57:                                               ; preds = %55
  store ptr %56, ptr %9, align 8
  %58 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  %59 = getelementptr inbounds i8, ptr %58, i64 4
  %60 = load i32, ptr %59, align 4, !tbaa !17
  %61 = load i32, ptr %13, align 4, !tbaa !14
  %.not = icmp slt i32 %60, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  br i1 %.not, label %66, label %.thread48

.thread48:                                        ; preds = %57
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br label %.critedge45

62:                                               ; preds = %50
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %80

64:                                               ; preds = %55
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  br label %80

.critedge3:                                       ; preds = %52
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  br label %66

66:                                               ; preds = %.critedge3, %57
  %67 = icmp slt i32 %.03070, %.131.lcssa
  br i1 %67, label %.lr.ph67.preheader, label %._crit_edge68

.lr.ph67.preheader:                               ; preds = %66
  %68 = sext i32 %.03070 to i64
  br label %.lr.ph67

.lr.ph67:                                         ; preds = %.lr.ph67.preheader, %75
  %indvars.iv84 = phi i64 [ %68, %.lr.ph67.preheader ], [ %indvars.iv.next85, %75 ]
  %69 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv84) #4
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %69, i64 noundef 1) #4
  %71 = load i32, ptr %70, align 4, !tbaa !7
  %72 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv84) #4
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12) %72, i64 noundef 2) #4
  %74 = load i32, ptr %73, align 4, !tbaa !7
  invoke void @_Z7processii(i32 noundef %71, i32 noundef %74)
          to label %75 unwind label %76

75:                                               ; preds = %.lr.ph67
  %indvars.iv.next85 = add nsw i64 %indvars.iv84, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next85 to i32
  %exitcond88.not = icmp eq i32 %.131.lcssa, %lftr.wideiv
  br i1 %exitcond88.not, label %._crit_edge68, label %.lr.ph67, !llvm.loop !19

76:                                               ; preds = %.lr.ph67
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %80

._crit_edge68:                                    ; preds = %75, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  %78 = call noundef i64 @_ZNKSt6vectorISt5arrayIiLm3EESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  %79 = trunc i64 %78 to i32
  %.not39.not = icmp slt i32 %.131.lcssa, %79
  br i1 %.not39.not, label %20, label %.critedge45, !llvm.loop !20

80:                                               ; preds = %76, %64, %62
  %.pn = phi { ptr, i32 } [ %77, %76 ], [ %65, %64 ], [ %63, %62 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br label %81

81:                                               ; preds = %80, %45
  %.pn40 = phi { ptr, i32 } [ %46, %45 ], [ %.pn, %80 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br label %82

.critedge45:                                      ; preds = %._crit_edge68, %.preheader, %.thread48, %.thread
  %.not3958 = phi i1 [ false, %.thread48 ], [ false, %.thread ], [ true, %.preheader ], [ true, %._crit_edge68 ]
  call void @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  ret i1 %.not3958

82:                                               ; preds = %81, %18, %16
  %.pn42 = phi { ptr, i32 } [ %17, %16 ], [ %.pn40, %81 ], [ %19, %18 ]
  call void @_ZNSt6vectorISt5arrayIiLm3EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  resume { ptr, i32 } %.pn42
}

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm3EEixEm(ptr noundef nonnull align 4 dereferenceable(12), i64 noundef) local_unnamed_addr #1 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = distinct !{!11, !6}
!12 = !{!13, !8, i64 0}
!13 = !{!"_ZTSSt4pairIiiE", !8, i64 0, !8, i64 4}
!14 = !{!13, !8, i64 4}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !9, i64 0}
!17 = !{!18, !8, i64 4}
!18 = !{!"_ZTSSt4pairIKiiE", !8, i64 0, !8, i64 4}
!19 = distinct !{!19, !6}
!20 = distinct !{!20, !6}


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