; LLVM IR from upupming/algorithm :: AdvancedLevel_C++/1112. Stucked Keyboard (20) (main)

; 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_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<char, std::pair<const char, bool>, std::_Select1st<std::pair<const char, bool>>, std::less<char>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<char, std::pair<const char, bool>, std::_Select1st<std::pair<const char, bool>>, 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::set" = type { %"class.std::_Rb_tree.3" }
%"class.std::_Rb_tree.3" = 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_const_iterator" = type { ptr }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>

@sureNoBroken = external dso_local global [256 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::map", align 8
  %8 = alloca %"class.std::set", align 8
  %9 = alloca i8, align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %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 %"struct.std::pair", align 8
  %17 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !5
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  %19 = invoke 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) %4)
          to label %20 unwind label %29

20:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 48, ptr %7) #6
  call void @_ZNSt3mapIcbSt4lessIcESaISt4pairIKcbEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr %8) #6
  call void @_ZNSt3setIcSt4lessIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #6
  store i8 35, ptr %9, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #6
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_S5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %4, i8 noundef signext 35)
          to label %21 unwind label %33

21:                                               ; preds = %20
  %22 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %88, %21
  %24 = load i32, ptr %11, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  %27 = icmp ult i64 %25, %26
  br i1 %27, label %37, label %28

28:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %91

29:                                               ; preds = %0
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %5, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %6, align 4
  br label %235

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

37:                                               ; preds = %23
  %38 = load i32, ptr %11, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %39)
          to label %41 unwind label %50

41:                                               ; preds = %37
  %42 = load i8, ptr %40, align 1, !tbaa !9
  %43 = sext i8 %42 to i32
  %44 = load i8, ptr %9, align 1, !tbaa !9
  %45 = sext i8 %44 to i32
  %46 = icmp eq i32 %43, %45
  br i1 %46, label %47, label %54

47:                                               ; preds = %41
  %48 = load i32, ptr %3, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %3, align 4, !tbaa !5
  br label %64

50:                                               ; preds = %82, %78, %70, %37
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %5, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %234

54:                                               ; preds = %41
  %55 = load i32, ptr %3, align 4, !tbaa !5
  %56 = load i32, ptr %2, align 4, !tbaa !5
  %57 = srem i32 %55, %56
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %59, label %63

59:                                               ; preds = %54
  %60 = load i8, ptr %9, align 1, !tbaa !9
  %61 = sext i8 %60 to i64
  %62 = getelementptr inbounds [256 x i8], ptr @sureNoBroken, i64 0, i64 %61
  store i8 1, ptr %62, align 1, !tbaa !10
  br label %63

63:                                               ; preds = %59, %54
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %63, %47
  %65 = load i32, ptr %11, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  %68 = sub i64 %67, 1
  %69 = icmp ne i64 %66, %68
  br i1 %69, label %70, label %82

70:                                               ; preds = %64
  %71 = load i32, ptr %3, align 4, !tbaa !5
  %72 = load i32, ptr %2, align 4, !tbaa !5
  %73 = srem i32 %71, %72
  %74 = icmp eq i32 %73, 0
  %75 = load i32, ptr %11, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %76)
          to label %78 unwind label %50

78:                                               ; preds = %70
  %79 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIcbSt4lessIcESaISt4pairIKcbEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 1 dereferenceable(1) %77)
          to label %80 unwind label %50

80:                                               ; preds = %78
  %81 = zext i1 %74 to i8
  store i8 %81, ptr %79, align 1, !tbaa !10
  br label %82

82:                                               ; preds = %80, %64
  %83 = load i32, ptr %11, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %84)
          to label %86 unwind label %50

86:                                               ; preds = %82
  %87 = load i8, ptr %85, align 1, !tbaa !9
  store i8 %87, ptr %9, align 1, !tbaa !9
  br label %88

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

91:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %123, %91
  %93 = load i32, ptr %12, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  %96 = sub i64 %95, 1
  %97 = icmp ult i64 %94, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %126

99:                                               ; preds = %92
  %100 = load i32, ptr %12, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %101)
          to label %103 unwind label %118

103:                                              ; preds = %99
  %104 = load i8, ptr %102, align 1, !tbaa !9
  %105 = sext i8 %104 to i64
  %106 = getelementptr inbounds [256 x i8], ptr @sureNoBroken, i64 0, i64 %105
  %107 = load i8, ptr %106, align 1, !tbaa !10, !range !14, !noundef !15
  %108 = trunc i8 %107 to i1
  %109 = zext i1 %108 to i32
  %110 = icmp eq i32 %109, 1
  br i1 %110, label %111, label %122

111:                                              ; preds = %103
  %112 = load i32, ptr %12, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %113)
          to label %115 unwind label %118

115:                                              ; preds = %111
  %116 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIcbSt4lessIcESaISt4pairIKcbEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 1 dereferenceable(1) %114)
          to label %117 unwind label %118

117:                                              ; preds = %115
  store i8 0, ptr %116, align 1, !tbaa !10
  br label %122

118:                                              ; preds = %115, %111, %99
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %5, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %234

122:                                              ; preds = %117, %103
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %12, align 4, !tbaa !5
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %12, align 4, !tbaa !5
  br label %92, !llvm.loop !16

126:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %127

127:                                              ; preds = %184, %126
  %128 = load i32, ptr %13, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  %131 = sub i64 %130, 1
  %132 = icmp ult i64 %129, %131
  br i1 %132, label %134, label %133

133:                                              ; preds = %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %188

134:                                              ; preds = %127
  %135 = load i32, ptr %13, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %137 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %136)
          to label %138 unwind label %175

138:                                              ; preds = %134
  %139 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIcbSt4lessIcESaISt4pairIKcbEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 1 dereferenceable(1) %137)
          to label %140 unwind label %175

140:                                              ; preds = %138
  %141 = load i8, ptr %139, align 1, !tbaa !10, !range !14, !noundef !15
  %142 = trunc i8 %141 to i1
  br i1 %142, label %143, label %154

143:                                              ; preds = %140
  %144 = load i32, ptr %13, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %145)
          to label %147 unwind label %179

147:                                              ; preds = %143
  %148 = invoke ptr @_ZNSt3setIcSt4lessIcESaIcEE4findERKc(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 1 dereferenceable(1) %146)
          to label %149 unwind label %179

149:                                              ; preds = %147
  %150 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %14, i32 0, i32 0
  store ptr %148, ptr %150, align 8
  %151 = call ptr @_ZNKSt3setIcSt4lessIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %8) #6
  %152 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %15, i32 0, i32 0
  store ptr %151, ptr %152, align 8
  %153 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIcES2_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  br label %154

154:                                              ; preds = %149, %140
  %155 = phi i1 [ false, %140 ], [ %153, %149 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br i1 %155, label %156, label %183

156:                                              ; preds = %154
  %157 = load i32, ptr %13, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %158)
          to label %160 unwind label %175

160:                                              ; preds = %156
  %161 = load i8, ptr %159, align 1, !tbaa !9
  %162 = sext i8 %161 to i32
  %163 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %162)
          to label %164 unwind label %175

164:                                              ; preds = %160
  %165 = load i32, ptr %13, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %166)
          to label %168 unwind label %175

168:                                              ; preds = %164
  %169 = invoke { ptr, i8 } @_ZNSt3setIcSt4lessIcESaIcEE6insertERKc(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 1 dereferenceable(1) %167)
          to label %170 unwind label %175

170:                                              ; preds = %168
  %171 = getelementptr inbounds { ptr, i8 }, ptr %16, i32 0, i32 0
  %172 = extractvalue { ptr, i8 } %169, 0
  store ptr %172, ptr %171, align 8
  %173 = getelementptr inbounds { ptr, i8 }, ptr %16, i32 0, i32 1
  %174 = extractvalue { ptr, i8 } %169, 1
  store i8 %174, ptr %173, align 8
  br label %183

175:                                              ; preds = %168, %164, %160, %156, %138, %134
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %5, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %6, align 4
  br label %187

179:                                              ; preds = %147, %143
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %5, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %187

183:                                              ; preds = %170, %154
  br label %184

184:                                              ; preds = %183
  %185 = load i32, ptr %13, align 4, !tbaa !5
  %186 = add nsw i32 %185, 1
  store i32 %186, ptr %13, align 4, !tbaa !5
  br label %127, !llvm.loop !17

187:                                              ; preds = %179, %175
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %234

188:                                              ; preds = %133
  %189 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2)
          to label %190 unwind label %198

190:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %191

191:                                              ; preds = %229, %190
  %192 = load i32, ptr %17, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  %195 = sub i64 %194, 1
  %196 = icmp ult i64 %193, %195
  br i1 %196, label %202, label %197

197:                                              ; preds = %191
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %232

198:                                              ; preds = %188
  %199 = landingpad { ptr, i32 }
          cleanup
  %200 = extractvalue { ptr, i32 } %199, 0
  store ptr %200, ptr %5, align 8
  %201 = extractvalue { ptr, i32 } %199, 1
  store i32 %201, ptr %6, align 4
  br label %234

202:                                              ; preds = %191
  %203 = load i32, ptr %17, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %204)
          to label %206 unwind label %224

206:                                              ; preds = %202
  %207 = load i8, ptr %205, align 1, !tbaa !9
  %208 = sext i8 %207 to i32
  %209 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %208)
          to label %210 unwind label %224

210:                                              ; preds = %206
  %211 = load i32, ptr %17, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %212)
          to label %214 unwind label %224

214:                                              ; preds = %210
  %215 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIcbSt4lessIcESaISt4pairIKcbEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 1 dereferenceable(1) %213)
          to label %216 unwind label %224

216:                                              ; preds = %214
  %217 = load i8, ptr %215, align 1, !tbaa !10, !range !14, !noundef !15
  %218 = trunc i8 %217 to i1
  br i1 %218, label %219, label %228

219:                                              ; preds = %216
  %220 = load i32, ptr %17, align 4, !tbaa !5
  %221 = load i32, ptr %2, align 4, !tbaa !5
  %222 = add nsw i32 %220, %221
  %223 = sub nsw i32 %222, 1
  store i32 %223, ptr %17, align 4, !tbaa !5
  br label %228

224:                                              ; preds = %214, %210, %206, %202
  %225 = landingpad { ptr, i32 }
          cleanup
  %226 = extractvalue { ptr, i32 } %225, 0
  store ptr %226, ptr %5, align 8
  %227 = extractvalue { ptr, i32 } %225, 1
  store i32 %227, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %234

228:                                              ; preds = %219, %216
  br label %229

229:                                              ; preds = %228
  %230 = load i32, ptr %17, align 4, !tbaa !5
  %231 = add nsw i32 %230, 1
  store i32 %231, ptr %17, align 4, !tbaa !5
  br label %191, !llvm.loop !18

232:                                              ; preds = %197
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  call void @_ZNSt3setIcSt4lessIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #6
  call void @_ZNSt3mapIcbSt4lessIcESaISt4pairIKcbEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %233 = load i32, ptr %1, align 4
  ret i32 %233

234:                                              ; preds = %224, %198, %187, %118, %50, %33
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  call void @_ZNSt3setIcSt4lessIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #6
  call void @_ZNSt3mapIcbSt4lessIcESaISt4pairIKcbEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #6
  br label %235

235:                                              ; preds = %234, %29
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %236

236:                                              ; preds = %235
  %237 = load ptr, ptr %5, align 8
  %238 = load i32, ptr %6, align 4
  %239 = insertvalue { ptr, i32 } poison, ptr %237, 0
  %240 = insertvalue { ptr, i32 } %239, i32 %238, 1
  resume { ptr, i32 } %240
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 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)) #2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_S5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

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

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

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

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

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

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

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

declare i32 @printf(ptr noundef, ...) #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)) #5 align 2

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"bool", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}


; 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_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<char, std::pair<const char, bool>, std::_Select1st<std::pair<const char, bool>>, std::less<char>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<char, std::pair<const char, bool>, std::_Select1st<std::pair<const char, bool>>, 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::set" = type { %"class.std::_Rb_tree.3" }
%"class.std::_Rb_tree.3" = 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_const_iterator" = type { ptr }

@sureNoBroken = external dso_local local_unnamed_addr global [256 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::map", align 8
  %4 = alloca %"class.std::set", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %7 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %9 = invoke 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) %2)
          to label %10 unwind label %15

10:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #7
  call void @_ZNSt3mapIcbSt4lessIcESaISt4pairIKcbEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #7
  call void @_ZNSt3setIcSt4lessIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_S5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(32) %2, i8 noundef signext 35)
          to label %11 unwind label %17

11:                                               ; preds = %10
  %12 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  %13 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %.not60 = icmp eq i64 %13, 0
  br i1 %.not60, label %.preheader48, label %.lr.ph

.preheader48:                                     ; preds = %43, %11
  %14 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %.not61 = icmp eq i64 %14, 1
  br i1 %.not61, label %.preheader, label %.lr.ph53

15:                                               ; preds = %0
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %114

17:                                               ; preds = %10
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  br label %113

.lr.ph:                                           ; preds = %11, %43
  %indvars.iv = phi i64 [ %indvars.iv.next, %43 ], [ 0, %11 ]
  %.02851 = phi i32 [ %.129, %43 ], [ 1, %11 ]
  %.03349 = phi i8 [ %45, %43 ], [ 35, %11 ]
  %19 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %indvars.iv)
  %20 = load i8, ptr %19, align 1, !tbaa !5
  %21 = icmp eq i8 %20, %.03349
  br i1 %21, label %22, label %26

22:                                               ; preds = %.lr.ph
  %23 = add nsw i32 %.02851, 1
  br label %32

24:                                               ; preds = %35
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %113

26:                                               ; preds = %.lr.ph
  %27 = load i32, ptr %1, align 4, !tbaa !8
  %28 = srem i32 %.02851, %27
  %.not = icmp eq i32 %28, 0
  br i1 %.not, label %32, label %29

29:                                               ; preds = %26
  %30 = sext i8 %.03349 to i64
  %31 = getelementptr inbounds [256 x i8], ptr @sureNoBroken, i64 0, i64 %30
  store i8 1, ptr %31, align 1, !tbaa !10
  br label %32

32:                                               ; preds = %26, %29, %22
  %.129 = phi i32 [ %23, %22 ], [ 1, %29 ], [ 1, %26 ]
  %33 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %34 = add i64 %33, -1
  %.not44 = icmp eq i64 %34, %indvars.iv
  br i1 %.not44, label %43, label %35

35:                                               ; preds = %32
  %36 = load i32, ptr %1, align 4, !tbaa !8
  %37 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %indvars.iv)
  %38 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIcbSt4lessIcESaISt4pairIKcbEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 1 dereferenceable(1) %37)
          to label %39 unwind label %24

39:                                               ; preds = %35
  %40 = srem i32 %.129, %36
  %41 = icmp eq i32 %40, 0
  %42 = zext i1 %41 to i8
  store i8 %42, ptr %38, align 1, !tbaa !10
  br label %43

43:                                               ; preds = %39, %32
  %44 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %indvars.iv)
  %45 = load i8, ptr %44, align 1, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %46 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %47 = icmp ugt i64 %46, %indvars.iv.next
  br i1 %47, label %.lr.ph, label %.preheader48, !llvm.loop !12

.preheader:                                       ; preds = %61, %.preheader48
  %48 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %.not62 = icmp eq i64 %48, 1
  br i1 %.not62, label %._crit_edge, label %.lr.ph55

.lr.ph53:                                         ; preds = %.preheader48, %61
  %indvars.iv64 = phi i64 [ %indvars.iv.next65, %61 ], [ 0, %.preheader48 ]
  %49 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %indvars.iv64)
  %50 = load i8, ptr %49, align 1, !tbaa !5
  %51 = sext i8 %50 to i64
  %52 = getelementptr inbounds [256 x i8], ptr @sureNoBroken, i64 0, i64 %51
  %53 = load i8, ptr %52, align 1, !tbaa !10, !range !14, !noundef !15
  %54 = trunc nuw i8 %53 to i1
  br i1 %54, label %55, label %61

55:                                               ; preds = %.lr.ph53
  %56 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %indvars.iv64)
  %57 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIcbSt4lessIcESaISt4pairIKcbEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 1 dereferenceable(1) %56)
          to label %58 unwind label %59

58:                                               ; preds = %55
  store i8 0, ptr %57, align 1, !tbaa !10
  br label %61

59:                                               ; preds = %55
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %113

61:                                               ; preds = %.lr.ph53, %58
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1
  %62 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %63 = add i64 %62, -1
  %64 = icmp ugt i64 %63, %indvars.iv.next65
  br i1 %64, label %.lr.ph53, label %.preheader, !llvm.loop !16

._crit_edge:                                      ; preds = %89, %.preheader
  %65 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %66 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %.not63 = icmp eq i64 %66, 1
  br i1 %.not63, label %._crit_edge59, label %.lr.ph58

.lr.ph55:                                         ; preds = %.preheader, %89
  %indvars.iv67 = phi i64 [ %indvars.iv.next68, %89 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %67 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %indvars.iv67)
  %68 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIcbSt4lessIcESaISt4pairIKcbEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 1 dereferenceable(1) %67)
          to label %69 unwind label %85

69:                                               ; preds = %.lr.ph55
  %70 = load i8, ptr %68, align 1, !tbaa !10, !range !14, !noundef !15
  %71 = trunc nuw i8 %70 to i1
  br i1 %71, label %72, label %.critedge

72:                                               ; preds = %69
  %73 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %indvars.iv67)
  %74 = invoke ptr @_ZNSt3setIcSt4lessIcESaIcEE4findERKc(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 1 dereferenceable(1) %73)
          to label %75 unwind label %87

75:                                               ; preds = %72
  store ptr %74, ptr %6, align 8
  %76 = call ptr @_ZNKSt3setIcSt4lessIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  store ptr %76, ptr %7, align 8
  %77 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIcES2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br i1 %77, label %78, label %89

78:                                               ; preds = %75
  %79 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %indvars.iv67)
  %80 = load i8, ptr %79, align 1, !tbaa !5
  %81 = sext i8 %80 to i32
  %82 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %81)
  %83 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %indvars.iv67)
  %84 = invoke { ptr, i8 } @_ZNSt3setIcSt4lessIcESaIcEE6insertERKc(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 1 dereferenceable(1) %83)
          to label %89 unwind label %85

85:                                               ; preds = %78, %.lr.ph55
  %86 = landingpad { ptr, i32 }
          cleanup
  br label %113

87:                                               ; preds = %72
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %113

.critedge:                                        ; preds = %69
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %89

89:                                               ; preds = %78, %75, %.critedge
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %90 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %91 = add i64 %90, -1
  %92 = icmp ugt i64 %91, %indvars.iv.next68
  br i1 %92, label %.lr.ph55, label %._crit_edge, !llvm.loop !17

._crit_edge59:                                    ; preds = %100, %._crit_edge
  call void @_ZNSt3setIcSt4lessIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #7
  call void @_ZNSt3mapIcbSt4lessIcESaISt4pairIKcbEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

.lr.ph58:                                         ; preds = %._crit_edge, %100
  %93 = phi i64 [ %107, %100 ], [ 0, %._crit_edge ]
  %.056 = phi i32 [ %106, %100 ], [ 0, %._crit_edge ]
  %94 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %93)
  %95 = load i8, ptr %94, align 1, !tbaa !5
  %96 = sext i8 %95 to i32
  %97 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %96)
  %98 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %93)
  %99 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt3mapIcbSt4lessIcESaISt4pairIKcbEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 1 dereferenceable(1) %98)
          to label %100 unwind label %111

100:                                              ; preds = %.lr.ph58
  %101 = load i8, ptr %99, align 1, !tbaa !10, !range !14, !noundef !15
  %102 = trunc nuw i8 %101 to i1
  %103 = load i32, ptr %1, align 4
  %104 = add nsw i32 %.056, -1
  %105 = add i32 %104, %103
  %.1 = select i1 %102, i32 %105, i32 %.056
  %106 = add nsw i32 %.1, 1
  %107 = sext i32 %106 to i64
  %108 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %109 = add i64 %108, -1
  %110 = icmp ugt i64 %109, %107
  br i1 %110, label %.lr.ph58, label %._crit_edge59, !llvm.loop !18

111:                                              ; preds = %.lr.ph58
  %112 = landingpad { ptr, i32 }
          cleanup
  br label %113

113:                                              ; preds = %85, %87, %111, %59, %24, %17
  %.pn45 = phi { ptr, i32 } [ %25, %24 ], [ %60, %59 ], [ %112, %111 ], [ %18, %17 ], [ %86, %85 ], [ %88, %87 ]
  call void @_ZNSt3setIcSt4lessIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #7
  call void @_ZNSt3mapIcbSt4lessIcESaISt4pairIKcbEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #7
  br label %114

114:                                              ; preds = %113, %15
  %.pn45.pn = phi { ptr, i32 } [ %.pn45, %113 ], [ %16, %15 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn45.pn
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 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 #4

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_S5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) local_unnamed_addr #5

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress nounwind 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 #3 align 2

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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 #6 align 2

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree 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 #3 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"bool", !6, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass