; LLVM IR from kazunetakahashi/atcoder :: 2019/1224_xmascon19 (F)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@H = external dso_local global i32, align 4
@W = external dso_local global i32, align 4
@_Z1SB5cxx11 = external dso_local global %"class.std::vector", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [83 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5stampii(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) #3

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #0 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #5 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::set", align 8
  %4 = alloca %"class.std::set", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %15 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %18 = alloca i32, align 4
  %19 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %20 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @H)
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 4 dereferenceable(4) @W)
  %32 = load i32, ptr @H, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %33)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %44, %0
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = load i32, ptr @H, align 4, !tbaa !5
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %47

39:                                               ; preds = %34
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %41) #8
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %42)
  br label %44

44:                                               ; preds = %39
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %2, align 4, !tbaa !5
  br label %34, !llvm.loop !9

47:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 48, ptr %3) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr %4) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %92, %47
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = load i32, ptr @H, align 4, !tbaa !5
  %51 = icmp slt i32 %49, %50
  br i1 %51, label %53, label %52

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

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

54:                                               ; preds = %88, %53
  %55 = load i32, ptr %7, align 4, !tbaa !5
  %56 = load i32, ptr @W, align 4, !tbaa !5
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %59, label %58

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

59:                                               ; preds = %54
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %61) #8
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %62, i64 noundef %64)
          to label %66 unwind label %83

66:                                               ; preds = %59
  %67 = load i8, ptr %65, align 1, !tbaa !11
  %68 = sext i8 %67 to i32
  %69 = icmp eq i32 %68, 46
  br i1 %69, label %70, label %87

70:                                               ; preds = %66
  %71 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %72 unwind label %83

72:                                               ; preds = %70
  %73 = getelementptr inbounds { ptr, i8 }, ptr %10, i32 0, i32 0
  %74 = extractvalue { ptr, i8 } %71, 0
  store ptr %74, ptr %73, align 8
  %75 = getelementptr inbounds { ptr, i8 }, ptr %10, i32 0, i32 1
  %76 = extractvalue { ptr, i8 } %71, 1
  store i8 %76, ptr %75, align 8
  %77 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %78 unwind label %83

78:                                               ; preds = %72
  %79 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 0
  %80 = extractvalue { ptr, i8 } %77, 0
  store ptr %80, ptr %79, align 8
  %81 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 1
  %82 = extractvalue { ptr, i8 } %77, 1
  store i8 %82, ptr %81, align 8
  br label %87

83:                                               ; preds = %72, %70, %59
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %8, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %373

87:                                               ; preds = %78, %66
  br label %88

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

91:                                               ; preds = %58
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %5, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %5, align 4, !tbaa !5
  br label %48, !llvm.loop !13

95:                                               ; preds = %52
  %96 = call noundef zeroext i1 @_ZNKSt3setIiSt4lessIiESaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  br i1 %96, label %97, label %103

97:                                               ; preds = %95
  invoke void @_Z3Yesi(i32 noundef 0)
          to label %98 unwind label %99

98:                                               ; preds = %97
  br label %103

99:                                               ; preds = %97
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %8, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %9, align 4
  br label %373

103:                                              ; preds = %98, %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %104 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  %105 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %12, i32 0, i32 0
  store ptr %104, ptr %105, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %106 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  %107 = load i32, ptr %106, align 4, !tbaa !5
  store i32 %107, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %108 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  %109 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %14, i32 0, i32 0
  store ptr %108, ptr %109, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %14, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  %110 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %12, i32 noundef 0) #8
  %111 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %15, i32 0, i32 0
  store ptr %110, ptr %111, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %112 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  %113 = load i32, ptr %112, align 4, !tbaa !5
  store i32 %113, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %114 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  %115 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %17, i32 0, i32 0
  store ptr %114, ptr %115, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %17, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %116 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  %117 = load i32, ptr %116, align 4, !tbaa !5
  store i32 %117, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %118 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  %119 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %19, i32 0, i32 0
  store ptr %118, ptr %119, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %19, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  %120 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %12, i32 noundef 0) #8
  %121 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %20, i32 0, i32 0
  store ptr %120, ptr %121, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  %122 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  %123 = load i32, ptr %122, align 4, !tbaa !5
  store i32 %123, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %124 = load i32, ptr %16, align 4, !tbaa !5
  %125 = load i32, ptr %13, align 4, !tbaa !5
  %126 = sub nsw i32 %124, %125
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %128 = load i32, ptr %21, align 4, !tbaa !5
  %129 = load i32, ptr %18, align 4, !tbaa !5
  %130 = sub nsw i32 %128, %129
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %23, align 4, !tbaa !5
  %132 = load i32, ptr %22, align 4, !tbaa !5
  %133 = load i32, ptr @H, align 4, !tbaa !5
  %134 = sdiv i32 %133, 2
  %135 = icmp sle i32 %132, %134
  br i1 %135, label %136, label %147

136:                                              ; preds = %103
  %137 = load i32, ptr %23, align 4, !tbaa !5
  %138 = load i32, ptr @W, align 4, !tbaa !5
  %139 = sdiv i32 %138, 2
  %140 = icmp sle i32 %137, %139
  br i1 %140, label %141, label %147

141:                                              ; preds = %136
  invoke void @_Z3Yesi(i32 noundef 1)
          to label %142 unwind label %143

142:                                              ; preds = %141
  br label %147

143:                                              ; preds = %159, %152, %141
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %8, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %9, align 4
  br label %372

147:                                              ; preds = %142, %136, %103
  %148 = load i32, ptr %22, align 4, !tbaa !5
  %149 = load i32, ptr @H, align 4, !tbaa !5
  %150 = sdiv i32 %149, 2
  %151 = icmp sle i32 %148, %150
  br i1 %151, label %152, label %154

152:                                              ; preds = %147
  invoke void @_Z3Yesi(i32 noundef 2)
          to label %153 unwind label %143

153:                                              ; preds = %152
  br label %154

154:                                              ; preds = %153, %147
  %155 = load i32, ptr %23, align 4, !tbaa !5
  %156 = load i32, ptr @W, align 4, !tbaa !5
  %157 = sdiv i32 %156, 2
  %158 = icmp sle i32 %155, %157
  br i1 %158, label %159, label %161

159:                                              ; preds = %154
  invoke void @_Z3Yesi(i32 noundef 2)
          to label %160 unwind label %143

160:                                              ; preds = %159
  br label %161

161:                                              ; preds = %160, %154
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  store i32 0, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %162

162:                                              ; preds = %353, %161
  %163 = load i32, ptr %25, align 4, !tbaa !5
  %164 = load i32, ptr @H, align 4, !tbaa !5
  %165 = load i32, ptr @W, align 4, !tbaa !5
  %166 = add nsw i32 %164, %165
  %167 = sub nsw i32 %166, 1
  %168 = icmp slt i32 %163, %167
  br i1 %168, label %170, label %169

169:                                              ; preds = %162
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %356

170:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  store i32 0, ptr %26, align 4, !tbaa !5
  br label %171

171:                                              ; preds = %348, %170
  %172 = load i32, ptr %26, align 4, !tbaa !5
  %173 = load i32, ptr %25, align 4, !tbaa !5
  %174 = icmp sle i32 %172, %173
  br i1 %174, label %176, label %175

175:                                              ; preds = %171
  store i32 14, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %352

176:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  %177 = load i32, ptr %25, align 4, !tbaa !5
  %178 = load i32, ptr %26, align 4, !tbaa !5
  %179 = sub nsw i32 %177, %178
  store i32 %179, ptr %27, align 4, !tbaa !5
  %180 = load i32, ptr %26, align 4, !tbaa !5
  %181 = load i32, ptr @H, align 4, !tbaa !5
  %182 = icmp slt i32 %180, %181
  br i1 %182, label %183, label %187

183:                                              ; preds = %176
  %184 = load i32, ptr %27, align 4, !tbaa !5
  %185 = load i32, ptr @W, align 4, !tbaa !5
  %186 = icmp slt i32 %184, %185
  br i1 %186, label %188, label %187

187:                                              ; preds = %183, %176
  store i32 16, ptr %6, align 4
  br label %345

188:                                              ; preds = %183
  %189 = load i32, ptr %26, align 4, !tbaa !5
  %190 = icmp sle i32 0, %189
  br i1 %190, label %191, label %223

191:                                              ; preds = %188
  %192 = load i32, ptr %26, align 4, !tbaa !5
  %193 = load i32, ptr @H, align 4, !tbaa !5
  %194 = icmp slt i32 %192, %193
  br i1 %194, label %195, label %223

195:                                              ; preds = %191
  %196 = load i32, ptr %27, align 4, !tbaa !5
  %197 = icmp sle i32 0, %196
  br i1 %197, label %198, label %223

198:                                              ; preds = %195
  %199 = load i32, ptr %27, align 4, !tbaa !5
  %200 = load i32, ptr @W, align 4, !tbaa !5
  %201 = icmp slt i32 %199, %200
  br i1 %201, label %202, label %223

202:                                              ; preds = %198
  %203 = load i32, ptr %26, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %204) #8
  %206 = load i32, ptr %27, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %205, i64 noundef %207)
          to label %209 unwind label %219

209:                                              ; preds = %202
  %210 = load i8, ptr %208, align 1, !tbaa !11
  %211 = sext i8 %210 to i32
  %212 = icmp eq i32 %211, 46
  br i1 %212, label %213, label %223

213:                                              ; preds = %209
  %214 = load i32, ptr %24, align 4, !tbaa !5
  %215 = add nsw i32 %214, 1
  store i32 %215, ptr %24, align 4, !tbaa !5
  %216 = load i32, ptr %26, align 4, !tbaa !5
  %217 = load i32, ptr %27, align 4, !tbaa !5
  invoke void @_Z5stampii(i32 noundef %216, i32 noundef %217)
          to label %218 unwind label %219

218:                                              ; preds = %213
  br label %223

219:                                              ; preds = %213, %202
  %220 = landingpad { ptr, i32 }
          cleanup
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %8, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %9, align 4
  br label %351

223:                                              ; preds = %218, %209, %198, %195, %191, %188
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  %224 = load i32, ptr @H, align 4, !tbaa !5
  %225 = sub nsw i32 %224, 1
  %226 = load i32, ptr %26, align 4, !tbaa !5
  %227 = sub nsw i32 %225, %226
  store i32 %227, ptr %28, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  %228 = load i32, ptr @W, align 4, !tbaa !5
  %229 = sub nsw i32 %228, 1
  %230 = load i32, ptr %27, align 4, !tbaa !5
  %231 = sub nsw i32 %229, %230
  store i32 %231, ptr %29, align 4, !tbaa !5
  %232 = load i32, ptr %28, align 4, !tbaa !5
  %233 = icmp sle i32 0, %232
  br i1 %233, label %234, label %270

234:                                              ; preds = %223
  %235 = load i32, ptr %28, align 4, !tbaa !5
  %236 = load i32, ptr @H, align 4, !tbaa !5
  %237 = icmp slt i32 %235, %236
  br i1 %237, label %238, label %270

238:                                              ; preds = %234
  %239 = load i32, ptr %27, align 4, !tbaa !5
  %240 = icmp sle i32 0, %239
  br i1 %240, label %241, label %270

241:                                              ; preds = %238
  %242 = load i32, ptr %27, align 4, !tbaa !5
  %243 = load i32, ptr @W, align 4, !tbaa !5
  %244 = icmp slt i32 %242, %243
  br i1 %244, label %245, label %270

245:                                              ; preds = %241
  %246 = load i32, ptr %28, align 4, !tbaa !5
  %247 = sext i32 %246 to i64
  %248 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %247) #8
  %249 = load i32, ptr %27, align 4, !tbaa !5
  %250 = sext i32 %249 to i64
  %251 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %248, i64 noundef %250)
          to label %252 unwind label %266

252:                                              ; preds = %245
  %253 = load i8, ptr %251, align 1, !tbaa !11
  %254 = sext i8 %253 to i32
  %255 = icmp eq i32 %254, 46
  br i1 %255, label %256, label %270

256:                                              ; preds = %252
  %257 = load i32, ptr %24, align 4, !tbaa !5
  %258 = add nsw i32 %257, 1
  store i32 %258, ptr %24, align 4, !tbaa !5
  %259 = load i32, ptr %28, align 4, !tbaa !5
  %260 = load i32, ptr @H, align 4, !tbaa !5
  %261 = sdiv i32 %260, 2
  %262 = sub nsw i32 %259, %261
  %263 = add nsw i32 %262, 1
  %264 = load i32, ptr %27, align 4, !tbaa !5
  invoke void @_Z5stampii(i32 noundef %263, i32 noundef %264)
          to label %265 unwind label %266

265:                                              ; preds = %256
  br label %270

266:                                              ; preds = %330, %319, %295, %284, %256, %245
  %267 = landingpad { ptr, i32 }
          cleanup
  %268 = extractvalue { ptr, i32 } %267, 0
  store ptr %268, ptr %8, align 8
  %269 = extractvalue { ptr, i32 } %267, 1
  store i32 %269, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %351

270:                                              ; preds = %265, %252, %241, %238, %234, %223
  %271 = load i32, ptr %26, align 4, !tbaa !5
  %272 = icmp sle i32 0, %271
  br i1 %272, label %273, label %305

273:                                              ; preds = %270
  %274 = load i32, ptr %26, align 4, !tbaa !5
  %275 = load i32, ptr @H, align 4, !tbaa !5
  %276 = icmp slt i32 %274, %275
  br i1 %276, label %277, label %305

277:                                              ; preds = %273
  %278 = load i32, ptr %29, align 4, !tbaa !5
  %279 = icmp sle i32 0, %278
  br i1 %279, label %280, label %305

280:                                              ; preds = %277
  %281 = load i32, ptr %29, align 4, !tbaa !5
  %282 = load i32, ptr @W, align 4, !tbaa !5
  %283 = icmp slt i32 %281, %282
  br i1 %283, label %284, label %305

284:                                              ; preds = %280
  %285 = load i32, ptr %26, align 4, !tbaa !5
  %286 = sext i32 %285 to i64
  %287 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %286) #8
  %288 = load i32, ptr %29, align 4, !tbaa !5
  %289 = sext i32 %288 to i64
  %290 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %287, i64 noundef %289)
          to label %291 unwind label %266

291:                                              ; preds = %284
  %292 = load i8, ptr %290, align 1, !tbaa !11
  %293 = sext i8 %292 to i32
  %294 = icmp eq i32 %293, 46
  br i1 %294, label %295, label %305

295:                                              ; preds = %291
  %296 = load i32, ptr %24, align 4, !tbaa !5
  %297 = add nsw i32 %296, 1
  store i32 %297, ptr %24, align 4, !tbaa !5
  %298 = load i32, ptr %26, align 4, !tbaa !5
  %299 = load i32, ptr %29, align 4, !tbaa !5
  %300 = load i32, ptr @W, align 4, !tbaa !5
  %301 = sdiv i32 %300, 2
  %302 = sub nsw i32 %299, %301
  %303 = add nsw i32 %302, 1
  invoke void @_Z5stampii(i32 noundef %298, i32 noundef %303)
          to label %304 unwind label %266

304:                                              ; preds = %295
  br label %305

305:                                              ; preds = %304, %291, %280, %277, %273, %270
  %306 = load i32, ptr %28, align 4, !tbaa !5
  %307 = icmp sle i32 0, %306
  br i1 %307, label %308, label %344

308:                                              ; preds = %305
  %309 = load i32, ptr %28, align 4, !tbaa !5
  %310 = load i32, ptr @H, align 4, !tbaa !5
  %311 = icmp slt i32 %309, %310
  br i1 %311, label %312, label %344

312:                                              ; preds = %308
  %313 = load i32, ptr %29, align 4, !tbaa !5
  %314 = icmp sle i32 0, %313
  br i1 %314, label %315, label %344

315:                                              ; preds = %312
  %316 = load i32, ptr %29, align 4, !tbaa !5
  %317 = load i32, ptr @W, align 4, !tbaa !5
  %318 = icmp slt i32 %316, %317
  br i1 %318, label %319, label %344

319:                                              ; preds = %315
  %320 = load i32, ptr %28, align 4, !tbaa !5
  %321 = sext i32 %320 to i64
  %322 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %321) #8
  %323 = load i32, ptr %29, align 4, !tbaa !5
  %324 = sext i32 %323 to i64
  %325 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %322, i64 noundef %324)
          to label %326 unwind label %266

326:                                              ; preds = %319
  %327 = load i8, ptr %325, align 1, !tbaa !11
  %328 = sext i8 %327 to i32
  %329 = icmp eq i32 %328, 46
  br i1 %329, label %330, label %344

330:                                              ; preds = %326
  %331 = load i32, ptr %24, align 4, !tbaa !5
  %332 = add nsw i32 %331, 1
  store i32 %332, ptr %24, align 4, !tbaa !5
  %333 = load i32, ptr %28, align 4, !tbaa !5
  %334 = load i32, ptr @H, align 4, !tbaa !5
  %335 = sdiv i32 %334, 2
  %336 = sub nsw i32 %333, %335
  %337 = add nsw i32 %336, 1
  %338 = load i32, ptr %29, align 4, !tbaa !5
  %339 = load i32, ptr @W, align 4, !tbaa !5
  %340 = sdiv i32 %339, 2
  %341 = sub nsw i32 %338, %340
  %342 = add nsw i32 %341, 1
  invoke void @_Z5stampii(i32 noundef %337, i32 noundef %342)
          to label %343 unwind label %266

343:                                              ; preds = %330
  br label %344

344:                                              ; preds = %343, %326, %315, %312, %308, %305
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  store i32 0, ptr %6, align 4
  br label %345

345:                                              ; preds = %344, %187
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  %346 = load i32, ptr %6, align 4
  switch i32 %346, label %379 [
    i32 0, label %347
    i32 16, label %348
  ]

347:                                              ; preds = %345
  br label %348

348:                                              ; preds = %347, %345
  %349 = load i32, ptr %26, align 4, !tbaa !5
  %350 = add nsw i32 %349, 1
  store i32 %350, ptr %26, align 4, !tbaa !5
  br label %171, !llvm.loop !17

351:                                              ; preds = %266, %219
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %371

352:                                              ; preds = %175
  br label %353

353:                                              ; preds = %352
  %354 = load i32, ptr %25, align 4, !tbaa !5
  %355 = add nsw i32 %354, 1
  store i32 %355, ptr %25, align 4, !tbaa !5
  br label %162, !llvm.loop !18

356:                                              ; preds = %169
  %357 = load i32, ptr %24, align 4, !tbaa !5
  %358 = icmp sgt i32 %357, 4
  br i1 %358, label %359, label %360

359:                                              ; preds = %356
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.9, i32 noundef 303, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

360:                                              ; preds = %356
  %361 = load i32, ptr %24, align 4, !tbaa !5
  %362 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %361)
          to label %363 unwind label %367

363:                                              ; preds = %360
  %364 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %362, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %365 unwind label %367

365:                                              ; preds = %363
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #8
  %366 = load i32, ptr %1, align 4
  ret i32 %366

367:                                              ; preds = %363, %360
  %368 = landingpad { ptr, i32 }
          cleanup
  %369 = extractvalue { ptr, i32 } %368, 0
  store ptr %369, ptr %8, align 8
  %370 = extractvalue { ptr, i32 } %368, 1
  store i32 %370, ptr %9, align 4
  br label %371

371:                                              ; preds = %367, %351
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %372

372:                                              ; preds = %371, %143
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %373

373:                                              ; preds = %372, %99, %83
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #8
  br label %374

374:                                              ; preds = %373
  %375 = load ptr, ptr %8, align 8
  %376 = load i32, ptr %9, align 4
  %377 = insertvalue { ptr, i32 } poison, ptr %375, 0
  %378 = insertvalue { ptr, i32 } %377, i32 %376, 1
  resume { ptr, i32 } %378

379:                                              ; preds = %345
  unreachable
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #1

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #4 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 = { "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 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { noreturn 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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = !{i64 0, i64 8, !15}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@H = external dso_local global i32, align 4
@W = external dso_local global i32, align 4
@_Z1SB5cxx11 = external dso_local global %"class.std::vector", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [83 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5stampii(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) #3

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::set", align 8
  %2 = alloca %"class.std::set", align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %6 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @H)
  %7 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(4) @W)
  %8 = load i32, ptr @H, align 4, !tbaa !5
  %9 = sext i32 %8 to i64
  tail call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %9)
  %10 = load i32, ptr @H, align 4, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #7
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #7
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  %12 = load i32, ptr @H, align 4, !tbaa !5
  %13 = icmp sgt i32 %12, 0
  %14 = load i32, ptr @W, align 4
  %15 = icmp sgt i32 %14, 0
  %or.cond154 = select i1 %13, i1 %15, i1 false
  br i1 %or.cond154, label %.lr.ph119.split, label %._crit_edge120

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %16 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %indvars.iv) #7
  %17 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %16)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %18 = load i32, ptr @H, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = icmp slt i64 %indvars.iv.next, %19
  br i1 %20, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge120:                                   ; preds = %._crit_edge117, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  %21 = call noundef zeroext i1 @_ZNKSt3setIiSt4lessIiESaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  br i1 %21, label %51, label %54

.lr.ph119.split:                                  ; preds = %._crit_edge, %._crit_edge117
  %22 = phi i32 [ %26, %._crit_edge117 ], [ %12, %._crit_edge ]
  %23 = phi i32 [ %29, %._crit_edge117 ], [ 0, %._crit_edge ]
  %24 = phi i32 [ %28, %._crit_edge117 ], [ %14, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %.lr.ph116, label %._crit_edge117

._crit_edge117.loopexit:                          ; preds = %46
  %.pre = load i32, ptr %3, align 4, !tbaa !5
  %.pre141 = load i32, ptr @H, align 4, !tbaa !5
  br label %._crit_edge117

._crit_edge117:                                   ; preds = %._crit_edge117.loopexit, %.lr.ph119.split
  %26 = phi i32 [ %.pre141, %._crit_edge117.loopexit ], [ %22, %.lr.ph119.split ]
  %27 = phi i32 [ %.pre, %._crit_edge117.loopexit ], [ %23, %.lr.ph119.split ]
  %28 = phi i32 [ %49, %._crit_edge117.loopexit ], [ %24, %.lr.ph119.split ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  %29 = add nsw i32 %27, 1
  store i32 %29, ptr %3, align 4, !tbaa !5
  %30 = icmp slt i32 %29, %26
  br i1 %30, label %.lr.ph119.split, label %._crit_edge120, !llvm.loop !11

.lr.ph116:                                        ; preds = %.lr.ph119.split, %46
  %31 = load i32, ptr %3, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %32) #7
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %33, i64 noundef %35)
          to label %37 unwind label %44

37:                                               ; preds = %.lr.ph116
  %38 = load i8, ptr %36, align 1, !tbaa !13
  %39 = icmp eq i8 %38, 46
  br i1 %39, label %40, label %46

40:                                               ; preds = %37
  %41 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %42 unwind label %44

42:                                               ; preds = %40
  %43 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %46 unwind label %44

44:                                               ; preds = %42, %40, %.lr.ph116
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  br label %200

46:                                               ; preds = %42, %37
  %47 = load i32, ptr %4, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %4, align 4, !tbaa !5
  %49 = load i32, ptr @W, align 4, !tbaa !5
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %.lr.ph116, label %._crit_edge117.loopexit, !llvm.loop !14

51:                                               ; preds = %._crit_edge120
  invoke void @_Z3Yesi(i32 noundef 0)
          to label %54 unwind label %52

52:                                               ; preds = %51
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %200

54:                                               ; preds = %51, %._crit_edge120
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %55 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  store ptr %55, ptr %5, align 8
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  store ptr %58, ptr %5, align 8, !tbaa !15
  %59 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef 0) #7
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  store ptr %62, ptr %5, align 8, !tbaa !15
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  store ptr %65, ptr %5, align 8, !tbaa !15
  %66 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef 0) #7
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = sub nsw i32 %61, %57
  %70 = sub nsw i32 %68, %64
  %71 = load i32, ptr @H, align 4, !tbaa !5
  %72 = sdiv i32 %71, 2
  %.not.not = icmp slt i32 %69, %72
  br i1 %.not.not, label %73, label %79

73:                                               ; preds = %54
  %74 = load i32, ptr @W, align 4, !tbaa !5
  %75 = sdiv i32 %74, 2
  %.not.not92 = icmp slt i32 %70, %75
  br i1 %.not.not92, label %76, label %79

76:                                               ; preds = %73
  invoke void @_Z3Yesi(i32 noundef 1)
          to label %._crit_edge142 unwind label %77

._crit_edge142:                                   ; preds = %76
  %.pre143 = load i32, ptr @H, align 4, !tbaa !5
  %.pre149 = sdiv i32 %.pre143, 2
  br label %79

77:                                               ; preds = %84, %80, %76
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %199

79:                                               ; preds = %._crit_edge142, %73, %54
  %.pre-phi = phi i32 [ %.pre149, %._crit_edge142 ], [ %72, %73 ], [ %72, %54 ]
  %.not.not93 = icmp slt i32 %69, %.pre-phi
  br i1 %.not.not93, label %80, label %81

80:                                               ; preds = %79
  invoke void @_Z3Yesi(i32 noundef 2)
          to label %81 unwind label %77

81:                                               ; preds = %80, %79
  %82 = load i32, ptr @W, align 4, !tbaa !5
  %83 = sdiv i32 %82, 2
  %.not.not94 = icmp slt i32 %70, %83
  br i1 %.not.not94, label %84, label %85

84:                                               ; preds = %81
  invoke void @_Z3Yesi(i32 noundef 2)
          to label %._crit_edge144 unwind label %77

._crit_edge144:                                   ; preds = %84
  %.pre145 = load i32, ptr @W, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %._crit_edge144, %81
  %86 = phi i32 [ %.pre145, %._crit_edge144 ], [ %82, %81 ]
  %87 = load i32, ptr @H, align 4, !tbaa !5
  %88 = add i32 %87, -1
  %89 = add i32 %88, %86
  %90 = icmp sgt i32 %89, 0
  br i1 %90, label %.preheader, label %._crit_edge126.thread

.preheader:                                       ; preds = %85, %93
  %indvars.iv136 = phi i64 [ %indvars.iv.next137, %93 ], [ 0, %85 ]
  %indvars.iv134 = phi i64 [ %indvars.iv.next135, %93 ], [ 1, %85 ]
  %.079124 = phi i32 [ %.6, %93 ], [ 0, %85 ]
  %91 = trunc nuw nsw i64 %indvars.iv136 to i32
  br label %100

._crit_edge126:                                   ; preds = %93
  %92 = icmp sgt i32 %.6, 4
  br i1 %92, label %192, label %._crit_edge126.thread

93:                                               ; preds = %191
  %indvars.iv.next137 = add nuw nsw i64 %indvars.iv136, 1
  %94 = load i32, ptr @H, align 4, !tbaa !5
  %95 = load i32, ptr @W, align 4, !tbaa !5
  %96 = add i32 %94, -1
  %97 = add i32 %96, %95
  %98 = sext i32 %97 to i64
  %99 = icmp slt i64 %indvars.iv.next137, %98
  %indvars.iv.next135 = add nuw nsw i64 %indvars.iv134, 1
  br i1 %99, label %.preheader, label %._crit_edge126, !llvm.loop !17

100:                                              ; preds = %.preheader, %191
  %indvars.iv129 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next130, %191 ]
  %.180121 = phi i32 [ %.079124, %.preheader ], [ %.6, %191 ]
  %indvars131 = trunc i64 %indvars.iv129 to i32
  %101 = sub nsw i64 %indvars.iv136, %indvars.iv129
  %102 = sub nsw i32 %91, %indvars131
  %103 = load i32, ptr @H, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = icmp slt i64 %indvars.iv129, %104
  %106 = load i32, ptr @W, align 4
  %107 = sext i32 %106 to i64
  %108 = icmp slt i64 %101, %107
  %or.cond = select i1 %105, i1 %108, i1 false
  br i1 %or.cond, label %109, label %191

109:                                              ; preds = %100
  %110 = icmp sgt i64 %101, -1
  br i1 %110, label %111, label %121

111:                                              ; preds = %109
  %112 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %indvars.iv129) #7
  %113 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %112, i64 noundef %101)
          to label %114 unwind label %119

114:                                              ; preds = %111
  %115 = load i8, ptr %113, align 1, !tbaa !13
  %116 = icmp eq i8 %115, 46
  br i1 %116, label %117, label %121

117:                                              ; preds = %114
  %118 = add nsw i32 %.180121, 1
  invoke void @_Z5stampii(i32 noundef %indvars131, i32 noundef %102)
          to label %121 unwind label %119

119:                                              ; preds = %117, %111
  %120 = landingpad { ptr, i32 }
          cleanup
  br label %199

121:                                              ; preds = %117, %114, %109
  %.281 = phi i32 [ %118, %117 ], [ %.180121, %114 ], [ %.180121, %109 ]
  %122 = load i32, ptr @H, align 4, !tbaa !5
  %123 = xor i32 %indvars131, -1
  %124 = add i32 %122, %123
  %125 = load i32, ptr @W, align 4, !tbaa !5
  %126 = trunc i64 %101 to i32
  %127 = xor i32 %126, -1
  %128 = add i32 %125, %127
  %129 = icmp sgt i32 %124, -1
  br i1 %129, label %130, label %148

130:                                              ; preds = %121
  %131 = icmp slt i32 %124, %122
  %or.cond3 = and i1 %110, %131
  %132 = sext i32 %125 to i64
  %133 = icmp slt i64 %101, %132
  %or.cond105 = select i1 %or.cond3, i1 %133, i1 false
  br i1 %or.cond105, label %134, label %148

134:                                              ; preds = %130
  %135 = zext nneg i32 %124 to i64
  %136 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %135) #7
  %137 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %136, i64 noundef %101)
          to label %138 unwind label %146

138:                                              ; preds = %134
  %139 = load i8, ptr %137, align 1, !tbaa !13
  %140 = icmp eq i8 %139, 46
  %.pre148 = load i32, ptr @H, align 4, !tbaa !5
  br i1 %140, label %141, label %148

141:                                              ; preds = %138
  %.neg = sdiv i32 %.pre148, -2
  %142 = sub i32 %122, %indvars131
  %143 = add i32 %142, %.neg
  %144 = trunc nsw i64 %101 to i32
  invoke void @_Z5stampii(i32 noundef %143, i32 noundef %144)
          to label %._crit_edge146 unwind label %146

._crit_edge146:                                   ; preds = %141
  %145 = add nsw i32 %.281, 1
  %.pre147 = load i32, ptr @H, align 4, !tbaa !5
  br label %148

146:                                              ; preds = %182, %174, %162, %155, %141, %134
  %147 = landingpad { ptr, i32 }
          cleanup
  br label %199

148:                                              ; preds = %._crit_edge146, %121, %130, %138
  %149 = phi i32 [ %.pre147, %._crit_edge146 ], [ %.pre148, %138 ], [ %122, %130 ], [ %122, %121 ]
  %.382 = phi i32 [ %145, %._crit_edge146 ], [ %.281, %138 ], [ %.281, %130 ], [ %.281, %121 ]
  %150 = sext i32 %149 to i64
  %151 = icmp slt i64 %indvars.iv129, %150
  %152 = icmp sgt i32 %128, -1
  %or.cond5 = select i1 %151, i1 %152, i1 false
  %153 = load i32, ptr @W, align 4
  %154 = icmp slt i32 %128, %153
  %or.cond107 = select i1 %or.cond5, i1 %154, i1 false
  br i1 %or.cond107, label %155, label %168

155:                                              ; preds = %148
  %156 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %indvars.iv129) #7
  %157 = zext nneg i32 %128 to i64
  %158 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %156, i64 noundef %157)
          to label %159 unwind label %146

159:                                              ; preds = %155
  %160 = load i8, ptr %158, align 1, !tbaa !13
  %161 = icmp eq i8 %160, 46
  br i1 %161, label %162, label %168

162:                                              ; preds = %159
  %163 = add nsw i32 %.382, 1
  %164 = load i32, ptr @W, align 4, !tbaa !5
  %.neg95 = sdiv i32 %164, -2
  %165 = trunc nsw i64 %101 to i32
  %166 = sub i32 %125, %165
  %167 = add i32 %166, %.neg95
  invoke void @_Z5stampii(i32 noundef %indvars131, i32 noundef %167)
          to label %168 unwind label %146

168:                                              ; preds = %162, %159, %148
  %.4 = phi i32 [ %163, %162 ], [ %.382, %159 ], [ %.382, %148 ]
  br i1 %129, label %169, label %191

169:                                              ; preds = %168
  %170 = load i32, ptr @H, align 4, !tbaa !5
  %171 = icmp slt i32 %124, %170
  %or.cond7 = select i1 %171, i1 %152, i1 false
  %172 = load i32, ptr @W, align 4
  %173 = icmp slt i32 %128, %172
  %or.cond109 = select i1 %or.cond7, i1 %173, i1 false
  br i1 %or.cond109, label %174, label %191

174:                                              ; preds = %169
  %175 = zext nneg i32 %124 to i64
  %176 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %175) #7
  %177 = zext nneg i32 %128 to i64
  %178 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %176, i64 noundef %177)
          to label %179 unwind label %146

179:                                              ; preds = %174
  %180 = load i8, ptr %178, align 1, !tbaa !13
  %181 = icmp eq i8 %180, 46
  br i1 %181, label %182, label %191

182:                                              ; preds = %179
  %183 = add nsw i32 %.4, 1
  %184 = load i32, ptr @H, align 4, !tbaa !5
  %.neg96 = sdiv i32 %184, -2
  %185 = sub i32 %122, %indvars131
  %186 = add i32 %185, %.neg96
  %187 = load i32, ptr @W, align 4, !tbaa !5
  %.neg97 = sdiv i32 %187, -2
  %188 = trunc nsw i64 %101 to i32
  %189 = sub i32 %125, %188
  %190 = add i32 %189, %.neg97
  invoke void @_Z5stampii(i32 noundef %186, i32 noundef %190)
          to label %191 unwind label %146

191:                                              ; preds = %168, %169, %179, %182, %100
  %.6 = phi i32 [ %.180121, %100 ], [ %183, %182 ], [ %.4, %179 ], [ %.4, %169 ], [ %.4, %168 ]
  %indvars.iv.next130 = add nuw nsw i64 %indvars.iv129, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next130, %indvars.iv134
  br i1 %exitcond.not, label %93, label %100, !llvm.loop !18

192:                                              ; preds = %._crit_edge126
  call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.9, i32 noundef 303, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

._crit_edge126.thread:                            ; preds = %85, %._crit_edge126
  %.079.lcssa151 = phi i32 [ %.6, %._crit_edge126 ], [ 0, %85 ]
  %193 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.079.lcssa151)
          to label %194 unwind label %197

194:                                              ; preds = %._crit_edge126.thread
  %195 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %193, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %196 unwind label %197

196:                                              ; preds = %194
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #7
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #7
  ret i32 0

197:                                              ; preds = %194, %._crit_edge126.thread
  %198 = landingpad { ptr, i32 }
          cleanup
  br label %199

199:                                              ; preds = %197, %146, %119, %77
  %.pn.pn.pn = phi { ptr, i32 } [ %78, %77 ], [ %198, %197 ], [ %147, %146 ], [ %120, %119 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %200

200:                                              ; preds = %199, %52, %44
  %.pn102 = phi { ptr, i32 } [ %45, %44 ], [ %.pn.pn.pn, %199 ], [ %53, %52 ]
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #7
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn102
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #4 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 = { "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 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { noreturn 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 = !{!7, !7, i64 0}
!14 = distinct !{!14, !10}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


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