; LLVM IR from VastoLorde95/Competitive-Programming :: SPOJ/Random/PERMUT1 (permut1)

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

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@_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 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 [13 x [99 x i64]], align 16
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 10296, ptr %7) #6
  %9 = getelementptr inbounds [13 x [99 x i64]], ptr %7, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %9, i8 0, i64 10296, i1 false)
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %10

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

13:                                               ; preds = %10
  %14 = load i32, ptr %5, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [13 x [99 x i64]], ptr %7, i64 0, i64 %15
  %17 = getelementptr inbounds [99 x i64], ptr %16, i64 0, i64 0
  store i64 1, ptr %17, align 8, !tbaa !9
  br label %18

18:                                               ; preds = %13
  %19 = load i32, ptr %5, align 4, !tbaa !5
  %20 = add nsw i32 %19, 1
  store i32 %20, ptr %5, align 4, !tbaa !5
  br label %10, !llvm.loop !11

21:                                               ; preds = %10
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %30, %21
  %23 = load i32, ptr %5, align 4, !tbaa !5
  %24 = icmp sle i32 %23, 98
  br i1 %24, label %25, label %33

25:                                               ; preds = %22
  %26 = getelementptr inbounds [13 x [99 x i64]], ptr %7, i64 0, i64 1
  %27 = load i32, ptr %5, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [99 x i64], ptr %26, i64 0, i64 %28
  store i64 0, ptr %29, align 8, !tbaa !9
  br label %30

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

33:                                               ; preds = %22
  store i32 2, ptr %5, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %104, %33
  %35 = load i32, ptr %5, align 4, !tbaa !5
  %36 = icmp sle i32 %35, 12
  br i1 %36, label %37, label %107

37:                                               ; preds = %34
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %100, %37
  %39 = load i32, ptr %6, align 4, !tbaa !5
  %40 = icmp sle i32 %39, 98
  br i1 %40, label %41, label %103

41:                                               ; preds = %38
  %42 = load i32, ptr %6, align 4, !tbaa !5
  %43 = sub nsw i32 %42, 1
  %44 = icmp slt i32 %43, 0
  br i1 %44, label %45, label %69

45:                                               ; preds = %41
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [13 x [99 x i64]], ptr %7, i64 0, i64 %47
  %49 = load i32, ptr %6, align 4, !tbaa !5
  %50 = sub nsw i32 %49, 1
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [99 x i64], ptr %48, i64 0, i64 %51
  %53 = load i64, ptr %52, align 8, !tbaa !9
  %54 = load i32, ptr %5, align 4, !tbaa !5
  %55 = sub nsw i32 %54, 1
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [13 x [99 x i64]], ptr %7, i64 0, i64 %56
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [99 x i64], ptr %57, i64 0, i64 %59
  %61 = load i64, ptr %60, align 8, !tbaa !9
  %62 = add nsw i64 %53, %61
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [13 x [99 x i64]], ptr %7, i64 0, i64 %64
  %66 = load i32, ptr %6, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [99 x i64], ptr %65, i64 0, i64 %67
  store i64 %62, ptr %68, align 8, !tbaa !9
  br label %99

69:                                               ; preds = %41
  %70 = load i32, ptr %6, align 4, !tbaa !5
  %71 = load i32, ptr %5, align 4, !tbaa !5
  %72 = sub nsw i32 %70, %71
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %4, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %95, %69
  %75 = load i32, ptr %4, align 4, !tbaa !5
  %76 = load i32, ptr %6, align 4, !tbaa !5
  %77 = icmp sle i32 %75, %76
  br i1 %77, label %78, label %98

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

95:                                               ; preds = %78
  %96 = load i32, ptr %4, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %4, align 4, !tbaa !5
  br label %74, !llvm.loop !14

98:                                               ; preds = %74
  br label %99

99:                                               ; preds = %98, %45
  br label %100

100:                                              ; preds = %99
  %101 = load i32, ptr %6, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %6, align 4, !tbaa !5
  br label %38, !llvm.loop !15

103:                                              ; preds = %38
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %5, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %5, align 4, !tbaa !5
  br label %34, !llvm.loop !16

107:                                              ; preds = %34
  br label %108

108:                                              ; preds = %112, %107
  %109 = load i32, ptr %2, align 4, !tbaa !5
  %110 = add nsw i32 %109, -1
  store i32 %110, ptr %2, align 4, !tbaa !5
  %111 = icmp ne i32 %109, 0
  br i1 %111, label %112, label %123

112:                                              ; preds = %108
  %113 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %3, ptr noundef %4)
  %114 = load i32, ptr %3, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [13 x [99 x i64]], ptr %7, i64 0, i64 %115
  %117 = load i32, ptr %4, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [99 x i64], ptr %116, i64 0, i64 %118
  %120 = load i64, ptr %119, align 8, !tbaa !9
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %120)
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %121, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %108, !llvm.loop !17

123:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 10296, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  ret i32 0
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; 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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
.preheader29:
  %0 = alloca i32, align 4
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca [13 x [99 x i64]], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %0) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %0)
  call void @llvm.lifetime.start.p0(i64 10296, ptr nonnull %3) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(10296) %3, i8 0, i64 10296, i1 false)
  %5 = getelementptr inbounds i8, ptr %3, i64 792
  store i64 1, ptr %5, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %3, i64 1584
  store i64 1, ptr %6, align 16, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %3, i64 2376
  store i64 1, ptr %7, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %3, i64 3168
  store i64 1, ptr %8, align 16, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %3, i64 3960
  store i64 1, ptr %9, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %3, i64 4752
  store i64 1, ptr %10, align 16, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %3, i64 5544
  store i64 1, ptr %11, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %3, i64 6336
  store i64 1, ptr %12, align 16, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %3, i64 7128
  store i64 1, ptr %13, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %3, i64 7920
  store i64 1, ptr %14, align 16, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %3, i64 8712
  store i64 1, ptr %15, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %3, i64 9504
  store i64 1, ptr %16, align 16, !tbaa !5
  %scevgep = getelementptr inbounds i8, ptr %3, i64 800
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(784) %scevgep, i8 0, i64 784, i1 false), !tbaa !5
  br label %.preheader27

.preheader27:                                     ; preds = %.preheader29, %50
  %indvar = phi i64 [ 0, %.preheader29 ], [ %indvar.next, %50 ]
  %indvars.iv57 = phi i64 [ 2, %.preheader29 ], [ %indvars.iv.next58, %50 ]
  %indvars.iv = phi i64 [ -1, %.preheader29 ], [ %indvars.iv.next, %50 ]
  %storemerge.lcssa37.lcssa4243 = phi i32 [ undef, %.preheader29 ], [ %storemerge.lcssa36, %50 ]
  %17 = add i64 %indvar, 1
  %18 = add nsw i64 %indvars.iv57, -1
  %19 = getelementptr inbounds [13 x [99 x i64]], ptr %3, i64 0, i64 %indvars.iv57, i64 -1
  %20 = getelementptr inbounds [13 x [99 x i64]], ptr %3, i64 0, i64 %18, i64 0
  %21 = getelementptr inbounds [13 x [99 x i64]], ptr %3, i64 0, i64 %indvars.iv57, i64 0
  %xtraiter = and i64 %indvars.iv57, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %22 = icmp ult i64 %17, 3
  br label %25

.preheader:                                       ; preds = %50
  store i32 %storemerge.lcssa36, ptr %2, align 4, !tbaa !9
  %23 = load i32, ptr %0, align 4, !tbaa !9
  %24 = add nsw i32 %23, -1
  store i32 %24, ptr %0, align 4, !tbaa !9
  %.not45 = icmp eq i32 %23, 0
  br i1 %.not45, label %._crit_edge, label %.lr.ph46

25:                                               ; preds = %.preheader27, %.loopexit
  %indvars.iv54 = phi i64 [ 0, %.preheader27 ], [ %indvars.iv.next55, %.loopexit ]
  %indvars.iv49 = phi i64 [ %indvars.iv, %.preheader27 ], [ %indvars.iv.next50, %.loopexit ]
  %storemerge.lcssa3738 = phi i32 [ %storemerge.lcssa37.lcssa4243, %.preheader27 ], [ %storemerge.lcssa36, %.loopexit ]
  %26 = icmp eq i64 %indvars.iv54, 0
  br i1 %26, label %27, label %.lr.ph

27:                                               ; preds = %25
  %28 = load i64, ptr %19, align 8, !tbaa !5
  %29 = load i64, ptr %20, align 8, !tbaa !5
  %30 = add nsw i64 %29, %28
  store i64 %30, ptr %21, align 8, !tbaa !5
  br label %.loopexit

.lr.ph:                                           ; preds = %25
  %31 = getelementptr inbounds [13 x [99 x i64]], ptr %3, i64 0, i64 %indvars.iv57, i64 %indvars.iv54
  %.promoted = load i64, ptr %31, align 8, !tbaa !5
  br i1 %lcmp.mod.not, label %.prol.loopexit, label %.prol.preheader

.prol.preheader:                                  ; preds = %.lr.ph, %.prol.preheader
  %indvars.iv51.prol = phi i64 [ %indvars.iv.next52.prol, %.prol.preheader ], [ %indvars.iv49, %.lr.ph ]
  %32 = phi i64 [ %35, %.prol.preheader ], [ %.promoted, %.lr.ph ]
  %prol.iter = phi i64 [ %prol.iter.next, %.prol.preheader ], [ 0, %.lr.ph ]
  %33 = getelementptr inbounds [13 x [99 x i64]], ptr %3, i64 0, i64 %18, i64 %indvars.iv51.prol
  %34 = load i64, ptr %33, align 8, !tbaa !5
  %35 = add nsw i64 %32, %34
  store i64 %35, ptr %31, align 8, !tbaa !5
  %indvars.iv.next52.prol = add nsw i64 %indvars.iv51.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.prol.loopexit, label %.prol.preheader, !llvm.loop !11

.prol.loopexit:                                   ; preds = %.prol.preheader, %.lr.ph
  %indvars.iv51.unr = phi i64 [ %indvars.iv49, %.lr.ph ], [ %indvars.iv.next52.prol, %.prol.preheader ]
  %.unr = phi i64 [ %.promoted, %.lr.ph ], [ %35, %.prol.preheader ]
  %indvars.iv.next52.lcssa.unr = phi i64 [ poison, %.lr.ph ], [ %indvars.iv.next52.prol, %.prol.preheader ]
  br i1 %22, label %.loopexit.loopexit, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.prol.loopexit, %.lr.ph.new
  %indvars.iv51 = phi i64 [ %indvars.iv.next52.3, %.lr.ph.new ], [ %indvars.iv51.unr, %.prol.loopexit ]
  %36 = phi i64 [ %48, %.lr.ph.new ], [ %.unr, %.prol.loopexit ]
  %37 = getelementptr inbounds [13 x [99 x i64]], ptr %3, i64 0, i64 %18, i64 %indvars.iv51
  %38 = load i64, ptr %37, align 8, !tbaa !5
  %39 = add nsw i64 %36, %38
  store i64 %39, ptr %31, align 8, !tbaa !5
  %indvars.iv.next52 = add nsw i64 %indvars.iv51, 1
  %40 = getelementptr inbounds [13 x [99 x i64]], ptr %3, i64 0, i64 %18, i64 %indvars.iv.next52
  %41 = load i64, ptr %40, align 8, !tbaa !5
  %42 = add nsw i64 %39, %41
  store i64 %42, ptr %31, align 8, !tbaa !5
  %indvars.iv.next52.1 = add nsw i64 %indvars.iv51, 2
  %43 = getelementptr inbounds [13 x [99 x i64]], ptr %3, i64 0, i64 %18, i64 %indvars.iv.next52.1
  %44 = load i64, ptr %43, align 8, !tbaa !5
  %45 = add nsw i64 %42, %44
  store i64 %45, ptr %31, align 8, !tbaa !5
  %indvars.iv.next52.2 = add nsw i64 %indvars.iv51, 3
  %46 = getelementptr inbounds [13 x [99 x i64]], ptr %3, i64 0, i64 %18, i64 %indvars.iv.next52.2
  %47 = load i64, ptr %46, align 8, !tbaa !5
  %48 = add nsw i64 %45, %47
  store i64 %48, ptr %31, align 8, !tbaa !5
  %indvars.iv.next52.3 = add nsw i64 %indvars.iv51, 4
  %.not26.not.3 = icmp slt i64 %indvars.iv.next52.2, %indvars.iv54
  br i1 %.not26.not.3, label %.lr.ph.new, label %.loopexit.loopexit, !llvm.loop !13

.loopexit.loopexit:                               ; preds = %.lr.ph.new, %.prol.loopexit
  %indvars.iv.next52.lcssa = phi i64 [ %indvars.iv.next52.lcssa.unr, %.prol.loopexit ], [ %indvars.iv.next52.3, %.lr.ph.new ]
  %49 = trunc nsw i64 %indvars.iv.next52.lcssa to i32
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %27
  %storemerge.lcssa36 = phi i32 [ %storemerge.lcssa3738, %27 ], [ %49, %.loopexit.loopexit ]
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %indvars.iv.next50 = add nsw i64 %indvars.iv49, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next55, 99
  br i1 %exitcond.not, label %50, label %25, !llvm.loop !15

50:                                               ; preds = %.loopexit
  %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %exitcond60.not = icmp eq i64 %indvars.iv.next58, 13
  %indvar.next = add i64 %indvar, 1
  br i1 %exitcond60.not, label %.preheader, label %.preheader27, !llvm.loop !16

.lr.ph46:                                         ; preds = %.preheader, %.lr.ph46
  %51 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %52 = load i32, ptr %1, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = load i32, ptr %2, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [13 x [99 x i64]], ptr %3, i64 0, i64 %53, i64 %55
  %57 = load i64, ptr %56, align 8, !tbaa !5
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %57)
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %60 = load i32, ptr %0, align 4, !tbaa !9
  %61 = add nsw i32 %60, -1
  store i32 %61, ptr %0, align 4, !tbaa !9
  %.not = icmp eq i32 %60, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph46, !llvm.loop !17

._crit_edge:                                      ; preds = %.lr.ph46, %.preheader
  call void @llvm.lifetime.end.p0(i64 10296, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %0) #6
  ret i32 0
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; 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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "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 nounwind willreturn memory(argmem: write) }
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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.unroll.disable"}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}


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