; LLVM IR from VastoLorde95/Competitive-Programming :: HackerEarth/Tesco 2016/Problem C/my (C)

; 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::__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] }
%"struct.std::pair" = type { i32, i32 }

@_Z1gB5cxx11 = external dso_local global [211 x %"class.std::__cxx11::basic_string"], align 16
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z6verifyRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %0) #0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca %"struct.std::pair", align 4
  %5 = alloca %"struct.std::pair", align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair", align 4
  %10 = alloca %"struct.std::pair", align 4
  %11 = alloca [211 x [211 x i32]], align 16
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 4 dereferenceable(8) %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %15

15:                                               ; preds = %57, %1
  %16 = load i32, ptr %6, align 4, !tbaa !9
  %17 = load i32, ptr @n, align 4, !tbaa !9
  %18 = icmp slt i32 %16, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %15
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %60

20:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %53, %20
  %22 = load i32, ptr %8, align 4, !tbaa !9
  %23 = load i32, ptr @m, align 4, !tbaa !9
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %21
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %56

26:                                               ; preds = %21
  %27 = load i32, ptr %6, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [211 x %"class.std::__cxx11::basic_string"], ptr @_Z1gB5cxx11, i64 0, i64 %28
  %30 = load i32, ptr %8, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %29, i64 noundef %31)
  %33 = load i8, ptr %32, align 1, !tbaa !11
  %34 = sext i8 %33 to i32
  %35 = icmp eq i32 %34, 83
  br i1 %35, label %36, label %39

36:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %37 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i64 %37, ptr %9, align 4
  %38 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %39

39:                                               ; preds = %36, %26
  %40 = load i32, ptr %6, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [211 x %"class.std::__cxx11::basic_string"], ptr @_Z1gB5cxx11, i64 0, i64 %41
  %43 = load i32, ptr %8, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %42, i64 noundef %44)
  %46 = load i8, ptr %45, align 1, !tbaa !11
  %47 = sext i8 %46 to i32
  %48 = icmp eq i32 %47, 70
  br i1 %48, label %49, label %52

49:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %50 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i64 %50, ptr %10, align 4
  %51 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %52

52:                                               ; preds = %49, %39
  br label %53

53:                                               ; preds = %52
  %54 = load i32, ptr %8, align 4, !tbaa !9
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %8, align 4, !tbaa !9
  br label %21, !llvm.loop !12

56:                                               ; preds = %25
  br label %57

57:                                               ; preds = %56
  %58 = load i32, ptr %6, align 4, !tbaa !9
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %6, align 4, !tbaa !9
  br label %15, !llvm.loop !14

60:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 178084, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %83, %60
  %62 = load i32, ptr %12, align 4, !tbaa !9
  %63 = load i32, ptr @n, align 4, !tbaa !9
  %64 = icmp slt i32 %62, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %61
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %86

66:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %67

67:                                               ; preds = %79, %66
  %68 = load i32, ptr %13, align 4, !tbaa !9
  %69 = load i32, ptr @n, align 4, !tbaa !9
  %70 = icmp slt i32 %68, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %67
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %82

72:                                               ; preds = %67
  %73 = load i32, ptr %12, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [211 x [211 x i32]], ptr %11, i64 0, i64 %74
  %76 = load i32, ptr %13, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [211 x i32], ptr %75, i64 0, i64 %77
  store i32 0, ptr %78, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %72
  %80 = load i32, ptr %13, align 4, !tbaa !9
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %13, align 4, !tbaa !9
  br label %67, !llvm.loop !15

82:                                               ; preds = %71
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %12, align 4, !tbaa !9
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %12, align 4, !tbaa !9
  br label %61, !llvm.loop !16

86:                                               ; preds = %65
  %87 = getelementptr inbounds %"struct.std::pair", ptr %4, i32 0, i32 0
  %88 = load i32, ptr %87, align 4, !tbaa !17
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [211 x [211 x i32]], ptr %11, i64 0, i64 %89
  %91 = getelementptr inbounds %"struct.std::pair", ptr %4, i32 0, i32 1
  %92 = load i32, ptr %91, align 4, !tbaa !19
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [211 x i32], ptr %90, i64 0, i64 %93
  store i32 1, ptr %94, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %95

95:                                               ; preds = %172, %86
  %96 = load i32, ptr %14, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = load ptr, ptr %3, align 8, !tbaa !5
  %99 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %98) #4
  %100 = icmp ult i64 %97, %99
  br i1 %100, label %102, label %101

101:                                              ; preds = %95
  store i32 14, ptr %7, align 4
  br label %175

102:                                              ; preds = %95
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = load i32, ptr %14, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %103, i64 noundef %105)
  %107 = load i8, ptr %106, align 1, !tbaa !11
  %108 = sext i8 %107 to i32
  %109 = icmp eq i32 %108, 76
  br i1 %109, label %110, label %114

110:                                              ; preds = %102
  %111 = getelementptr inbounds %"struct.std::pair", ptr %4, i32 0, i32 1
  %112 = load i32, ptr %111, align 4, !tbaa !19
  %113 = sub nsw i32 %112, 1
  store i32 %113, ptr %111, align 4, !tbaa !19
  br label %144

114:                                              ; preds = %102
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = load i32, ptr %14, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %115, i64 noundef %117)
  %119 = load i8, ptr %118, align 1, !tbaa !11
  %120 = sext i8 %119 to i32
  %121 = icmp eq i32 %120, 82
  br i1 %121, label %122, label %126

122:                                              ; preds = %114
  %123 = getelementptr inbounds %"struct.std::pair", ptr %4, i32 0, i32 1
  %124 = load i32, ptr %123, align 4, !tbaa !19
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %123, align 4, !tbaa !19
  br label %143

126:                                              ; preds = %114
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  %128 = load i32, ptr %14, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %127, i64 noundef %129)
  %131 = load i8, ptr %130, align 1, !tbaa !11
  %132 = sext i8 %131 to i32
  %133 = icmp eq i32 %132, 85
  br i1 %133, label %134, label %138

134:                                              ; preds = %126
  %135 = getelementptr inbounds %"struct.std::pair", ptr %4, i32 0, i32 0
  %136 = load i32, ptr %135, align 4, !tbaa !17
  %137 = sub nsw i32 %136, 1
  store i32 %137, ptr %135, align 4, !tbaa !17
  br label %142

138:                                              ; preds = %126
  %139 = getelementptr inbounds %"struct.std::pair", ptr %4, i32 0, i32 0
  %140 = load i32, ptr %139, align 4, !tbaa !17
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %139, align 4, !tbaa !17
  br label %142

142:                                              ; preds = %138, %134
  br label %143

143:                                              ; preds = %142, %122
  br label %144

144:                                              ; preds = %143, %110
  %145 = getelementptr inbounds %"struct.std::pair", ptr %4, i32 0, i32 0
  %146 = load i32, ptr %145, align 4, !tbaa !17
  %147 = getelementptr inbounds %"struct.std::pair", ptr %4, i32 0, i32 1
  %148 = load i32, ptr %147, align 4, !tbaa !19
  %149 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %146, i32 noundef %148)
  br i1 %149, label %151, label %150

150:                                              ; preds = %144
  store i1 false, ptr %2, align 1
  store i32 1, ptr %7, align 4
  br label %175

151:                                              ; preds = %144
  %152 = getelementptr inbounds %"struct.std::pair", ptr %4, i32 0, i32 0
  %153 = load i32, ptr %152, align 4, !tbaa !17
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [211 x [211 x i32]], ptr %11, i64 0, i64 %154
  %156 = getelementptr inbounds %"struct.std::pair", ptr %4, i32 0, i32 1
  %157 = load i32, ptr %156, align 4, !tbaa !19
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [211 x i32], ptr %155, i64 0, i64 %158
  %160 = load i32, ptr %159, align 4, !tbaa !9
  %161 = icmp ne i32 %160, 0
  br i1 %161, label %162, label %163

162:                                              ; preds = %151
  store i1 false, ptr %2, align 1
  store i32 1, ptr %7, align 4
  br label %175

163:                                              ; preds = %151
  %164 = getelementptr inbounds %"struct.std::pair", ptr %4, i32 0, i32 0
  %165 = load i32, ptr %164, align 4, !tbaa !17
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [211 x [211 x i32]], ptr %11, i64 0, i64 %166
  %168 = getelementptr inbounds %"struct.std::pair", ptr %4, i32 0, i32 1
  %169 = load i32, ptr %168, align 4, !tbaa !19
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [211 x i32], ptr %167, i64 0, i64 %170
  store i32 1, ptr %171, align 4, !tbaa !9
  br label %172

172:                                              ; preds = %163
  %173 = load i32, ptr %14, align 4, !tbaa !9
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %14, align 4, !tbaa !9
  br label %95, !llvm.loop !20

175:                                              ; preds = %162, %150, %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  %176 = load i32, ptr %7, align 4
  switch i32 %176, label %181 [
    i32 14, label %177
  ]

177:                                              ; preds = %175
  %178 = call noundef zeroext i1 @_ZStneIiiEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %5)
  br i1 %178, label %179, label %180

179:                                              ; preds = %177
  store i1 false, ptr %2, align 1
  store i32 1, ptr %7, align 4
  br label %181

180:                                              ; preds = %177
  store i1 true, ptr %2, align 1
  store i32 1, ptr %7, align 4
  br label %181

181:                                              ; preds = %180, %179, %175
  call void @llvm.lifetime.end.p0(i64 178084, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  %182 = load i1, ptr %2, align 1
  ret i1 %182
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #0

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z7inrangeii(i32 noundef, i32 noundef) #3

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

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

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

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


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

%"class.std::__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] }
%"struct.std::pair" = type { i32, i32 }

@_Z1gB5cxx11 = external dso_local global [211 x %"class.std::__cxx11::basic_string"], align 16
@n = external dso_local local_unnamed_addr global i32, align 4
@m = external dso_local local_unnamed_addr global i32, align 4

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z6verifyRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %0) local_unnamed_addr #0 {
  %2 = alloca %"struct.std::pair", align 4
  %3 = alloca %"struct.std::pair", align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca %"struct.std::pair", align 8
  %8 = alloca [211 x [211 x i32]], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 4 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 4 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  store i32 0, ptr %4, align 4, !tbaa !5
  %9 = load i32, ptr @n, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph26, label %._crit_edge27.thread

._crit_edge27.thread:                             ; preds = %1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 178084, ptr nonnull %8) #5
  br label %._crit_edge33

.lr.ph26:                                         ; preds = %1
  %11 = load i32, ptr @m, align 4, !tbaa !5
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph26.split, label %._crit_edge27

._crit_edge27:                                    ; preds = %._crit_edge, %.lr.ph26
  %.lcssa = phi i32 [ %9, %.lr.ph26 ], [ %29, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 178084, ptr nonnull %8) #5
  %13 = icmp sgt i32 %.lcssa, 0
  br i1 %13, label %.preheader.us.preheader, label %._crit_edge33

.preheader.us.preheader:                          ; preds = %._crit_edge27
  %14 = zext nneg i32 %.lcssa to i64
  %15 = shl nuw nsw i64 %14, 2
  %xtraiter = and i64 %14, 7
  %16 = icmp ult i32 %.lcssa, 8
  br i1 %16, label %._crit_edge33.loopexit.unr-lcssa, label %.preheader.us.preheader.new

.preheader.us.preheader.new:                      ; preds = %.preheader.us.preheader
  %unroll_iter = and i64 %14, 2147483640
  %invariant.gep = getelementptr i8, ptr %8, i64 844
  %invariant.gep54 = getelementptr i8, ptr %8, i64 1688
  %invariant.gep56 = getelementptr i8, ptr %8, i64 2532
  %invariant.gep58 = getelementptr i8, ptr %8, i64 3376
  %invariant.gep60 = getelementptr i8, ptr %8, i64 4220
  %invariant.gep62 = getelementptr i8, ptr %8, i64 5064
  %invariant.gep64 = getelementptr i8, ptr %8, i64 5908
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us, %.preheader.us.preheader.new
  %indvar = phi i64 [ 0, %.preheader.us.preheader.new ], [ %indvar.next.7, %.preheader.us ]
  %niter = phi i64 [ 0, %.preheader.us.preheader.new ], [ %niter.next.7, %.preheader.us ]
  %17 = mul nuw nsw i64 %indvar, 844
  %scevgep = getelementptr i8, ptr %8, i64 %17
  call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %15, i1 false), !tbaa !5
  %18 = mul nuw i64 %indvar, 844
  %gep = getelementptr i8, ptr %invariant.gep, i64 %18
  call void @llvm.memset.p0.i64(ptr align 4 %gep, i8 0, i64 %15, i1 false), !tbaa !5
  %19 = mul nuw i64 %indvar, 844
  %gep55 = getelementptr i8, ptr %invariant.gep54, i64 %19
  call void @llvm.memset.p0.i64(ptr align 8 %gep55, i8 0, i64 %15, i1 false), !tbaa !5
  %20 = mul nuw i64 %indvar, 844
  %gep57 = getelementptr i8, ptr %invariant.gep56, i64 %20
  call void @llvm.memset.p0.i64(ptr align 4 %gep57, i8 0, i64 %15, i1 false), !tbaa !5
  %21 = mul nuw i64 %indvar, 844
  %gep59 = getelementptr i8, ptr %invariant.gep58, i64 %21
  call void @llvm.memset.p0.i64(ptr align 16 %gep59, i8 0, i64 %15, i1 false), !tbaa !5
  %22 = mul nuw i64 %indvar, 844
  %gep61 = getelementptr i8, ptr %invariant.gep60, i64 %22
  call void @llvm.memset.p0.i64(ptr align 4 %gep61, i8 0, i64 %15, i1 false), !tbaa !5
  %23 = mul nuw i64 %indvar, 844
  %gep63 = getelementptr i8, ptr %invariant.gep62, i64 %23
  call void @llvm.memset.p0.i64(ptr align 8 %gep63, i8 0, i64 %15, i1 false), !tbaa !5
  %24 = mul nuw i64 %indvar, 844
  %gep65 = getelementptr i8, ptr %invariant.gep64, i64 %24
  call void @llvm.memset.p0.i64(ptr align 4 %gep65, i8 0, i64 %15, i1 false), !tbaa !5
  %indvar.next.7 = add nuw nsw i64 %indvar, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %._crit_edge33.loopexit.unr-lcssa, label %.preheader.us, !llvm.loop !9

.lr.ph26.split:                                   ; preds = %.lr.ph26, %._crit_edge
  %25 = phi i32 [ %29, %._crit_edge ], [ %9, %.lr.ph26 ]
  %26 = phi i32 [ %32, %._crit_edge ], [ 0, %.lr.ph26 ]
  %27 = phi i32 [ %31, %._crit_edge ], [ %11, %.lr.ph26 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %56
  %.pre = load i32, ptr %4, align 4, !tbaa !5
  %.pre43 = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph26.split
  %29 = phi i32 [ %.pre43, %._crit_edge.loopexit ], [ %25, %.lr.ph26.split ]
  %30 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %26, %.lr.ph26.split ]
  %31 = phi i32 [ %59, %._crit_edge.loopexit ], [ %27, %.lr.ph26.split ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  %32 = add nsw i32 %30, 1
  store i32 %32, ptr %4, align 4, !tbaa !5
  %33 = icmp slt i32 %32, %29
  br i1 %33, label %.lr.ph26.split, label %._crit_edge27, !llvm.loop !11

.lr.ph:                                           ; preds = %.lr.ph26.split, %56
  %storemerge2324 = phi i32 [ %58, %56 ], [ 0, %.lr.ph26.split ]
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [211 x %"class.std::__cxx11::basic_string"], ptr @_Z1gB5cxx11, i64 0, i64 %35
  %37 = sext i32 %storemerge2324 to i64
  %38 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %36, i64 noundef %37)
  %39 = load i8, ptr %38, align 1, !tbaa !13
  %40 = icmp eq i8 %39, 83
  br i1 %40, label %41, label %44

41:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %42 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %42, ptr %6, align 8
  %43 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(8) %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %44

44:                                               ; preds = %41, %.lr.ph
  %45 = load i32, ptr %4, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [211 x %"class.std::__cxx11::basic_string"], ptr @_Z1gB5cxx11, i64 0, i64 %46
  %48 = load i32, ptr %5, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %47, i64 noundef %49)
  %51 = load i8, ptr %50, align 1, !tbaa !13
  %52 = icmp eq i8 %51, 70
  br i1 %52, label %53, label %56

53:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %54 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %54, ptr %7, align 8
  %55 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br label %56

56:                                               ; preds = %44, %53
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %5, align 4, !tbaa !5
  %59 = load i32, ptr @m, align 4, !tbaa !5
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !14

._crit_edge33.loopexit.unr-lcssa:                 ; preds = %.preheader.us, %.preheader.us.preheader
  %indvar.unr = phi i64 [ 0, %.preheader.us.preheader ], [ %indvar.next.7, %.preheader.us ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge33, label %.preheader.us.epil

.preheader.us.epil:                               ; preds = %._crit_edge33.loopexit.unr-lcssa, %.preheader.us.epil
  %indvar.epil = phi i64 [ %indvar.next.epil, %.preheader.us.epil ], [ %indvar.unr, %._crit_edge33.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader.us.epil ], [ 0, %._crit_edge33.loopexit.unr-lcssa ]
  %61 = mul nuw nsw i64 %indvar.epil, 844
  %scevgep.epil = getelementptr i8, ptr %8, i64 %61
  call void @llvm.memset.p0.i64(ptr align 4 %scevgep.epil, i8 0, i64 %15, i1 false), !tbaa !5
  %indvar.next.epil = add nuw nsw i64 %indvar.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge33, label %.preheader.us.epil, !llvm.loop !15

._crit_edge33:                                    ; preds = %._crit_edge33.loopexit.unr-lcssa, %.preheader.us.epil, %._crit_edge27.thread, %._crit_edge27
  %62 = load i32, ptr %2, align 4, !tbaa !17
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds i8, ptr %2, i64 4
  %65 = load i32, ptr %64, align 4, !tbaa !19
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [211 x [211 x i32]], ptr %8, i64 0, i64 %63, i64 %66
  store i32 1, ptr %67, align 4, !tbaa !5
  %68 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #5
  %.not2234.not = icmp eq i64 %68, 0
  br i1 %.not2234.not, label %.critedge, label %.lr.ph37

.lr.ph37:                                         ; preds = %._crit_edge33, %102
  %indvars.iv = phi i64 [ %indvars.iv.next, %102 ], [ 0, %._crit_edge33 ]
  %69 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %indvars.iv)
  %70 = load i8, ptr %69, align 1, !tbaa !13
  %71 = icmp eq i8 %70, 76
  br i1 %71, label %72, label %75

72:                                               ; preds = %.lr.ph37
  %73 = load i32, ptr %64, align 4, !tbaa !19
  %74 = add nsw i32 %73, -1
  store i32 %74, ptr %64, align 4, !tbaa !19
  br label %91

75:                                               ; preds = %.lr.ph37
  %76 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %indvars.iv)
  %77 = load i8, ptr %76, align 1, !tbaa !13
  %78 = icmp eq i8 %77, 82
  br i1 %78, label %79, label %82

79:                                               ; preds = %75
  %80 = load i32, ptr %64, align 4, !tbaa !19
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %64, align 4, !tbaa !19
  br label %91

82:                                               ; preds = %75
  %83 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %indvars.iv)
  %84 = load i8, ptr %83, align 1, !tbaa !13
  %85 = icmp eq i8 %84, 85
  %86 = load i32, ptr %2, align 4, !tbaa !17
  br i1 %85, label %87, label %89

87:                                               ; preds = %82
  %88 = add nsw i32 %86, -1
  store i32 %88, ptr %2, align 4, !tbaa !17
  br label %91

89:                                               ; preds = %82
  %90 = add nsw i32 %86, 1
  store i32 %90, ptr %2, align 4, !tbaa !17
  br label %91

91:                                               ; preds = %79, %89, %87, %72
  %92 = load i32, ptr %2, align 4, !tbaa !17
  %93 = load i32, ptr %64, align 4, !tbaa !19
  %94 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %92, i32 noundef %93)
  br i1 %94, label %95, label %.loopexit

95:                                               ; preds = %91
  %96 = load i32, ptr %2, align 4, !tbaa !17
  %97 = sext i32 %96 to i64
  %98 = load i32, ptr %64, align 4, !tbaa !19
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [211 x [211 x i32]], ptr %8, i64 0, i64 %97, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %.not = icmp eq i32 %101, 0
  br i1 %.not, label %102, label %.loopexit

102:                                              ; preds = %95
  store i32 1, ptr %100, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %103 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #5
  %.not22 = icmp ugt i64 %103, %indvars.iv.next
  br i1 %.not22, label %.lr.ph37, label %.critedge, !llvm.loop !20

.critedge:                                        ; preds = %102, %._crit_edge33
  %104 = call noundef zeroext i1 @_ZStneIiiEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 4 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(8) %3)
  %not. = xor i1 %104, true
  br label %.loopexit

.loopexit:                                        ; preds = %91, %95, %.critedge
  %.1 = phi i1 [ %not., %.critedge ], [ false, %95 ], [ false, %91 ]
  call void @llvm.lifetime.end.p0(i64 178084, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  ret i1 %.1
}

; 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 nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z7inrangeii(i32 noundef, i32 noundef) local_unnamed_addr #3

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

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


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