; LLVM IR from MinaFaried3/Assiut-University-Training---Newcomers :: m-sheet10_general_hard/F-Marks.ll (Z9solution2v)

; 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::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" }
%"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] }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z9solution2v() #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %19 = load i32, ptr %1, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %20, i64 32)
  %22 = extractvalue { i64, i1 } %21, 1
  %23 = extractvalue { i64, i1 } %21, 0
  %24 = call { i64, i1 } @llvm.uadd.with.overflow.i64(i64 %23, i64 8)
  %25 = extractvalue { i64, i1 } %24, 1
  %26 = or i1 %22, %25
  %27 = extractvalue { i64, i1 } %24, 0
  %28 = select i1 %26, i64 -1, i64 %27
  %29 = call noalias noundef nonnull ptr @_Znam(i64 noundef %28) #7
  store i64 %20, ptr %29, align 16
  %30 = getelementptr inbounds i8, ptr %29, i64 8
  %31 = icmp eq i64 %20, 0
  br i1 %31, label %38, label %32

32:                                               ; preds = %0
  %33 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %30, i64 %20
  br label %34

34:                                               ; preds = %34, %32
  %35 = phi ptr [ %30, %32 ], [ %36, %34 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #6
  %36 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %35, i64 1
  %37 = icmp eq ptr %36, %33
  br i1 %37, label %38, label %34

38:                                               ; preds = %34, %0
  store ptr %30, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %39 = load i32, ptr %1, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %40, i64 4)
  %42 = extractvalue { i64, i1 } %41, 1
  %43 = extractvalue { i64, i1 } %41, 0
  %44 = select i1 %42, i64 -1, i64 %43
  %45 = call noalias noundef nonnull ptr @_Znam(i64 noundef %44) #7
  store ptr %45, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %46 = load i32, ptr %1, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %47, i64 4)
  %49 = extractvalue { i64, i1 } %48, 1
  %50 = extractvalue { i64, i1 } %48, 0
  %51 = select i1 %49, i64 -1, i64 %50
  %52 = call noalias noundef nonnull ptr @_Znam(i64 noundef %51) #7
  store ptr %52, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %53

53:                                               ; preds = %72, %38
  %54 = load i32, ptr %6, align 4, !tbaa !5
  %55 = load i32, ptr %1, align 4, !tbaa !5
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %75

58:                                               ; preds = %53
  %59 = load ptr, ptr %3, align 8, !tbaa !9
  %60 = load i32, ptr %6, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %59, i64 %61
  %63 = 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) %62)
  %64 = load ptr, ptr %4, align 8, !tbaa !9
  %65 = load i32, ptr %6, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds i32, ptr %64, i64 %66
  store i32 0, ptr %67, align 4, !tbaa !5
  %68 = load ptr, ptr %5, align 8, !tbaa !9
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds i32, ptr %68, i64 %70
  store i32 0, ptr %71, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %58
  %73 = load i32, ptr %6, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %6, align 4, !tbaa !5
  br label %53, !llvm.loop !11

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

76:                                               ; preds = %92, %75
  %77 = load i32, ptr %7, align 4, !tbaa !5
  %78 = load i32, ptr %1, align 4, !tbaa !5
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %81, label %80

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

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

82:                                               ; preds = %88, %81
  %83 = load i32, ptr %9, align 4, !tbaa !5
  %84 = load i32, ptr %2, align 4, !tbaa !5
  %85 = icmp slt i32 %83, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %82
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %91

87:                                               ; preds = %82
  br label %88

88:                                               ; preds = %87
  %89 = load i32, ptr %9, align 4, !tbaa !5
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %9, align 4, !tbaa !5
  br label %82, !llvm.loop !13

91:                                               ; preds = %86
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %7, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %7, align 4, !tbaa !5
  br label %76, !llvm.loop !14

95:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %176, %95
  %97 = load i32, ptr %11, align 4, !tbaa !5
  %98 = load i32, ptr %2, align 4, !tbaa !5
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %96
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %179

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

102:                                              ; preds = %121, %101
  %103 = load i32, ptr %12, align 4, !tbaa !5
  %104 = load i32, ptr %1, align 4, !tbaa !5
  %105 = icmp slt i32 %103, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %102
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %124

107:                                              ; preds = %102
  %108 = load ptr, ptr %3, align 8, !tbaa !9
  %109 = load i32, ptr %12, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %108, i64 %110
  %112 = load i32, ptr %11, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %111, i64 noundef %113)
  %115 = load i8, ptr %114, align 1, !tbaa !15
  %116 = sext i8 %115 to i32
  %117 = load ptr, ptr %5, align 8, !tbaa !9
  %118 = load i32, ptr %12, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds i32, ptr %117, i64 %119
  store i32 %116, ptr %120, align 4, !tbaa !5
  br label %121

121:                                              ; preds = %107
  %122 = load i32, ptr %12, align 4, !tbaa !5
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %12, align 4, !tbaa !5
  br label %102, !llvm.loop !16

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

125:                                              ; preds = %145, %124
  %126 = load i32, ptr %13, align 4, !tbaa !5
  %127 = load i32, ptr %1, align 4, !tbaa !5
  %128 = icmp slt i32 %126, %127
  br i1 %128, label %130, label %129

129:                                              ; preds = %125
  store i32 17, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %148

130:                                              ; preds = %125
  %131 = load ptr, ptr %5, align 8, !tbaa !9
  %132 = load i32, ptr %10, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds i32, ptr %131, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = load ptr, ptr %5, align 8, !tbaa !9
  %137 = load i32, ptr %13, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds i32, ptr %136, i64 %138
  %140 = load i32, ptr %139, align 4, !tbaa !5
  %141 = icmp sle i32 %135, %140
  br i1 %141, label %142, label %144

142:                                              ; preds = %130
  %143 = load i32, ptr %13, align 4, !tbaa !5
  store i32 %143, ptr %10, align 4, !tbaa !5
  br label %144

144:                                              ; preds = %142, %130
  br label %145

145:                                              ; preds = %144
  %146 = load i32, ptr %13, align 4, !tbaa !5
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %13, align 4, !tbaa !5
  br label %125, !llvm.loop !17

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

149:                                              ; preds = %172, %148
  %150 = load i32, ptr %14, align 4, !tbaa !5
  %151 = load i32, ptr %1, align 4, !tbaa !5
  %152 = icmp slt i32 %150, %151
  br i1 %152, label %154, label %153

153:                                              ; preds = %149
  store i32 20, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %175

154:                                              ; preds = %149
  %155 = load ptr, ptr %5, align 8, !tbaa !9
  %156 = load i32, ptr %10, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds i32, ptr %155, i64 %157
  %159 = load i32, ptr %158, align 4, !tbaa !5
  %160 = load ptr, ptr %5, align 8, !tbaa !9
  %161 = load i32, ptr %14, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds i32, ptr %160, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !5
  %165 = icmp eq i32 %159, %164
  br i1 %165, label %166, label %171

166:                                              ; preds = %154
  %167 = load ptr, ptr %4, align 8, !tbaa !9
  %168 = load i32, ptr %14, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds i32, ptr %167, i64 %169
  store i32 1, ptr %170, align 4, !tbaa !5
  br label %171

171:                                              ; preds = %166, %154
  br label %172

172:                                              ; preds = %171
  %173 = load i32, ptr %14, align 4, !tbaa !5
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %14, align 4, !tbaa !5
  br label %149, !llvm.loop !18

175:                                              ; preds = %153
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %176

176:                                              ; preds = %175
  %177 = load i32, ptr %11, align 4, !tbaa !5
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %11, align 4, !tbaa !5
  br label %96, !llvm.loop !19

179:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %180

180:                                              ; preds = %196, %179
  %181 = load i32, ptr %16, align 4, !tbaa !5
  %182 = load i32, ptr %1, align 4, !tbaa !5
  %183 = icmp slt i32 %181, %182
  br i1 %183, label %185, label %184

184:                                              ; preds = %180
  store i32 23, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %199

185:                                              ; preds = %180
  %186 = load ptr, ptr %4, align 8, !tbaa !9
  %187 = load i32, ptr %16, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds i32, ptr %186, i64 %188
  %190 = load i32, ptr %189, align 4, !tbaa !5
  %191 = icmp eq i32 %190, 1
  br i1 %191, label %192, label %195

192:                                              ; preds = %185
  %193 = load i32, ptr %15, align 4, !tbaa !5
  %194 = add nsw i32 %193, 1
  store i32 %194, ptr %15, align 4, !tbaa !5
  br label %195

195:                                              ; preds = %192, %185
  br label %196

196:                                              ; preds = %195
  %197 = load i32, ptr %16, align 4, !tbaa !5
  %198 = add nsw i32 %197, 1
  store i32 %198, ptr %16, align 4, !tbaa !5
  br label %180, !llvm.loop !20

199:                                              ; preds = %184
  %200 = load i32, ptr %15, align 4, !tbaa !5
  %201 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %200)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.uadd.with.overflow.i64(i64, i64) #4

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

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: mustprogress uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nobuiltin allocsize(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 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 speculatable willreturn memory(none) }
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 = { nounwind }
attributes #7 = { builtin allocsize(0) }

!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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}


; 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::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" }
%"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] }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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
define dso_local void @_Z9solution2v() local_unnamed_addr #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %3 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %4 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %5 = load i32, ptr %1, align 4, !tbaa !5
  %6 = sext i32 %5 to i64
  %7 = icmp slt i32 %5, 0
  %8 = shl nsw i64 %6, 5
  %9 = or disjoint i64 %8, 8
  %10 = select i1 %7, i64 -1, i64 %9
  %11 = call noalias noundef nonnull ptr @_Znam(i64 noundef %10) #7
  store i64 %6, ptr %11, align 16
  %12 = getelementptr inbounds i8, ptr %11, i64 8
  %13 = icmp eq i32 %5, 0
  br i1 %13, label %.loopexit.thread, label %14

14:                                               ; preds = %0
  %15 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %12, i64 %6
  br label %16

16:                                               ; preds = %16, %14
  %17 = phi ptr [ %12, %14 ], [ %18, %16 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  %18 = getelementptr inbounds i8, ptr %17, i64 32
  %19 = icmp eq ptr %18, %15
  br i1 %19, label %.loopexit, label %16

.loopexit:                                        ; preds = %16
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  %.pre.fr = freeze i32 %.pre
  %20 = sext i32 %.pre.fr to i64
  %21 = icmp slt i32 %.pre.fr, 0
  %22 = shl nsw i64 %20, 2
  %spec.select105 = select i1 %21, i64 -1, i64 %22
  br label %.loopexit.thread

.loopexit.thread:                                 ; preds = %.loopexit, %0
  %23 = phi i32 [ 0, %0 ], [ %.pre.fr, %.loopexit ]
  %24 = phi i64 [ 0, %0 ], [ %spec.select105, %.loopexit ]
  %25 = call noalias noundef nonnull ptr @_Znam(i64 noundef %24) #7
  %26 = call noalias noundef nonnull ptr @_Znam(i64 noundef %24) #7
  %27 = icmp sgt i32 %23, 0
  br i1 %27, label %.lr.ph, label %.preheader56

.lr.ph:                                           ; preds = %.loopexit.thread, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.loopexit.thread ]
  %28 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %12, i64 %indvars.iv
  %29 = 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) %28)
  %30 = getelementptr inbounds i32, ptr %25, i64 %indvars.iv
  store i32 0, ptr %30, align 4, !tbaa !5
  %31 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv
  store i32 0, ptr %31, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %32 = load i32, ptr %1, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = icmp slt i64 %indvars.iv.next, %33
  br i1 %34, label %.lr.ph, label %.preheader56, !llvm.loop !9

.preheader56:                                     ; preds = %.lr.ph, %.loopexit.thread
  %.lcssa59101 = phi i32 [ %23, %.loopexit.thread ], [ %32, %.lr.ph ]
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = icmp sgt i32 %35, 0
  br i1 %36, label %.preheader55, label %.preheader

.preheader55:                                     ; preds = %.preheader56, %._crit_edge
  %37 = phi i32 [ %125, %._crit_edge ], [ %.lcssa59101, %.preheader56 ]
  %indvars.iv91 = phi i64 [ %indvars.iv.next92, %._crit_edge ], [ 0, %.preheader56 ]
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %.lr.ph63, label %._crit_edge

.preheader:                                       ; preds = %._crit_edge, %.preheader56
  %39 = phi i32 [ %.lcssa59101, %.preheader56 ], [ %125, %._crit_edge ]
  %40 = icmp sgt i32 %39, 0
  br i1 %40, label %.lr.ph74.preheader, label %._crit_edge75

.lr.ph74.preheader:                               ; preds = %.preheader
  %wide.trip.count97 = zext nneg i32 %39 to i64
  %min.iters.check125 = icmp ult i32 %39, 8
  br i1 %min.iters.check125, label %.lr.ph74.preheader137, label %vector.ph126

.lr.ph74.preheader137:                            ; preds = %middle.block123, %.lr.ph74.preheader
  %indvars.iv94.ph = phi i64 [ 0, %.lr.ph74.preheader ], [ %n.vec128, %middle.block123 ]
  %.04172.ph = phi i32 [ 0, %.lr.ph74.preheader ], [ %50, %middle.block123 ]
  br label %.lr.ph74

vector.ph126:                                     ; preds = %.lr.ph74.preheader
  %n.vec128 = and i64 %wide.trip.count97, 2147483640
  br label %vector.body130

vector.body130:                                   ; preds = %vector.body130, %vector.ph126
  %index131 = phi i64 [ 0, %vector.ph126 ], [ %index.next135, %vector.body130 ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph126 ], [ %47, %vector.body130 ]
  %vec.phi132 = phi <4 x i32> [ zeroinitializer, %vector.ph126 ], [ %48, %vector.body130 ]
  %41 = getelementptr inbounds i32, ptr %25, i64 %index131
  %42 = getelementptr inbounds i8, ptr %41, i64 16
  %wide.load133 = load <4 x i32>, ptr %41, align 4, !tbaa !5
  %wide.load134 = load <4 x i32>, ptr %42, align 4, !tbaa !5
  %43 = icmp eq <4 x i32> %wide.load133, <i32 1, i32 1, i32 1, i32 1>
  %44 = icmp eq <4 x i32> %wide.load134, <i32 1, i32 1, i32 1, i32 1>
  %45 = zext <4 x i1> %43 to <4 x i32>
  %46 = zext <4 x i1> %44 to <4 x i32>
  %47 = add <4 x i32> %vec.phi, %45
  %48 = add <4 x i32> %vec.phi132, %46
  %index.next135 = add nuw i64 %index131, 8
  %49 = icmp eq i64 %index.next135, %n.vec128
  br i1 %49, label %middle.block123, label %vector.body130, !llvm.loop !11

middle.block123:                                  ; preds = %vector.body130
  %bin.rdx = add <4 x i32> %48, %47
  %50 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n136 = icmp eq i64 %n.vec128, %wide.trip.count97
  br i1 %cmp.n136, label %._crit_edge75, label %.lr.ph74.preheader137

.preheader54:                                     ; preds = %.lr.ph63
  %51 = icmp sgt i32 %60, 1
  br i1 %51, label %.lr.ph67.preheader, label %.preheader53

.lr.ph67.preheader:                               ; preds = %.preheader54
  %wide.trip.count = zext nneg i32 %60 to i64
  %52 = add nsw i64 %wide.trip.count, -1
  %53 = add nsw i64 %wide.trip.count, -2
  %xtraiter = and i64 %52, 3
  %54 = icmp ult i64 %53, 3
  br i1 %54, label %.preheader53.loopexit.unr-lcssa, label %.lr.ph67.preheader.new

.lr.ph67.preheader.new:                           ; preds = %.lr.ph67.preheader
  %unroll_iter = and i64 %52, -4
  br label %.lr.ph67

.lr.ph63:                                         ; preds = %.preheader55, %.lr.ph63
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %.lr.ph63 ], [ 0, %.preheader55 ]
  %55 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %12, i64 %indvars.iv80
  %56 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %55, i64 noundef %indvars.iv91)
  %57 = load i8, ptr %56, align 1, !tbaa !14
  %58 = sext i8 %57 to i32
  %59 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv80
  store i32 %58, ptr %59, align 4, !tbaa !5
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %60 = load i32, ptr %1, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = icmp slt i64 %indvars.iv.next81, %61
  br i1 %62, label %.lr.ph63, label %.preheader54, !llvm.loop !15

.preheader53.loopexit.unr-lcssa:                  ; preds = %.lr.ph67, %.lr.ph67.preheader
  %spec.select.lcssa.ph = phi i32 [ poison, %.lr.ph67.preheader ], [ %spec.select.3, %.lr.ph67 ]
  %indvars.iv83.unr = phi i64 [ 1, %.lr.ph67.preheader ], [ %indvars.iv.next84.3, %.lr.ph67 ]
  %.14765.unr = phi i32 [ 0, %.lr.ph67.preheader ], [ %spec.select.3, %.lr.ph67 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader53, label %.lr.ph67.epil

.lr.ph67.epil:                                    ; preds = %.preheader53.loopexit.unr-lcssa, %.lr.ph67.epil
  %indvars.iv83.epil = phi i64 [ %indvars.iv.next84.epil, %.lr.ph67.epil ], [ %indvars.iv83.unr, %.preheader53.loopexit.unr-lcssa ]
  %.14765.epil = phi i32 [ %spec.select.epil, %.lr.ph67.epil ], [ %.14765.unr, %.preheader53.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph67.epil ], [ 0, %.preheader53.loopexit.unr-lcssa ]
  %63 = sext i32 %.14765.epil to i64
  %64 = getelementptr inbounds i32, ptr %26, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv83.epil
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %.not.epil = icmp sgt i32 %65, %67
  %68 = trunc nuw nsw i64 %indvars.iv83.epil to i32
  %spec.select.epil = select i1 %.not.epil, i32 %.14765.epil, i32 %68
  %indvars.iv.next84.epil = add nuw nsw i64 %indvars.iv83.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader53, label %.lr.ph67.epil, !llvm.loop !16

.preheader53:                                     ; preds = %.preheader53.loopexit.unr-lcssa, %.lr.ph67.epil, %.preheader54
  %.147.lcssa = phi i32 [ 0, %.preheader54 ], [ %spec.select.lcssa.ph, %.preheader53.loopexit.unr-lcssa ], [ %spec.select.epil, %.lr.ph67.epil ]
  %69 = icmp sgt i32 %60, 0
  br i1 %69, label %.lr.ph70, label %._crit_edge

.lr.ph70:                                         ; preds = %.preheader53
  %70 = sext i32 %.147.lcssa to i64
  %71 = getelementptr inbounds i32, ptr %26, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %wide.trip.count89 = zext nneg i32 %60 to i64
  %min.iters.check = icmp ult i32 %60, 8
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph70
  %indvars.iv86.ph = phi i64 [ 0, %.lr.ph70 ], [ %n.vec, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph70
  %n.vec = and i64 %wide.trip.count89, 2147483640
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %72, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %pred.store.continue122, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %pred.store.continue122 ]
  %73 = or disjoint i64 %index, 4
  %74 = getelementptr inbounds i32, ptr %26, i64 %index
  %75 = getelementptr inbounds i8, ptr %74, i64 16
  %wide.load = load <4 x i32>, ptr %74, align 4, !tbaa !5
  %wide.load108 = load <4 x i32>, ptr %75, align 4, !tbaa !5
  %76 = icmp eq <4 x i32> %broadcast.splat, %wide.load
  %77 = icmp eq <4 x i32> %broadcast.splat, %wide.load108
  %78 = extractelement <4 x i1> %76, i64 0
  br i1 %78, label %pred.store.if, label %pred.store.continue

pred.store.if:                                    ; preds = %vector.body
  %79 = getelementptr inbounds i32, ptr %25, i64 %index
  store i32 1, ptr %79, align 4, !tbaa !5
  br label %pred.store.continue

pred.store.continue:                              ; preds = %pred.store.if, %vector.body
  %80 = extractelement <4 x i1> %76, i64 1
  br i1 %80, label %pred.store.if109, label %pred.store.continue110

pred.store.if109:                                 ; preds = %pred.store.continue
  %81 = or disjoint i64 %index, 1
  %82 = getelementptr inbounds i32, ptr %25, i64 %81
  store i32 1, ptr %82, align 4, !tbaa !5
  br label %pred.store.continue110

pred.store.continue110:                           ; preds = %pred.store.if109, %pred.store.continue
  %83 = extractelement <4 x i1> %76, i64 2
  br i1 %83, label %pred.store.if111, label %pred.store.continue112

pred.store.if111:                                 ; preds = %pred.store.continue110
  %84 = or disjoint i64 %index, 2
  %85 = getelementptr inbounds i32, ptr %25, i64 %84
  store i32 1, ptr %85, align 4, !tbaa !5
  br label %pred.store.continue112

pred.store.continue112:                           ; preds = %pred.store.if111, %pred.store.continue110
  %86 = extractelement <4 x i1> %76, i64 3
  br i1 %86, label %pred.store.if113, label %pred.store.continue114

pred.store.if113:                                 ; preds = %pred.store.continue112
  %87 = or disjoint i64 %index, 3
  %88 = getelementptr inbounds i32, ptr %25, i64 %87
  store i32 1, ptr %88, align 4, !tbaa !5
  br label %pred.store.continue114

pred.store.continue114:                           ; preds = %pred.store.if113, %pred.store.continue112
  %89 = extractelement <4 x i1> %77, i64 0
  br i1 %89, label %pred.store.if115, label %pred.store.continue116

pred.store.if115:                                 ; preds = %pred.store.continue114
  %90 = getelementptr inbounds i32, ptr %25, i64 %73
  store i32 1, ptr %90, align 4, !tbaa !5
  br label %pred.store.continue116

pred.store.continue116:                           ; preds = %pred.store.if115, %pred.store.continue114
  %91 = extractelement <4 x i1> %77, i64 1
  br i1 %91, label %pred.store.if117, label %pred.store.continue118

pred.store.if117:                                 ; preds = %pred.store.continue116
  %92 = or disjoint i64 %index, 5
  %93 = getelementptr inbounds i32, ptr %25, i64 %92
  store i32 1, ptr %93, align 4, !tbaa !5
  br label %pred.store.continue118

pred.store.continue118:                           ; preds = %pred.store.if117, %pred.store.continue116
  %94 = extractelement <4 x i1> %77, i64 2
  br i1 %94, label %pred.store.if119, label %pred.store.continue120

pred.store.if119:                                 ; preds = %pred.store.continue118
  %95 = or disjoint i64 %index, 6
  %96 = getelementptr inbounds i32, ptr %25, i64 %95
  store i32 1, ptr %96, align 4, !tbaa !5
  br label %pred.store.continue120

pred.store.continue120:                           ; preds = %pred.store.if119, %pred.store.continue118
  %97 = extractelement <4 x i1> %77, i64 3
  br i1 %97, label %pred.store.if121, label %pred.store.continue122

pred.store.if121:                                 ; preds = %pred.store.continue120
  %98 = or disjoint i64 %index, 7
  %99 = getelementptr inbounds i32, ptr %25, i64 %98
  store i32 1, ptr %99, align 4, !tbaa !5
  br label %pred.store.continue122

pred.store.continue122:                           ; preds = %pred.store.if121, %pred.store.continue120
  %index.next = add nuw i64 %index, 8
  %100 = icmp eq i64 %index.next, %n.vec
  br i1 %100, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %pred.store.continue122
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count89
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

.lr.ph67:                                         ; preds = %.lr.ph67, %.lr.ph67.preheader.new
  %indvars.iv83 = phi i64 [ 1, %.lr.ph67.preheader.new ], [ %indvars.iv.next84.3, %.lr.ph67 ]
  %.14765 = phi i32 [ 0, %.lr.ph67.preheader.new ], [ %spec.select.3, %.lr.ph67 ]
  %niter = phi i64 [ 0, %.lr.ph67.preheader.new ], [ %niter.next.3, %.lr.ph67 ]
  %101 = sext i32 %.14765 to i64
  %102 = getelementptr inbounds i32, ptr %26, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %104 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv83
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %.not = icmp sgt i32 %103, %105
  %106 = trunc nuw nsw i64 %indvars.iv83 to i32
  %spec.select = select i1 %.not, i32 %.14765, i32 %106
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %107 = sext i32 %spec.select to i64
  %108 = getelementptr inbounds i32, ptr %26, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv.next84
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %.not.1 = icmp sgt i32 %109, %111
  %112 = trunc nuw nsw i64 %indvars.iv.next84 to i32
  %spec.select.1 = select i1 %.not.1, i32 %spec.select, i32 %112
  %indvars.iv.next84.1 = add nuw nsw i64 %indvars.iv83, 2
  %113 = sext i32 %spec.select.1 to i64
  %114 = getelementptr inbounds i32, ptr %26, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv.next84.1
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %.not.2 = icmp sgt i32 %115, %117
  %118 = trunc nuw nsw i64 %indvars.iv.next84.1 to i32
  %spec.select.2 = select i1 %.not.2, i32 %spec.select.1, i32 %118
  %indvars.iv.next84.2 = add nuw nsw i64 %indvars.iv83, 3
  %119 = sext i32 %spec.select.2 to i64
  %120 = getelementptr inbounds i32, ptr %26, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv.next84.2
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %.not.3 = icmp sgt i32 %121, %123
  %124 = trunc nuw nsw i64 %indvars.iv.next84.2 to i32
  %spec.select.3 = select i1 %.not.3, i32 %spec.select.2, i32 %124
  %indvars.iv.next84.3 = add nuw nsw i64 %indvars.iv83, 4
  %niter.next.3 = add nuw i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader53.loopexit.unr-lcssa, label %.lr.ph67, !llvm.loop !19

._crit_edge:                                      ; preds = %134, %middle.block, %.preheader55, %.preheader53
  %125 = phi i32 [ %60, %.preheader53 ], [ %37, %.preheader55 ], [ %60, %middle.block ], [ %60, %134 ]
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %126 = load i32, ptr %2, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = icmp slt i64 %indvars.iv.next92, %127
  br i1 %128, label %.preheader55, label %.preheader, !llvm.loop !20

scalar.ph:                                        ; preds = %scalar.ph.preheader, %134
  %indvars.iv86 = phi i64 [ %indvars.iv.next87, %134 ], [ %indvars.iv86.ph, %scalar.ph.preheader ]
  %129 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv86
  %130 = load i32, ptr %129, align 4, !tbaa !5
  %131 = icmp eq i32 %72, %130
  br i1 %131, label %132, label %134

132:                                              ; preds = %scalar.ph
  %133 = getelementptr inbounds i32, ptr %25, i64 %indvars.iv86
  store i32 1, ptr %133, align 4, !tbaa !5
  br label %134

134:                                              ; preds = %scalar.ph, %132
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %exitcond90.not = icmp eq i64 %indvars.iv.next87, %wide.trip.count89
  br i1 %exitcond90.not, label %._crit_edge, label %scalar.ph, !llvm.loop !21

._crit_edge75:                                    ; preds = %.lr.ph74, %middle.block123, %.preheader
  %.041.lcssa = phi i32 [ 0, %.preheader ], [ %50, %middle.block123 ], [ %spec.select52, %.lr.ph74 ]
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.041.lcssa)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret void

.lr.ph74:                                         ; preds = %.lr.ph74.preheader137, %.lr.ph74
  %indvars.iv94 = phi i64 [ %indvars.iv.next95, %.lr.ph74 ], [ %indvars.iv94.ph, %.lr.ph74.preheader137 ]
  %.04172 = phi i32 [ %spec.select52, %.lr.ph74 ], [ %.04172.ph, %.lr.ph74.preheader137 ]
  %136 = getelementptr inbounds i32, ptr %25, i64 %indvars.iv94
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = icmp eq i32 %137, 1
  %139 = zext i1 %138 to i32
  %spec.select52 = add nuw nsw i32 %.04172, %139
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %exitcond98.not = icmp eq i64 %indvars.iv.next95, %wide.trip.count97
  br i1 %exitcond98.not, label %._crit_edge75, label %.lr.ph74, !llvm.loop !22
}

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

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 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 #3 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #5

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

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

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


; Effective O3 passes: ADCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass