; LLVM IR from Tunghohin/Competitive_Coding :: Codeforces/cf1703_E.ll (Z5solvev)

; 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" }

@mp = external dso_local global [110 x [110 x i8]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #5
  %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) %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %11

11:                                               ; preds = %34, %0
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = load i32, ptr %1, align 4, !tbaa !5
  %14 = icmp sle i32 %12, %13
  br i1 %14, label %16, label %15

15:                                               ; preds = %11
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %37

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

17:                                               ; preds = %30, %16
  %18 = load i32, ptr %4, align 4, !tbaa !5
  %19 = load i32, ptr %1, align 4, !tbaa !5
  %20 = icmp sle i32 %18, %19
  br i1 %20, label %22, label %21

21:                                               ; preds = %17
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %33

22:                                               ; preds = %17
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [110 x [110 x i8]], ptr @mp, i64 0, i64 %24
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [110 x i8], ptr %25, i64 0, i64 %27
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %28)
  br label %30

30:                                               ; preds = %22
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %4, align 4, !tbaa !5
  br label %17, !llvm.loop !9

33:                                               ; preds = %21
  br label %34

34:                                               ; preds = %33
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %2, align 4, !tbaa !5
  br label %11, !llvm.loop !11

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

38:                                               ; preds = %130, %37
  %39 = load i32, ptr %6, align 4, !tbaa !5
  %40 = load i32, ptr %1, align 4, !tbaa !5
  %41 = sdiv i32 %40, 2
  %42 = load i32, ptr %1, align 4, !tbaa !5
  %43 = srem i32 %42, 2
  %44 = icmp eq i32 %43, 1
  %45 = zext i1 %44 to i32
  %46 = add nsw i32 %41, %45
  %47 = icmp sle i32 %39, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %38
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %133

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

51:                                               ; preds = %126, %49
  %52 = load i32, ptr %7, align 4, !tbaa !5
  %53 = load i32, ptr %1, align 4, !tbaa !5
  %54 = load i32, ptr %6, align 4, !tbaa !5
  %55 = sub nsw i32 %53, %54
  %56 = icmp sle i32 %52, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %51
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %129

58:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %59 = load i32, ptr %6, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [110 x [110 x i8]], ptr @mp, i64 0, i64 %60
  %62 = load i32, ptr %7, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [110 x i8], ptr %61, i64 0, i64 %63
  %65 = load i8, ptr %64, align 1, !tbaa !12
  %66 = sext i8 %65 to i32
  %67 = icmp eq i32 %66, 49
  %68 = zext i1 %67 to i32
  store i32 %68, ptr %8, align 4, !tbaa !5
  %69 = load i32, ptr %7, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [110 x [110 x i8]], ptr @mp, i64 0, i64 %70
  %72 = load i32, ptr %1, align 4, !tbaa !5
  %73 = load i32, ptr %6, align 4, !tbaa !5
  %74 = sub nsw i32 %72, %73
  %75 = add nsw i32 %74, 1
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [110 x i8], ptr %71, i64 0, i64 %76
  %78 = load i8, ptr %77, align 1, !tbaa !12
  %79 = sext i8 %78 to i32
  %80 = icmp eq i32 %79, 49
  br i1 %80, label %81, label %84

81:                                               ; preds = %58
  %82 = load i32, ptr %8, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %8, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %81, %58
  %85 = load i32, ptr %1, align 4, !tbaa !5
  %86 = load i32, ptr %7, align 4, !tbaa !5
  %87 = sub nsw i32 %85, %86
  %88 = add nsw i32 %87, 1
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [110 x [110 x i8]], ptr @mp, i64 0, i64 %89
  %91 = load i32, ptr %6, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [110 x i8], ptr %90, i64 0, i64 %92
  %94 = load i8, ptr %93, align 1, !tbaa !12
  %95 = sext i8 %94 to i32
  %96 = icmp eq i32 %95, 49
  br i1 %96, label %97, label %100

97:                                               ; preds = %84
  %98 = load i32, ptr %8, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %8, align 4, !tbaa !5
  br label %100

100:                                              ; preds = %97, %84
  %101 = load i32, ptr %1, align 4, !tbaa !5
  %102 = load i32, ptr %6, align 4, !tbaa !5
  %103 = sub nsw i32 %101, %102
  %104 = add nsw i32 %103, 1
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [110 x [110 x i8]], ptr @mp, i64 0, i64 %105
  %107 = load i32, ptr %1, align 4, !tbaa !5
  %108 = load i32, ptr %7, align 4, !tbaa !5
  %109 = sub nsw i32 %107, %108
  %110 = add nsw i32 %109, 1
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [110 x i8], ptr %106, i64 0, i64 %111
  %113 = load i8, ptr %112, align 1, !tbaa !12
  %114 = sext i8 %113 to i32
  %115 = icmp eq i32 %114, 49
  br i1 %115, label %116, label %119

116:                                              ; preds = %100
  %117 = load i32, ptr %8, align 4, !tbaa !5
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %8, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %116, %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %120 = load i32, ptr %8, align 4, !tbaa !5
  %121 = sub nsw i32 4, %120
  store i32 %121, ptr %9, align 4, !tbaa !5
  %122 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = load i32, ptr %5, align 4, !tbaa !5
  %125 = add nsw i32 %124, %123
  store i32 %125, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %126

126:                                              ; preds = %119
  %127 = load i32, ptr %7, align 4, !tbaa !5
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %7, align 4, !tbaa !5
  br label %51, !llvm.loop !13

129:                                              ; preds = %57
  br label %130

130:                                              ; preds = %129
  %131 = load i32, ptr %6, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %6, align 4, !tbaa !5
  br label %38, !llvm.loop !14

133:                                              ; preds = %48
  %134 = load i32, ptr %5, align 4, !tbaa !5
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %134)
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %135, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #5
  ret void
}

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #4

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress 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 #4 = { 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 #5 = { nounwind }

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

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


; 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" }

@mp = external dso_local global [110 x [110 x i8]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %4 = 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)
  %5 = load i32, ptr %1, align 4, !tbaa !5
  %.not33 = icmp slt i32 %5, 1
  br i1 %.not33, label %.preheader29, label %.preheader30

.preheader30:                                     ; preds = %0, %._crit_edge
  %6 = phi i32 [ %13, %._crit_edge ], [ %5, %0 ]
  %indvars.iv47 = phi i64 [ %indvars.iv.next48, %._crit_edge ], [ 1, %0 ]
  %.not2831 = icmp slt i32 %6, 1
  br i1 %.not2831, label %.preheader30.._crit_edge_crit_edge, label %.lr.ph

.preheader30.._crit_edge_crit_edge:               ; preds = %.preheader30
  %.pre = sext i32 %6 to i64
  br label %._crit_edge

.preheader29:                                     ; preds = %._crit_edge, %0
  %7 = phi i32 [ %5, %0 ], [ %13, %._crit_edge ]
  %8 = sdiv i32 %7, 2
  %9 = and i32 %7, -2147483647
  %10 = icmp eq i32 %9, 1
  %11 = zext i1 %10 to i32
  %12 = add nsw i32 %8, %11
  %.not2640 = icmp slt i32 %12, 1
  br i1 %.not2640, label %._crit_edge43, label %.preheader

._crit_edge:                                      ; preds = %.lr.ph, %.preheader30.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader30.._crit_edge_crit_edge ], [ %17, %.lr.ph ]
  %13 = phi i32 [ %6, %.preheader30.._crit_edge_crit_edge ], [ %16, %.lr.ph ]
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %.not.not = icmp slt i64 %indvars.iv47, %.pre-phi
  br i1 %.not.not, label %.preheader30, label %.preheader29, !llvm.loop !9

.lr.ph:                                           ; preds = %.preheader30, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.preheader30 ]
  %14 = getelementptr inbounds [110 x [110 x i8]], ptr @mp, i64 0, i64 %indvars.iv47, i64 %indvars.iv
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %14)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %16 = load i32, ptr %1, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %.not28.not = icmp slt i64 %indvars.iv, %17
  br i1 %.not28.not, label %.lr.ph, label %._crit_edge, !llvm.loop !12

.preheader:                                       ; preds = %.preheader29, %._crit_edge39
  %18 = phi i32 [ %24, %._crit_edge39 ], [ %7, %.preheader29 ]
  %indvars.iv50 = phi i64 [ %indvars.iv.next51, %._crit_edge39 ], [ 1, %.preheader29 ]
  %.02341 = phi i32 [ %.1.lcssa, %._crit_edge39 ], [ 0, %.preheader29 ]
  %19 = trunc nuw nsw i64 %indvars.iv50 to i32
  %20 = sub nsw i32 %18, %19
  %21 = sext i32 %20 to i64
  %.not2735 = icmp sgt i64 %indvars.iv50, %21
  br i1 %.not2735, label %._crit_edge39, label %.lr.ph38

._crit_edge43:                                    ; preds = %._crit_edge39, %.preheader29
  %.023.lcssa = phi i32 [ 0, %.preheader29 ], [ %.1.lcssa, %._crit_edge39 ]
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.023.lcssa)
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %22, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret void

._crit_edge39:                                    ; preds = %61, %.preheader
  %24 = phi i32 [ %18, %.preheader ], [ %67, %61 ]
  %.1.lcssa = phi i32 [ %.02341, %.preheader ], [ %66, %61 ]
  %indvars.iv.next51 = add nuw nsw i64 %indvars.iv50, 1
  %25 = sdiv i32 %24, 2
  %26 = and i32 %24, -2147483647
  %27 = icmp eq i32 %26, 1
  %28 = zext i1 %27 to i32
  %29 = add nsw i32 %25, %28
  %30 = sext i32 %29 to i64
  %.not26.not = icmp slt i64 %indvars.iv50, %30
  br i1 %.not26.not, label %.preheader, label %._crit_edge43, !llvm.loop !13

.lr.ph38:                                         ; preds = %.preheader, %61
  %indvars.iv52 = phi i64 [ %indvars.iv.next53, %61 ], [ %indvars.iv50, %.preheader ]
  %31 = phi i32 [ %68, %61 ], [ %20, %.preheader ]
  %32 = phi i32 [ %67, %61 ], [ %18, %.preheader ]
  %.136 = phi i32 [ %66, %61 ], [ %.02341, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %33 = getelementptr inbounds [110 x [110 x i8]], ptr @mp, i64 0, i64 %indvars.iv50, i64 %indvars.iv52
  %34 = load i8, ptr %33, align 1, !tbaa !14
  %35 = icmp eq i8 %34, 49
  %36 = zext i1 %35 to i32
  store i32 %36, ptr %2, align 4, !tbaa !5
  %37 = add nsw i32 %31, 1
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [110 x [110 x i8]], ptr @mp, i64 0, i64 %indvars.iv52, i64 %38
  %40 = load i8, ptr %39, align 1, !tbaa !14
  %41 = icmp eq i8 %40, 49
  br i1 %41, label %42, label %44

42:                                               ; preds = %.lr.ph38
  %43 = select i1 %35, i32 2, i32 1
  store i32 %43, ptr %2, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %42, %.lr.ph38
  %45 = phi i32 [ %43, %42 ], [ %36, %.lr.ph38 ]
  %46 = trunc nuw nsw i64 %indvars.iv52 to i32
  %reass.sub = sub i32 %32, %46
  %47 = add i32 %reass.sub, 1
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [110 x [110 x i8]], ptr @mp, i64 0, i64 %48, i64 %indvars.iv50
  %50 = load i8, ptr %49, align 1, !tbaa !14
  %51 = icmp eq i8 %50, 49
  br i1 %51, label %52, label %54

52:                                               ; preds = %44
  %53 = add nuw nsw i32 %45, 1
  store i32 %53, ptr %2, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %52, %44
  %55 = phi i32 [ %53, %52 ], [ %45, %44 ]
  %56 = getelementptr inbounds [110 x [110 x i8]], ptr @mp, i64 0, i64 %38, i64 %48
  %57 = load i8, ptr %56, align 1, !tbaa !14
  %58 = icmp eq i8 %57, 49
  br i1 %58, label %59, label %61

59:                                               ; preds = %54
  %60 = add nuw nsw i32 %55, 1
  store i32 %60, ptr %2, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %59, %54
  %62 = phi i32 [ %60, %59 ], [ %55, %54 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  %63 = sub nuw nsw i32 4, %62
  store i32 %63, ptr %3, align 4, !tbaa !5
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = add nsw i32 %65, %.136
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  %indvars.iv.next53 = add nuw nsw i64 %indvars.iv52, 1
  %67 = load i32, ptr %1, align 4, !tbaa !5
  %68 = sub nsw i32 %67, %19
  %69 = sext i32 %68 to i64
  %.not27.not = icmp slt i64 %indvars.iv52, %69
  br i1 %.not27.not, label %.lr.ph38, label %._crit_edge39, !llvm.loop !15
}

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #4

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress 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 #4 = { 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 #5 = { nounwind }

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass