; LLVM IR from upupming/algorithm :: kick-start/2019/RoundC/A. Wiggle Walk.ll (Z5solvev)

; 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::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"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] }

@sr = external dso_local global i32, align 4
@sc = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@g = external dso_local global %"class.std::unordered_map", align 8
@_Z3cmdB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7getTypec(i8 noundef signext) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  call void @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) @g) #3
  %20 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) @sr)
  %21 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %20, ptr noundef nonnull align 4 dereferenceable(4) @sc)
  store i32 1, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #3
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  br label %22

22:                                               ; preds = %207, %0
  %23 = load i32, ptr %1, align 4, !tbaa !5
  %24 = load i32, ptr @n, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %27, label %26

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

27:                                               ; preds = %22
  %28 = load i32, ptr %1, align 4, !tbaa !5
  store i32 %28, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  %29 = load i32, ptr %1, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3cmdB5cxx11, i64 noundef %30)
  %32 = load i8, ptr %31, align 1, !tbaa !9
  %33 = call noundef i32 @_Z7getTypec(i8 noundef signext %32)
  store i32 %33, ptr %4, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %48, %27
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = load i32, ptr @n, align 4, !tbaa !5
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %38, label %46

38:                                               ; preds = %34
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3cmdB5cxx11, i64 noundef %40)
  %42 = load i8, ptr %41, align 1, !tbaa !9
  %43 = call noundef i32 @_Z7getTypec(i8 noundef signext %42)
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = icmp eq i32 %43, %44
  br label %46

46:                                               ; preds = %38, %34
  %47 = phi i1 [ false, %34 ], [ %45, %38 ]
  br i1 %47, label %48, label %51

48:                                               ; preds = %46
  %49 = load i32, ptr %2, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %2, align 4, !tbaa !5
  br label %34, !llvm.loop !10

51:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %52 = load i32, ptr %1, align 4, !tbaa !5
  store i32 %52, ptr %7, align 4, !tbaa !5
  br label %53

53:                                               ; preds = %79, %51
  %54 = load i32, ptr %7, align 4, !tbaa !5
  %55 = load i32, ptr %2, align 4, !tbaa !5
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  store i32 6, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %82

58:                                               ; preds = %53
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3cmdB5cxx11, i64 noundef %60)
  %62 = load i8, ptr %61, align 1, !tbaa !9
  %63 = sext i8 %62 to i32
  %64 = icmp eq i32 %63, 87
  br i1 %64, label %72, label %65

65:                                               ; preds = %58
  %66 = load i32, ptr %7, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3cmdB5cxx11, i64 noundef %67)
  %69 = load i8, ptr %68, align 1, !tbaa !9
  %70 = sext i8 %69 to i32
  %71 = icmp eq i32 %70, 78
  br i1 %71, label %72, label %75

72:                                               ; preds = %65, %58
  %73 = load i32, ptr %5, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %5, align 4, !tbaa !5
  br label %78

75:                                               ; preds = %65
  %76 = load i32, ptr %6, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %6, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %75, %72
  br label %79

79:                                               ; preds = %78
  %80 = load i32, ptr %7, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %7, align 4, !tbaa !5
  br label %53, !llvm.loop !12

82:                                               ; preds = %57
  %83 = load i32, ptr %4, align 4, !tbaa !5
  %84 = icmp eq i32 %83, 1
  br i1 %84, label %85, label %146

85:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %86 = load i32, ptr @sr, align 4, !tbaa !5
  store i32 %86, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %87 = load i32, ptr @sc, align 4, !tbaa !5
  store i32 %87, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %105, %85
  %89 = load i32, ptr %10, align 4, !tbaa !5
  %90 = load i32, ptr %5, align 4, !tbaa !5
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 9, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %108

93:                                               ; preds = %88
  br label %94

94:                                               ; preds = %99, %93
  %95 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %95, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %99, label %102

99:                                               ; preds = %94
  %100 = load i32, ptr %9, align 4, !tbaa !5
  %101 = add nsw i32 %100, -1
  store i32 %101, ptr %9, align 4, !tbaa !5
  br label %94, !llvm.loop !13

102:                                              ; preds = %94
  %103 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %103, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i32 1, ptr %104, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %102
  %106 = load i32, ptr %10, align 4, !tbaa !5
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %10, align 4, !tbaa !5
  br label %88, !llvm.loop !14

108:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  %109 = load i32, ptr @sr, align 4, !tbaa !5
  store i32 %109, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %110 = load i32, ptr @sc, align 4, !tbaa !5
  store i32 %110, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %111

111:                                              ; preds = %128, %108
  %112 = load i32, ptr %13, align 4, !tbaa !5
  %113 = load i32, ptr %6, align 4, !tbaa !5
  %114 = icmp slt i32 %112, %113
  br i1 %114, label %116, label %115

115:                                              ; preds = %111
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %131

116:                                              ; preds = %111
  br label %117

117:                                              ; preds = %122, %116
  %118 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %118, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %120 = load i32, ptr %119, align 4, !tbaa !5
  %121 = icmp ne i32 %120, 0
  br i1 %121, label %122, label %125

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

125:                                              ; preds = %117
  %126 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %127 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %126, ptr noundef nonnull align 4 dereferenceable(4) %12)
  store i32 1, ptr %127, align 4, !tbaa !5
  br label %128

128:                                              ; preds = %125
  %129 = load i32, ptr %13, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %13, align 4, !tbaa !5
  br label %111, !llvm.loop !16

131:                                              ; preds = %115
  %132 = load i32, ptr %2, align 4, !tbaa !5
  %133 = sub nsw i32 %132, 1
  %134 = sext i32 %133 to i64
  %135 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3cmdB5cxx11, i64 noundef %134)
  %136 = load i8, ptr %135, align 1, !tbaa !9
  %137 = sext i8 %136 to i32
  %138 = icmp eq i32 %137, 87
  br i1 %138, label %139, label %142

139:                                              ; preds = %131
  %140 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %140, ptr @sr, align 4, !tbaa !5
  %141 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %141, ptr @sc, align 4, !tbaa !5
  br label %145

142:                                              ; preds = %131
  %143 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %143, ptr @sr, align 4, !tbaa !5
  %144 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %144, ptr @sc, align 4, !tbaa !5
  br label %145

145:                                              ; preds = %142, %139
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %207

146:                                              ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %147 = load i32, ptr @sr, align 4, !tbaa !5
  store i32 %147, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %148 = load i32, ptr @sc, align 4, !tbaa !5
  store i32 %148, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %149

149:                                              ; preds = %166, %146
  %150 = load i32, ptr %16, align 4, !tbaa !5
  %151 = load i32, ptr %5, align 4, !tbaa !5
  %152 = icmp slt i32 %150, %151
  br i1 %152, label %154, label %153

153:                                              ; preds = %149
  store i32 19, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  br label %169

154:                                              ; preds = %149
  br label %155

155:                                              ; preds = %160, %154
  %156 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %157 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %156, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = icmp ne i32 %158, 0
  br i1 %159, label %160, label %163

160:                                              ; preds = %155
  %161 = load i32, ptr %14, align 4, !tbaa !5
  %162 = add nsw i32 %161, -1
  store i32 %162, ptr %14, align 4, !tbaa !5
  br label %155, !llvm.loop !17

163:                                              ; preds = %155
  %164 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %165 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %164, ptr noundef nonnull align 4 dereferenceable(4) %15)
  store i32 1, ptr %165, align 4, !tbaa !5
  br label %166

166:                                              ; preds = %163
  %167 = load i32, ptr %16, align 4, !tbaa !5
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %16, align 4, !tbaa !5
  br label %149, !llvm.loop !18

169:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  %170 = load i32, ptr @sr, align 4, !tbaa !5
  store i32 %170, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  %171 = load i32, ptr @sc, align 4, !tbaa !5
  store i32 %171, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %172

172:                                              ; preds = %189, %169
  %173 = load i32, ptr %19, align 4, !tbaa !5
  %174 = load i32, ptr %6, align 4, !tbaa !5
  %175 = icmp slt i32 %173, %174
  br i1 %175, label %177, label %176

176:                                              ; preds = %172
  store i32 24, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  br label %192

177:                                              ; preds = %172
  br label %178

178:                                              ; preds = %183, %177
  %179 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %180 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %179, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %181 = load i32, ptr %180, align 4, !tbaa !5
  %182 = icmp ne i32 %181, 0
  br i1 %182, label %183, label %186

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

186:                                              ; preds = %178
  %187 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %188 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %187, ptr noundef nonnull align 4 dereferenceable(4) %18)
  store i32 1, ptr %188, align 4, !tbaa !5
  br label %189

189:                                              ; preds = %186
  %190 = load i32, ptr %19, align 4, !tbaa !5
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %19, align 4, !tbaa !5
  br label %172, !llvm.loop !20

192:                                              ; preds = %176
  %193 = load i32, ptr %2, align 4, !tbaa !5
  %194 = sub nsw i32 %193, 1
  %195 = sext i32 %194 to i64
  %196 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3cmdB5cxx11, i64 noundef %195)
  %197 = load i8, ptr %196, align 1, !tbaa !9
  %198 = sext i8 %197 to i32
  %199 = icmp eq i32 %198, 78
  br i1 %199, label %200, label %203

200:                                              ; preds = %192
  %201 = load i32, ptr %14, align 4, !tbaa !5
  store i32 %201, ptr @sr, align 4, !tbaa !5
  %202 = load i32, ptr %15, align 4, !tbaa !5
  store i32 %202, ptr @sc, align 4, !tbaa !5
  br label %206

203:                                              ; preds = %192
  %204 = load i32, ptr %17, align 4, !tbaa !5
  store i32 %204, ptr @sr, align 4, !tbaa !5
  %205 = load i32, ptr %18, align 4, !tbaa !5
  store i32 %205, ptr @sc, align 4, !tbaa !5
  br label %206

206:                                              ; preds = %203, %200
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  br label %207

207:                                              ; preds = %206, %145
  %208 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %208, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  br label %22, !llvm.loop !21

209:                                              ; preds = %26
  ret void
}

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

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

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

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

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

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


; 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::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"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] }

@sr = external dso_local global i32, align 4
@sc = external dso_local global i32, align 4
@n = external dso_local local_unnamed_addr global i32, align 4
@g = external dso_local global %"class.std::unordered_map", align 8
@_Z3cmdB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7getTypec(i8 noundef signext) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  tail call void @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) @g) #3
  %9 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) @sr)
  %10 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %9, ptr noundef nonnull align 4 dereferenceable(4) @sc)
  store i32 1, ptr %10, align 4, !tbaa !5
  %11 = load i32, ptr @n, align 4, !tbaa !5
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph90, label %._crit_edge91

._crit_edge91:                                    ; preds = %113, %0
  ret void

.lr.ph90:                                         ; preds = %0, %113
  %.03888 = phi i32 [ %.039.lcssa, %113 ], [ 0, %0 ]
  %13 = sext i32 %.03888 to i64
  %14 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3cmdB5cxx11, i64 noundef %13)
  %15 = load i8, ptr %14, align 1, !tbaa !9
  %16 = call noundef i32 @_Z7getTypec(i8 noundef signext %15)
  %17 = load i32, ptr @n, align 4, !tbaa !5
  %18 = icmp slt i32 %.03888, %17
  br i1 %18, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %.lr.ph90, %23
  %indvars.iv = phi i64 [ %indvars.iv.next, %23 ], [ %13, %.lr.ph90 ]
  %19 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3cmdB5cxx11, i64 noundef %indvars.iv)
  %20 = load i8, ptr %19, align 1, !tbaa !9
  %21 = call noundef i32 @_Z7getTypec(i8 noundef signext %20)
  %22 = icmp eq i32 %21, %16
  br i1 %22, label %23, label %.critedge.loopexit

23:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %24 = load i32, ptr @n, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = icmp slt i64 %indvars.iv.next, %25
  br i1 %26, label %.lr.ph, label %.critedge.loopexit, !llvm.loop !10

.critedge.loopexit:                               ; preds = %23, %.lr.ph
  %.039.lcssa.ph.in = phi i64 [ %indvars.iv, %.lr.ph ], [ %indvars.iv.next, %23 ]
  %.039.lcssa.ph = trunc i64 %.039.lcssa.ph.in to i32
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %.lr.ph90
  %.039.lcssa = phi i32 [ %.03888, %.lr.ph90 ], [ %.039.lcssa.ph, %.critedge.loopexit ]
  %27 = icmp slt i32 %.03888, %.039.lcssa
  br i1 %27, label %.lr.ph65, label %._crit_edge.thread

._crit_edge:                                      ; preds = %46
  %28 = icmp eq i32 %16, 1
  %29 = icmp sgt i32 %.137, 0
  br i1 %28, label %47, label %80

._crit_edge.thread:                               ; preds = %.critedge
  %30 = icmp eq i32 %16, 1
  br i1 %30, label %._crit_edge82.thread, label %._crit_edge72.thread

._crit_edge72.thread:                             ; preds = %._crit_edge.thread
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  %31 = load i32, ptr @sr, align 4, !tbaa !5
  store i32 %31, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  %32 = load i32, ptr @sc, align 4, !tbaa !5
  store i32 %32, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #3
  store i32 %31, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #3
  store i32 %32, ptr %8, align 4, !tbaa !5
  br label %._crit_edge77

._crit_edge82.thread:                             ; preds = %._crit_edge.thread
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #3
  %33 = load i32, ptr @sr, align 4, !tbaa !5
  store i32 %33, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #3
  %34 = load i32, ptr @sc, align 4, !tbaa !5
  store i32 %34, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  store i32 %33, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  store i32 %34, ptr %4, align 4, !tbaa !5
  br label %._crit_edge87

.lr.ph65:                                         ; preds = %.critedge, %46
  %indvars.iv93 = phi i64 [ %indvars.iv.next94, %46 ], [ %13, %.critedge ]
  %.03563 = phi i32 [ %.1, %46 ], [ 0, %.critedge ]
  %.03662 = phi i32 [ %.137, %46 ], [ 0, %.critedge ]
  %35 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3cmdB5cxx11, i64 noundef %indvars.iv93)
  %36 = load i8, ptr %35, align 1, !tbaa !9
  %37 = icmp eq i8 %36, 87
  br i1 %37, label %42, label %38

38:                                               ; preds = %.lr.ph65
  %39 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3cmdB5cxx11, i64 noundef %indvars.iv93)
  %40 = load i8, ptr %39, align 1, !tbaa !9
  %41 = icmp eq i8 %40, 78
  br i1 %41, label %42, label %44

42:                                               ; preds = %38, %.lr.ph65
  %43 = add nsw i32 %.03662, 1
  br label %46

44:                                               ; preds = %38
  %45 = add nsw i32 %.03563, 1
  br label %46

46:                                               ; preds = %42, %44
  %.137 = phi i32 [ %43, %42 ], [ %.03662, %44 ]
  %.1 = phi i32 [ %.03563, %42 ], [ %45, %44 ]
  %indvars.iv.next94 = add nsw i64 %indvars.iv93, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next94 to i32
  %exitcond.not = icmp eq i32 %.039.lcssa, %lftr.wideiv
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph65, !llvm.loop !12

47:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #3
  %48 = load i32, ptr @sr, align 4, !tbaa !5
  store i32 %48, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #3
  %49 = load i32, ptr @sc, align 4, !tbaa !5
  store i32 %49, ptr %2, align 4, !tbaa !5
  br i1 %29, label %.preheader56, label %._crit_edge82

.preheader56:                                     ; preds = %47, %._crit_edge80
  %.03381 = phi i32 [ %63, %._crit_edge80 ], [ 0, %47 ]
  %50 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %50, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %.not4578 = icmp eq i32 %52, 0
  br i1 %.not4578, label %._crit_edge80, label %.lr.ph79

._crit_edge82.loopexit:                           ; preds = %._crit_edge80
  %.pre102 = load i32, ptr @sr, align 4, !tbaa !5
  %.pre103 = load i32, ptr @sc, align 4, !tbaa !5
  br label %._crit_edge82

._crit_edge82:                                    ; preds = %._crit_edge82.loopexit, %47
  %53 = phi i32 [ %.pre103, %._crit_edge82.loopexit ], [ %49, %47 ]
  %54 = phi i32 [ %.pre102, %._crit_edge82.loopexit ], [ %48, %47 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  store i32 %54, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  store i32 %53, ptr %4, align 4, !tbaa !5
  %55 = icmp sgt i32 %.1, 0
  br i1 %55, label %.preheader, label %._crit_edge87

.lr.ph79:                                         ; preds = %.preheader56, %.lr.ph79
  %56 = load i32, ptr %2, align 4, !tbaa !5
  %57 = add nsw i32 %56, -1
  store i32 %57, ptr %2, align 4, !tbaa !5
  %58 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %58, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %.not45 = icmp eq i32 %60, 0
  br i1 %.not45, label %._crit_edge80, label %.lr.ph79, !llvm.loop !13

._crit_edge80:                                    ; preds = %.lr.ph79, %.preheader56
  %61 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %61, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i32 1, ptr %62, align 4, !tbaa !5
  %63 = add nuw nsw i32 %.03381, 1
  %exitcond99.not = icmp eq i32 %63, %.137
  br i1 %exitcond99.not, label %._crit_edge82.loopexit, label %.preheader56, !llvm.loop !14

.preheader:                                       ; preds = %._crit_edge82, %._crit_edge85
  %.03286 = phi i32 [ %79, %._crit_edge85 ], [ 0, %._crit_edge82 ]
  %64 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %64, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %.not4483 = icmp eq i32 %66, 0
  br i1 %.not4483, label %._crit_edge85, label %.lr.ph84

._crit_edge87:                                    ; preds = %._crit_edge85, %._crit_edge82.thread, %._crit_edge82
  %67 = add nsw i32 %.039.lcssa, -1
  %68 = sext i32 %67 to i64
  %69 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3cmdB5cxx11, i64 noundef %68)
  %70 = load i8, ptr %69, align 1, !tbaa !9
  %71 = icmp eq i8 %70, 87
  %.val52 = load i32, ptr %1, align 4
  %.val53 = load i32, ptr %3, align 4
  %storemerge43 = select i1 %71, i32 %.val52, i32 %.val53
  store i32 %storemerge43, ptr @sr, align 4, !tbaa !5
  %.val54 = load i32, ptr %2, align 4
  %.val55 = load i32, ptr %4, align 4
  %storemerge42 = select i1 %71, i32 %.val54, i32 %.val55
  store i32 %storemerge42, ptr @sc, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #3
  br label %113

.lr.ph84:                                         ; preds = %.preheader, %.lr.ph84
  %72 = load i32, ptr %4, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %4, align 4, !tbaa !5
  %74 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %74, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %.not44 = icmp eq i32 %76, 0
  br i1 %.not44, label %._crit_edge85, label %.lr.ph84, !llvm.loop !15

._crit_edge85:                                    ; preds = %.lr.ph84, %.preheader
  %77 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %77, ptr noundef nonnull align 4 dereferenceable(4) %4)
  store i32 1, ptr %78, align 4, !tbaa !5
  %79 = add nuw nsw i32 %.03286, 1
  %exitcond100.not = icmp eq i32 %79, %.1
  br i1 %exitcond100.not, label %._crit_edge87, label %.preheader, !llvm.loop !16

80:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  %81 = load i32, ptr @sr, align 4, !tbaa !5
  store i32 %81, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  %82 = load i32, ptr @sc, align 4, !tbaa !5
  store i32 %82, ptr %6, align 4, !tbaa !5
  br i1 %29, label %.preheader58, label %._crit_edge72

.preheader58:                                     ; preds = %80, %._crit_edge70
  %.03171 = phi i32 [ %96, %._crit_edge70 ], [ 0, %80 ]
  %83 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %83, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %.not4168 = icmp eq i32 %85, 0
  br i1 %.not4168, label %._crit_edge70, label %.lr.ph69

._crit_edge72.loopexit:                           ; preds = %._crit_edge70
  %.pre = load i32, ptr @sr, align 4, !tbaa !5
  %.pre101 = load i32, ptr @sc, align 4, !tbaa !5
  br label %._crit_edge72

._crit_edge72:                                    ; preds = %._crit_edge72.loopexit, %80
  %86 = phi i32 [ %.pre101, %._crit_edge72.loopexit ], [ %82, %80 ]
  %87 = phi i32 [ %.pre, %._crit_edge72.loopexit ], [ %81, %80 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #3
  store i32 %87, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #3
  store i32 %86, ptr %8, align 4, !tbaa !5
  %88 = icmp sgt i32 %.1, 0
  br i1 %88, label %.preheader57, label %._crit_edge77

.lr.ph69:                                         ; preds = %.preheader58, %.lr.ph69
  %89 = load i32, ptr %5, align 4, !tbaa !5
  %90 = add nsw i32 %89, -1
  store i32 %90, ptr %5, align 4, !tbaa !5
  %91 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %91, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %.not41 = icmp eq i32 %93, 0
  br i1 %.not41, label %._crit_edge70, label %.lr.ph69, !llvm.loop !17

._crit_edge70:                                    ; preds = %.lr.ph69, %.preheader58
  %94 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %95 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %94, ptr noundef nonnull align 4 dereferenceable(4) %6)
  store i32 1, ptr %95, align 4, !tbaa !5
  %96 = add nuw nsw i32 %.03171, 1
  %exitcond97.not = icmp eq i32 %96, %.137
  br i1 %exitcond97.not, label %._crit_edge72.loopexit, label %.preheader58, !llvm.loop !18

.preheader57:                                     ; preds = %._crit_edge72, %._crit_edge75
  %.076 = phi i32 [ %112, %._crit_edge75 ], [ 0, %._crit_edge72 ]
  %97 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %97, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %.not73 = icmp eq i32 %99, 0
  br i1 %.not73, label %._crit_edge75, label %.lr.ph74

._crit_edge77:                                    ; preds = %._crit_edge75, %._crit_edge72.thread, %._crit_edge72
  %100 = add nsw i32 %.039.lcssa, -1
  %101 = sext i32 %100 to i64
  %102 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3cmdB5cxx11, i64 noundef %101)
  %103 = load i8, ptr %102, align 1, !tbaa !9
  %104 = icmp eq i8 %103, 78
  %.val = load i32, ptr %5, align 4
  %.val49 = load i32, ptr %7, align 4
  %storemerge40 = select i1 %104, i32 %.val, i32 %.val49
  store i32 %storemerge40, ptr @sr, align 4, !tbaa !5
  %.val50 = load i32, ptr %6, align 4
  %.val51 = load i32, ptr %8, align 4
  %storemerge = select i1 %104, i32 %.val50, i32 %.val51
  store i32 %storemerge, ptr @sc, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  br label %113

.lr.ph74:                                         ; preds = %.preheader57, %.lr.ph74
  %105 = load i32, ptr %7, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %7, align 4, !tbaa !5
  %107 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %108 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %107, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %.not = icmp eq i32 %109, 0
  br i1 %.not, label %._crit_edge75, label %.lr.ph74, !llvm.loop !19

._crit_edge75:                                    ; preds = %.lr.ph74, %.preheader57
  %110 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEES1_S3_SaIS4_IS5_S8_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @g, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %110, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i32 1, ptr %111, align 4, !tbaa !5
  %112 = add nuw nsw i32 %.076, 1
  %exitcond98.not = icmp eq i32 %112, %.1
  br i1 %exitcond98.not, label %._crit_edge77, label %.preheader57, !llvm.loop !20

113:                                              ; preds = %._crit_edge77, %._crit_edge87
  %114 = load i32, ptr @n, align 4, !tbaa !5
  %115 = icmp slt i32 %.039.lcssa, %114
  br i1 %115, label %.lr.ph90, label %._crit_edge91, !llvm.loop !21
}

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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 #0 align 2

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

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


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