; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/101 Hacks/101 Hack 2016/101 Hack May/Problem C (C)

; 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_ostream" = type { ptr, %"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_istream" = type { ptr, i64, %"class.std::basic_ios" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@n = external dso_local global i32, align 4
@m = external dso_local global i64, align 8
@p = external dso_local global [100100 x i32], align 16
@jump = external dso_local global [64 x [100100 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 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)) #1

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

24:                                               ; preds = %34, %0
  %25 = load i32, ptr %2, align 4, !tbaa !8
  %26 = load i32, ptr @n, align 4, !tbaa !8
  %27 = icmp sle i32 %25, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %37

29:                                               ; preds = %24
  %30 = load i32, ptr %2, align 4, !tbaa !8
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [100100 x i32], ptr @p, i64 0, i64 %31
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %32)
  br label %34

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

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

38:                                               ; preds = %51, %37
  %39 = load i32, ptr %3, align 4, !tbaa !8
  %40 = load i32, ptr @n, align 4, !tbaa !8
  %41 = icmp sle i32 %39, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %54

43:                                               ; preds = %38
  %44 = load i32, ptr %3, align 4, !tbaa !8
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [100100 x i32], ptr @p, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !8
  %48 = load i32, ptr %3, align 4, !tbaa !8
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [100100 x i32], ptr @jump, i64 0, i64 %49
  store i32 %47, ptr %50, align 4, !tbaa !8
  br label %51

51:                                               ; preds = %43
  %52 = load i32, ptr %3, align 4, !tbaa !8
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %3, align 4, !tbaa !8
  br label %38, !llvm.loop !13

54:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 1, ptr %4, align 4, !tbaa !8
  br label %55

55:                                               ; preds = %107, %54
  %56 = load i32, ptr %4, align 4, !tbaa !8
  %57 = icmp slt i32 %56, 64
  br i1 %57, label %59, label %58

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

59:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 1, ptr %6, align 4, !tbaa !8
  br label %60

60:                                               ; preds = %103, %59
  %61 = load i32, ptr %6, align 4, !tbaa !8
  %62 = load i32, ptr @n, align 4, !tbaa !8
  %63 = icmp sle i32 %61, %62
  br i1 %63, label %65, label %64

64:                                               ; preds = %60
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %106

65:                                               ; preds = %60
  %66 = load i32, ptr %4, align 4, !tbaa !8
  %67 = sub nsw i32 %66, 1
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [64 x [100100 x i32]], ptr @jump, i64 0, i64 %68
  %70 = load i32, ptr %6, align 4, !tbaa !8
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [100100 x i32], ptr %69, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !8
  %74 = add nsw i32 %73, 1
  %75 = load i32, ptr @n, align 4, !tbaa !8
  %76 = icmp sgt i32 %74, %75
  br i1 %76, label %77, label %78

77:                                               ; preds = %65
  br label %95

78:                                               ; preds = %65
  %79 = load i32, ptr %4, align 4, !tbaa !8
  %80 = sub nsw i32 %79, 1
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [64 x [100100 x i32]], ptr @jump, i64 0, i64 %81
  %83 = load i32, ptr %4, align 4, !tbaa !8
  %84 = sub nsw i32 %83, 1
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [64 x [100100 x i32]], ptr @jump, i64 0, i64 %85
  %87 = load i32, ptr %6, align 4, !tbaa !8
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [100100 x i32], ptr %86, i64 0, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !8
  %91 = add nsw i32 %90, 1
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [100100 x i32], ptr %82, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !8
  br label %95

95:                                               ; preds = %78, %77
  %96 = phi i32 [ 100100, %77 ], [ %94, %78 ]
  %97 = load i32, ptr %4, align 4, !tbaa !8
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [64 x [100100 x i32]], ptr @jump, i64 0, i64 %98
  %100 = load i32, ptr %6, align 4, !tbaa !8
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [100100 x i32], ptr %99, i64 0, i64 %101
  store i32 %96, ptr %102, align 4, !tbaa !8
  br label %103

103:                                              ; preds = %95
  %104 = load i32, ptr %6, align 4, !tbaa !8
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %6, align 4, !tbaa !8
  br label %60, !llvm.loop !14

106:                                              ; preds = %64
  br label %107

107:                                              ; preds = %106
  %108 = load i32, ptr %4, align 4, !tbaa !8
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %4, align 4, !tbaa !8
  br label %55, !llvm.loop !15

110:                                              ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 1, ptr %7, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %111 = load i64, ptr @m, align 8, !tbaa !16
  store i64 %111, ptr %9, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 63, ptr %10, align 4, !tbaa !8
  br label %112

112:                                              ; preds = %164, %110
  %113 = load i32, ptr %10, align 4, !tbaa !8
  %114 = icmp sge i32 %113, 0
  br i1 %114, label %116, label %115

115:                                              ; preds = %112
  store i32 14, ptr %5, align 4
  br label %167

116:                                              ; preds = %112
  %117 = load i32, ptr %10, align 4, !tbaa !8
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [64 x [100100 x i32]], ptr @jump, i64 0, i64 %118
  %120 = load i32, ptr %7, align 4, !tbaa !8
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [100100 x i32], ptr %119, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !8
  %124 = load i32, ptr @n, align 4, !tbaa !8
  %125 = icmp sle i32 %123, %124
  br i1 %125, label %126, label %163

126:                                              ; preds = %116
  %127 = load i32, ptr %10, align 4, !tbaa !8
  %128 = shl i32 1, %127
  %129 = sext i32 %128 to i64
  %130 = load i64, ptr %9, align 8, !tbaa !16
  %131 = icmp sle i64 %129, %130
  br i1 %131, label %132, label %163

132:                                              ; preds = %126
  %133 = load i32, ptr %10, align 4, !tbaa !8
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [64 x [100100 x i32]], ptr @jump, i64 0, i64 %134
  %136 = load i32, ptr %7, align 4, !tbaa !8
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [100100 x i32], ptr %135, i64 0, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !8
  store i32 %139, ptr %8, align 4, !tbaa !8
  %140 = load i64, ptr @m, align 8, !tbaa !16
  %141 = load i32, ptr %10, align 4, !tbaa !8
  %142 = zext i32 %141 to i64
  %143 = shl i64 1, %142
  %144 = sub nsw i64 %140, %143
  %145 = add nsw i64 %144, 1
  %146 = load i32, ptr %8, align 4, !tbaa !8
  %147 = load i32, ptr %7, align 4, !tbaa !8
  %148 = sub nsw i32 %146, %147
  %149 = sext i32 %148 to i64
  %150 = add nsw i64 %145, %149
  store i64 %150, ptr @m, align 8, !tbaa !16
  %151 = load i32, ptr %8, align 4, !tbaa !8
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %7, align 4, !tbaa !8
  %153 = load i32, ptr %10, align 4, !tbaa !8
  %154 = shl i32 1, %153
  %155 = sext i32 %154 to i64
  %156 = load i64, ptr %9, align 8, !tbaa !16
  %157 = sub nsw i64 %156, %155
  store i64 %157, ptr %9, align 8, !tbaa !16
  %158 = load i32, ptr %7, align 4, !tbaa !8
  %159 = load i32, ptr @n, align 4, !tbaa !8
  %160 = icmp sgt i32 %158, %159
  br i1 %160, label %161, label %162

161:                                              ; preds = %132
  store i32 14, ptr %5, align 4
  br label %167

162:                                              ; preds = %132
  br label %163

163:                                              ; preds = %162, %126, %116
  br label %164

164:                                              ; preds = %163
  %165 = load i32, ptr %10, align 4, !tbaa !8
  %166 = add nsw i32 %165, -1
  store i32 %166, ptr %10, align 4, !tbaa !8
  br label %112, !llvm.loop !18

167:                                              ; preds = %161, %115
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %168

168:                                              ; preds = %167
  %169 = load i64, ptr @m, align 8, !tbaa !16
  %170 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %169)
  %171 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %170, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  %172 = load i32, ptr %1, align 4
  ret i32 %172
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #4 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)) #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)) #0 align 2

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

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"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_istream" = type { ptr, i64, %"class.std::basic_ios" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@n = external dso_local global i32, align 4
@m = external dso_local global i64, align 8
@p = external dso_local global [100100 x i32], align 16
@jump = external dso_local local_unnamed_addr global [64 x [100100 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8

; 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 #0 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)) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %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 @_ZSt4cout, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt4cout, 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) @n)
  %13 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(8) @m)
  %14 = load i32, ptr @n, align 4, !tbaa !8
  %.not54 = icmp slt i32 %14, 1
  br i1 %.not54, label %.split.us, label %.lr.ph

.preheader53:                                     ; preds = %.lr.ph
  %.not4656 = icmp slt i32 %17, 1
  br i1 %.not4656, label %.split.us, label %.preheader.preheader

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %15 = getelementptr inbounds [100100 x i32], ptr @p, i64 0, i64 %indvars.iv
  %16 = 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) %15)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %17 = load i32, ptr @n, align 4, !tbaa !8
  %18 = sext i32 %17 to i64
  %.not.not = icmp slt i64 %indvars.iv, %18
  br i1 %.not.not, label %.lr.ph, label %.preheader53, !llvm.loop !11

.preheader.preheader:                             ; preds = %.preheader53
  %19 = zext nneg i32 %17 to i64
  %20 = shl nuw nsw i64 %19, 2
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @jump, i64 4), ptr nonnull align 4 getelementptr inbounds (i8, ptr @p, i64 4), i64 %20, i1 false), !tbaa !8
  %21 = zext nneg i32 %17 to i64
  %xtraiter = and i64 %21, 1
  %22 = icmp eq i32 %17, 1
  %unroll_iter = and i64 %21, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge
  %indvars.iv75 = phi i64 [ 1, %.preheader.preheader ], [ %indvars.iv.next76, %._crit_edge ]
  %23 = add nsw i64 %indvars.iv75, -1
  br i1 %22, label %._crit_edge.unr-lcssa, label %.preheader.new

.split.us:                                        ; preds = %._crit_edge, %0, %.preheader53
  %.lcssa8488 = phi i32 [ %17, %.preheader53 ], [ %14, %0 ], [ %17, %._crit_edge ]
  %24 = load i64, ptr @m, align 8, !tbaa !13
  br label %54

._crit_edge.unr-lcssa:                            ; preds = %51, %.preheader
  %indvars.iv72.unr = phi i64 [ 1, %.preheader ], [ %indvars.iv.next73.1, %51 ]
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.unr-lcssa
  %25 = getelementptr inbounds [64 x [100100 x i32]], ptr @jump, i64 0, i64 %23, i64 %indvars.iv72.unr
  %26 = load i32, ptr %25, align 4, !tbaa !8
  %.not51.epil = icmp slt i32 %26, %17
  br i1 %.not51.epil, label %27, label %._crit_edge.epilog-lcssa

27:                                               ; preds = %.epil.preheader
  %28 = add nsw i32 %26, 1
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [64 x [100100 x i32]], ptr @jump, i64 0, i64 %23, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !8
  br label %._crit_edge.epilog-lcssa

._crit_edge.epilog-lcssa:                         ; preds = %27, %.epil.preheader
  %32 = phi i32 [ %31, %27 ], [ 100100, %.epil.preheader ]
  %33 = getelementptr inbounds [64 x [100100 x i32]], ptr @jump, i64 0, i64 %indvars.iv75, i64 %indvars.iv72.unr
  store i32 %32, ptr %33, align 4, !tbaa !8
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.unr-lcssa, %._crit_edge.epilog-lcssa
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %exitcond78.not = icmp eq i64 %indvars.iv.next76, 64
  br i1 %exitcond78.not, label %.split.us, label %.preheader, !llvm.loop !15

.preheader.new:                                   ; preds = %.preheader, %51
  %indvars.iv72 = phi i64 [ %indvars.iv.next73.1, %51 ], [ 1, %.preheader ]
  %niter = phi i64 [ %niter.next.1, %51 ], [ 0, %.preheader ]
  %34 = getelementptr inbounds [64 x [100100 x i32]], ptr @jump, i64 0, i64 %23, i64 %indvars.iv72
  %35 = load i32, ptr %34, align 4, !tbaa !8
  %.not51 = icmp slt i32 %35, %17
  br i1 %.not51, label %36, label %41

36:                                               ; preds = %.preheader.new
  %37 = add nsw i32 %35, 1
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [64 x [100100 x i32]], ptr @jump, i64 0, i64 %23, i64 %38
  %40 = load i32, ptr %39, align 4, !tbaa !8
  br label %41

41:                                               ; preds = %.preheader.new, %36
  %42 = phi i32 [ %40, %36 ], [ 100100, %.preheader.new ]
  %43 = getelementptr inbounds [64 x [100100 x i32]], ptr @jump, i64 0, i64 %indvars.iv75, i64 %indvars.iv72
  store i32 %42, ptr %43, align 4, !tbaa !8
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %44 = getelementptr inbounds [64 x [100100 x i32]], ptr @jump, i64 0, i64 %23, i64 %indvars.iv.next73
  %45 = load i32, ptr %44, align 4, !tbaa !8
  %.not51.1 = icmp slt i32 %45, %17
  br i1 %.not51.1, label %46, label %51

46:                                               ; preds = %41
  %47 = add nsw i32 %45, 1
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [64 x [100100 x i32]], ptr @jump, i64 0, i64 %23, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !8
  br label %51

51:                                               ; preds = %46, %41
  %52 = phi i32 [ %50, %46 ], [ 100100, %41 ]
  %53 = getelementptr inbounds [64 x [100100 x i32]], ptr @jump, i64 0, i64 %indvars.iv75, i64 %indvars.iv.next73
  store i32 %52, ptr %53, align 4, !tbaa !8
  %indvars.iv.next73.1 = add nuw nsw i64 %indvars.iv72, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.unr-lcssa, label %.preheader.new, !llvm.loop !16

54:                                               ; preds = %.split.us, %71
  %indvars.iv79 = phi i64 [ 63, %.split.us ], [ %indvars.iv.next80, %71 ]
  %.03464 = phi i64 [ %24, %.split.us ], [ %.1, %71 ]
  %.03663 = phi i32 [ 1, %.split.us ], [ %.137, %71 ]
  %55 = phi i64 [ %24, %.split.us ], [ %72, %71 ]
  %56 = sext i32 %.03663 to i64
  %57 = getelementptr inbounds [64 x [100100 x i32]], ptr @jump, i64 0, i64 %indvars.iv79, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !8
  %.not47 = icmp sgt i32 %58, %.lcssa8488
  br i1 %.not47, label %71, label %59

59:                                               ; preds = %54
  %60 = trunc nuw nsw i64 %indvars.iv79 to i32
  %61 = shl nuw i32 1, %60
  %62 = sext i32 %61 to i64
  %.not48 = icmp slt i64 %.03464, %62
  br i1 %.not48, label %71, label %63

63:                                               ; preds = %59
  %.neg = shl nsw i64 -1, %indvars.iv79
  %64 = sub nsw i32 %58, %.03663
  %65 = sext i32 %64 to i64
  %66 = add nsw i64 %.neg, 1
  %67 = add i64 %66, %65
  %68 = add i64 %67, %55
  store i64 %68, ptr @m, align 8, !tbaa !13
  %69 = add nsw i32 %58, 1
  %70 = sub nsw i64 %.03464, %62
  %.not49 = icmp slt i32 %58, %.lcssa8488
  br i1 %.not49, label %71, label %73

71:                                               ; preds = %54, %59, %63
  %72 = phi i64 [ %68, %63 ], [ %55, %59 ], [ %55, %54 ]
  %.137 = phi i32 [ %69, %63 ], [ %.03663, %59 ], [ %.03663, %54 ]
  %.1 = phi i64 [ %70, %63 ], [ %.03464, %59 ], [ %.03464, %54 ]
  %indvars.iv.next80 = add nsw i64 %indvars.iv79, -1
  %.not = icmp eq i64 %indvars.iv79, 0
  br i1 %.not, label %73, label %54, !llvm.loop !17

73:                                               ; preds = %63, %71
  %74 = phi i64 [ %68, %63 ], [ %72, %71 ]
  %75 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %74)
  %76 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #4 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 #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 #0 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 #0 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

!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 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"long long", !10, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


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