; LLVM IR from tangjz/acm-icpc :: hackerrank/basic-cryptanalysis.ll (Z3dfsi)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, std::vector<std::pair<int, char>>>, std::allocator<std::pair<int, std::vector<std::pair<int, char>>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, std::vector<std::pair<int, char>>>, std::allocator<std::pair<int, std::vector<std::pair<int, char>>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, std::vector<std::pair<int, char>>>, std::allocator<std::pair<int, std::vector<std::pair<int, char>>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, std::vector<std::pair<int, char>>>, std::allocator<std::pair<int, std::vector<std::pair<int, char>>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.5" = type { ptr }
%"struct.std::pair" = type { i32, %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::pair<int, char>, std::allocator<std::pair<int, char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, char>, std::allocator<std::pair<int, char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, char>, std::allocator<std::pair<int, char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, char>, std::allocator<std::pair<int, char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.6" = type <{ i32, i8, [3 x i8] }>

@e = external dso_local global [101 x %"class.std::vector"], align 16
@n = external dso_local global i32, align 4
@bLen = external dso_local global [101 x i32], align 16
@ord = external dso_local global [101 x i32], align 16
@ctr = external dso_local global [27 x i32], align 16
@rctr = external dso_local global [27 x i32], align 16
@buf = external dso_local global [101 x [101 x i8]], align 16
@perm = external dso_local global [27 x i8], align 16
@bDup = external dso_local global [101 x i8], align 16
@bUpp = external dso_local global [101 x [101 x i8]], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z3dfsi(i32 noundef %0) #0 {
  %2 = alloca i1, align 1
  %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 ptr, align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i8, align 1
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = load i32, ptr @n, align 4, !tbaa !5
  %34 = icmp eq i32 %32, %33
  br i1 %34, label %35, label %117

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

36:                                               ; preds = %113, %35
  %37 = load i32, ptr %4, align 4, !tbaa !5
  %38 = load i32, ptr @n, align 4, !tbaa !5
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  store i32 2, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %116

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

42:                                               ; preds = %96, %41
  %43 = load i32, ptr %6, align 4, !tbaa !5
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [101 x i32], ptr @bLen, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = icmp slt i32 %43, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %42
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %99

50:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %51 = load i32, ptr %4, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %52
  %54 = load i32, ptr %6, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [101 x i8], ptr %53, i64 0, i64 %55
  %57 = load i8, ptr %56, align 1, !tbaa !9
  %58 = sext i8 %57 to i32
  %59 = sub nsw i32 %58, 97
  store i32 %59, ptr %7, align 4, !tbaa !5
  %60 = load i32, ptr %7, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [27 x i8], ptr @perm, i64 0, i64 %61
  %63 = load i8, ptr %62, align 1, !tbaa !9
  %64 = load i32, ptr %4, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %65
  %67 = load i32, ptr %6, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [101 x i8], ptr %66, i64 0, i64 %68
  store i8 %63, ptr %69, align 1, !tbaa !9
  %70 = load i32, ptr %4, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [101 x [101 x i8]], ptr @bUpp, i64 0, i64 %71
  %73 = load i32, ptr %6, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [101 x i8], ptr %72, i64 0, i64 %74
  %76 = load i8, ptr %75, align 1, !tbaa !10, !range !12, !noundef !13
  %77 = trunc i8 %76 to i1
  br i1 %77, label %78, label %95

78:                                               ; preds = %50
  %79 = load i32, ptr %4, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %80
  %82 = load i32, ptr %6, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [101 x i8], ptr %81, i64 0, i64 %83
  %85 = load i8, ptr %84, align 1, !tbaa !9
  %86 = sext i8 %85 to i32
  %87 = call i32 @toupper(i32 noundef %86) #7
  %88 = trunc i32 %87 to i8
  %89 = load i32, ptr %4, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %90
  %92 = load i32, ptr %6, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [101 x i8], ptr %91, i64 0, i64 %93
  store i8 %88, ptr %94, align 1, !tbaa !9
  br label %95

95:                                               ; preds = %78, %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %96

96:                                               ; preds = %95
  %97 = load i32, ptr %6, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %6, align 4, !tbaa !5
  br label %42, !llvm.loop !14

99:                                               ; preds = %49
  %100 = load i32, ptr %4, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %101
  %103 = getelementptr inbounds [101 x i8], ptr %102, i64 0, i64 0
  %104 = load i32, ptr %4, align 4, !tbaa !5
  %105 = load i32, ptr @n, align 4, !tbaa !5
  %106 = sub nsw i32 %105, 1
  %107 = icmp eq i32 %104, %106
  %108 = zext i1 %107 to i64
  %109 = getelementptr inbounds [3 x i8], ptr @.str.2, i64 0, i64 %108
  %110 = load i8, ptr %109, align 1, !tbaa !9
  %111 = sext i8 %110 to i32
  %112 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef %103, i32 noundef %111)
  br label %113

113:                                              ; preds = %99
  %114 = load i32, ptr %4, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %4, align 4, !tbaa !5
  br label %36, !llvm.loop !16

116:                                              ; preds = %40
  store i1 true, ptr %2, align 1
  br label %306

117:                                              ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %118 = load i32, ptr %3, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [101 x i32], ptr @ord, i64 0, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !5
  store i32 %121, ptr %8, align 4, !tbaa !5
  %122 = load i32, ptr %8, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [101 x i8], ptr @bDup, i64 0, i64 %123
  %125 = load i8, ptr %124, align 1, !tbaa !10, !range !12, !noundef !13
  %126 = trunc i8 %125 to i1
  br i1 %126, label %127, label %131

127:                                              ; preds = %117
  %128 = load i32, ptr %3, align 4, !tbaa !5
  %129 = add nsw i32 %128, 1
  %130 = call noundef zeroext i1 @_Z3dfsi(i32 noundef %129)
  store i1 %130, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %305

131:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %132 = load i32, ptr %8, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [101 x %"class.std::vector"], ptr @e, i64 0, i64 %133
  store ptr %134, ptr %9, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %135 = load ptr, ptr %9, align 8, !tbaa !17
  %136 = call ptr @_ZNSt6vectorISt4pairIiS_IS0_IicESaIS1_EEESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %135) #6
  %137 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %136, ptr %137, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %138 = load ptr, ptr %9, align 8, !tbaa !17
  %139 = call ptr @_ZNSt6vectorISt4pairIiS_IS0_IicESaIS1_EEESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %138) #6
  %140 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %139, ptr %140, align 8
  br label %141

141:                                              ; preds = %300, %131
  %142 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiSt6vectorIS1_IicESaIS3_EEES2_IS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  br i1 %142, label %144, label %143

143:                                              ; preds = %141
  store i32 8, ptr %5, align 4
  br label %302

144:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %145 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiSt6vectorIS1_IicESaIS3_EEES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  store ptr %145, ptr %12, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #6
  store i8 0, ptr %13, align 1, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %146 = load ptr, ptr %12, align 8, !tbaa !17
  %147 = getelementptr inbounds %"struct.std::pair", ptr %146, i32 0, i32 0
  %148 = load i32, ptr %147, align 8, !tbaa !19
  store i32 %148, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %149 = load ptr, ptr %12, align 8, !tbaa !17
  %150 = getelementptr inbounds %"struct.std::pair", ptr %149, i32 0, i32 1
  store ptr %150, ptr %15, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %151 = load ptr, ptr %15, align 8, !tbaa !17
  %152 = call ptr @_ZNSt6vectorISt4pairIicESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %151) #6
  %153 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %16, i32 0, i32 0
  store ptr %152, ptr %153, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %154 = load ptr, ptr %15, align 8, !tbaa !17
  %155 = call ptr @_ZNSt6vectorISt4pairIicESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %154) #6
  %156 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %17, i32 0, i32 0
  store ptr %155, ptr %156, align 8
  br label %157

157:                                              ; preds = %189, %144
  %158 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIicESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  br i1 %158, label %160, label %159

159:                                              ; preds = %157
  store i32 10, ptr %5, align 4
  br label %191

160:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %161 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIicESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  store ptr %161, ptr %18, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %162 = load ptr, ptr %18, align 8, !tbaa !17
  %163 = getelementptr inbounds %"struct.std::pair.6", ptr %162, i32 0, i32 0
  %164 = load i32, ptr %163, align 4, !tbaa !25
  store i32 %164, ptr %19, align 4, !tbaa !5
  %165 = load i32, ptr %19, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [27 x i8], ptr @perm, i64 0, i64 %166
  %168 = load i8, ptr %167, align 1, !tbaa !9
  %169 = icmp ne i8 %168, 0
  br i1 %169, label %170, label %182

170:                                              ; preds = %160
  %171 = load i32, ptr %19, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [27 x i8], ptr @perm, i64 0, i64 %172
  %174 = load i8, ptr %173, align 1, !tbaa !9
  %175 = sext i8 %174 to i32
  %176 = load ptr, ptr %18, align 8, !tbaa !17
  %177 = getelementptr inbounds %"struct.std::pair.6", ptr %176, i32 0, i32 1
  %178 = load i8, ptr %177, align 4, !tbaa !27
  %179 = sext i8 %178 to i32
  %180 = icmp ne i32 %175, %179
  br i1 %180, label %181, label %182

181:                                              ; preds = %170
  store i8 1, ptr %13, align 1, !tbaa !10
  store i32 10, ptr %5, align 4
  br label %183

182:                                              ; preds = %170, %160
  store i32 0, ptr %5, align 4
  br label %183

183:                                              ; preds = %182, %181
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  %184 = load i32, ptr %5, align 4
  switch i32 %184, label %186 [
    i32 0, label %185
  ]

185:                                              ; preds = %183
  store i32 0, ptr %5, align 4
  br label %186

186:                                              ; preds = %185, %183
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  %187 = load i32, ptr %5, align 4
  switch i32 %187, label %191 [
    i32 0, label %188
  ]

188:                                              ; preds = %186
  br label %189

189:                                              ; preds = %188
  %190 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIicESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  br label %157

191:                                              ; preds = %186, %159
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %192

192:                                              ; preds = %191
  %193 = load i8, ptr %13, align 1, !tbaa !10, !range !12, !noundef !13
  %194 = trunc i8 %193 to i1
  br i1 %194, label %195, label %196

195:                                              ; preds = %192
  store i32 9, ptr %5, align 4
  br label %294

196:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %197 = load ptr, ptr %12, align 8, !tbaa !17
  %198 = getelementptr inbounds %"struct.std::pair", ptr %197, i32 0, i32 1
  store ptr %198, ptr %20, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %199 = load ptr, ptr %20, align 8, !tbaa !17
  %200 = call ptr @_ZNSt6vectorISt4pairIicESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %199) #6
  %201 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %21, i32 0, i32 0
  store ptr %200, ptr %201, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %202 = load ptr, ptr %20, align 8, !tbaa !17
  %203 = call ptr @_ZNSt6vectorISt4pairIicESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %202) #6
  %204 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %22, i32 0, i32 0
  store ptr %203, ptr %204, align 8
  br label %205

205:                                              ; preds = %243, %196
  %206 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIicESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  br i1 %206, label %208, label %207

207:                                              ; preds = %205
  store i32 12, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %245

208:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %209 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIicESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  store ptr %209, ptr %23, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %210 = load ptr, ptr %23, align 8, !tbaa !17
  %211 = getelementptr inbounds %"struct.std::pair.6", ptr %210, i32 0, i32 0
  %212 = load i32, ptr %211, align 4, !tbaa !25
  store i32 %212, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %213 = load ptr, ptr %23, align 8, !tbaa !17
  %214 = getelementptr inbounds %"struct.std::pair.6", ptr %213, i32 0, i32 1
  %215 = load i8, ptr %214, align 4, !tbaa !27
  %216 = sext i8 %215 to i32
  %217 = sub nsw i32 %216, 97
  store i32 %217, ptr %25, align 4, !tbaa !5
  %218 = load i32, ptr %24, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [27 x i32], ptr @ctr, i64 0, i64 %219
  %221 = load i32, ptr %220, align 4, !tbaa !5
  %222 = add nsw i32 %221, 1
  store i32 %222, ptr %220, align 4, !tbaa !5
  %223 = icmp ne i32 %221, 0
  br i1 %223, label %242, label %224

224:                                              ; preds = %208
  %225 = load i32, ptr %25, align 4, !tbaa !5
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [27 x i32], ptr @rctr, i64 0, i64 %226
  %228 = load i32, ptr %227, align 4, !tbaa !5
  %229 = add nsw i32 %228, 1
  store i32 %229, ptr %227, align 4, !tbaa !5
  %230 = load i8, ptr %13, align 1, !tbaa !10, !range !12, !noundef !13
  %231 = trunc i8 %230 to i1
  %232 = zext i1 %231 to i32
  %233 = or i32 %232, %228
  %234 = icmp ne i32 %233, 0
  %235 = zext i1 %234 to i8
  store i8 %235, ptr %13, align 1, !tbaa !10
  %236 = load ptr, ptr %23, align 8, !tbaa !17
  %237 = getelementptr inbounds %"struct.std::pair.6", ptr %236, i32 0, i32 1
  %238 = load i8, ptr %237, align 4, !tbaa !27
  %239 = load i32, ptr %24, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [27 x i8], ptr @perm, i64 0, i64 %240
  store i8 %238, ptr %241, align 1, !tbaa !9
  br label %242

242:                                              ; preds = %224, %208
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %243

243:                                              ; preds = %242
  %244 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIicESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  br label %205

245:                                              ; preds = %207
  %246 = load i8, ptr %13, align 1, !tbaa !10, !range !12, !noundef !13
  %247 = trunc i8 %246 to i1
  br i1 %247, label %253, label %248

248:                                              ; preds = %245
  %249 = load i32, ptr %3, align 4, !tbaa !5
  %250 = add nsw i32 %249, 1
  %251 = call noundef zeroext i1 @_Z3dfsi(i32 noundef %250)
  br i1 %251, label %252, label %253

252:                                              ; preds = %248
  store i1 true, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %294

253:                                              ; preds = %248, %245
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %254 = load ptr, ptr %12, align 8, !tbaa !17
  %255 = getelementptr inbounds %"struct.std::pair", ptr %254, i32 0, i32 1
  store ptr %255, ptr %26, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %256 = load ptr, ptr %26, align 8, !tbaa !17
  %257 = call ptr @_ZNSt6vectorISt4pairIicESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %256) #6
  %258 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %27, i32 0, i32 0
  store ptr %257, ptr %258, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %259 = load ptr, ptr %26, align 8, !tbaa !17
  %260 = call ptr @_ZNSt6vectorISt4pairIicESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %259) #6
  %261 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %28, i32 0, i32 0
  store ptr %260, ptr %261, align 8
  br label %262

262:                                              ; preds = %291, %253
  %263 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIicESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #6
  br i1 %263, label %265, label %264

264:                                              ; preds = %262
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %293

265:                                              ; preds = %262
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %266 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIicESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #6
  store ptr %266, ptr %29, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  %267 = load ptr, ptr %29, align 8, !tbaa !17
  %268 = getelementptr inbounds %"struct.std::pair.6", ptr %267, i32 0, i32 0
  %269 = load i32, ptr %268, align 4, !tbaa !25
  store i32 %269, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  %270 = load ptr, ptr %29, align 8, !tbaa !17
  %271 = getelementptr inbounds %"struct.std::pair.6", ptr %270, i32 0, i32 1
  %272 = load i8, ptr %271, align 4, !tbaa !27
  %273 = sext i8 %272 to i32
  %274 = sub nsw i32 %273, 97
  store i32 %274, ptr %31, align 4, !tbaa !5
  %275 = load i32, ptr %30, align 4, !tbaa !5
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds [27 x i32], ptr @ctr, i64 0, i64 %276
  %278 = load i32, ptr %277, align 4, !tbaa !5
  %279 = add nsw i32 %278, -1
  store i32 %279, ptr %277, align 4, !tbaa !5
  %280 = icmp ne i32 %279, 0
  br i1 %280, label %290, label %281

281:                                              ; preds = %265
  %282 = load i32, ptr %31, align 4, !tbaa !5
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds [27 x i32], ptr @rctr, i64 0, i64 %283
  %285 = load i32, ptr %284, align 4, !tbaa !5
  %286 = add nsw i32 %285, -1
  store i32 %286, ptr %284, align 4, !tbaa !5
  %287 = load i32, ptr %30, align 4, !tbaa !5
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds [27 x i8], ptr @perm, i64 0, i64 %288
  store i8 0, ptr %289, align 1, !tbaa !9
  br label %290

290:                                              ; preds = %281, %265
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %291

291:                                              ; preds = %290
  %292 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIicESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #6
  br label %262

293:                                              ; preds = %264
  store i32 0, ptr %5, align 4
  br label %294

294:                                              ; preds = %293, %252, %195
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #6
  %295 = load i32, ptr %5, align 4
  switch i32 %295, label %297 [
    i32 0, label %296
  ]

296:                                              ; preds = %294
  store i32 0, ptr %5, align 4
  br label %297

297:                                              ; preds = %296, %294
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  %298 = load i32, ptr %5, align 4
  switch i32 %298, label %302 [
    i32 0, label %299
    i32 9, label %300
  ]

299:                                              ; preds = %297
  br label %300

300:                                              ; preds = %299, %297
  %301 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiSt6vectorIS1_IicESaIS3_EEES2_IS6_SaIS6_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  br label %141

302:                                              ; preds = %297, %143
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  %303 = load i32, ptr %5, align 4
  switch i32 %303, label %305 [
    i32 8, label %304
  ]

304:                                              ; preds = %302
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %305

305:                                              ; preds = %304, %302, %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %306

306:                                              ; preds = %305, %116
  %307 = load i1, ptr %2, align 1
  ret i1 %307
}

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @toupper(i32 noundef) #2

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

declare i32 @printf(ptr noundef, ...) #3

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

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

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

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

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

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

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

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

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

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

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

!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 = !{i8 0, i8 2}
!13 = !{}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = !{!18, !18, i64 0}
!18 = !{!"any pointer", !7, i64 0}
!19 = !{!20, !6, i64 0}
!20 = !{!"_ZTSSt4pairIiSt6vectorIS_IicESaIS1_EEE", !6, i64 0, !21, i64 8}
!21 = !{!"_ZTSSt6vectorISt4pairIicESaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseISt4pairIicESaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseISt4pairIicESaIS1_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseISt4pairIicESaIS1_EE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!25 = !{!26, !6, i64 0}
!26 = !{!"_ZTSSt4pairIicE", !6, i64 0, !7, i64 4}
!27 = !{!26, !7, i64 4}


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, std::vector<std::pair<int, char>>>, std::allocator<std::pair<int, std::vector<std::pair<int, char>>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, std::vector<std::pair<int, char>>>, std::allocator<std::pair<int, std::vector<std::pair<int, char>>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, std::vector<std::pair<int, char>>>, std::allocator<std::pair<int, std::vector<std::pair<int, char>>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, std::vector<std::pair<int, char>>>, std::allocator<std::pair<int, std::vector<std::pair<int, char>>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.5" = type { ptr }

@e = external dso_local global [101 x %"class.std::vector"], align 16
@n = external dso_local local_unnamed_addr global i32, align 4
@bLen = external dso_local local_unnamed_addr global [101 x i32], align 16
@ord = external dso_local local_unnamed_addr global [101 x i32], align 16
@ctr = external dso_local local_unnamed_addr global [27 x i32], align 16
@rctr = external dso_local local_unnamed_addr global [27 x i32], align 16
@buf = external dso_local global [101 x [101 x i8]], align 16
@perm = external dso_local local_unnamed_addr global [27 x i8], align 16
@bDup = external dso_local local_unnamed_addr global [101 x i8], align 16
@bUpp = external dso_local local_unnamed_addr global [101 x [101 x i8]], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_Z3dfsi(i32 noundef %0) local_unnamed_addr #0 {
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %10 = load i32, ptr @n, align 4, !tbaa !5
  %11 = icmp eq i32 %10, %0
  br i1 %11, label %.preheader80, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %1
  %12 = sext i32 %0 to i64
  br label %.lr.ph

.preheader80:                                     ; preds = %tailrecurse, %1
  %13 = icmp sgt i32 %10, 0
  br i1 %13, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %.preheader80, %._crit_edge103
  %indvars.iv112 = phi i64 [ %indvars.iv.next113, %._crit_edge103 ], [ 0, %.preheader80 ]
  %14 = phi i32 [ %27, %._crit_edge103 ], [ %10, %.preheader80 ]
  %15 = getelementptr inbounds [101 x i32], ptr @bLen, i64 0, i64 %indvars.iv112
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph102.preheader, label %._crit_edge103

.lr.ph102.preheader:                              ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %16 to i64
  br label %.lr.ph102

._crit_edge103:                                   ; preds = %43, %.preheader
  %18 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %indvars.iv112
  %19 = add nsw i32 %14, -1
  %20 = zext i32 %19 to i64
  %21 = icmp eq i64 %indvars.iv112, %20
  %22 = zext i1 %21 to i64
  %23 = getelementptr inbounds [3 x i8], ptr @.str.2, i64 0, i64 %22
  %24 = load i8, ptr %23, align 1, !tbaa !9
  %25 = sext i8 %24 to i32
  %26 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull %18, i32 noundef %25)
  %indvars.iv.next113 = add nuw nsw i64 %indvars.iv112, 1
  %27 = load i32, ptr @n, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = icmp slt i64 %indvars.iv.next113, %28
  br i1 %29, label %.preheader, label %.loopexit, !llvm.loop !10

.lr.ph102:                                        ; preds = %.lr.ph102.preheader, %43
  %indvars.iv109 = phi i64 [ 0, %.lr.ph102.preheader ], [ %indvars.iv.next110, %43 ]
  %30 = getelementptr inbounds [101 x [101 x i8]], ptr @buf, i64 0, i64 %indvars.iv112, i64 %indvars.iv109
  %31 = load i8, ptr %30, align 1, !tbaa !9
  %32 = sext i8 %31 to i64
  %33 = add nsw i64 %32, -97
  %34 = getelementptr inbounds [27 x i8], ptr @perm, i64 0, i64 %33
  %35 = load i8, ptr %34, align 1, !tbaa !9
  store i8 %35, ptr %30, align 1, !tbaa !9
  %36 = getelementptr inbounds [101 x [101 x i8]], ptr @bUpp, i64 0, i64 %indvars.iv112, i64 %indvars.iv109
  %37 = load i8, ptr %36, align 1, !tbaa !12, !range !14, !noundef !15
  %38 = trunc nuw i8 %37 to i1
  br i1 %38, label %39, label %43

39:                                               ; preds = %.lr.ph102
  %40 = sext i8 %35 to i32
  %41 = tail call i32 @toupper(i32 noundef %40) #5
  %42 = trunc i32 %41 to i8
  store i8 %42, ptr %30, align 1, !tbaa !9
  br label %43

43:                                               ; preds = %39, %.lr.ph102
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next110, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge103, label %.lr.ph102, !llvm.loop !16

.lr.ph:                                           ; preds = %.lr.ph.preheader, %tailrecurse
  %indvars.iv = phi i64 [ %12, %.lr.ph.preheader ], [ %indvars.iv.next, %tailrecurse ]
  %44 = getelementptr inbounds [101 x i32], ptr @ord, i64 0, i64 %indvars.iv
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [101 x i8], ptr @bDup, i64 0, i64 %46
  %48 = load i8, ptr %47, align 1, !tbaa !12, !range !14, !noundef !15
  %49 = trunc nuw i8 %48 to i1
  br i1 %49, label %tailrecurse, label %52

tailrecurse:                                      ; preds = %.lr.ph
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %50 = trunc nsw i64 %indvars.iv.next to i32
  %51 = icmp eq i32 %10, %50
  br i1 %51, label %.preheader80, label %.lr.ph

52:                                               ; preds = %.lr.ph
  %53 = getelementptr inbounds [101 x %"class.std::vector"], ptr @e, i64 0, i64 %46
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %54 = tail call ptr @_ZNSt6vectorISt4pairIiS_IS0_IicESaIS1_EEESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #6
  store ptr %54, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %55 = tail call ptr @_ZNSt6vectorISt4pairIiS_IS0_IicESaIS1_EEESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #6
  store ptr %55, ptr %3, align 8
  %56 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiSt6vectorIS1_IicESaIS3_EEES2_IS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  br i1 %56, label %.lr.ph97, label %._crit_edge98

.lr.ph97:                                         ; preds = %52
  %57 = trunc nsw i64 %indvars.iv to i32
  %58 = add nsw i32 %57, 1
  br label %59

59:                                               ; preds = %.lr.ph97, %126
  %60 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiSt6vectorIS1_IicESaIS3_EEES2_IS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  %61 = getelementptr inbounds i8, ptr %60, i64 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %62 = call ptr @_ZNSt6vectorISt4pairIicESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %61) #6
  store ptr %62, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %63 = call ptr @_ZNSt6vectorISt4pairIicESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %61) #6
  store ptr %63, ptr %5, align 8
  %64 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIicESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  br i1 %64, label %.lr.ph85, label %.loopexit118

.lr.ph85:                                         ; preds = %59, %72
  %65 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIicESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %66 = load i32, ptr %65, align 4, !tbaa !17
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [27 x i8], ptr @perm, i64 0, i64 %67
  %69 = load i8, ptr %68, align 1, !tbaa !9
  %.not = icmp eq i8 %69, 0
  %70 = getelementptr inbounds i8, ptr %65, i64 4
  %71 = load i8, ptr %70, align 4
  %.not75 = icmp eq i8 %69, %71
  %or.cond = select i1 %.not, i1 true, i1 %.not75
  br i1 %or.cond, label %72, label %._crit_edge

72:                                               ; preds = %.lr.ph85
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIicESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %74 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIicESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  br i1 %74, label %.lr.ph85, label %.loopexit118

._crit_edge:                                      ; preds = %.lr.ph85
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %126

.loopexit118:                                     ; preds = %72, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %75 = call ptr @_ZNSt6vectorISt4pairIicESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %61) #6
  store ptr %75, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %76 = call ptr @_ZNSt6vectorISt4pairIicESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %61) #6
  store ptr %76, ptr %7, align 8
  %77 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIicESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br i1 %77, label %.lr.ph90, label %._crit_edge91.thread

._crit_edge91.thread:                             ; preds = %.loopexit118
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %102

._crit_edge91:                                    ; preds = %99
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %78 = trunc nuw i8 %.472 to i1
  br i1 %78, label %104, label %102

.lr.ph90:                                         ; preds = %.loopexit118, %99
  %.37188 = phi i8 [ %.472, %99 ], [ 0, %.loopexit118 ]
  %79 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIicESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  %80 = load i32, ptr %79, align 4, !tbaa !17
  %81 = getelementptr inbounds i8, ptr %79, i64 4
  %82 = load i8, ptr %81, align 4, !tbaa !19
  %83 = sext i32 %80 to i64
  %84 = getelementptr inbounds [27 x i32], ptr @ctr, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %84, align 4, !tbaa !5
  %.not77 = icmp eq i32 %85, 0
  br i1 %.not77, label %87, label %99

87:                                               ; preds = %.lr.ph90
  %88 = sext i8 %82 to i64
  %89 = add nsw i64 %88, -97
  %90 = getelementptr inbounds [27 x i32], ptr @rctr, i64 0, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %90, align 4, !tbaa !5
  %93 = and i8 %.37188, 1
  %94 = zext nneg i8 %93 to i32
  %95 = or i32 %91, %94
  %96 = icmp ne i32 %95, 0
  %97 = zext i1 %96 to i8
  %98 = getelementptr inbounds [27 x i8], ptr @perm, i64 0, i64 %83
  store i8 %82, ptr %98, align 1, !tbaa !9
  br label %99

99:                                               ; preds = %87, %.lr.ph90
  %.472 = phi i8 [ %.37188, %.lr.ph90 ], [ %97, %87 ]
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIicESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  %101 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIicESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br i1 %101, label %.lr.ph90, label %._crit_edge91

102:                                              ; preds = %._crit_edge91.thread, %._crit_edge91
  %103 = call noundef zeroext i1 @_Z3dfsi(i32 noundef %58)
  br i1 %103, label %._crit_edge98, label %104

104:                                              ; preds = %102, %._crit_edge91
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %105 = call ptr @_ZNSt6vectorISt4pairIicESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %61) #6
  store ptr %105, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %106 = call ptr @_ZNSt6vectorISt4pairIicESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %61) #6
  store ptr %106, ptr %9, align 8
  %107 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIicESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br i1 %107, label %.lr.ph94, label %._crit_edge95

._crit_edge95:                                    ; preds = %123, %104
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %126

.lr.ph94:                                         ; preds = %104, %123
  %108 = call noundef nonnull align 4 dereferenceable(5) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIicESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %109 = load i32, ptr %108, align 4, !tbaa !17
  %110 = getelementptr inbounds i8, ptr %108, i64 4
  %111 = load i8, ptr %110, align 4, !tbaa !19
  %112 = sext i32 %109 to i64
  %113 = getelementptr inbounds [27 x i32], ptr @ctr, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = add nsw i32 %114, -1
  store i32 %115, ptr %113, align 4, !tbaa !5
  %.not76 = icmp eq i32 %115, 0
  br i1 %.not76, label %116, label %123

116:                                              ; preds = %.lr.ph94
  %117 = sext i8 %111 to i64
  %118 = add nsw i64 %117, -97
  %119 = getelementptr inbounds [27 x i32], ptr @rctr, i64 0, i64 %118
  %120 = load i32, ptr %119, align 4, !tbaa !5
  %121 = add nsw i32 %120, -1
  store i32 %121, ptr %119, align 4, !tbaa !5
  %122 = getelementptr inbounds [27 x i8], ptr @perm, i64 0, i64 %112
  store i8 0, ptr %122, align 1, !tbaa !9
  br label %123

123:                                              ; preds = %116, %.lr.ph94
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIicESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %125 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIicESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br i1 %125, label %.lr.ph94, label %._crit_edge95

126:                                              ; preds = %._crit_edge, %._crit_edge95
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiSt6vectorIS1_IicESaIS3_EEES2_IS6_SaIS6_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  %128 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiSt6vectorIS1_IicESaIS3_EEES2_IS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  br i1 %128, label %59, label %._crit_edge98

._crit_edge98:                                    ; preds = %126, %102, %52
  %.lcssa81 = phi i1 [ false, %52 ], [ true, %102 ], [ false, %126 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  br label %.loopexit

.loopexit:                                        ; preds = %._crit_edge103, %.preheader80, %._crit_edge98
  %.4 = phi i1 [ %.lcssa81, %._crit_edge98 ], [ true, %.preheader80 ], [ true, %._crit_edge103 ]
  ret i1 %.4
}

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare i32 @toupper(i32 noundef) local_unnamed_addr #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: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiSt6vectorIS1_IicESaIS3_EEES2_IS6_SaIS6_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nofree nounwind willreturn memory(read) "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 = { 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 #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind willreturn memory(read) }
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 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13, !13, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = distinct !{!16, !11}
!17 = !{!18, !6, i64 0}
!18 = !{!"_ZTSSt4pairIicE", !6, i64 0, !7, i64 4}
!19 = !{!18, !7, i64 4}


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