; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2016-17/Open 2017/Silver/17 Open S3.ll (Z5floodv)

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

%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>>::_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::map" = type { %"class.std::_Rb_tree.3" }
%"class.std::_Rb_tree.3" = type { %"struct.std::_Rb_tree<char, std::pair<const char, int>, std::_Select1st<std::pair<const char, int>>, std::less<char>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<char, std::pair<const char, int>, std::_Select1st<std::pair<const char, int>>, std::less<char>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = 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 }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair.12" = type { i8, i32 }

@grid = external dso_local global [20 x [20 x i8]], align 16
@comp = external dso_local global [20 x [20 x i32]], align 16
@x1 = external dso_local global i32, align 4
@x2 = external dso_local global i32, align 4
@y11 = external dso_local global i32, align 4
@y2 = external dso_local global i32, align 4

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

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

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

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

18:                                               ; preds = %65, %0
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = load i32, ptr @x2, align 4, !tbaa !5
  %21 = add nsw i32 %20, 1
  %22 = icmp slt i32 %19, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %18
  store i32 2, ptr %5, align 4
  br label %68

24:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %25 = load i32, ptr @y11, align 4, !tbaa !5
  store i32 %25, ptr %6, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %59, %24
  %27 = load i32, ptr %6, align 4, !tbaa !5
  %28 = load i32, ptr @y2, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  %30 = icmp slt i32 %27, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %26
  store i32 5, ptr %5, align 4
  br label %62

32:                                               ; preds = %26
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [20 x [20 x i32]], ptr @comp, i64 0, i64 %34
  %36 = load i32, ptr %6, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [20 x i32], ptr %35, i64 0, i64 %37
  store i32 0, ptr %38, align 4, !tbaa !5
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [20 x [20 x i8]], ptr @grid, i64 0, i64 %40
  %42 = load i32, ptr %6, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [20 x i8], ptr %41, i64 0, i64 %43
  %45 = invoke { ptr, i8 } @_ZNSt3setIcSt4lessIcESaIcEE6insertERKc(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 1 dereferenceable(1) %44)
          to label %46 unwind label %54

46:                                               ; preds = %32
  %47 = getelementptr inbounds { ptr, i8 }, ptr %9, i32 0, i32 0
  %48 = extractvalue { ptr, i8 } %45, 0
  store ptr %48, ptr %47, align 8
  %49 = getelementptr inbounds { ptr, i8 }, ptr %9, i32 0, i32 1
  %50 = extractvalue { ptr, i8 } %45, 1
  store i8 %50, ptr %49, align 8
  %51 = call noundef i64 @_ZNKSt3setIcSt4lessIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #5
  %52 = icmp ugt i64 %51, 2
  br i1 %52, label %53, label %58

53:                                               ; preds = %46
  store i1 false, ptr %1, align 1
  store i32 1, ptr %5, align 4
  br label %62

54:                                               ; preds = %32
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %7, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %168

58:                                               ; preds = %46
  br label %59

59:                                               ; preds = %58
  %60 = load i32, ptr %6, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %6, align 4, !tbaa !5
  br label %26, !llvm.loop !9

62:                                               ; preds = %53, %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %63 = load i32, ptr %5, align 4
  switch i32 %63, label %68 [
    i32 5, label %64
  ]

64:                                               ; preds = %62
  br label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %4, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %4, align 4, !tbaa !5
  br label %18, !llvm.loop !11

68:                                               ; preds = %62, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  %69 = load i32, ptr %5, align 4
  switch i32 %69, label %166 [
    i32 2, label %70
  ]

70:                                               ; preds = %68
  %71 = call noundef i64 @_ZNKSt3setIcSt4lessIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #5
  %72 = icmp eq i64 %71, 1
  br i1 %72, label %73, label %74

73:                                               ; preds = %70
  store i1 false, ptr %1, align 1
  store i32 1, ptr %5, align 4
  br label %166

74:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %75 = load i32, ptr @x1, align 4, !tbaa !5
  store i32 %75, ptr %10, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %122, %74
  %77 = load i32, ptr %10, align 4, !tbaa !5
  %78 = load i32, ptr @x2, align 4, !tbaa !5
  %79 = add nsw i32 %78, 1
  %80 = icmp slt i32 %77, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %76
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %125

82:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %83 = load i32, ptr @y11, align 4, !tbaa !5
  store i32 %83, ptr %11, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %118, %82
  %85 = load i32, ptr %11, align 4, !tbaa !5
  %86 = load i32, ptr @y2, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  %88 = icmp slt i32 %85, %87
  br i1 %88, label %90, label %89

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

90:                                               ; preds = %84
  %91 = load i32, ptr %10, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [20 x [20 x i32]], ptr @comp, i64 0, i64 %92
  %94 = load i32, ptr %11, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [20 x i32], ptr %93, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = icmp eq i32 %97, 0
  br i1 %98, label %99, label %117

99:                                               ; preds = %90
  %100 = load i32, ptr %10, align 4, !tbaa !5
  %101 = load i32, ptr %11, align 4, !tbaa !5
  invoke void @_Z3runii(i32 noundef %100, i32 noundef %101)
          to label %102 unwind label %113

102:                                              ; preds = %99
  %103 = load i32, ptr %10, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [20 x [20 x i8]], ptr @grid, i64 0, i64 %104
  %106 = load i32, ptr %11, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [20 x i8], ptr %105, i64 0, i64 %107
  %109 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 1 dereferenceable(1) %108)
          to label %110 unwind label %113

110:                                              ; preds = %102
  %111 = load i32, ptr %109, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %109, align 4, !tbaa !5
  br label %117

113:                                              ; preds = %102, %99
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %7, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %168

117:                                              ; preds = %110, %90
  br label %118

118:                                              ; preds = %117
  %119 = load i32, ptr %11, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %11, align 4, !tbaa !5
  br label %84, !llvm.loop !12

121:                                              ; preds = %89
  br label %122

122:                                              ; preds = %121
  %123 = load i32, ptr %10, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %10, align 4, !tbaa !5
  br label %76, !llvm.loop !13

125:                                              ; preds = %81
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #5
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store ptr %3, ptr %13, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %126 = load ptr, ptr %13, align 8, !tbaa !14
  %127 = call ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %126) #5
  %128 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %14, i32 0, i32 0
  store ptr %127, ptr %128, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %129 = load ptr, ptr %13, align 8, !tbaa !14
  %130 = call ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %129) #5
  %131 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %15, i32 0, i32 0
  store ptr %130, ptr %131, align 8
  br label %132

132:                                              ; preds = %139, %125
  %133 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKciEES5_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  br i1 %133, label %135, label %134

134:                                              ; preds = %132
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %145

135:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %136 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKciEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %136, i64 8, i1 false)
  %137 = getelementptr inbounds %"struct.std::pair.12", ptr %16, i32 0, i32 1
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 4 dereferenceable(4) %137)
          to label %138 unwind label %141

138:                                              ; preds = %135
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %139

139:                                              ; preds = %138
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKciEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br label %132

141:                                              ; preds = %135
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %7, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  br label %168

145:                                              ; preds = %134
  %146 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 0) #5
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 1) #5
  %149 = load i32, ptr %148, align 4, !tbaa !5
  %150 = icmp sgt i32 %147, %149
  br i1 %150, label %151, label %154

151:                                              ; preds = %145
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 0) #5
  %153 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 1) #5
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %152, ptr noundef nonnull align 4 dereferenceable(4) %153) #5
  br label %154

154:                                              ; preds = %151, %145
  %155 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 0) #5
  %156 = load i32, ptr %155, align 4, !tbaa !5
  %157 = icmp sgt i32 %156, 1
  br i1 %157, label %158, label %159

158:                                              ; preds = %154
  store i1 false, ptr %1, align 1
  store i32 1, ptr %5, align 4
  br label %165

159:                                              ; preds = %154
  %160 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 1) #5
  %161 = load i32, ptr %160, align 4, !tbaa !5
  %162 = icmp eq i32 %161, 1
  br i1 %162, label %163, label %164

163:                                              ; preds = %159
  store i1 false, ptr %1, align 1
  store i32 1, ptr %5, align 4
  br label %165

164:                                              ; preds = %159
  store i1 true, ptr %1, align 1
  store i32 1, ptr %5, align 4
  br label %165

165:                                              ; preds = %164, %163, %158
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  br label %166

166:                                              ; preds = %165, %73, %68
  call void @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #5
  call void @_ZNSt3setIcSt4lessIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %2) #5
  %167 = load i1, ptr %1, align 1
  ret i1 %167

168:                                              ; preds = %141, %113, %54
  call void @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #5
  call void @_ZNSt3setIcSt4lessIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %2) #5
  br label %169

169:                                              ; preds = %168
  %170 = load ptr, ptr %7, align 8
  %171 = load i32, ptr %8, align 4
  %172 = insertvalue { ptr, i32 } poison, ptr %170, 0
  %173 = insertvalue { ptr, i32 } %172, i32 %171, 1
  resume { ptr, i32 } %173
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKciEES5_(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 4 dereferenceable(8) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKciEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKciEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIcSt4lessIcESaIcEED2Ev(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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}


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

%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>>::_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::map" = type { %"class.std::_Rb_tree.3" }
%"class.std::_Rb_tree.3" = type { %"struct.std::_Rb_tree<char, std::pair<const char, int>, std::_Select1st<std::pair<const char, int>>, std::less<char>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<char, std::pair<const char, int>, std::_Select1st<std::pair<const char, int>>, std::less<char>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = 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 }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair.12" = type { i8, i32 }

@grid = external dso_local global [20 x [20 x i8]], align 16
@comp = external dso_local local_unnamed_addr global [20 x [20 x i32]], align 16
@x1 = external dso_local local_unnamed_addr global i32, align 4
@x2 = external dso_local local_unnamed_addr global i32, align 4
@y11 = external dso_local local_unnamed_addr global i32, align 4
@y2 = external dso_local local_unnamed_addr global i32, align 4

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z5floodv() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::set", align 8
  %2 = alloca %"class.std::map", align 8
  %3 = alloca %"class.std::vector.7", align 8
  %4 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %5 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %6 = alloca %"struct.std::pair.12", align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #4
  call void @_ZNSt3setIcSt4lessIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #4
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #4
  call void @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #4
  %7 = load i32, ptr @x1, align 4, !tbaa !5
  %8 = load i32, ptr @x2, align 4, !tbaa !5
  %.not41 = icmp sgt i32 %7, %8
  br i1 %.not41, label %.critedge38, label %.lr.ph43

.lr.ph43:                                         ; preds = %0
  %9 = load i32, ptr @y11, align 4, !tbaa !5
  %10 = load i32, ptr @y2, align 4, !tbaa !5
  %11 = icmp sgt i32 %9, %10
  br i1 %11, label %.critedge38, label %.lr.ph43.split.preheader

.lr.ph43.split.preheader:                         ; preds = %.lr.ph43
  %12 = sext i32 %7 to i64
  br label %.lr.ph43.split

.lr.ph43.split:                                   ; preds = %.lr.ph43.split.preheader, %.critedge
  %13 = phi i32 [ %8, %.lr.ph43.split.preheader ], [ %29, %.critedge ]
  %14 = phi i32 [ %10, %.lr.ph43.split.preheader ], [ %30, %.critedge ]
  %indvars.iv58 = phi i64 [ %12, %.lr.ph43.split.preheader ], [ %indvars.iv.next59, %.critedge ]
  %15 = load i32, ptr @y11, align 4, !tbaa !5
  %.not3339 = icmp sgt i32 %15, %14
  br i1 %.not3339, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph43.split
  %16 = sext i32 %15 to i64
  br label %20

17:                                               ; preds = %24
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %18 = load i32, ptr @y2, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %.not33.not = icmp slt i64 %indvars.iv, %19
  br i1 %.not33.not, label %20, label %.critedge.loopexit, !llvm.loop !9

20:                                               ; preds = %.lr.ph, %17
  %indvars.iv = phi i64 [ %16, %.lr.ph ], [ %indvars.iv.next, %17 ]
  %21 = getelementptr inbounds [20 x [20 x i32]], ptr @comp, i64 0, i64 %indvars.iv58, i64 %indvars.iv
  store i32 0, ptr %21, align 4, !tbaa !5
  %22 = getelementptr inbounds [20 x [20 x i8]], ptr @grid, i64 0, i64 %indvars.iv58, i64 %indvars.iv
  %23 = invoke { ptr, i8 } @_ZNSt3setIcSt4lessIcESaIcEE6insertERKc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %24 unwind label %27

24:                                               ; preds = %20
  %25 = call noundef i64 @_ZNKSt3setIcSt4lessIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #4
  %26 = icmp ugt i64 %25, 2
  br i1 %26, label %.loopexit, label %17

27:                                               ; preds = %20
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %98

.critedge.loopexit:                               ; preds = %17
  %.pre = load i32, ptr @x2, align 4, !tbaa !5
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %.lr.ph43.split
  %29 = phi i32 [ %.pre, %.critedge.loopexit ], [ %13, %.lr.ph43.split ]
  %30 = phi i32 [ %18, %.critedge.loopexit ], [ %14, %.lr.ph43.split ]
  %indvars.iv.next59 = add nsw i64 %indvars.iv58, 1
  %31 = sext i32 %29 to i64
  %.not.not = icmp slt i64 %indvars.iv58, %31
  br i1 %.not.not, label %.lr.ph43.split, label %.critedge38, !llvm.loop !11

.critedge38:                                      ; preds = %.critedge, %.lr.ph43, %0
  %32 = call noundef i64 @_ZNKSt3setIcSt4lessIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #4
  %33 = icmp eq i64 %32, 1
  br i1 %33, label %.loopexit, label %34

34:                                               ; preds = %.critedge38
  %35 = load i32, ptr @x1, align 4, !tbaa !5
  %36 = load i32, ptr @x2, align 4, !tbaa !5
  %.not3447 = icmp sgt i32 %35, %36
  br i1 %.not3447, label %._crit_edge51, label %.lr.ph50

.lr.ph50:                                         ; preds = %34
  %37 = load i32, ptr @y11, align 4, !tbaa !5
  %38 = load i32, ptr @y2, align 4, !tbaa !5
  %39 = icmp sgt i32 %37, %38
  br i1 %39, label %._crit_edge51, label %.lr.ph50.split.preheader

.lr.ph50.split.preheader:                         ; preds = %.lr.ph50
  %40 = sext i32 %35 to i64
  br label %.lr.ph50.split

._crit_edge51:                                    ; preds = %._crit_edge, %.lr.ph50, %34
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %41 = call ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #4
  store ptr %41, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %42 = call ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #4
  store ptr %42, ptr %5, align 8
  %43 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKciEES5_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  br i1 %43, label %.lr.ph53, label %._crit_edge54

.lr.ph53:                                         ; preds = %._crit_edge51
  %44 = getelementptr inbounds i8, ptr %6, i64 4
  br label %78

.lr.ph50.split:                                   ; preds = %.lr.ph50.split.preheader, %._crit_edge
  %45 = phi i32 [ %36, %.lr.ph50.split.preheader ], [ %51, %._crit_edge ]
  %46 = phi i32 [ %38, %.lr.ph50.split.preheader ], [ %52, %._crit_edge ]
  %47 = phi i32 [ %38, %.lr.ph50.split.preheader ], [ %53, %._crit_edge ]
  %indvars.iv64 = phi i64 [ %40, %.lr.ph50.split.preheader ], [ %indvars.iv.next65, %._crit_edge ]
  %48 = load i32, ptr @y11, align 4, !tbaa !5
  %.not3544 = icmp sgt i32 %48, %47
  br i1 %.not3544, label %._crit_edge, label %.lr.ph46

.lr.ph46:                                         ; preds = %.lr.ph50.split
  %49 = sext i32 %48 to i64
  %50 = trunc nsw i64 %indvars.iv64 to i32
  br label %55

._crit_edge.loopexit:                             ; preds = %70
  %.pre68 = load i32, ptr @x2, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph50.split
  %51 = phi i32 [ %.pre68, %._crit_edge.loopexit ], [ %45, %.lr.ph50.split ]
  %52 = phi i32 [ %71, %._crit_edge.loopexit ], [ %46, %.lr.ph50.split ]
  %53 = phi i32 [ %71, %._crit_edge.loopexit ], [ %47, %.lr.ph50.split ]
  %indvars.iv.next65 = add nsw i64 %indvars.iv64, 1
  %54 = sext i32 %51 to i64
  %.not34.not = icmp slt i64 %indvars.iv64, %54
  br i1 %.not34.not, label %.lr.ph50.split, label %._crit_edge51, !llvm.loop !13

55:                                               ; preds = %.lr.ph46, %70
  %56 = phi i32 [ %46, %.lr.ph46 ], [ %71, %70 ]
  %indvars.iv61 = phi i64 [ %49, %.lr.ph46 ], [ %indvars.iv.next62, %70 ]
  %57 = getelementptr inbounds [20 x [20 x i32]], ptr @comp, i64 0, i64 %indvars.iv64, i64 %indvars.iv61
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = icmp eq i32 %58, 0
  br i1 %59, label %60, label %70

60:                                               ; preds = %55
  %61 = trunc nsw i64 %indvars.iv61 to i32
  invoke void @_Z3runii(i32 noundef %50, i32 noundef %61)
          to label %62 unwind label %68

62:                                               ; preds = %60
  %63 = getelementptr inbounds [20 x [20 x i8]], ptr @grid, i64 0, i64 %indvars.iv64, i64 %indvars.iv61
  %64 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 1 dereferenceable(1) %63)
          to label %65 unwind label %68

65:                                               ; preds = %62
  %66 = load i32, ptr %64, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %64, align 4, !tbaa !5
  %.pre67 = load i32, ptr @y2, align 4, !tbaa !5
  br label %70

68:                                               ; preds = %62, %60
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %98

70:                                               ; preds = %55, %65
  %71 = phi i32 [ %56, %55 ], [ %.pre67, %65 ]
  %indvars.iv.next62 = add nsw i64 %indvars.iv61, 1
  %72 = sext i32 %71 to i64
  %.not35.not = icmp slt i64 %indvars.iv61, %72
  br i1 %.not35.not, label %55, label %._crit_edge.loopexit, !llvm.loop !14

._crit_edge54:                                    ; preds = %81, %._crit_edge51
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #4
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 1) #4
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = icmp sgt i32 %74, %76
  br i1 %77, label %86, label %89

78:                                               ; preds = %.lr.ph53, %81
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %79 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKciEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %80 = load i64, ptr %79, align 4
  store i64 %80, ptr %6, align 8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %44)
          to label %81 unwind label %84

81:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKciEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %83 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKciEES5_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  br i1 %83, label %78, label %._crit_edge54

84:                                               ; preds = %78
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  br label %98

86:                                               ; preds = %._crit_edge54
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #4
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 1) #4
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %87, ptr noundef nonnull align 4 dereferenceable(4) %88) #4
  br label %89

89:                                               ; preds = %86, %._crit_edge54
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #4
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = icmp sgt i32 %91, 1
  br i1 %92, label %97, label %93

93:                                               ; preds = %89
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 1) #4
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = icmp ne i32 %95, 1
  br label %97

97:                                               ; preds = %93, %89
  %.3 = phi i1 [ false, %89 ], [ %96, %93 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  br label %.loopexit

.loopexit:                                        ; preds = %24, %.critedge38, %97
  %.4 = phi i1 [ %.3, %97 ], [ false, %.critedge38 ], [ false, %24 ]
  call void @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #4
  call void @_ZNSt3setIcSt4lessIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #4
  ret i1 %.4

98:                                               ; preds = %84, %68, %27
  %.pn = phi { ptr, i32 } [ %69, %68 ], [ %85, %84 ], [ %28, %27 ]
  call void @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #4
  call void @_ZNSt3setIcSt4lessIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #4
  resume { ptr, i32 } %.pn
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKciEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIcSt4lessIcESaIcEED2Ev(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 = { 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 = { 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}
!12 = !{!"llvm.loop.unswitch.partial.disable"}
!13 = distinct !{!13, !10, !12}
!14 = distinct !{!14, !10}


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