; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/265 Division 1/Problem A (A)

; 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] }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@n = external dso_local global i32, align 4
@p = external dso_local global i32, align 4
@_Z1sB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z3resB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z3curB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z7inrangei(i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z6isgoodNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef) #1

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @p)
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11)
  %13 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) @_Z3resB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11)
  %14 = load i32, ptr @p, align 4, !tbaa !5
  %15 = icmp sle i32 %14, 2
  br i1 %15, label %16, label %21

16:                                               ; preds = %0
  %17 = load i32, ptr @n, align 4, !tbaa !5
  %18 = icmp sgt i32 %17, 2
  br i1 %18, label %19, label %21

19:                                               ; preds = %16
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.4)
  store i32 0, ptr %1, align 4
  br label %193

21:                                               ; preds = %16, %0
  %22 = load i32, ptr @n, align 4, !tbaa !5
  %23 = icmp eq i32 %22, 1
  br i1 %23, label %24, label %49

24:                                               ; preds = %21
  %25 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef 0)
  %26 = load i8, ptr %25, align 1, !tbaa !9
  %27 = sext i8 %26 to i32
  %28 = sub nsw i32 %27, 97
  %29 = load i32, ptr @p, align 4, !tbaa !5
  %30 = sub nsw i32 %29, 1
  %31 = icmp eq i32 %28, %30
  br i1 %31, label %32, label %34

32:                                               ; preds = %24
  %33 = call i32 @puts(ptr noundef @.str.5)
  br label %48

34:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %35 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef 0)
  %36 = load i8, ptr %35, align 1, !tbaa !9
  %37 = sext i8 %36 to i32
  %38 = sub nsw i32 %37, 97
  store i32 %38, ptr %2, align 4, !tbaa !5
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  %41 = load i32, ptr @p, align 4, !tbaa !5
  %42 = srem i32 %40, %41
  %43 = add nsw i32 %42, 97
  %44 = trunc i32 %43 to i8
  %45 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef 0)
  store i8 %44, ptr %45, align 1, !tbaa !9
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11)
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %48

48:                                               ; preds = %34, %32
  store i32 0, ptr %1, align 4
  br label %193

49:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %182, %49
  %51 = load i32, ptr %3, align 4, !tbaa !5
  %52 = load i32, ptr @n, align 4, !tbaa !5
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %185

55:                                               ; preds = %50
  %56 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) @_Z3curB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %177, %55
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = load i32, ptr @p, align 4, !tbaa !5
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %57
  store i32 5, ptr %4, align 4
  br label %180

62:                                               ; preds = %57
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %64 = sub nsw i32 %63, 1
  %65 = call noundef zeroext i1 @_Z7inrangei(i32 noundef %64)
  br i1 %65, label %66, label %77

66:                                               ; preds = %62
  %67 = load i32, ptr %3, align 4, !tbaa !5
  %68 = sub nsw i32 %67, 1
  %69 = sext i32 %68 to i64
  %70 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %69)
  %71 = load i8, ptr %70, align 1, !tbaa !9
  %72 = sext i8 %71 to i32
  %73 = sub nsw i32 %72, 97
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = icmp eq i32 %73, %74
  br i1 %75, label %76, label %77

76:                                               ; preds = %66
  br label %177

77:                                               ; preds = %66, %62
  %78 = load i32, ptr %3, align 4, !tbaa !5
  %79 = sub nsw i32 %78, 2
  %80 = call noundef zeroext i1 @_Z7inrangei(i32 noundef %79)
  br i1 %80, label %81, label %92

81:                                               ; preds = %77
  %82 = load i32, ptr %3, align 4, !tbaa !5
  %83 = sub nsw i32 %82, 2
  %84 = sext i32 %83 to i64
  %85 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %84)
  %86 = load i8, ptr %85, align 1, !tbaa !9
  %87 = sext i8 %86 to i32
  %88 = sub nsw i32 %87, 97
  %89 = load i32, ptr %5, align 4, !tbaa !5
  %90 = icmp eq i32 %88, %89
  br i1 %90, label %91, label %92

91:                                               ; preds = %81
  br label %177

92:                                               ; preds = %81, %77
  %93 = load i32, ptr %5, align 4, !tbaa !5
  %94 = load i32, ptr %3, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3curB5cxx11, i64 noundef %95)
  %97 = load i8, ptr %96, align 1, !tbaa !9
  %98 = sext i8 %97 to i32
  %99 = sub nsw i32 %98, 97
  %100 = icmp sgt i32 %93, %99
  br i1 %100, label %101, label %176

101:                                              ; preds = %92
  %102 = load i32, ptr %5, align 4, !tbaa !5
  %103 = add nsw i32 %102, 97
  %104 = trunc i32 %103 to i8
  %105 = load i32, ptr %3, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3curB5cxx11, i64 noundef %106)
  store i8 %104, ptr %107, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %108 = load i32, ptr %3, align 4, !tbaa !5
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %6, align 4, !tbaa !5
  br label %110

110:                                              ; preds = %163, %101
  %111 = load i32, ptr %6, align 4, !tbaa !5
  %112 = load i32, ptr @n, align 4, !tbaa !5
  %113 = icmp slt i32 %111, %112
  br i1 %113, label %115, label %114

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

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

116:                                              ; preds = %158, %115
  %117 = load i32, ptr %7, align 4, !tbaa !5
  %118 = load i32, ptr @p, align 4, !tbaa !5
  %119 = icmp slt i32 %117, %118
  br i1 %119, label %121, label %120

120:                                              ; preds = %116
  store i32 11, ptr %4, align 4
  br label %161

121:                                              ; preds = %116
  %122 = load i32, ptr %6, align 4, !tbaa !5
  %123 = sub nsw i32 %122, 1
  %124 = call noundef zeroext i1 @_Z7inrangei(i32 noundef %123)
  br i1 %124, label %125, label %136

125:                                              ; preds = %121
  %126 = load i32, ptr %6, align 4, !tbaa !5
  %127 = sub nsw i32 %126, 1
  %128 = sext i32 %127 to i64
  %129 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3curB5cxx11, i64 noundef %128)
  %130 = load i8, ptr %129, align 1, !tbaa !9
  %131 = sext i8 %130 to i32
  %132 = sub nsw i32 %131, 97
  %133 = load i32, ptr %7, align 4, !tbaa !5
  %134 = icmp eq i32 %132, %133
  br i1 %134, label %135, label %136

135:                                              ; preds = %125
  br label %158

136:                                              ; preds = %125, %121
  %137 = load i32, ptr %6, align 4, !tbaa !5
  %138 = sub nsw i32 %137, 2
  %139 = call noundef zeroext i1 @_Z7inrangei(i32 noundef %138)
  br i1 %139, label %140, label %151

140:                                              ; preds = %136
  %141 = load i32, ptr %6, align 4, !tbaa !5
  %142 = sub nsw i32 %141, 2
  %143 = sext i32 %142 to i64
  %144 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3curB5cxx11, i64 noundef %143)
  %145 = load i8, ptr %144, align 1, !tbaa !9
  %146 = sext i8 %145 to i32
  %147 = sub nsw i32 %146, 97
  %148 = load i32, ptr %7, align 4, !tbaa !5
  %149 = icmp eq i32 %147, %148
  br i1 %149, label %150, label %151

150:                                              ; preds = %140
  br label %158

151:                                              ; preds = %140, %136
  %152 = load i32, ptr %7, align 4, !tbaa !5
  %153 = add nsw i32 %152, 97
  %154 = trunc i32 %153 to i8
  %155 = load i32, ptr %6, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3curB5cxx11, i64 noundef %156)
  store i8 %154, ptr %157, align 1, !tbaa !9
  store i32 11, ptr %4, align 4
  br label %161

158:                                              ; preds = %150, %135
  %159 = load i32, ptr %7, align 4, !tbaa !5
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %7, align 4, !tbaa !5
  br label %116, !llvm.loop !10

161:                                              ; preds = %151, %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %162

162:                                              ; preds = %161
  br label %163

163:                                              ; preds = %162
  %164 = load i32, ptr %6, align 4, !tbaa !5
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %6, align 4, !tbaa !5
  br label %110, !llvm.loop !12

166:                                              ; preds = %114
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) @_Z3curB5cxx11)
  %167 = invoke noundef zeroext i1 @_Z6isgoodNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %8)
          to label %168 unwind label %171

168:                                              ; preds = %166
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  br i1 %167, label %169, label %175

169:                                              ; preds = %168
  %170 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) @_Z3resB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) @_Z3curB5cxx11)
  store i32 5, ptr %4, align 4
  br label %180

171:                                              ; preds = %166
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %9, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %195

175:                                              ; preds = %168
  br label %176

176:                                              ; preds = %175, %92
  br label %177

177:                                              ; preds = %176, %91, %76
  %178 = load i32, ptr %5, align 4, !tbaa !5
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %5, align 4, !tbaa !5
  br label %57, !llvm.loop !13

180:                                              ; preds = %169, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %181

181:                                              ; preds = %180
  br label %182

182:                                              ; preds = %181
  %183 = load i32, ptr %3, align 4, !tbaa !5
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %3, align 4, !tbaa !5
  br label %50, !llvm.loop !14

185:                                              ; preds = %54
  %186 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) @_Z3resB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #7
  br i1 %186, label %187, label %189

187:                                              ; preds = %185
  %188 = call i32 @puts(ptr noundef @.str.5)
  br label %192

189:                                              ; preds = %185
  %190 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) @_Z3resB5cxx11)
  %191 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %190, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %192

192:                                              ; preds = %189, %187
  store i32 0, ptr %1, align 4
  br label %193

193:                                              ; preds = %192, %48, %19
  %194 = load i32, ptr %1, align 4
  ret i32 %194

195:                                              ; preds = %171
  %196 = load ptr, ptr %9, align 8
  %197 = load i32, ptr %10, align 4
  %198 = insertvalue { ptr, i32 } poison, ptr %196, 0
  %199 = insertvalue { ptr, i32 } %198, i32 %197, 1
  resume { ptr, i32 } %199
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5

declare i32 @puts(ptr noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #5

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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


; 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] }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@n = external dso_local global i32, align 4
@p = external dso_local global i32, align 4
@_Z1sB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z3resB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z3curB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z7inrangei(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z6isgoodNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @p)
  %3 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11)
  %4 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) @_Z3resB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11)
  %5 = load i32, ptr @p, align 4, !tbaa !5
  %6 = icmp slt i32 %5, 3
  %7 = load i32, ptr @n, align 4
  %8 = icmp sgt i32 %7, 2
  %or.cond = select i1 %6, i1 %8, i1 false
  br i1 %or.cond, label %9, label %11

9:                                                ; preds = %0
  %10 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.4)
  br label %126

11:                                               ; preds = %0
  %12 = icmp eq i32 %7, 1
  br i1 %12, label %14, label %.preheader36

.preheader36:                                     ; preds = %11
  %13 = icmp sgt i32 %7, 0
  br i1 %13, label %.lr.ph47, label %._crit_edge48

14:                                               ; preds = %11
  %15 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef 0)
  %16 = load i8, ptr %15, align 1, !tbaa !9
  %17 = sext i8 %16 to i32
  %18 = load i32, ptr @p, align 4, !tbaa !5
  %19 = add nsw i32 %17, -96
  %20 = icmp eq i32 %19, %18
  br i1 %20, label %21, label %23

21:                                               ; preds = %14
  %22 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %126

23:                                               ; preds = %14
  %24 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef 0)
  %25 = load i8, ptr %24, align 1, !tbaa !9
  %26 = sext i8 %25 to i32
  %27 = add nsw i32 %26, -96
  %28 = load i32, ptr @p, align 4, !tbaa !5
  %29 = srem i32 %27, %28
  %30 = trunc i32 %29 to i8
  %31 = add i8 %30, 97
  %32 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef 0)
  store i8 %31, ptr %32, align 1, !tbaa !9
  %33 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11)
  %34 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %126

._crit_edge48:                                    ; preds = %.loopexit35, %.preheader36
  %35 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) @_Z3resB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #7
  br i1 %35, label %121, label %123

.lr.ph47:                                         ; preds = %.preheader36, %.loopexit35
  %indvars.iv53 = phi i64 [ %indvars.iv.next54.pre-phi, %.loopexit35 ], [ 0, %.preheader36 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %.loopexit35 ], [ 1, %.preheader36 ]
  %36 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) @_Z3curB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11)
  %37 = load i32, ptr @p, align 4, !tbaa !5
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %.lr.ph44, label %.lr.ph47..loopexit35_crit_edge

.lr.ph47..loopexit35_crit_edge:                   ; preds = %.lr.ph47
  %.pre63 = add nuw nsw i64 %indvars.iv53, 1
  br label %.loopexit35

.lr.ph44:                                         ; preds = %.lr.ph47
  %39 = add nsw i64 %indvars.iv53, -1
  %40 = add nsw i64 %indvars.iv53, -2
  %41 = add nuw nsw i64 %indvars.iv53, 1
  %42 = trunc nsw i64 %39 to i32
  %43 = trunc nsw i64 %40 to i32
  br label %44

44:                                               ; preds = %.lr.ph44, %114
  %.03442 = phi i32 [ 0, %.lr.ph44 ], [ %115, %114 ]
  %45 = call noundef zeroext i1 @_Z7inrangei(i32 noundef %42)
  br i1 %45, label %46, label %52

46:                                               ; preds = %44
  %47 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %39)
  %48 = load i8, ptr %47, align 1, !tbaa !9
  %49 = sext i8 %48 to i32
  %50 = add nsw i32 %49, -97
  %51 = icmp eq i32 %50, %.03442
  br i1 %51, label %114, label %52

52:                                               ; preds = %46, %44
  %53 = call noundef zeroext i1 @_Z7inrangei(i32 noundef %43)
  br i1 %53, label %54, label %60

54:                                               ; preds = %52
  %55 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %40)
  %56 = load i8, ptr %55, align 1, !tbaa !9
  %57 = sext i8 %56 to i32
  %58 = add nsw i32 %57, -97
  %59 = icmp eq i32 %58, %.03442
  br i1 %59, label %114, label %60

60:                                               ; preds = %54, %52
  %61 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3curB5cxx11, i64 noundef %indvars.iv53)
  %62 = load i8, ptr %61, align 1, !tbaa !9
  %63 = sext i8 %62 to i32
  %64 = add nsw i32 %63, -97
  %65 = icmp sgt i32 %.03442, %64
  br i1 %65, label %66, label %114

66:                                               ; preds = %60
  %67 = trunc i32 %.03442 to i8
  %68 = add i8 %67, 97
  %69 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3curB5cxx11, i64 noundef %indvars.iv53)
  store i8 %68, ptr %69, align 1, !tbaa !9
  %70 = load i32, ptr @n, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = icmp slt i64 %41, %71
  %73 = load i32, ptr @p, align 4
  %74 = icmp sgt i32 %73, 0
  %or.cond66 = select i1 %72, i1 %74, i1 false
  br i1 %or.cond66, label %.preheader, label %._crit_edge

.preheader:                                       ; preds = %66, %.loopexit
  %75 = phi i32 [ %105, %.loopexit ], [ %73, %66 ]
  %indvars.iv55 = phi i64 [ %indvars.iv.next56, %.loopexit ], [ %indvars.iv53, %66 ]
  %indvars.iv51 = phi i64 [ %indvars.iv.next52, %.loopexit ], [ %indvars.iv, %66 ]
  %76 = icmp sgt i32 %75, 0
  br i1 %76, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader
  %77 = add nsw i64 %indvars.iv55, -1
  %78 = trunc nuw nsw i64 %indvars.iv55 to i32
  %79 = trunc nsw i64 %77 to i32
  br label %81

._crit_edge:                                      ; preds = %.loopexit, %66
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) @_Z3curB5cxx11)
  %80 = invoke noundef zeroext i1 @_Z6isgoodNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull %1)
          to label %109 unwind label %112

81:                                               ; preds = %.lr.ph, %101
  %.03238 = phi i32 [ 0, %.lr.ph ], [ %102, %101 ]
  %82 = call noundef zeroext i1 @_Z7inrangei(i32 noundef %78)
  br i1 %82, label %83, label %89

83:                                               ; preds = %81
  %84 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3curB5cxx11, i64 noundef %indvars.iv55)
  %85 = load i8, ptr %84, align 1, !tbaa !9
  %86 = sext i8 %85 to i32
  %87 = add nsw i32 %86, -97
  %88 = icmp eq i32 %87, %.03238
  br i1 %88, label %101, label %89

89:                                               ; preds = %83, %81
  %90 = call noundef zeroext i1 @_Z7inrangei(i32 noundef %79)
  br i1 %90, label %91, label %97

91:                                               ; preds = %89
  %92 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3curB5cxx11, i64 noundef %77)
  %93 = load i8, ptr %92, align 1, !tbaa !9
  %94 = sext i8 %93 to i32
  %95 = add nsw i32 %94, -97
  %96 = icmp eq i32 %95, %.03238
  br i1 %96, label %101, label %97

97:                                               ; preds = %91, %89
  %98 = trunc i32 %.03238 to i8
  %99 = add i8 %98, 97
  %100 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z3curB5cxx11, i64 noundef %indvars.iv51)
  store i8 %99, ptr %100, align 1, !tbaa !9
  %.pre = load i32, ptr @p, align 4, !tbaa !5
  br label %.loopexit

101:                                              ; preds = %91, %83
  %102 = add nuw nsw i32 %.03238, 1
  %103 = load i32, ptr @p, align 4, !tbaa !5
  %104 = icmp slt i32 %102, %103
  br i1 %104, label %81, label %.loopexit, !llvm.loop !10

.loopexit:                                        ; preds = %101, %.preheader, %97
  %105 = phi i32 [ %75, %.preheader ], [ %.pre, %97 ], [ %103, %101 ]
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %106 = load i32, ptr @n, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = icmp slt i64 %indvars.iv.next52, %107
  %indvars.iv.next56 = add nuw nsw i64 %indvars.iv55, 1
  br i1 %108, label %.preheader, label %._crit_edge, !llvm.loop !12

109:                                              ; preds = %._crit_edge
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  br i1 %80, label %110, label %114

110:                                              ; preds = %109
  %111 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) @_Z3resB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) @_Z3curB5cxx11)
  br label %.loopexit35

112:                                              ; preds = %._crit_edge
  %113 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  resume { ptr, i32 } %113

114:                                              ; preds = %60, %109, %54, %46
  %115 = add nuw nsw i32 %.03442, 1
  %116 = load i32, ptr @p, align 4, !tbaa !5
  %117 = icmp slt i32 %115, %116
  br i1 %117, label %44, label %.loopexit35, !llvm.loop !14

.loopexit35:                                      ; preds = %114, %.lr.ph47..loopexit35_crit_edge, %110
  %indvars.iv.next54.pre-phi = phi i64 [ %.pre63, %.lr.ph47..loopexit35_crit_edge ], [ %41, %110 ], [ %41, %114 ]
  %118 = load i32, ptr @n, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = icmp slt i64 %indvars.iv.next54.pre-phi, %119
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  br i1 %120, label %.lr.ph47, label %._crit_edge48, !llvm.loop !15

121:                                              ; preds = %._crit_edge48
  %122 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %126

123:                                              ; preds = %._crit_edge48
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) @_Z3resB5cxx11)
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %124, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %126

126:                                              ; preds = %121, %123, %21, %23, %9
  ret i32 0
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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


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