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

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

@C = external dso_local global [61 x [61 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %14 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %15 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %17
  %19 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %18, ptr noundef null)
  %20 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %21 = getelementptr i8, ptr %20, i64 -24
  %22 = load i64, ptr %21, align 8
  %23 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %22
  %24 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %23, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  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 %7) #6
  store i32 2, ptr %7, align 4, !tbaa !11
  br label %25

25:                                               ; preds = %64, %0
  %26 = load i32, ptr %7, align 4, !tbaa !11
  %27 = icmp sle i32 %26, 60
  br i1 %27, label %29, label %28

28:                                               ; preds = %25
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %67

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

30:                                               ; preds = %60, %29
  %31 = load i32, ptr %9, align 4, !tbaa !11
  %32 = load i32, ptr %7, align 4, !tbaa !11
  %33 = icmp sle i32 %31, %32
  br i1 %33, label %35, label %34

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

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

60:                                               ; preds = %35
  %61 = load i32, ptr %9, align 4, !tbaa !11
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %9, align 4, !tbaa !11
  br label %30, !llvm.loop !13

63:                                               ; preds = %34
  br label %64

64:                                               ; preds = %63
  %65 = load i32, ptr %7, align 4, !tbaa !11
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %7, align 4, !tbaa !11
  br label %25, !llvm.loop !15

67:                                               ; preds = %28
  %68 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  br label %69

69:                                               ; preds = %177, %67
  %70 = load i64, ptr %2, align 8, !tbaa !8
  %71 = add nsw i64 %70, -1
  store i64 %71, ptr %2, align 8, !tbaa !8
  %72 = icmp ne i64 %70, 0
  br i1 %72, label %73, label %181

73:                                               ; preds = %69
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %75 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %74, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store i64 0, ptr %10, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 -1, ptr %11, align 8, !tbaa !8
  store i64 0, ptr %5, align 8, !tbaa !8
  br label %76

76:                                               ; preds = %86, %73
  %77 = load i64, ptr %4, align 8, !tbaa !8
  %78 = load i64, ptr %10, align 8, !tbaa !8
  %79 = icmp sgt i64 %77, %78
  br i1 %79, label %80, label %84

80:                                               ; preds = %76
  %81 = load i64, ptr %3, align 8, !tbaa !8
  %82 = load i64, ptr %11, align 8, !tbaa !8
  %83 = icmp sgt i64 %81, %82
  br label %84

84:                                               ; preds = %80, %76
  %85 = phi i1 [ false, %76 ], [ %83, %80 ]
  br i1 %85, label %86, label %97

86:                                               ; preds = %84
  %87 = load i64, ptr %4, align 8, !tbaa !8
  %88 = load i64, ptr %10, align 8, !tbaa !8
  %89 = sub nsw i64 %87, %88
  store i64 %89, ptr %4, align 8, !tbaa !8
  %90 = load i64, ptr %11, align 8, !tbaa !8
  %91 = add nsw i64 %90, 1
  store i64 %91, ptr %11, align 8, !tbaa !8
  %92 = load i64, ptr %3, align 8, !tbaa !8
  %93 = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %92
  %94 = load i64, ptr %11, align 8, !tbaa !8
  %95 = getelementptr inbounds [61 x i64], ptr %93, i64 0, i64 %94
  %96 = load i64, ptr %95, align 8, !tbaa !8
  store i64 %96, ptr %10, align 8, !tbaa !8
  br label %76, !llvm.loop !16

97:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 0, ptr %12, align 8, !tbaa !8
  store i64 0, ptr %10, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !11
  br label %98

98:                                               ; preds = %173, %97
  %99 = load i32, ptr %13, align 4, !tbaa !11
  %100 = sext i32 %99 to i64
  %101 = load i64, ptr %3, align 8, !tbaa !8
  %102 = icmp slt i64 %100, %101
  br i1 %102, label %104, label %103

103:                                              ; preds = %98
  store i32 12, ptr %8, align 4
  br label %176

104:                                              ; preds = %98
  %105 = load i64, ptr %3, align 8, !tbaa !8
  %106 = load i32, ptr %13, align 4, !tbaa !11
  %107 = sext i32 %106 to i64
  %108 = sub nsw i64 %105, %107
  %109 = sub nsw i64 %108, 1
  %110 = icmp eq i64 %109, 0
  br i1 %110, label %111, label %114

111:                                              ; preds = %104
  %112 = load i64, ptr %12, align 8, !tbaa !8
  %113 = add nsw i64 %112, 1
  store i64 %113, ptr %12, align 8, !tbaa !8
  store i32 12, ptr %8, align 4
  br label %176

114:                                              ; preds = %104
  %115 = load i64, ptr %3, align 8, !tbaa !8
  %116 = load i32, ptr %13, align 4, !tbaa !11
  %117 = sext i32 %116 to i64
  %118 = sub nsw i64 %115, %117
  %119 = sub nsw i64 %118, 1
  %120 = load i64, ptr %11, align 8, !tbaa !8
  %121 = icmp slt i64 %119, %120
  br i1 %121, label %122, label %131

122:                                              ; preds = %114
  %123 = load i64, ptr %3, align 8, !tbaa !8
  %124 = load i32, ptr %13, align 4, !tbaa !11
  %125 = sext i32 %124 to i64
  %126 = sub nsw i64 %123, %125
  %127 = sub nsw i64 %126, 1
  %128 = shl i64 1, %127
  %129 = load i64, ptr %12, align 8, !tbaa !8
  %130 = xor i64 %129, %128
  store i64 %130, ptr %12, align 8, !tbaa !8
  br label %168

131:                                              ; preds = %114
  %132 = load i64, ptr %10, align 8, !tbaa !8
  %133 = load i64, ptr %3, align 8, !tbaa !8
  %134 = load i32, ptr %13, align 4, !tbaa !11
  %135 = sext i32 %134 to i64
  %136 = sub nsw i64 %133, %135
  %137 = sub nsw i64 %136, 1
  %138 = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %137
  %139 = load i64, ptr %11, align 8, !tbaa !8
  %140 = getelementptr inbounds [61 x i64], ptr %138, i64 0, i64 %139
  %141 = load i64, ptr %140, align 8, !tbaa !8
  %142 = add nsw i64 %132, %141
  %143 = load i64, ptr %4, align 8, !tbaa !8
  %144 = icmp slt i64 %142, %143
  br i1 %144, label %145, label %167

145:                                              ; preds = %131
  %146 = load i64, ptr %10, align 8, !tbaa !8
  %147 = load i64, ptr %3, align 8, !tbaa !8
  %148 = load i32, ptr %13, align 4, !tbaa !11
  %149 = sext i32 %148 to i64
  %150 = sub nsw i64 %147, %149
  %151 = sub nsw i64 %150, 1
  %152 = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %151
  %153 = load i64, ptr %11, 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 = add nsw i64 %146, %155
  store i64 %156, ptr %10, align 8, !tbaa !8
  %157 = load i64, ptr %3, align 8, !tbaa !8
  %158 = load i32, ptr %13, align 4, !tbaa !11
  %159 = sext i32 %158 to i64
  %160 = sub nsw i64 %157, %159
  %161 = sub nsw i64 %160, 1
  %162 = shl i64 1, %161
  %163 = load i64, ptr %12, align 8, !tbaa !8
  %164 = xor i64 %163, %162
  store i64 %164, ptr %12, align 8, !tbaa !8
  %165 = load i64, ptr %11, align 8, !tbaa !8
  %166 = sub nsw i64 %165, 1
  store i64 %166, ptr %11, align 8, !tbaa !8
  br label %167

167:                                              ; preds = %145, %131
  br label %168

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

171:                                              ; preds = %168
  store i32 12, ptr %8, align 4
  br label %176

172:                                              ; preds = %168
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr %13, align 4, !tbaa !11
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %13, align 4, !tbaa !11
  br label %98, !llvm.loop !17

176:                                              ; preds = %171, %111, %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %177

177:                                              ; preds = %176
  %178 = load i64, ptr %12, align 8, !tbaa !8
  %179 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %178)
  %180 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %179, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %69, !llvm.loop !18

181:                                              ; preds = %69
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #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 8, ptr %2) #6
  %182 = load i32, ptr %1, align 4
  ret i32 %182
}

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

; 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: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #4 align 2

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

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

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

@C = external dso_local local_unnamed_addr global [61 x [61 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %5 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %6 = getelementptr i8, ptr %5, i64 -24
  %7 = load i64, ptr %6, align 8
  %8 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %7
  %9 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %8, ptr noundef null)
  %10 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %11 = getelementptr i8, ptr %10, i64 -24
  %12 = load i64, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %12
  %14 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %13, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  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 %.preheader51

.preheader51:                                     ; preds = %0, %.loopexit94
  %indvars.iv79 = phi i64 [ 2, %0 ], [ %indvars.iv.next80, %.loopexit94 ]
  %indvars.iv77 = phi i64 [ 3, %0 ], [ %indvars.iv.next78, %.loopexit94 ]
  %15 = add nsw i64 %indvars.iv79, -1
  %.phi.trans.insert = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %15, 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, %.preheader51
  %.ph = phi i64 [ %.pre, %.preheader51 ], [ %vector.recur.extract, %middle.block ]
  %indvars.iv.ph = phi i64 [ 0, %.preheader51 ], [ %n.vec, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.preheader51
  %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 ]
  %16 = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %15, i64 %index
  %17 = getelementptr inbounds i8, ptr %16, i64 16
  %wide.load = load <2 x i64>, ptr %16, align 8, !tbaa !8
  %wide.load93 = load <2 x i64>, ptr %17, align 8, !tbaa !8
  %18 = shufflevector <2 x i64> %vector.recur, <2 x i64> %wide.load, <2 x i32> <i32 1, i32 2>
  %19 = shufflevector <2 x i64> %wide.load, <2 x i64> %wide.load93, <2 x i32> <i32 1, i32 2>
  %20 = add nsw <2 x i64> %wide.load, %18
  %21 = add nsw <2 x i64> %wide.load93, %19
  %22 = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %indvars.iv79, i64 %index
  %23 = getelementptr inbounds i8, ptr %22, i64 16
  store <2 x i64> %20, ptr %22, align 8, !tbaa !8
  store <2 x i64> %21, ptr %23, align 8, !tbaa !8
  %index.next = add nuw i64 %index, 4
  %24 = icmp eq i64 %index.next, %n.vec
  br i1 %24, 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

25:                                               ; preds = %.loopexit94
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %27 = load i64, ptr %1, align 8, !tbaa !8
  %28 = add nsw i64 %27, -1
  store i64 %28, ptr %1, align 8, !tbaa !8
  %.not69 = icmp eq i64 %27, 0
  br i1 %.not69, label %._crit_edge, label %.lr.ph70

.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 %25, label %.preheader51, !llvm.loop !15

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %29 = phi i64 [ %31, %scalar.ph ], [ %.ph, %scalar.ph.preheader ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %30 = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %15, i64 %indvars.iv
  %31 = load i64, ptr %30, align 8, !tbaa !8
  %32 = add nsw i64 %31, %29
  %33 = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %indvars.iv79, i64 %indvars.iv
  store i64 %32, ptr %33, 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 !16

.lr.ph70:                                         ; preds = %25, %.loopexit
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %36 = load i64, ptr %2, align 8
  %.promoted = load i64, ptr %3, align 8, !tbaa !8
  %37 = icmp sgt i64 %.promoted, 0
  %38 = icmp sgt i64 %36, -1
  %39 = select i1 %37, i1 %38, i1 false
  br i1 %39, label %.lr.ph, label %.preheader

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

.preheader:                                       ; preds = %..preheader_crit_edge, %.lr.ph70
  %.037.lcssa = phi i64 [ %44, %..preheader_crit_edge ], [ -1, %.lr.ph70 ]
  %.lcssa52 = phi i64 [ %43, %..preheader_crit_edge ], [ %.promoted, %.lr.ph70 ]
  %40 = icmp sgt i64 %36, 0
  br i1 %40, label %.lr.ph65.preheader, label %.loopexit

.lr.ph65.preheader:                               ; preds = %.preheader
  %41 = add nsw i64 %36, -1
  br label %.lr.ph65

.lr.ph:                                           ; preds = %.lr.ph70, %.lr.ph
  %.03757 = phi i64 [ %44, %.lr.ph ], [ -1, %.lr.ph70 ]
  %.04056 = phi i64 [ %46, %.lr.ph ], [ 0, %.lr.ph70 ]
  %42 = phi i64 [ %43, %.lr.ph ], [ %.promoted, %.lr.ph70 ]
  %43 = sub nsw i64 %42, %.04056
  %44 = add nsw i64 %.03757, 1
  %45 = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %36, i64 %44
  %46 = load i64, ptr %45, align 8, !tbaa !8
  %47 = icmp sgt i64 %43, %46
  %48 = icmp sgt i64 %36, %44
  %49 = select i1 %47, i1 %48, i1 false
  br i1 %49, label %.lr.ph, label %..preheader_crit_edge, !llvm.loop !17

.lr.ph65:                                         ; preds = %.lr.ph65.preheader, %68
  %indvars.iv85 = phi i64 [ 0, %.lr.ph65.preheader ], [ %indvars.iv.next86, %68 ]
  %.03663 = phi i64 [ 0, %.lr.ph65.preheader ], [ %.1, %68 ]
  %.13862 = phi i64 [ %.037.lcssa, %.lr.ph65.preheader ], [ %.239, %68 ]
  %.14161 = phi i64 [ 0, %.lr.ph65.preheader ], [ %.242, %68 ]
  %50 = xor i64 %indvars.iv85, -1
  %51 = add nsw i64 %36, %50
  %exitcond88 = icmp eq i64 %indvars.iv85, %41
  br i1 %exitcond88, label %52, label %54

52:                                               ; preds = %.lr.ph65
  %53 = add nsw i64 %.03663, 1
  br label %.loopexit

54:                                               ; preds = %.lr.ph65
  %55 = icmp slt i64 %51, %.13862
  br i1 %55, label %56, label %59

56:                                               ; preds = %54
  %57 = shl nuw i64 1, %51
  %58 = xor i64 %57, %.03663
  br label %68

59:                                               ; preds = %54
  %60 = getelementptr inbounds [61 x [61 x i64]], ptr @C, i64 0, i64 %51, i64 %.13862
  %61 = load i64, ptr %60, align 8, !tbaa !8
  %62 = add nsw i64 %61, %.14161
  %63 = icmp slt i64 %62, %.lcssa52
  br i1 %63, label %64, label %68

64:                                               ; preds = %59
  %65 = shl nuw i64 1, %51
  %66 = xor i64 %65, %.03663
  %67 = add nsw i64 %.13862, -1
  br label %68

68:                                               ; preds = %59, %64, %56
  %.242 = phi i64 [ %.14161, %56 ], [ %62, %64 ], [ %.14161, %59 ]
  %.239 = phi i64 [ %.13862, %56 ], [ %67, %64 ], [ %.13862, %59 ]
  %.1 = phi i64 [ %58, %56 ], [ %66, %64 ], [ %.03663, %59 ]
  %69 = icmp ne i64 %.239, 0
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %70 = icmp sgt i64 %36, %indvars.iv.next86
  %or.cond = select i1 %69, i1 %70, i1 false
  br i1 %or.cond, label %.lr.ph65, label %.loopexit, !llvm.loop !18

.loopexit:                                        ; preds = %68, %.preheader, %52
  %.2 = phi i64 [ %53, %52 ], [ 0, %.preheader ], [ %.1, %68 ]
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.2)
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %73 = load i64, ptr %1, align 8, !tbaa !8
  %74 = add nsw i64 %73, -1
  store i64 %74, ptr %1, align 8, !tbaa !8
  %.not = icmp eq i64 %73, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph70, !llvm.loop !19

._crit_edge:                                      ; preds = %.loopexit, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  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

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

; Function Attrs: mustprogress 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)) local_unnamed_addr #4 align 2

; 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 #4 align 2

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

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

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 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 = distinct !{!11, !12, !13, !14}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12, !14, !13}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !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