; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/Company Contests/Cisco iCode/iCode 2/Problem B (B)

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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@k = external dso_local global i64, align 8
@C = external dso_local global [61 x [61 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", 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 i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %9 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %10 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %11 = getelementptr i8, ptr %10, i64 -24
  %12 = load i64, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %12
  %14 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %13, ptr noundef null)
  %15 = load ptr, ptr @_ZSt4cerr, align 8, !tbaa !5
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr @_ZSt4cerr, i64 %17
  %19 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %18, ptr noundef null)
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @t)
  store i64 1, ptr getelementptr inbounds ([61 x i64], ptr getelementptr inbounds ([61 x [61 x i64]], ptr @C, i64 0, i64 1), i64 0, i64 1), align 8, !tbaa !8
  store i64 1, ptr getelementptr inbounds ([61 x [61 x i64]], ptr @C, i64 0, i64 1), align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 2, ptr %2, align 4, !tbaa !11
  br label %21

21:                                               ; preds = %60, %0
  %22 = load i32, ptr %2, align 4, !tbaa !11
  %23 = icmp sle i32 %22, 60
  br i1 %23, label %25, label %24

24:                                               ; preds = %21
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %63

25:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !11
  br label %26

26:                                               ; preds = %56, %25
  %27 = load i32, ptr %4, align 4, !tbaa !11
  %28 = load i32, ptr %2, align 4, !tbaa !11
  %29 = icmp sle i32 %27, %28
  br i1 %29, label %31, label %30

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

31:                                               ; preds = %26
  %32 = load i32, ptr %2, align 4, !tbaa !11
  %33 = sub nsw i32 %32, 1
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %34
  %36 = load i32, ptr %4, align 4, !tbaa !11
  %37 = sub nsw i32 %36, 1
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [61 x i64], ptr %35, i64 0, i64 %38
  %40 = load i64, ptr %39, align 8, !tbaa !8
  %41 = load i32, ptr %2, align 4, !tbaa !11
  %42 = sub nsw i32 %41, 1
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %43
  %45 = load i32, ptr %4, align 4, !tbaa !11
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [61 x i64], ptr %44, i64 0, i64 %46
  %48 = load i64, ptr %47, align 8, !tbaa !8
  %49 = add nsw i64 %40, %48
  %50 = load i32, ptr %2, align 4, !tbaa !11
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %51
  %53 = load i32, ptr %4, align 4, !tbaa !11
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [61 x i64], ptr %52, i64 0, i64 %54
  store i64 %49, ptr %55, align 8, !tbaa !8
  br label %56

56:                                               ; preds = %31
  %57 = load i32, ptr %4, align 4, !tbaa !11
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %4, align 4, !tbaa !11
  br label %26, !llvm.loop !13

59:                                               ; preds = %30
  br label %60

60:                                               ; preds = %59
  %61 = load i32, ptr %2, align 4, !tbaa !11
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %2, align 4, !tbaa !11
  br label %21, !llvm.loop !15

63:                                               ; preds = %24
  br label %64

64:                                               ; preds = %178, %73, %63
  %65 = load i32, ptr @t, align 4, !tbaa !11
  %66 = add nsw i32 %65, -1
  store i32 %66, ptr @t, align 4, !tbaa !11
  %67 = icmp ne i32 %65, 0
  br i1 %67, label %68, label %182

68:                                               ; preds = %64
  %69 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %70 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %69, ptr noundef nonnull align 8 dereferenceable(8) @k)
  %71 = load i64, ptr @k, align 8, !tbaa !8
  %72 = icmp eq i64 %71, 1
  br i1 %72, label %73, label %76

73:                                               ; preds = %68
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef @.str)
  br label %64, !llvm.loop !16

76:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store i64 0, ptr %5, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store i64 -1, ptr %6, align 8, !tbaa !8
  br label %77

77:                                               ; preds = %88, %76
  %78 = load i64, ptr %5, align 8, !tbaa !8
  %79 = load i64, ptr @k, align 8, !tbaa !8
  %80 = icmp slt i64 %78, %79
  br i1 %80, label %81, label %86

81:                                               ; preds = %77
  %82 = load i64, ptr %6, align 8, !tbaa !8
  %83 = load i32, ptr @n, align 4, !tbaa !11
  %84 = sext i32 %83 to i64
  %85 = icmp slt i64 %82, %84
  br label %86

86:                                               ; preds = %81, %77
  %87 = phi i1 [ false, %77 ], [ %85, %81 ]
  br i1 %87, label %88, label %100

88:                                               ; preds = %86
  %89 = load i64, ptr %5, align 8, !tbaa !8
  %90 = load i64, ptr @k, align 8, !tbaa !8
  %91 = sub nsw i64 %90, %89
  store i64 %91, ptr @k, align 8, !tbaa !8
  %92 = load i64, ptr %6, align 8, !tbaa !8
  %93 = add nsw i64 %92, 1
  store i64 %93, ptr %6, align 8, !tbaa !8
  %94 = load i32, ptr @n, align 4, !tbaa !11
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %95
  %97 = load i64, ptr %6, align 8, !tbaa !8
  %98 = getelementptr inbounds [61 x i64], ptr %96, i64 0, i64 %97
  %99 = load i64, ptr %98, align 8, !tbaa !8
  store i64 %99, ptr %5, align 8, !tbaa !8
  br label %77, !llvm.loop !17

100:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store i64 0, ptr %7, align 8, !tbaa !8
  store i64 0, ptr %5, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !11
  br label %101

101:                                              ; preds = %174, %100
  %102 = load i32, ptr %8, align 4, !tbaa !11
  %103 = load i32, ptr @n, align 4, !tbaa !11
  %104 = icmp slt i32 %102, %103
  br i1 %104, label %106, label %105

105:                                              ; preds = %101
  store i32 12, ptr %3, align 4
  br label %177

106:                                              ; preds = %101
  %107 = load i32, ptr @n, align 4, !tbaa !11
  %108 = load i32, ptr %8, align 4, !tbaa !11
  %109 = sub nsw i32 %107, %108
  %110 = sub nsw i32 %109, 1
  %111 = icmp eq i32 %110, 0
  br i1 %111, label %112, label %115

112:                                              ; preds = %106
  %113 = load i64, ptr %7, align 8, !tbaa !8
  %114 = or i64 %113, 1
  store i64 %114, ptr %7, align 8, !tbaa !8
  store i32 12, ptr %3, align 4
  br label %177

115:                                              ; preds = %106
  %116 = load i64, ptr %6, align 8, !tbaa !8
  %117 = load i32, ptr @n, align 4, !tbaa !11
  %118 = load i32, ptr %8, align 4, !tbaa !11
  %119 = sub nsw i32 %117, %118
  %120 = sub nsw i32 %119, 1
  %121 = sext i32 %120 to i64
  %122 = icmp sgt i64 %116, %121
  br i1 %122, label %123, label %132

123:                                              ; preds = %115
  %124 = load i32, ptr @n, align 4, !tbaa !11
  %125 = load i32, ptr %8, align 4, !tbaa !11
  %126 = sub nsw i32 %124, %125
  %127 = sub nsw i32 %126, 1
  %128 = zext i32 %127 to i64
  %129 = shl i64 1, %128
  %130 = load i64, ptr %7, align 8, !tbaa !8
  %131 = or i64 %130, %129
  store i64 %131, ptr %7, align 8, !tbaa !8
  br label %169

132:                                              ; preds = %115
  %133 = load i64, ptr %5, align 8, !tbaa !8
  %134 = load i32, ptr @n, align 4, !tbaa !11
  %135 = load i32, ptr %8, align 4, !tbaa !11
  %136 = sub nsw i32 %134, %135
  %137 = sub nsw i32 %136, 1
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %138
  %140 = load i64, ptr %6, align 8, !tbaa !8
  %141 = getelementptr inbounds [61 x i64], ptr %139, i64 0, i64 %140
  %142 = load i64, ptr %141, align 8, !tbaa !8
  %143 = add nsw i64 %133, %142
  %144 = load i64, ptr @k, align 8, !tbaa !8
  %145 = icmp slt i64 %143, %144
  br i1 %145, label %146, label %168

146:                                              ; preds = %132
  %147 = load i32, ptr @n, align 4, !tbaa !11
  %148 = load i32, ptr %8, align 4, !tbaa !11
  %149 = sub nsw i32 %147, %148
  %150 = sub nsw i32 %149, 1
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %151
  %153 = load i64, ptr %6, align 8, !tbaa !8
  %154 = getelementptr inbounds [61 x i64], ptr %152, i64 0, i64 %153
  %155 = load i64, ptr %154, align 8, !tbaa !8
  %156 = load i64, ptr %5, align 8, !tbaa !8
  %157 = add nsw i64 %156, %155
  store i64 %157, ptr %5, align 8, !tbaa !8
  %158 = load i32, ptr @n, align 4, !tbaa !11
  %159 = load i32, ptr %8, align 4, !tbaa !11
  %160 = sub nsw i32 %158, %159
  %161 = sub nsw i32 %160, 1
  %162 = zext i32 %161 to i64
  %163 = shl i64 1, %162
  %164 = load i64, ptr %7, align 8, !tbaa !8
  %165 = or i64 %164, %163
  store i64 %165, ptr %7, align 8, !tbaa !8
  %166 = load i64, ptr %6, align 8, !tbaa !8
  %167 = sub nsw i64 %166, 1
  store i64 %167, ptr %6, align 8, !tbaa !8
  br label %168

168:                                              ; preds = %146, %132
  br label %169

169:                                              ; preds = %168, %123
  %170 = load i64, ptr %6, align 8, !tbaa !8
  %171 = icmp eq i64 %170, 0
  br i1 %171, label %172, label %173

172:                                              ; preds = %169
  store i32 12, ptr %3, align 4
  br label %177

173:                                              ; preds = %169
  br label %174

174:                                              ; preds = %173
  %175 = load i32, ptr %8, align 4, !tbaa !11
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %8, align 4, !tbaa !11
  br label %101, !llvm.loop !18

177:                                              ; preds = %172, %112, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %178

178:                                              ; preds = %177
  %179 = load i64, ptr %7, align 8, !tbaa !8
  %180 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %179)
  %181 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %180, ptr noundef @.str)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %64, !llvm.loop !16

182:                                              ; preds = %64
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #4 align 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}


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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@k = external dso_local global i64, align 8
@C = external dso_local local_unnamed_addr global [61 x [61 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", 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 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %2 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %3 = getelementptr i8, ptr %2, i64 -24
  %4 = load i64, ptr %3, align 8
  %5 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %4
  %6 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %5, ptr noundef null)
  %7 = load ptr, ptr @_ZSt4cerr, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt4cerr, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @t)
  store i64 1, ptr getelementptr inbounds (i8, ptr @C, i64 496), align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @C, i64 488), align 8, !tbaa !8
  br label %.preheader52

.preheader52:                                     ; preds = %0, %.loopexit94
  %indvars.iv79 = phi i64 [ 2, %0 ], [ %indvars.iv.next80, %.loopexit94 ]
  %indvars.iv77 = phi i64 [ 3, %0 ], [ %indvars.iv.next78, %.loopexit94 ]
  %13 = add nsw i64 %indvars.iv79, -1
  %.phi.trans.insert = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %13, i64 -1
  %.pre = load i64, ptr %.phi.trans.insert, align 8, !tbaa !8
  %min.iters.check = icmp ult i64 %indvars.iv77, 4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader52
  %.ph = phi i64 [ %.pre, %.preheader52 ], [ %vector.recur.extract, %middle.block ]
  %indvars.iv.ph = phi i64 [ 0, %.preheader52 ], [ %n.vec, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.preheader52
  %n.vec = and i64 %indvars.iv77, 9223372036854775804
  %vector.recur.init = insertelement <2 x i64> poison, i64 %.pre, i64 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vector.recur = phi <2 x i64> [ %vector.recur.init, %vector.ph ], [ %wide.load93, %vector.body ]
  %14 = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %13, i64 %index
  %15 = getelementptr inbounds i8, ptr %14, i64 16
  %wide.load = load <2 x i64>, ptr %14, align 8, !tbaa !8
  %wide.load93 = load <2 x i64>, ptr %15, align 8, !tbaa !8
  %16 = shufflevector <2 x i64> %vector.recur, <2 x i64> %wide.load, <2 x i32> <i32 1, i32 2>
  %17 = shufflevector <2 x i64> %wide.load, <2 x i64> %wide.load93, <2 x i32> <i32 1, i32 2>
  %18 = add nsw <2 x i64> %wide.load, %16
  %19 = add nsw <2 x i64> %wide.load93, %17
  %20 = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %indvars.iv79, i64 %index
  %21 = getelementptr inbounds i8, ptr %20, i64 16
  store <2 x i64> %18, ptr %20, align 8, !tbaa !8
  store <2 x i64> %19, ptr %21, align 8, !tbaa !8
  %index.next = add nuw i64 %index, 4
  %22 = icmp eq i64 %index.next, %n.vec
  br i1 %22, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %vector.recur.extract = extractelement <2 x i64> %wide.load93, i64 1
  %cmp.n = icmp eq i64 %indvars.iv77, %n.vec
  br i1 %cmp.n, label %.loopexit94, label %scalar.ph.preheader

.preheader51:                                     ; preds = %.loopexit94
  %23 = load i32, ptr @t, align 4, !tbaa !15
  %24 = add nsw i32 %23, -1
  store i32 %24, ptr @t, align 4, !tbaa !15
  %.not70 = icmp eq i32 %23, 0
  br i1 %.not70, label %._crit_edge, label %.lr.ph71

.loopexit94:                                      ; preds = %scalar.ph, %middle.block
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %exitcond84.not = icmp eq i64 %indvars.iv.next80, 61
  br i1 %exitcond84.not, label %.preheader51, label %.preheader52, !llvm.loop !17

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %25 = phi i64 [ %27, %scalar.ph ], [ %.ph, %scalar.ph.preheader ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %26 = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %13, i64 %indvars.iv
  %27 = load i64, ptr %26, align 8, !tbaa !8
  %28 = add nsw i64 %27, %25
  %29 = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %indvars.iv79, i64 %indvars.iv
  store i64 %28, ptr %29, align 8, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %indvars.iv77
  br i1 %exitcond.not, label %.loopexit94, label %scalar.ph, !llvm.loop !18

.lr.ph71:                                         ; preds = %.preheader51, %.backedge
  %30 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %31 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(8) @k)
  %32 = load i64, ptr @k, align 8, !tbaa !8
  %33 = icmp eq i64 %32, 1
  br i1 %33, label %39, label %.preheader50

.preheader50:                                     ; preds = %.lr.ph71
  %34 = load i32, ptr @n, align 4
  %35 = sext i32 %34 to i64
  %36 = icmp sgt i64 %32, 0
  %37 = icmp sgt i32 %34, -1
  %38 = select i1 %36, i1 %37, i1 false
  br i1 %38, label %.lr.ph, label %.preheader

39:                                               ; preds = %.lr.ph71
  %40 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  br label %.backedge

.backedge:                                        ; preds = %39, %.loopexit
  %.sink = phi ptr [ %40, %39 ], [ %75, %.loopexit ]
  %41 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %.sink, ptr noundef nonnull @.str)
  %42 = load i32, ptr @t, align 4, !tbaa !15
  %43 = add nsw i32 %42, -1
  store i32 %43, ptr @t, align 4, !tbaa !15
  %.not = icmp eq i32 %42, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph71, !llvm.loop !19

..preheader_crit_edge:                            ; preds = %.lr.ph
  store i64 %47, ptr @k, align 8, !tbaa !8
  br label %.preheader

.preheader:                                       ; preds = %..preheader_crit_edge, %.preheader50
  %.036.lcssa = phi i64 [ %48, %..preheader_crit_edge ], [ -1, %.preheader50 ]
  %.lcssa53 = phi i64 [ %47, %..preheader_crit_edge ], [ %32, %.preheader50 ]
  %44 = icmp sgt i32 %34, 0
  br i1 %44, label %.lr.ph66.preheader, label %.loopexit

.lr.ph66.preheader:                               ; preds = %.preheader
  %45 = add nsw i32 %34, -1
  %wide.trip.count = zext nneg i32 %45 to i64
  br label %.lr.ph66

.lr.ph:                                           ; preds = %.preheader50, %.lr.ph
  %.03658 = phi i64 [ %48, %.lr.ph ], [ -1, %.preheader50 ]
  %.03957 = phi i64 [ %50, %.lr.ph ], [ 0, %.preheader50 ]
  %46 = phi i64 [ %47, %.lr.ph ], [ %32, %.preheader50 ]
  %47 = sub nsw i64 %46, %.03957
  %48 = add nsw i64 %.03658, 1
  %49 = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %35, i64 %48
  %50 = load i64, ptr %49, align 8, !tbaa !8
  %51 = icmp slt i64 %50, %47
  %52 = icmp slt i64 %48, %35
  %53 = select i1 %51, i1 %52, i1 false
  br i1 %53, label %.lr.ph, label %..preheader_crit_edge, !llvm.loop !20

.lr.ph66:                                         ; preds = %.lr.ph66.preheader, %72
  %indvars.iv85 = phi i64 [ 0, %.lr.ph66.preheader ], [ %indvars.iv.next86, %72 ]
  %.03564 = phi i64 [ 0, %.lr.ph66.preheader ], [ %.1, %72 ]
  %.13763 = phi i64 [ %.036.lcssa, %.lr.ph66.preheader ], [ %.238, %72 ]
  %.14062 = phi i64 [ 0, %.lr.ph66.preheader ], [ %.241, %72 ]
  %54 = xor i64 %indvars.iv85, -1
  %55 = add nsw i64 %35, %54
  %exitcond88 = icmp eq i64 %indvars.iv85, %wide.trip.count
  br i1 %exitcond88, label %56, label %58

56:                                               ; preds = %.lr.ph66
  %57 = or i64 %.03564, 1
  br label %.loopexit

58:                                               ; preds = %.lr.ph66
  %59 = icmp sgt i64 %.13763, %55
  br i1 %59, label %60, label %63

60:                                               ; preds = %58
  %61 = shl nuw i64 1, %55
  %62 = or i64 %61, %.03564
  br label %72

63:                                               ; preds = %58
  %64 = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %55, i64 %.13763
  %65 = load i64, ptr %64, align 8, !tbaa !8
  %66 = add nsw i64 %65, %.14062
  %67 = icmp slt i64 %66, %.lcssa53
  br i1 %67, label %68, label %72

68:                                               ; preds = %63
  %69 = shl nuw i64 1, %55
  %70 = or i64 %69, %.03564
  %71 = add nsw i64 %.13763, -1
  br label %72

72:                                               ; preds = %63, %68, %60
  %.241 = phi i64 [ %.14062, %60 ], [ %66, %68 ], [ %.14062, %63 ]
  %.238 = phi i64 [ %.13763, %60 ], [ %71, %68 ], [ %.13763, %63 ]
  %.1 = phi i64 [ %62, %60 ], [ %70, %68 ], [ %.03564, %63 ]
  %73 = icmp ne i64 %.238, 0
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %74 = icmp slt i64 %indvars.iv.next86, %35
  %or.cond = select i1 %73, i1 %74, i1 false
  br i1 %or.cond, label %.lr.ph66, label %.loopexit, !llvm.loop !21

.loopexit:                                        ; preds = %72, %.preheader, %56
  %.2 = phi i64 [ %57, %56 ], [ 0, %.preheader ], [ %.1, %72 ]
  %75 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.2)
  br label %.backedge

._crit_edge:                                      ; preds = %.backedge, %.preheader51
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

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

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: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #3 align 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #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 = { 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" }

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12, !13, !14}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !10, i64 0}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12, !14, !13}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}


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