; LLVM IR from Izaron/ACM-ICPC :: Russian Council of School Olympiads (R.S.O.Sh.)/Zaoch/2017 (muffin)

; 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_ostream" = type { ptr, %"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_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3errv() #0

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 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)) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %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 ptr, align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %26 = 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)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  store ptr @_Z1sB5cxx11, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %27 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #8
  %28 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %27, ptr %28, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %29 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #8
  %30 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %29, ptr %30, align 8
  br label %31

31:                                               ; preds = %63, %0
  %32 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  br i1 %32, label %34, label %33

33:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %65

34:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #8
  %35 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  %36 = load i8, ptr %35, align 1, !tbaa !11
  store i8 %36, ptr %9, align 1, !tbaa !11
  %37 = load i8, ptr %9, align 1, !tbaa !11
  %38 = sext i8 %37 to i32
  %39 = icmp eq i32 %38, 76
  br i1 %39, label %40, label %43

40:                                               ; preds = %34
  %41 = load i32, ptr %2, align 4, !tbaa !5
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %2, align 4, !tbaa !5
  br label %62

43:                                               ; preds = %34
  %44 = load i8, ptr %9, align 1, !tbaa !11
  %45 = sext i8 %44 to i32
  %46 = icmp eq i32 %45, 85
  br i1 %46, label %47, label %50

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

50:                                               ; preds = %43
  %51 = load i8, ptr %9, align 1, !tbaa !11
  %52 = sext i8 %51 to i32
  %53 = icmp eq i32 %52, 82
  br i1 %53, label %54, label %57

54:                                               ; preds = %50
  %55 = load i32, ptr %4, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %4, align 4, !tbaa !5
  br label %60

57:                                               ; preds = %50
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %5, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %57, %54
  br label %61

61:                                               ; preds = %60, %47
  br label %62

62:                                               ; preds = %61, %40
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #8
  br label %63

63:                                               ; preds = %62
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  br label %31

65:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %66 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %67 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %66, ptr noundef nonnull align 4 dereferenceable(4) %11)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 0, ptr %15, align 4, !tbaa !5
  %68 = load i32, ptr %10, align 4, !tbaa !5
  %69 = icmp slt i32 %68, 0
  br i1 %69, label %70, label %106

70:                                               ; preds = %65
  %71 = load i32, ptr %2, align 4, !tbaa !5
  %72 = load i32, ptr %10, align 4, !tbaa !5
  %73 = call i32 @llvm.abs.i32(i32 %72, i1 true)
  %74 = icmp slt i32 %71, %73
  br i1 %74, label %75, label %76

75:                                               ; preds = %70
  call void @_Z3errv()
  br label %76

76:                                               ; preds = %75, %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %77 = load i32, ptr %10, align 4, !tbaa !5
  %78 = call i32 @llvm.abs.i32(i32 %77, i1 true)
  store i32 %78, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %101, %76
  %80 = load i32, ptr %17, align 4, !tbaa !5
  %81 = load i32, ptr @n, align 4, !tbaa !5
  %82 = icmp slt i32 %80, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %79
  store i32 4, ptr %18, align 4
  br label %104

84:                                               ; preds = %79
  %85 = load i32, ptr %17, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %86)
  %88 = load i8, ptr %87, align 1, !tbaa !11
  %89 = sext i8 %88 to i32
  %90 = icmp eq i32 %89, 76
  br i1 %90, label %91, label %94

91:                                               ; preds = %84
  %92 = load i32, ptr %16, align 4, !tbaa !5
  %93 = add nsw i32 %92, -1
  store i32 %93, ptr %16, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %91, %84
  %95 = load i32, ptr %16, align 4, !tbaa !5
  %96 = icmp eq i32 %95, 0
  br i1 %96, label %97, label %100

97:                                               ; preds = %94
  %98 = load i32, ptr %17, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %12, align 4, !tbaa !5
  store i32 4, ptr %18, align 4
  br label %104

100:                                              ; preds = %94
  br label %101

101:                                              ; preds = %100
  %102 = load i32, ptr %17, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %17, align 4, !tbaa !5
  br label %79, !llvm.loop !12

104:                                              ; preds = %97, %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %105

105:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %106

106:                                              ; preds = %105, %65
  %107 = load i32, ptr %10, align 4, !tbaa !5
  %108 = icmp sgt i32 %107, 0
  br i1 %108, label %109, label %145

109:                                              ; preds = %106
  %110 = load i32, ptr %4, align 4, !tbaa !5
  %111 = load i32, ptr %10, align 4, !tbaa !5
  %112 = call i32 @llvm.abs.i32(i32 %111, i1 true)
  %113 = icmp slt i32 %110, %112
  br i1 %113, label %114, label %115

114:                                              ; preds = %109
  call void @_Z3errv()
  br label %115

115:                                              ; preds = %114, %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %116 = load i32, ptr %10, align 4, !tbaa !5
  %117 = call i32 @llvm.abs.i32(i32 %116, i1 true)
  store i32 %117, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %140, %115
  %119 = load i32, ptr %20, align 4, !tbaa !5
  %120 = load i32, ptr @n, align 4, !tbaa !5
  %121 = icmp slt i32 %119, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %118
  store i32 7, ptr %18, align 4
  br label %143

123:                                              ; preds = %118
  %124 = load i32, ptr %20, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %125)
  %127 = load i8, ptr %126, align 1, !tbaa !11
  %128 = sext i8 %127 to i32
  %129 = icmp eq i32 %128, 82
  br i1 %129, label %130, label %133

130:                                              ; preds = %123
  %131 = load i32, ptr %19, align 4, !tbaa !5
  %132 = add nsw i32 %131, -1
  store i32 %132, ptr %19, align 4, !tbaa !5
  br label %133

133:                                              ; preds = %130, %123
  %134 = load i32, ptr %19, align 4, !tbaa !5
  %135 = icmp eq i32 %134, 0
  br i1 %135, label %136, label %139

136:                                              ; preds = %133
  %137 = load i32, ptr %20, align 4, !tbaa !5
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %14, align 4, !tbaa !5
  store i32 7, ptr %18, align 4
  br label %143

139:                                              ; preds = %133
  br label %140

140:                                              ; preds = %139
  %141 = load i32, ptr %20, align 4, !tbaa !5
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %20, align 4, !tbaa !5
  br label %118, !llvm.loop !14

143:                                              ; preds = %136, %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %144

144:                                              ; preds = %143
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %145

145:                                              ; preds = %144, %106
  %146 = load i32, ptr %11, align 4, !tbaa !5
  %147 = icmp slt i32 %146, 0
  br i1 %147, label %148, label %184

148:                                              ; preds = %145
  %149 = load i32, ptr %5, align 4, !tbaa !5
  %150 = load i32, ptr %11, align 4, !tbaa !5
  %151 = call i32 @llvm.abs.i32(i32 %150, i1 true)
  %152 = icmp slt i32 %149, %151
  br i1 %152, label %153, label %154

153:                                              ; preds = %148
  call void @_Z3errv()
  br label %154

154:                                              ; preds = %153, %148
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  %155 = load i32, ptr %11, align 4, !tbaa !5
  %156 = call i32 @llvm.abs.i32(i32 %155, i1 true)
  store i32 %156, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %157

157:                                              ; preds = %179, %154
  %158 = load i32, ptr %22, align 4, !tbaa !5
  %159 = load i32, ptr @n, align 4, !tbaa !5
  %160 = icmp slt i32 %158, %159
  br i1 %160, label %162, label %161

161:                                              ; preds = %157
  store i32 10, ptr %18, align 4
  br label %182

162:                                              ; preds = %157
  %163 = load i32, ptr %22, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %164)
  %166 = load i8, ptr %165, align 1, !tbaa !11
  %167 = sext i8 %166 to i32
  %168 = icmp eq i32 %167, 68
  br i1 %168, label %169, label %172

169:                                              ; preds = %162
  %170 = load i32, ptr %21, align 4, !tbaa !5
  %171 = add nsw i32 %170, -1
  store i32 %171, ptr %21, align 4, !tbaa !5
  br label %172

172:                                              ; preds = %169, %162
  %173 = load i32, ptr %21, align 4, !tbaa !5
  %174 = icmp eq i32 %173, 0
  br i1 %174, label %175, label %178

175:                                              ; preds = %172
  %176 = load i32, ptr %22, align 4, !tbaa !5
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %15, align 4, !tbaa !5
  store i32 10, ptr %18, align 4
  br label %182

178:                                              ; preds = %172
  br label %179

179:                                              ; preds = %178
  %180 = load i32, ptr %22, align 4, !tbaa !5
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %22, align 4, !tbaa !5
  br label %157, !llvm.loop !15

182:                                              ; preds = %175, %161
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %183

183:                                              ; preds = %182
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %184

184:                                              ; preds = %183, %145
  %185 = load i32, ptr %11, align 4, !tbaa !5
  %186 = icmp sgt i32 %185, 0
  br i1 %186, label %187, label %223

187:                                              ; preds = %184
  %188 = load i32, ptr %3, align 4, !tbaa !5
  %189 = load i32, ptr %11, align 4, !tbaa !5
  %190 = call i32 @llvm.abs.i32(i32 %189, i1 true)
  %191 = icmp slt i32 %188, %190
  br i1 %191, label %192, label %193

192:                                              ; preds = %187
  call void @_Z3errv()
  br label %193

193:                                              ; preds = %192, %187
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %194 = load i32, ptr %11, align 4, !tbaa !5
  %195 = call i32 @llvm.abs.i32(i32 %194, i1 true)
  store i32 %195, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  store i32 0, ptr %24, align 4, !tbaa !5
  br label %196

196:                                              ; preds = %218, %193
  %197 = load i32, ptr %24, align 4, !tbaa !5
  %198 = load i32, ptr @n, align 4, !tbaa !5
  %199 = icmp slt i32 %197, %198
  br i1 %199, label %201, label %200

200:                                              ; preds = %196
  store i32 13, ptr %18, align 4
  br label %221

201:                                              ; preds = %196
  %202 = load i32, ptr %24, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %203)
  %205 = load i8, ptr %204, align 1, !tbaa !11
  %206 = sext i8 %205 to i32
  %207 = icmp eq i32 %206, 85
  br i1 %207, label %208, label %211

208:                                              ; preds = %201
  %209 = load i32, ptr %23, align 4, !tbaa !5
  %210 = add nsw i32 %209, -1
  store i32 %210, ptr %23, align 4, !tbaa !5
  br label %211

211:                                              ; preds = %208, %201
  %212 = load i32, ptr %23, align 4, !tbaa !5
  %213 = icmp eq i32 %212, 0
  br i1 %213, label %214, label %217

214:                                              ; preds = %211
  %215 = load i32, ptr %24, align 4, !tbaa !5
  %216 = add nsw i32 %215, 1
  store i32 %216, ptr %13, align 4, !tbaa !5
  store i32 13, ptr %18, align 4
  br label %221

217:                                              ; preds = %211
  br label %218

218:                                              ; preds = %217
  %219 = load i32, ptr %24, align 4, !tbaa !5
  %220 = add nsw i32 %219, 1
  store i32 %220, ptr %24, align 4, !tbaa !5
  br label %196, !llvm.loop !16

221:                                              ; preds = %214, %200
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %222

222:                                              ; preds = %221
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %223

223:                                              ; preds = %222, %184
  %224 = load i32, ptr %12, align 4, !tbaa !5
  %225 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %224)
  %226 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %225, ptr noundef @.str)
  %227 = load i32, ptr %13, align 4, !tbaa !5
  %228 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %226, i32 noundef %227)
  %229 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %228, ptr noundef @.str)
  %230 = load i32, ptr %14, align 4, !tbaa !5
  %231 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %229, i32 noundef %230)
  %232 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %231, ptr noundef @.str)
  %233 = load i32, ptr %15, align 4, !tbaa !5
  %234 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %232, i32 noundef %233)
  %235 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %234, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %236 = load i32, ptr %1, align 4
  ret i32 %236
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #1

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)) #1

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #7

; 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) #5 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) #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 = { "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 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !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}


; 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_ostream" = type { ptr, %"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_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3errv() local_unnamed_addr #0

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1

; 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 #0 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)) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %6 = 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)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  %7 = tail call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #8
  store ptr %7, ptr %1, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  %8 = tail call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #8
  store ptr %8, ptr %2, align 8
  %9 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #8
  br i1 %9, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %24, %0
  %.064.lcssa = phi i32 [ 0, %0 ], [ %.165, %24 ]
  %.062.lcssa = phi i32 [ 0, %0 ], [ %.163, %24 ]
  %.060.lcssa = phi i32 [ 0, %0 ], [ %.161, %24 ]
  %.058.lcssa = phi i32 [ 0, %0 ], [ %.159, %24 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %12 = load i32, ptr %3, align 4, !tbaa !5
  %13 = icmp slt i32 %12, 0
  br i1 %13, label %27, label %48

.lr.ph:                                           ; preds = %0, %24
  %.05884 = phi i32 [ %.159, %24 ], [ 0, %0 ]
  %.06083 = phi i32 [ %.161, %24 ], [ 0, %0 ]
  %.06282 = phi i32 [ %.163, %24 ], [ 0, %0 ]
  %.06481 = phi i32 [ %.165, %24 ], [ 0, %0 ]
  %14 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #8
  %15 = load i8, ptr %14, align 1, !tbaa !9
  switch i8 %15, label %22 [
    i8 76, label %16
    i8 85, label %18
    i8 82, label %20
  ]

16:                                               ; preds = %.lr.ph
  %17 = add nsw i32 %.05884, 1
  br label %24

18:                                               ; preds = %.lr.ph
  %19 = add nsw i32 %.06083, 1
  br label %24

20:                                               ; preds = %.lr.ph
  %21 = add nsw i32 %.06481, 1
  br label %24

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

24:                                               ; preds = %18, %22, %20, %16
  %.165 = phi i32 [ %.06481, %16 ], [ %.06481, %18 ], [ %21, %20 ], [ %.06481, %22 ]
  %.163 = phi i32 [ %.06282, %16 ], [ %.06282, %18 ], [ %.06282, %20 ], [ %23, %22 ]
  %.161 = phi i32 [ %.06083, %16 ], [ %19, %18 ], [ %.06083, %20 ], [ %.06083, %22 ]
  %.159 = phi i32 [ %17, %16 ], [ %.05884, %18 ], [ %.05884, %20 ], [ %.05884, %22 ]
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #8
  %26 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #8
  br i1 %26, label %.lr.ph, label %._crit_edge

27:                                               ; preds = %._crit_edge
  %28 = sub nsw i32 0, %12
  %29 = icmp slt i32 %.058.lcssa, %28
  br i1 %29, label %30, label %31

30:                                               ; preds = %27
  call void @_Z3errv()
  %.pre = load i32, ptr %3, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %30, %27
  %32 = phi i32 [ %.pre, %30 ], [ %12, %27 ]
  %33 = load i32, ptr @n, align 4, !tbaa !5
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %.lr.ph91.preheader, label %thread-pre-split

.lr.ph91.preheader:                               ; preds = %31
  %35 = call i32 @llvm.abs.i32(i32 %32, i1 true)
  br label %.lr.ph91

.lr.ph91:                                         ; preds = %.lr.ph91.preheader, %44
  %indvars.iv = phi i64 [ 0, %.lr.ph91.preheader ], [ %indvars.iv.next, %44 ]
  %.04888 = phi i32 [ %35, %.lr.ph91.preheader ], [ %spec.select, %44 ]
  %36 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %indvars.iv)
  %37 = load i8, ptr %36, align 1, !tbaa !9
  %38 = icmp eq i8 %37, 76
  %39 = sext i1 %38 to i32
  %spec.select = add nsw i32 %.04888, %39
  %40 = icmp eq i32 %spec.select, 0
  br i1 %40, label %41, label %44

41:                                               ; preds = %.lr.ph91
  %42 = trunc nuw nsw i64 %indvars.iv to i32
  %43 = add nuw nsw i32 %42, 1
  br label %thread-pre-split

44:                                               ; preds = %.lr.ph91
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %45 = load i32, ptr @n, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = icmp slt i64 %indvars.iv.next, %46
  br i1 %47, label %.lr.ph91, label %thread-pre-split, !llvm.loop !10

thread-pre-split:                                 ; preds = %44, %31, %41
  %.157.ph = phi i32 [ %43, %41 ], [ 0, %31 ], [ 0, %44 ]
  %.pr = load i32, ptr %3, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %thread-pre-split, %._crit_edge
  %49 = phi i32 [ %.pr, %thread-pre-split ], [ %12, %._crit_edge ]
  %.157 = phi i32 [ %.157.ph, %thread-pre-split ], [ 0, %._crit_edge ]
  %50 = icmp sgt i32 %49, 0
  br i1 %50, label %51, label %.loopexit76

51:                                               ; preds = %48
  %52 = icmp slt i32 %.064.lcssa, %49
  br i1 %52, label %53, label %54

53:                                               ; preds = %51
  call void @_Z3errv()
  %.pre118 = load i32, ptr %3, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %53, %51
  %55 = phi i32 [ %.pre118, %53 ], [ %49, %51 ]
  %56 = load i32, ptr @n, align 4, !tbaa !5
  %57 = icmp sgt i32 %56, 0
  br i1 %57, label %.lr.ph95.preheader, label %.loopexit76

.lr.ph95.preheader:                               ; preds = %54
  %58 = call i32 @llvm.abs.i32(i32 %55, i1 true)
  br label %.lr.ph95

.lr.ph95:                                         ; preds = %.lr.ph95.preheader, %67
  %indvars.iv109 = phi i64 [ 0, %.lr.ph95.preheader ], [ %indvars.iv.next110, %67 ]
  %.04592 = phi i32 [ %58, %.lr.ph95.preheader ], [ %spec.select71, %67 ]
  %59 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %indvars.iv109)
  %60 = load i8, ptr %59, align 1, !tbaa !9
  %61 = icmp eq i8 %60, 82
  %62 = sext i1 %61 to i32
  %spec.select71 = add nsw i32 %.04592, %62
  %63 = icmp eq i32 %spec.select71, 0
  br i1 %63, label %64, label %67

64:                                               ; preds = %.lr.ph95
  %65 = trunc nuw nsw i64 %indvars.iv109 to i32
  %66 = add nuw nsw i32 %65, 1
  br label %.loopexit76

67:                                               ; preds = %.lr.ph95
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %68 = load i32, ptr @n, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = icmp slt i64 %indvars.iv.next110, %69
  br i1 %70, label %.lr.ph95, label %.loopexit76, !llvm.loop !12

.loopexit76:                                      ; preds = %67, %54, %64, %48
  %.153 = phi i32 [ 0, %48 ], [ %66, %64 ], [ 0, %54 ], [ 0, %67 ]
  %71 = load i32, ptr %4, align 4, !tbaa !5
  %72 = icmp slt i32 %71, 0
  br i1 %72, label %73, label %94

73:                                               ; preds = %.loopexit76
  %74 = sub nsw i32 0, %71
  %75 = icmp slt i32 %.062.lcssa, %74
  br i1 %75, label %76, label %77

76:                                               ; preds = %73
  call void @_Z3errv()
  %.pre119 = load i32, ptr %4, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %76, %73
  %78 = phi i32 [ %.pre119, %76 ], [ %71, %73 ]
  %79 = load i32, ptr @n, align 4, !tbaa !5
  %80 = icmp sgt i32 %79, 0
  br i1 %80, label %.lr.ph99.preheader, label %thread-pre-split74

.lr.ph99.preheader:                               ; preds = %77
  %81 = call i32 @llvm.abs.i32(i32 %78, i1 true)
  br label %.lr.ph99

.lr.ph99:                                         ; preds = %.lr.ph99.preheader, %90
  %indvars.iv112 = phi i64 [ 0, %.lr.ph99.preheader ], [ %indvars.iv.next113, %90 ]
  %.04296 = phi i32 [ %81, %.lr.ph99.preheader ], [ %spec.select72, %90 ]
  %82 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %indvars.iv112)
  %83 = load i8, ptr %82, align 1, !tbaa !9
  %84 = icmp eq i8 %83, 68
  %85 = sext i1 %84 to i32
  %spec.select72 = add nsw i32 %.04296, %85
  %86 = icmp eq i32 %spec.select72, 0
  br i1 %86, label %87, label %90

87:                                               ; preds = %.lr.ph99
  %88 = trunc nuw nsw i64 %indvars.iv112 to i32
  %89 = add nuw nsw i32 %88, 1
  br label %thread-pre-split74

90:                                               ; preds = %.lr.ph99
  %indvars.iv.next113 = add nuw nsw i64 %indvars.iv112, 1
  %91 = load i32, ptr @n, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = icmp slt i64 %indvars.iv.next113, %92
  br i1 %93, label %.lr.ph99, label %thread-pre-split74, !llvm.loop !13

thread-pre-split74:                               ; preds = %90, %77, %87
  %.151.ph = phi i32 [ %89, %87 ], [ 0, %77 ], [ 0, %90 ]
  %.pr75 = load i32, ptr %4, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %thread-pre-split74, %.loopexit76
  %95 = phi i32 [ %.pr75, %thread-pre-split74 ], [ %71, %.loopexit76 ]
  %.151 = phi i32 [ %.151.ph, %thread-pre-split74 ], [ 0, %.loopexit76 ]
  %96 = icmp sgt i32 %95, 0
  br i1 %96, label %97, label %.loopexit

97:                                               ; preds = %94
  %98 = icmp slt i32 %.060.lcssa, %95
  br i1 %98, label %99, label %100

99:                                               ; preds = %97
  call void @_Z3errv()
  %.pre120 = load i32, ptr %4, align 4, !tbaa !5
  br label %100

100:                                              ; preds = %99, %97
  %101 = phi i32 [ %.pre120, %99 ], [ %95, %97 ]
  %102 = load i32, ptr @n, align 4, !tbaa !5
  %103 = icmp sgt i32 %102, 0
  br i1 %103, label %.lr.ph103.preheader, label %.loopexit

.lr.ph103.preheader:                              ; preds = %100
  %104 = call i32 @llvm.abs.i32(i32 %101, i1 true)
  br label %.lr.ph103

.lr.ph103:                                        ; preds = %.lr.ph103.preheader, %113
  %indvars.iv115 = phi i64 [ 0, %.lr.ph103.preheader ], [ %indvars.iv.next116, %113 ]
  %.040100 = phi i32 [ %104, %.lr.ph103.preheader ], [ %spec.select73, %113 ]
  %105 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %indvars.iv115)
  %106 = load i8, ptr %105, align 1, !tbaa !9
  %107 = icmp eq i8 %106, 85
  %108 = sext i1 %107 to i32
  %spec.select73 = add nsw i32 %.040100, %108
  %109 = icmp eq i32 %spec.select73, 0
  br i1 %109, label %110, label %113

110:                                              ; preds = %.lr.ph103
  %111 = trunc nuw nsw i64 %indvars.iv115 to i32
  %112 = add nuw nsw i32 %111, 1
  br label %.loopexit

113:                                              ; preds = %.lr.ph103
  %indvars.iv.next116 = add nuw nsw i64 %indvars.iv115, 1
  %114 = load i32, ptr @n, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = icmp slt i64 %indvars.iv.next116, %115
  br i1 %116, label %.lr.ph103, label %.loopexit, !llvm.loop !14

.loopexit:                                        ; preds = %113, %100, %110, %94
  %.155 = phi i32 [ 0, %94 ], [ %112, %110 ], [ 0, %100 ], [ 0, %113 ]
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.157)
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %117, ptr noundef nonnull @.str)
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %118, i32 noundef %.155)
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %119, ptr noundef nonnull @.str)
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %120, i32 noundef %.153)
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %121, ptr noundef nonnull @.str)
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %122, i32 noundef %.151)
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %123, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  ret i32 0
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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 #1

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

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

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

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #7

; 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 #5 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 #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 = { "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 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 = { 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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}


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