; LLVM IR from ritikbanger/Hacktoberfest2022-DSA :: 28. Codechef Problems (StraigntLine)

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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [8 x i32], align 16
  %3 = alloca [8 x i32], align 16
  %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
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %20, %0
  %11 = load i32, ptr %5, align 4, !tbaa !5
  %12 = icmp slt i32 %11, 8
  br i1 %12, label %14, label %13

13:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %23

14:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %16 = load i32, ptr %6, align 4, !tbaa !5
  %17 = load i32, ptr %5, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [8 x i32], ptr %2, i64 0, i64 %18
  store i32 %16, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %20

20:                                               ; preds = %14
  %21 = load i32, ptr %5, align 4, !tbaa !5
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %5, align 4, !tbaa !5
  br label %10, !llvm.loop !9

23:                                               ; preds = %13
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  br label %25

25:                                               ; preds = %104, %23
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = add nsw i32 %26, -1
  store i32 %27, ptr %4, align 4, !tbaa !5
  %28 = icmp ne i32 %26, 0
  br i1 %28, label %29, label %105

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

30:                                               ; preds = %81, %29
  %31 = load i32, ptr %7, align 4, !tbaa !5
  %32 = icmp slt i32 %31, 8
  br i1 %32, label %34, label %33

33:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %84

34:                                               ; preds = %30
  %35 = load i32, ptr %7, align 4, !tbaa !5
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %46

37:                                               ; preds = %34
  %38 = load i32, ptr %7, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [8 x i32], ptr %2, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = load i32, ptr %7, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [8 x i32], ptr %3, i64 0, i64 %44
  store i32 %42, ptr %45, align 4, !tbaa !5
  br label %80

46:                                               ; preds = %34
  %47 = load i32, ptr %7, align 4, !tbaa !5
  %48 = icmp eq i32 %47, 7
  br i1 %48, label %49, label %58

49:                                               ; preds = %46
  %50 = load i32, ptr %7, align 4, !tbaa !5
  %51 = sub nsw i32 %50, 1
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [8 x i32], ptr %2, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = load i32, ptr %7, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [8 x i32], ptr %3, i64 0, i64 %56
  store i32 %54, ptr %57, align 4, !tbaa !5
  br label %79

58:                                               ; preds = %46
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %60 = sub nsw i32 %59, 1
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [8 x i32], ptr %2, i64 0, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = load i32, ptr %7, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [8 x i32], ptr %2, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = icmp eq i32 %63, %68
  br i1 %69, label %70, label %74

70:                                               ; preds = %58
  %71 = load i32, ptr %7, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [8 x i32], ptr %3, i64 0, i64 %72
  store i32 0, ptr %73, align 4, !tbaa !5
  br label %78

74:                                               ; preds = %58
  %75 = load i32, ptr %7, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [8 x i32], ptr %3, i64 0, i64 %76
  store i32 1, ptr %77, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %74, %70
  br label %79

79:                                               ; preds = %78, %49
  br label %80

80:                                               ; preds = %79, %37
  br label %81

81:                                               ; preds = %80
  %82 = load i32, ptr %7, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %7, align 4, !tbaa !5
  br label %30, !llvm.loop !11

84:                                               ; preds = %33
  %85 = load i32, ptr %4, align 4, !tbaa !5
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %87, label %104

87:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %100, %87
  %89 = load i32, ptr %8, align 4, !tbaa !5
  %90 = icmp slt i32 %89, 8
  br i1 %90, label %92, label %91

91:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %103

92:                                               ; preds = %88
  %93 = load i32, ptr %8, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [8 x i32], ptr %3, i64 0, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = load i32, ptr %8, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [8 x i32], ptr %2, i64 0, i64 %98
  store i32 %96, ptr %99, align 4, !tbaa !5
  br label %100

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

103:                                              ; preds = %91
  br label %104

104:                                              ; preds = %103, %84
  br label %25, !llvm.loop !13

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

106:                                              ; preds = %117, %105
  %107 = load i32, ptr %9, align 4, !tbaa !5
  %108 = icmp slt i32 %107, 8
  br i1 %108, label %110, label %109

109:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %120

110:                                              ; preds = %106
  %111 = load i32, ptr %9, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [8 x i32], ptr %3, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %114)
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef @.str)
  br label %117

117:                                              ; preds = %110
  %118 = load i32, ptr %9, align 4, !tbaa !5
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %9, align 4, !tbaa !5
  br label %106, !llvm.loop !14

120:                                              ; preds = %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #4
  ret i32 0
}

; 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

; 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 uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = distinct !{!12, !10}
!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" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %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) %2)
  %4 = load i32, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %6 = load i32, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %8 = load i32, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %10 = load i32, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %12 = load i32, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %14 = load i32, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %16 = load i32, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %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) %2)
  %18 = load i32, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  %19 = 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)
  %.promoted = load i32, ptr %1, align 4, !tbaa !5
  %.not31 = icmp ne i32 %.promoted, 0
  call void @llvm.assume(i1 %.not31)
  %xtraiter = and i32 %.promoted, 1
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader27.lr.ph.prol.loopexit, label %.preheader27.lr.ph.prol

.preheader27.lr.ph.prol:                          ; preds = %0
  %20 = add nsw i32 %.promoted, -1
  %21 = icmp ne i32 %4, %8
  %spec.select.prol = zext i1 %21 to i32
  %22 = icmp ne i32 %6, %10
  %.sroa.17.2.prol = zext i1 %22 to i32
  %23 = icmp ne i32 %8, %12
  %.sroa.20.2.prol = zext i1 %23 to i32
  %24 = icmp ne i32 %10, %14
  %.sroa.23.2.prol = zext i1 %24 to i32
  %25 = icmp ne i32 %12, %16
  %.sroa.26.2.prol = zext i1 %25 to i32
  %26 = icmp ne i32 %14, %18
  %.sroa.29.2.prol = zext i1 %26 to i32
  br label %.preheader27.lr.ph.prol.loopexit

.preheader27.lr.ph.prol.loopexit:                 ; preds = %.preheader27.lr.ph.prol, %0
  %spec.select.lcssa.unr = phi i32 [ poison, %0 ], [ %spec.select.prol, %.preheader27.lr.ph.prol ]
  %.sroa.17.2.lcssa.unr = phi i32 [ poison, %0 ], [ %.sroa.17.2.prol, %.preheader27.lr.ph.prol ]
  %.sroa.20.2.lcssa.unr = phi i32 [ poison, %0 ], [ %.sroa.20.2.prol, %.preheader27.lr.ph.prol ]
  %.sroa.23.2.lcssa.unr = phi i32 [ poison, %0 ], [ %.sroa.23.2.prol, %.preheader27.lr.ph.prol ]
  %.sroa.26.2.lcssa.unr = phi i32 [ poison, %0 ], [ %.sroa.26.2.prol, %.preheader27.lr.ph.prol ]
  %.sroa.29.2.lcssa.unr = phi i32 [ poison, %0 ], [ %.sroa.29.2.prol, %.preheader27.lr.ph.prol ]
  %.sroa.31.0.unr = phi i32 [ %18, %0 ], [ %16, %.preheader27.lr.ph.prol ]
  %.sroa.2646.0.unr = phi i32 [ %16, %0 ], [ %.sroa.29.2.prol, %.preheader27.lr.ph.prol ]
  %.sroa.22.0.unr = phi i32 [ %14, %0 ], [ %.sroa.26.2.prol, %.preheader27.lr.ph.prol ]
  %.sroa.18.0.unr = phi i32 [ %12, %0 ], [ %.sroa.23.2.prol, %.preheader27.lr.ph.prol ]
  %.sroa.1442.0.unr = phi i32 [ %10, %0 ], [ %.sroa.20.2.prol, %.preheader27.lr.ph.prol ]
  %.sroa.10.0.unr = phi i32 [ %8, %0 ], [ %.sroa.17.2.prol, %.preheader27.lr.ph.prol ]
  %.sroa.5.0.unr = phi i32 [ %6, %0 ], [ %spec.select.prol, %.preheader27.lr.ph.prol ]
  %.sroa.038.0.unr = phi i32 [ %4, %0 ], [ %6, %.preheader27.lr.ph.prol ]
  %.in.unr = phi i32 [ %.promoted, %0 ], [ %20, %.preheader27.lr.ph.prol ]
  %27 = icmp eq i32 %.promoted, 1
  br i1 %27, label %.preheader, label %.preheader27.lr.ph

.preheader:                                       ; preds = %.preheader27.lr.ph, %.preheader27.lr.ph.prol.loopexit
  %.sroa.2646.0.lcssa = phi i32 [ %16, %.preheader27.lr.ph.prol.loopexit ], [ %.sroa.29.2, %.preheader27.lr.ph ]
  %.sroa.5.0.lcssa = phi i32 [ %6, %.preheader27.lr.ph.prol.loopexit ], [ %spec.select, %.preheader27.lr.ph ]
  %spec.select.lcssa = phi i32 [ %spec.select.lcssa.unr, %.preheader27.lr.ph.prol.loopexit ], [ %spec.select.1, %.preheader27.lr.ph ]
  %.sroa.17.2.lcssa = phi i32 [ %.sroa.17.2.lcssa.unr, %.preheader27.lr.ph.prol.loopexit ], [ %.sroa.17.2.1, %.preheader27.lr.ph ]
  %.sroa.20.2.lcssa = phi i32 [ %.sroa.20.2.lcssa.unr, %.preheader27.lr.ph.prol.loopexit ], [ %.sroa.20.2.1, %.preheader27.lr.ph ]
  %.sroa.23.2.lcssa = phi i32 [ %.sroa.23.2.lcssa.unr, %.preheader27.lr.ph.prol.loopexit ], [ %.sroa.23.2.1, %.preheader27.lr.ph ]
  %.sroa.26.2.lcssa = phi i32 [ %.sroa.26.2.lcssa.unr, %.preheader27.lr.ph.prol.loopexit ], [ %.sroa.26.2.1, %.preheader27.lr.ph ]
  %.sroa.29.2.lcssa = phi i32 [ %.sroa.29.2.lcssa.unr, %.preheader27.lr.ph.prol.loopexit ], [ %.sroa.29.2.1, %.preheader27.lr.ph ]
  store i32 -1, ptr %1, align 4, !tbaa !5
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.sroa.5.0.lcssa)
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull @.str)
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %spec.select.lcssa)
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull @.str)
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.sroa.17.2.lcssa)
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull @.str)
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.sroa.20.2.lcssa)
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull @.str)
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.sroa.23.2.lcssa)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @.str)
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.sroa.26.2.lcssa)
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull @.str)
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.sroa.29.2.lcssa)
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull @.str)
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.sroa.2646.0.lcssa)
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull @.str)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret i32 0

.preheader27.lr.ph:                               ; preds = %.preheader27.lr.ph.prol.loopexit, %.preheader27.lr.ph
  %.sroa.31.0 = phi i32 [ %.sroa.29.2, %.preheader27.lr.ph ], [ %.sroa.31.0.unr, %.preheader27.lr.ph.prol.loopexit ]
  %.sroa.2646.0 = phi i32 [ %.sroa.29.2.1, %.preheader27.lr.ph ], [ %.sroa.2646.0.unr, %.preheader27.lr.ph.prol.loopexit ]
  %.sroa.22.0 = phi i32 [ %.sroa.26.2.1, %.preheader27.lr.ph ], [ %.sroa.22.0.unr, %.preheader27.lr.ph.prol.loopexit ]
  %.sroa.18.0 = phi i32 [ %.sroa.23.2.1, %.preheader27.lr.ph ], [ %.sroa.18.0.unr, %.preheader27.lr.ph.prol.loopexit ]
  %.sroa.1442.0 = phi i32 [ %.sroa.20.2.1, %.preheader27.lr.ph ], [ %.sroa.1442.0.unr, %.preheader27.lr.ph.prol.loopexit ]
  %.sroa.10.0 = phi i32 [ %.sroa.17.2.1, %.preheader27.lr.ph ], [ %.sroa.10.0.unr, %.preheader27.lr.ph.prol.loopexit ]
  %.sroa.5.0 = phi i32 [ %spec.select.1, %.preheader27.lr.ph ], [ %.sroa.5.0.unr, %.preheader27.lr.ph.prol.loopexit ]
  %.sroa.038.0 = phi i32 [ %spec.select, %.preheader27.lr.ph ], [ %.sroa.038.0.unr, %.preheader27.lr.ph.prol.loopexit ]
  %.in = phi i32 [ %50, %.preheader27.lr.ph ], [ %.in.unr, %.preheader27.lr.ph.prol.loopexit ]
  %44 = icmp ne i32 %.sroa.038.0, %.sroa.10.0
  %spec.select = zext i1 %44 to i32
  %45 = icmp ne i32 %.sroa.5.0, %.sroa.1442.0
  %.sroa.17.2 = zext i1 %45 to i32
  %46 = icmp ne i32 %.sroa.10.0, %.sroa.18.0
  %47 = icmp ne i32 %.sroa.1442.0, %.sroa.22.0
  %48 = icmp ne i32 %.sroa.18.0, %.sroa.2646.0
  %.sroa.26.2 = zext i1 %48 to i32
  %49 = icmp ne i32 %.sroa.22.0, %.sroa.31.0
  %.sroa.29.2 = zext i1 %49 to i32
  %50 = add nsw i32 %.in, -2
  %51 = icmp ne i32 %.sroa.5.0, %.sroa.17.2
  %spec.select.1 = zext i1 %51 to i32
  %52 = xor i1 %44, %46
  %.sroa.17.2.1 = zext i1 %52 to i32
  %53 = xor i1 %45, %47
  %.sroa.20.2.1 = zext i1 %53 to i32
  %54 = xor i1 %46, %48
  %.sroa.23.2.1 = zext i1 %54 to i32
  %55 = xor i1 %47, %49
  %.sroa.26.2.1 = zext i1 %55 to i32
  %56 = icmp ne i32 %.sroa.2646.0, %.sroa.26.2
  %.sroa.29.2.1 = zext i1 %56 to i32
  %.not25.1 = icmp eq i32 %50, 0
  br i1 %.not25.1, label %.preheader, label %.preheader27.lr.ph, !llvm.loop !9
}

; 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

; 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 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 #3

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write)
declare void @llvm.assume(i1 noundef) #4

attributes #0 = { 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 #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 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(inaccessiblemem: write) }
attributes #5 = { nounwind }

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

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


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