; LLVM IR from MinaFaried3/Assiut-University-Training---Newcomers :: m-sheet10_general_hard/Y-Spiral.ll (Z9solution1v)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z9solution1v() #2 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  %14 = 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)
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %16 = load i64, ptr %1, align 8, !tbaa !5
  %17 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %16, i64 8)
  %18 = extractvalue { i64, i1 } %17, 1
  %19 = extractvalue { i64, i1 } %17, 0
  %20 = select i1 %18, i64 -1, i64 %19
  %21 = call noalias noundef nonnull ptr @_Znam(i64 noundef %20) #6
  store ptr %21, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store i64 0, ptr %4, align 8, !tbaa !5
  br label %22

22:                                               ; preds = %37, %0
  %23 = load i64, ptr %4, align 8, !tbaa !5
  %24 = load i64, ptr %1, align 8, !tbaa !5
  %25 = icmp slt i64 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %40

27:                                               ; preds = %22
  %28 = load i64, ptr %2, align 8, !tbaa !5
  %29 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %28, i64 8)
  %30 = extractvalue { i64, i1 } %29, 1
  %31 = extractvalue { i64, i1 } %29, 0
  %32 = select i1 %30, i64 -1, i64 %31
  %33 = call noalias noundef nonnull ptr @_Znam(i64 noundef %32) #6
  %34 = load ptr, ptr %3, align 8, !tbaa !9
  %35 = load i64, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds ptr, ptr %34, i64 %35
  store ptr %33, ptr %36, align 8, !tbaa !9
  br label %37

37:                                               ; preds = %27
  %38 = load i64, ptr %4, align 8, !tbaa !5
  %39 = add nsw i64 %38, 1
  store i64 %39, ptr %4, align 8, !tbaa !5
  br label %22, !llvm.loop !11

40:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store i64 0, ptr %5, align 8, !tbaa !5
  br label %41

41:                                               ; preds = %64, %40
  %42 = load i64, ptr %5, align 8, !tbaa !5
  %43 = load i64, ptr %1, align 8, !tbaa !5
  %44 = icmp slt i64 %42, %43
  br i1 %44, label %46, label %45

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

46:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i64 0, ptr %7, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %60, %46
  %48 = load i64, ptr %7, align 8, !tbaa !5
  %49 = load i64, ptr %2, align 8, !tbaa !5
  %50 = icmp slt i64 %48, %49
  br i1 %50, label %52, label %51

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

52:                                               ; preds = %47
  %53 = load ptr, ptr %3, align 8, !tbaa !9
  %54 = load i64, ptr %5, align 8, !tbaa !5
  %55 = getelementptr inbounds ptr, ptr %53, i64 %54
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  %57 = load i64, ptr %7, align 8, !tbaa !5
  %58 = getelementptr inbounds i64, ptr %56, i64 %57
  %59 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %58)
  br label %60

60:                                               ; preds = %52
  %61 = load i64, ptr %7, align 8, !tbaa !5
  %62 = add nsw i64 %61, 1
  store i64 %62, ptr %7, align 8, !tbaa !5
  br label %47, !llvm.loop !13

63:                                               ; preds = %51
  br label %64

64:                                               ; preds = %63
  %65 = load i64, ptr %5, align 8, !tbaa !5
  %66 = add nsw i64 %65, 1
  store i64 %66, ptr %5, align 8, !tbaa !5
  br label %41, !llvm.loop !14

67:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 0, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i64 0, ptr %9, align 8, !tbaa !5
  br label %68

68:                                               ; preds = %180, %67
  %69 = load i64, ptr %8, align 8, !tbaa !5
  %70 = load i64, ptr %1, align 8, !tbaa !5
  %71 = icmp slt i64 %69, %70
  br i1 %71, label %72, label %76

72:                                               ; preds = %68
  %73 = load i64, ptr %9, align 8, !tbaa !5
  %74 = load i64, ptr %2, align 8, !tbaa !5
  %75 = icmp slt i64 %73, %74
  br label %76

76:                                               ; preds = %72, %68
  %77 = phi i1 [ false, %68 ], [ %75, %72 ]
  br i1 %77, label %78, label %181

78:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %79 = load i64, ptr %9, align 8, !tbaa !5
  store i64 %79, ptr %10, align 8, !tbaa !5
  br label %80

80:                                               ; preds = %95, %78
  %81 = load i64, ptr %10, align 8, !tbaa !5
  %82 = load i64, ptr %2, align 8, !tbaa !5
  %83 = icmp slt i64 %81, %82
  br i1 %83, label %85, label %84

84:                                               ; preds = %80
  store i32 13, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %98

85:                                               ; preds = %80
  %86 = load ptr, ptr %3, align 8, !tbaa !9
  %87 = load i64, ptr %8, align 8, !tbaa !5
  %88 = getelementptr inbounds ptr, ptr %86, i64 %87
  %89 = load ptr, ptr %88, align 8, !tbaa !9
  %90 = load i64, ptr %10, align 8, !tbaa !5
  %91 = getelementptr inbounds i64, ptr %89, i64 %90
  %92 = load i64, ptr %91, align 8, !tbaa !5
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %92)
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef @.str.2)
  br label %95

95:                                               ; preds = %85
  %96 = load i64, ptr %10, align 8, !tbaa !5
  %97 = add nsw i64 %96, 1
  store i64 %97, ptr %10, align 8, !tbaa !5
  br label %80, !llvm.loop !15

98:                                               ; preds = %84
  %99 = load i64, ptr %8, align 8, !tbaa !5
  %100 = add nsw i64 %99, 1
  store i64 %100, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %101 = load i64, ptr %8, align 8, !tbaa !5
  store i64 %101, ptr %11, align 8, !tbaa !5
  br label %102

102:                                              ; preds = %118, %98
  %103 = load i64, ptr %11, align 8, !tbaa !5
  %104 = load i64, ptr %1, align 8, !tbaa !5
  %105 = icmp slt i64 %103, %104
  br i1 %105, label %107, label %106

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

107:                                              ; preds = %102
  %108 = load ptr, ptr %3, align 8, !tbaa !9
  %109 = load i64, ptr %11, align 8, !tbaa !5
  %110 = getelementptr inbounds ptr, ptr %108, i64 %109
  %111 = load ptr, ptr %110, align 8, !tbaa !9
  %112 = load i64, ptr %2, align 8, !tbaa !5
  %113 = sub nsw i64 %112, 1
  %114 = getelementptr inbounds i64, ptr %111, i64 %113
  %115 = load i64, ptr %114, align 8, !tbaa !5
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %115)
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %116, ptr noundef @.str.2)
  br label %118

118:                                              ; preds = %107
  %119 = load i64, ptr %11, align 8, !tbaa !5
  %120 = add nsw i64 %119, 1
  store i64 %120, ptr %11, align 8, !tbaa !5
  br label %102, !llvm.loop !16

121:                                              ; preds = %106
  %122 = load i64, ptr %2, align 8, !tbaa !5
  %123 = add nsw i64 %122, -1
  store i64 %123, ptr %2, align 8, !tbaa !5
  %124 = load i64, ptr %8, align 8, !tbaa !5
  %125 = load i64, ptr %1, align 8, !tbaa !5
  %126 = icmp slt i64 %124, %125
  br i1 %126, label %127, label %152

127:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %128 = load i64, ptr %2, align 8, !tbaa !5
  %129 = sub nsw i64 %128, 1
  store i64 %129, ptr %12, align 8, !tbaa !5
  br label %130

130:                                              ; preds = %146, %127
  %131 = load i64, ptr %12, align 8, !tbaa !5
  %132 = load i64, ptr %9, align 8, !tbaa !5
  %133 = icmp sge i64 %131, %132
  br i1 %133, label %135, label %134

134:                                              ; preds = %130
  store i32 19, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %149

135:                                              ; preds = %130
  %136 = load ptr, ptr %3, align 8, !tbaa !9
  %137 = load i64, ptr %1, align 8, !tbaa !5
  %138 = sub nsw i64 %137, 1
  %139 = getelementptr inbounds ptr, ptr %136, i64 %138
  %140 = load ptr, ptr %139, align 8, !tbaa !9
  %141 = load i64, ptr %12, align 8, !tbaa !5
  %142 = getelementptr inbounds i64, ptr %140, i64 %141
  %143 = load i64, ptr %142, align 8, !tbaa !5
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %143)
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %144, ptr noundef @.str.2)
  br label %146

146:                                              ; preds = %135
  %147 = load i64, ptr %12, align 8, !tbaa !5
  %148 = add nsw i64 %147, -1
  store i64 %148, ptr %12, align 8, !tbaa !5
  br label %130, !llvm.loop !17

149:                                              ; preds = %134
  %150 = load i64, ptr %1, align 8, !tbaa !5
  %151 = add nsw i64 %150, -1
  store i64 %151, ptr %1, align 8, !tbaa !5
  br label %152

152:                                              ; preds = %149, %121
  %153 = load i64, ptr %9, align 8, !tbaa !5
  %154 = load i64, ptr %2, align 8, !tbaa !5
  %155 = icmp slt i64 %153, %154
  br i1 %155, label %156, label %180

156:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %157 = load i64, ptr %1, align 8, !tbaa !5
  %158 = sub nsw i64 %157, 1
  store i64 %158, ptr %13, align 8, !tbaa !5
  br label %159

159:                                              ; preds = %174, %156
  %160 = load i64, ptr %13, align 8, !tbaa !5
  %161 = load i64, ptr %8, align 8, !tbaa !5
  %162 = icmp sge i64 %160, %161
  br i1 %162, label %164, label %163

163:                                              ; preds = %159
  store i32 22, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %177

164:                                              ; preds = %159
  %165 = load ptr, ptr %3, align 8, !tbaa !9
  %166 = load i64, ptr %13, align 8, !tbaa !5
  %167 = getelementptr inbounds ptr, ptr %165, i64 %166
  %168 = load ptr, ptr %167, align 8, !tbaa !9
  %169 = load i64, ptr %9, align 8, !tbaa !5
  %170 = getelementptr inbounds i64, ptr %168, i64 %169
  %171 = load i64, ptr %170, align 8, !tbaa !5
  %172 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %171)
  %173 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %172, ptr noundef @.str.2)
  br label %174

174:                                              ; preds = %164
  %175 = load i64, ptr %13, align 8, !tbaa !5
  %176 = add nsw i64 %175, -1
  store i64 %176, ptr %13, align 8, !tbaa !5
  br label %159, !llvm.loop !18

177:                                              ; preds = %163
  %178 = load i64, ptr %9, align 8, !tbaa !5
  %179 = add nsw i64 %178, 1
  store i64 %179, ptr %9, align 8, !tbaa !5
  br label %180

180:                                              ; preds = %177, %152
  br label %68, !llvm.loop !19

181:                                              ; preds = %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  ret void
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #3

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #4

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nobuiltin allocsize(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 = { nounwind }
attributes #6 = { builtin allocsize(0) }

!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 = !{!"any pointer", !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}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !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_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z9solution1v() local_unnamed_addr #2 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %3 = 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)
  %4 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %5 = load i64, ptr %1, align 8, !tbaa !5
  %6 = icmp ugt i64 %5, 2305843009213693951
  %7 = shl i64 %5, 3
  %8 = select i1 %6, i64 -1, i64 %7
  %9 = call noalias noundef nonnull ptr @_Znam(i64 noundef %8) #5
  %10 = icmp sgt i64 %5, 0
  %.pre76.pre = load i64, ptr %2, align 8
  br i1 %10, label %.lr.ph, label %._crit_edge73

.lr.ph:                                           ; preds = %0
  %11 = icmp ugt i64 %.pre76.pre, 2305843009213693951
  %12 = shl i64 %.pre76.pre, 3
  %13 = select i1 %11, i64 -1, i64 %12
  br label %15

.preheader49:                                     ; preds = %15
  %14 = icmp sgt i64 %.pre76.pre, 0
  %or.cond = select i1 %10, i1 %14, i1 false
  br i1 %or.cond, label %.preheader48, label %._crit_edge73

15:                                               ; preds = %.lr.ph, %15
  %.04550 = phi i64 [ 0, %.lr.ph ], [ %18, %15 ]
  %16 = call noalias noundef nonnull ptr @_Znam(i64 noundef %13) #5
  %17 = getelementptr inbounds ptr, ptr %9, i64 %.04550
  store ptr %16, ptr %17, align 8, !tbaa !9
  %18 = add nuw nsw i64 %.04550, 1
  %exitcond.not = icmp eq i64 %18, %5
  br i1 %exitcond.not, label %.preheader49, label %15, !llvm.loop !11

.preheader48:                                     ; preds = %.preheader49, %._crit_edge
  %19 = phi i64 [ %27, %._crit_edge ], [ %5, %.preheader49 ]
  %20 = phi i64 [ %28, %._crit_edge ], [ %.pre76.pre, %.preheader49 ]
  %.04453 = phi i64 [ %29, %._crit_edge ], [ 0, %.preheader49 ]
  %21 = icmp sgt i64 %20, 0
  br i1 %21, label %.lr.ph52, label %._crit_edge

.lr.ph52:                                         ; preds = %.preheader48
  %22 = getelementptr inbounds ptr, ptr %9, i64 %.04453
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  br label %31

.preheader47:                                     ; preds = %._crit_edge
  %24 = icmp sgt i64 %27, 0
  %25 = icmp sgt i64 %28, 0
  %26 = and i1 %24, %25
  br i1 %26, label %.preheader.lr.ph, label %._crit_edge73

.preheader.lr.ph:                                 ; preds = %.preheader47
  %invariant.gep = getelementptr i8, ptr %9, i64 -8
  br label %.preheader

._crit_edge.loopexit:                             ; preds = %31
  %.pre = load i64, ptr %1, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader48
  %27 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ %19, %.preheader48 ]
  %28 = phi i64 [ %35, %._crit_edge.loopexit ], [ %20, %.preheader48 ]
  %29 = add nuw nsw i64 %.04453, 1
  %30 = icmp slt i64 %29, %27
  br i1 %30, label %.preheader48, label %.preheader47, !llvm.loop !13

31:                                               ; preds = %.lr.ph52, %31
  %.04351 = phi i64 [ 0, %.lr.ph52 ], [ %34, %31 ]
  %32 = getelementptr inbounds i64, ptr %23, i64 %.04351
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %32)
  %34 = add nuw nsw i64 %.04351, 1
  %35 = load i64, ptr %2, align 8
  %36 = icmp slt i64 %34, %35
  br i1 %36, label %31, label %._crit_edge.loopexit, !llvm.loop !15

.preheader:                                       ; preds = %.preheader.lr.ph, %92
  %.pre8187 = phi i64 [ %27, %.preheader.lr.ph ], [ %.pre8188, %92 ]
  %37 = phi i64 [ %27, %.preheader.lr.ph ], [ %94, %92 ]
  %38 = phi i64 [ %28, %.preheader.lr.ph ], [ %93, %92 ]
  %.04172 = phi i64 [ 0, %.preheader.lr.ph ], [ %.1, %92 ]
  %.04271 = phi i64 [ 0, %.preheader.lr.ph ], [ %44, %92 ]
  %39 = icmp slt i64 %.04172, %38
  br i1 %39, label %.lr.ph55, label %._crit_edge56

.lr.ph55:                                         ; preds = %.preheader
  %40 = getelementptr inbounds ptr, ptr %9, i64 %.04271
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  br label %46

._crit_edge56.loopexit:                           ; preds = %46
  %.pre77 = load i64, ptr %1, align 8, !tbaa !5
  br label %._crit_edge56

._crit_edge56:                                    ; preds = %._crit_edge56.loopexit, %.preheader
  %.pre8186 = phi i64 [ %.pre77, %._crit_edge56.loopexit ], [ %.pre8187, %.preheader ]
  %42 = phi i64 [ %.pre77, %._crit_edge56.loopexit ], [ %37, %.preheader ]
  %43 = phi i64 [ %52, %._crit_edge56.loopexit ], [ %38, %.preheader ]
  %44 = add nuw nsw i64 %.04271, 1
  %45 = icmp slt i64 %44, %42
  br i1 %45, label %.lr.ph59, label %._crit_edge60

46:                                               ; preds = %.lr.ph55, %46
  %.04054 = phi i64 [ %.04172, %.lr.ph55 ], [ %51, %46 ]
  %47 = getelementptr inbounds i64, ptr %41, i64 %.04054
  %48 = load i64, ptr %47, align 8, !tbaa !5
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %48)
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull @.str.2)
  %51 = add nsw i64 %.04054, 1
  %52 = load i64, ptr %2, align 8, !tbaa !5
  %53 = icmp slt i64 %51, %52
  br i1 %53, label %46, label %._crit_edge56.loopexit, !llvm.loop !16

._crit_edge60.loopexit:                           ; preds = %.lr.ph59
  %.pre78 = load i64, ptr %2, align 8, !tbaa !5
  br label %._crit_edge60

._crit_edge60:                                    ; preds = %._crit_edge60.loopexit, %._crit_edge56
  %.pre8185 = phi i64 [ %.pre8186, %._crit_edge56 ], [ %67, %._crit_edge60.loopexit ]
  %54 = phi i64 [ %42, %._crit_edge56 ], [ %67, %._crit_edge60.loopexit ]
  %55 = phi i64 [ %43, %._crit_edge56 ], [ %.pre78, %._crit_edge60.loopexit ]
  %56 = add nsw i64 %55, -1
  store i64 %56, ptr %2, align 8, !tbaa !5
  %57 = icmp slt i64 %44, %54
  br i1 %57, label %69, label %80

.lr.ph59:                                         ; preds = %._crit_edge56, %.lr.ph59
  %.03957 = phi i64 [ %66, %.lr.ph59 ], [ %44, %._crit_edge56 ]
  %58 = getelementptr inbounds ptr, ptr %9, i64 %.03957
  %59 = load ptr, ptr %58, align 8, !tbaa !9
  %60 = load i64, ptr %2, align 8, !tbaa !5
  %61 = getelementptr i64, ptr %59, i64 %60
  %62 = getelementptr i8, ptr %61, i64 -8
  %63 = load i64, ptr %62, align 8, !tbaa !5
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %63)
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull @.str.2)
  %66 = add nuw nsw i64 %.03957, 1
  %67 = load i64, ptr %1, align 8, !tbaa !5
  %68 = icmp slt i64 %66, %67
  br i1 %68, label %.lr.ph59, label %._crit_edge60.loopexit, !llvm.loop !17

69:                                               ; preds = %._crit_edge60
  %70 = add nsw i64 %55, -2
  %.not61 = icmp slt i64 %70, %.04172
  br i1 %.not61, label %._crit_edge65, label %.lr.ph64

._crit_edge65.loopexit:                           ; preds = %.lr.ph64
  %.pre79 = load i64, ptr %1, align 8, !tbaa !5
  %.pre80.pre = load i64, ptr %2, align 8
  br label %._crit_edge65

._crit_edge65:                                    ; preds = %._crit_edge65.loopexit, %69
  %.pre80 = phi i64 [ %.pre80.pre, %._crit_edge65.loopexit ], [ %56, %69 ]
  %71 = phi i64 [ %.pre79, %._crit_edge65.loopexit ], [ %54, %69 ]
  %72 = add nsw i64 %71, -1
  store i64 %72, ptr %1, align 8, !tbaa !5
  br label %80

.lr.ph64:                                         ; preds = %69, %.lr.ph64
  %.03862 = phi i64 [ %79, %.lr.ph64 ], [ %70, %69 ]
  %73 = load i64, ptr %1, align 8, !tbaa !5
  %gep = getelementptr ptr, ptr %invariant.gep, i64 %73
  %74 = load ptr, ptr %gep, align 8, !tbaa !9
  %75 = getelementptr inbounds i64, ptr %74, i64 %.03862
  %76 = load i64, ptr %75, align 8, !tbaa !5
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %76)
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef nonnull @.str.2)
  %79 = add nsw i64 %.03862, -1
  %.not.not = icmp sgt i64 %.03862, %.04172
  br i1 %.not.not, label %.lr.ph64, label %._crit_edge65.loopexit, !llvm.loop !18

80:                                               ; preds = %._crit_edge65, %._crit_edge60
  %.pre8184 = phi i64 [ %72, %._crit_edge65 ], [ %.pre8185, %._crit_edge60 ]
  %81 = phi i64 [ %72, %._crit_edge65 ], [ %54, %._crit_edge60 ]
  %82 = phi i64 [ %.pre80, %._crit_edge65 ], [ %56, %._crit_edge60 ]
  %83 = icmp slt i64 %.04172, %82
  br i1 %83, label %84, label %92

84:                                               ; preds = %80
  %.not46.not66 = icmp sgt i64 %81, %44
  br i1 %.not46.not66, label %.lr.ph69, label %._crit_edge70

._crit_edge70.loopexit:                           ; preds = %.lr.ph69
  %.pre81.pre = load i64, ptr %1, align 8, !tbaa !5
  %.pre82.pre = load i64, ptr %2, align 8
  br label %._crit_edge70

._crit_edge70:                                    ; preds = %._crit_edge70.loopexit, %84
  %.pre82 = phi i64 [ %.pre82.pre, %._crit_edge70.loopexit ], [ %82, %84 ]
  %.pre81 = phi i64 [ %.pre81.pre, %._crit_edge70.loopexit ], [ %.pre8184, %84 ]
  %85 = add nsw i64 %.04172, 1
  br label %92

.lr.ph69:                                         ; preds = %84, %.lr.ph69
  %.0.in67 = phi i64 [ %.0, %.lr.ph69 ], [ %81, %84 ]
  %.0 = add nsw i64 %.0.in67, -1
  %86 = getelementptr inbounds ptr, ptr %9, i64 %.0
  %87 = load ptr, ptr %86, align 8, !tbaa !9
  %88 = getelementptr inbounds i64, ptr %87, i64 %.04172
  %89 = load i64, ptr %88, align 8, !tbaa !5
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %89)
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull @.str.2)
  %.not46.not = icmp sgt i64 %.0, %44
  br i1 %.not46.not, label %.lr.ph69, label %._crit_edge70.loopexit, !llvm.loop !19

92:                                               ; preds = %._crit_edge70, %80
  %.pre8188 = phi i64 [ %.pre81, %._crit_edge70 ], [ %.pre8184, %80 ]
  %93 = phi i64 [ %.pre82, %._crit_edge70 ], [ %82, %80 ]
  %94 = phi i64 [ %.pre81, %._crit_edge70 ], [ %81, %80 ]
  %.1 = phi i64 [ %85, %._crit_edge70 ], [ %.04172, %80 ]
  %95 = icmp slt i64 %44, %94
  %96 = icmp slt i64 %.1, %93
  %97 = select i1 %95, i1 %96, i1 false
  br i1 %97, label %.preheader, label %._crit_edge73, !llvm.loop !20

._crit_edge73:                                    ; preds = %92, %0, %.preheader49, %.preheader47
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  ret void
}

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #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 #2 align 2

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

!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 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12, !14}
!14 = !{!"llvm.loop.unswitch.partial.disable"}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}


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