; LLVM IR from MinaFaried3/Assiut-University-Training---Newcomers :: l-sheet9_general_medium (N-PumbaaAndApples)

; 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 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4Fastv() #0

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

28:                                               ; preds = %43, %0
  %29 = load i64, ptr %6, align 8, !tbaa !5
  %30 = load i64, ptr %2, align 8, !tbaa !5
  %31 = icmp slt i64 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %46

33:                                               ; preds = %28
  %34 = load i64, ptr %3, align 8, !tbaa !5
  %35 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %34, i64 8)
  %36 = extractvalue { i64, i1 } %35, 1
  %37 = extractvalue { i64, i1 } %35, 0
  %38 = select i1 %36, i64 -1, i64 %37
  %39 = call noalias noundef nonnull ptr @_Znam(i64 noundef %38) #9
  %40 = load ptr, ptr %5, align 8, !tbaa !9
  %41 = load i64, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds ptr, ptr %40, i64 %41
  store ptr %39, ptr %42, align 8, !tbaa !9
  br label %43

43:                                               ; preds = %33
  %44 = load i64, ptr %6, align 8, !tbaa !5
  %45 = add nsw i64 %44, 1
  store i64 %45, ptr %6, align 8, !tbaa !5
  br label %28, !llvm.loop !11

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

47:                                               ; preds = %70, %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 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %73

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

53:                                               ; preds = %66, %52
  %54 = load i64, ptr %9, align 8, !tbaa !5
  %55 = load i64, ptr %3, align 8, !tbaa !5
  %56 = icmp slt i64 %54, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %69

58:                                               ; preds = %53
  %59 = load ptr, ptr %5, align 8, !tbaa !9
  %60 = load i64, ptr %7, align 8, !tbaa !5
  %61 = getelementptr inbounds ptr, ptr %59, i64 %60
  %62 = load ptr, ptr %61, align 8, !tbaa !9
  %63 = load i64, ptr %9, align 8, !tbaa !5
  %64 = getelementptr inbounds i64, ptr %62, i64 %63
  %65 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %64)
  br label %66

66:                                               ; preds = %58
  %67 = load i64, ptr %9, align 8, !tbaa !5
  %68 = add nsw i64 %67, 1
  store i64 %68, ptr %9, align 8, !tbaa !5
  br label %53, !llvm.loop !13

69:                                               ; preds = %57
  br label %70

70:                                               ; preds = %69
  %71 = load i64, ptr %7, align 8, !tbaa !5
  %72 = add nsw i64 %71, 1
  store i64 %72, ptr %7, align 8, !tbaa !5
  br label %47, !llvm.loop !14

73:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %74 = load i64, ptr %2, align 8, !tbaa !5
  %75 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %74, i64 8)
  %76 = extractvalue { i64, i1 } %75, 1
  %77 = extractvalue { i64, i1 } %75, 0
  %78 = select i1 %76, i64 -1, i64 %77
  %79 = call noalias noundef nonnull ptr @_Znam(i64 noundef %78) #9
  store ptr %79, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %80 = load i64, ptr %3, align 8, !tbaa !5
  %81 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %80, i64 8)
  %82 = extractvalue { i64, i1 } %81, 1
  %83 = extractvalue { i64, i1 } %81, 0
  %84 = select i1 %82, i64 -1, i64 %83
  %85 = call noalias noundef nonnull ptr @_Znam(i64 noundef %84) #9
  store ptr %85, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  store i64 0, ptr %12, align 8, !tbaa !5
  br label %86

86:                                               ; preds = %96, %73
  %87 = load i64, ptr %12, align 8, !tbaa !5
  %88 = load i64, ptr %2, align 8, !tbaa !5
  %89 = icmp slt i64 %87, %88
  br i1 %89, label %91, label %90

90:                                               ; preds = %86
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %99

91:                                               ; preds = %86
  %92 = load i64, ptr %12, align 8, !tbaa !5
  %93 = load ptr, ptr %10, align 8, !tbaa !9
  %94 = load i64, ptr %12, align 8, !tbaa !5
  %95 = getelementptr inbounds i64, ptr %93, i64 %94
  store i64 %92, ptr %95, align 8, !tbaa !5
  br label %96

96:                                               ; preds = %91
  %97 = load i64, ptr %12, align 8, !tbaa !5
  %98 = add nsw i64 %97, 1
  store i64 %98, ptr %12, align 8, !tbaa !5
  br label %86, !llvm.loop !15

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

100:                                              ; preds = %110, %99
  %101 = load i64, ptr %13, align 8, !tbaa !5
  %102 = load i64, ptr %3, align 8, !tbaa !5
  %103 = icmp slt i64 %101, %102
  br i1 %103, label %105, label %104

104:                                              ; preds = %100
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %113

105:                                              ; preds = %100
  %106 = load i64, ptr %13, align 8, !tbaa !5
  %107 = load ptr, ptr %11, align 8, !tbaa !9
  %108 = load i64, ptr %13, align 8, !tbaa !5
  %109 = getelementptr inbounds i64, ptr %107, i64 %108
  store i64 %106, ptr %109, align 8, !tbaa !5
  br label %110

110:                                              ; preds = %105
  %111 = load i64, ptr %13, align 8, !tbaa !5
  %112 = add nsw i64 %111, 1
  store i64 %112, ptr %13, align 8, !tbaa !5
  br label %100, !llvm.loop !16

113:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  br label %114

114:                                              ; preds = %166, %113
  %115 = load i64, ptr %4, align 8, !tbaa !5
  %116 = add nsw i64 %115, -1
  store i64 %116, ptr %4, align 8, !tbaa !5
  %117 = icmp ne i64 %115, 0
  br i1 %117, label %118, label %167

118:                                              ; preds = %114
  %119 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %14)
  %120 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %15)
  %121 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %120, ptr noundef nonnull align 8 dereferenceable(8) %16)
  %122 = load i64, ptr %15, align 8, !tbaa !5
  %123 = add nsw i64 %122, -1
  store i64 %123, ptr %15, align 8, !tbaa !5
  %124 = load i64, ptr %16, align 8, !tbaa !5
  %125 = add nsw i64 %124, -1
  store i64 %125, ptr %16, align 8, !tbaa !5
  %126 = load i8, ptr %14, align 1, !tbaa !17
  %127 = sext i8 %126 to i32
  %128 = icmp eq i32 %127, 103
  br i1 %128, label %129, label %147

129:                                              ; preds = %118
  %130 = load ptr, ptr %10, align 8, !tbaa !9
  %131 = load i64, ptr %15, align 8, !tbaa !5
  %132 = getelementptr inbounds i64, ptr %130, i64 %131
  %133 = load i64, ptr %132, align 8, !tbaa !5
  store i64 %133, ptr %17, align 8, !tbaa !5
  %134 = load ptr, ptr %11, align 8, !tbaa !9
  %135 = load i64, ptr %16, align 8, !tbaa !5
  %136 = getelementptr inbounds i64, ptr %134, i64 %135
  %137 = load i64, ptr %136, align 8, !tbaa !5
  store i64 %137, ptr %18, align 8, !tbaa !5
  %138 = load ptr, ptr %5, align 8, !tbaa !9
  %139 = load i64, ptr %17, align 8, !tbaa !5
  %140 = getelementptr inbounds ptr, ptr %138, i64 %139
  %141 = load ptr, ptr %140, align 8, !tbaa !9
  %142 = load i64, ptr %18, align 8, !tbaa !5
  %143 = getelementptr inbounds i64, ptr %141, i64 %142
  %144 = load i64, ptr %143, align 8, !tbaa !5
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %144)
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %145, ptr noundef @.str)
  br label %166

147:                                              ; preds = %118
  %148 = load i8, ptr %14, align 1, !tbaa !17
  %149 = sext i8 %148 to i32
  %150 = icmp eq i32 %149, 114
  br i1 %150, label %151, label %158

151:                                              ; preds = %147
  %152 = load ptr, ptr %10, align 8, !tbaa !9
  %153 = load i64, ptr %15, align 8, !tbaa !5
  %154 = getelementptr inbounds i64, ptr %152, i64 %153
  %155 = load ptr, ptr %10, align 8, !tbaa !9
  %156 = load i64, ptr %16, align 8, !tbaa !5
  %157 = getelementptr inbounds i64, ptr %155, i64 %156
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %154, ptr noundef nonnull align 8 dereferenceable(8) %157) #8
  br label %165

158:                                              ; preds = %147
  %159 = load ptr, ptr %11, align 8, !tbaa !9
  %160 = load i64, ptr %15, align 8, !tbaa !5
  %161 = getelementptr inbounds i64, ptr %159, i64 %160
  %162 = load ptr, ptr %11, align 8, !tbaa !9
  %163 = load i64, ptr %16, align 8, !tbaa !5
  %164 = getelementptr inbounds i64, ptr %162, i64 %163
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %161, ptr noundef nonnull align 8 dereferenceable(8) %164) #8
  br label %165

165:                                              ; preds = %158, %151
  br label %166

166:                                              ; preds = %165, %129
  br label %114, !llvm.loop !18

167:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  %168 = load i32, ptr %1, align 4
  ret i32 %168
}

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) #5

; 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) #6

; 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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #7

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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { 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 #7 = { inlinehint 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 #8 = { nounwind }
attributes #9 = { 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 = !{!7, !7, 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_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 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4Fastv() local_unnamed_addr #0

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

.lr.ph:                                           ; preds = %0
  %16 = icmp ugt i64 %.pre57.pre, 2305843009213693951
  %17 = shl i64 %.pre57.pre, 3
  %18 = select i1 %16, i64 -1, i64 %17
  br label %20

.preheader37:                                     ; preds = %20
  %19 = icmp sgt i64 %.pre57.pre, 0
  %or.cond = select i1 %15, i1 %19, i1 false
  br i1 %or.cond, label %.preheader36, label %._crit_edge42

20:                                               ; preds = %.lr.ph, %20
  %.038 = phi i64 [ 0, %.lr.ph ], [ %23, %20 ]
  %21 = call noalias noundef nonnull ptr @_Znam(i64 noundef %18) #8
  %22 = getelementptr inbounds ptr, ptr %14, i64 %.038
  store ptr %21, ptr %22, align 8, !tbaa !9
  %23 = add nuw nsw i64 %.038, 1
  %exitcond.not = icmp eq i64 %23, %10
  br i1 %exitcond.not, label %.preheader37, label %20, !llvm.loop !11

.preheader36:                                     ; preds = %.preheader37, %._crit_edge
  %24 = phi i64 [ %41, %._crit_edge ], [ %10, %.preheader37 ]
  %25 = phi i64 [ %42, %._crit_edge ], [ %.pre57.pre, %.preheader37 ]
  %.03041 = phi i64 [ %43, %._crit_edge ], [ 0, %.preheader37 ]
  %26 = icmp sgt i64 %25, 0
  br i1 %26, label %.lr.ph40, label %._crit_edge

.lr.ph40:                                         ; preds = %.preheader36
  %27 = getelementptr inbounds ptr, ptr %14, i64 %.03041
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  br label %45

._crit_edge42.loopexit:                           ; preds = %._crit_edge
  %.pre58 = shl i64 %41, 3
  br label %._crit_edge42

._crit_edge42:                                    ; preds = %0, %._crit_edge42.loopexit, %.preheader37
  %.pre-phi = phi i64 [ %.pre58, %._crit_edge42.loopexit ], [ %12, %.preheader37 ], [ %12, %0 ]
  %29 = phi i64 [ %42, %._crit_edge42.loopexit ], [ %.pre57.pre, %.preheader37 ], [ %.pre57.pre, %0 ]
  %.lcssa = phi i64 [ %41, %._crit_edge42.loopexit ], [ %10, %.preheader37 ], [ %10, %0 ]
  %30 = icmp ugt i64 %.lcssa, 2305843009213693951
  %31 = select i1 %30, i64 -1, i64 %.pre-phi
  %32 = call noalias noundef nonnull ptr @_Znam(i64 noundef %31) #8
  %33 = icmp ugt i64 %29, 2305843009213693951
  %34 = shl i64 %29, 3
  %35 = select i1 %33, i64 -1, i64 %34
  %36 = call noalias noundef nonnull ptr @_Znam(i64 noundef %35) #8
  %37 = icmp sgt i64 %.lcssa, 0
  br i1 %37, label %.lr.ph45.preheader, label %.preheader

.lr.ph45.preheader:                               ; preds = %._crit_edge42
  %min.iters.check = icmp ult i64 %.lcssa, 4
  br i1 %min.iters.check, label %.lr.ph45.preheader82, label %vector.ph

.lr.ph45.preheader82:                             ; preds = %middle.block, %.lr.ph45.preheader
  %.03243.ph = phi i64 [ 0, %.lr.ph45.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph45

vector.ph:                                        ; preds = %.lr.ph45.preheader
  %n.vec = and i64 %.lcssa, 9223372036854775804
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <2 x i64> [ <i64 0, i64 1>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <2 x i64> %vec.ind, <i64 2, i64 2>
  %38 = getelementptr inbounds i64, ptr %32, i64 %index
  %39 = getelementptr inbounds i8, ptr %38, i64 16
  store <2 x i64> %vec.ind, ptr %38, align 8, !tbaa !5
  store <2 x i64> %step.add, ptr %39, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %vec.ind.next = add <2 x i64> %vec.ind, <i64 4, i64 4>
  %40 = icmp eq i64 %index.next, %n.vec
  br i1 %40, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %.lcssa, %n.vec
  br i1 %cmp.n, label %.preheader, label %.lr.ph45.preheader82

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

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader36
  %41 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ %24, %.preheader36 ]
  %42 = phi i64 [ %49, %._crit_edge.loopexit ], [ %25, %.preheader36 ]
  %43 = add nuw nsw i64 %.03041, 1
  %44 = icmp slt i64 %43, %41
  br i1 %44, label %.preheader36, label %._crit_edge42.loopexit, !llvm.loop !16

45:                                               ; preds = %.lr.ph40, %45
  %.03339 = phi i64 [ 0, %.lr.ph40 ], [ %48, %45 ]
  %46 = getelementptr inbounds i64, ptr %28, i64 %.03339
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %46)
  %48 = add nuw nsw i64 %.03339, 1
  %49 = load i64, ptr %2, align 8, !tbaa !5
  %50 = icmp slt i64 %48, %49
  br i1 %50, label %45, label %._crit_edge.loopexit, !llvm.loop !18

.preheader:                                       ; preds = %.lr.ph45, %middle.block, %._crit_edge42
  %51 = icmp sgt i64 %29, 0
  br i1 %51, label %.lr.ph47.preheader, label %._crit_edge48

.lr.ph47.preheader:                               ; preds = %.preheader
  %min.iters.check68 = icmp ult i64 %29, 4
  br i1 %min.iters.check68, label %.lr.ph47.preheader81, label %vector.ph69

.lr.ph47.preheader81:                             ; preds = %middle.block66, %.lr.ph47.preheader
  %.03146.ph = phi i64 [ 0, %.lr.ph47.preheader ], [ %n.vec71, %middle.block66 ]
  br label %.lr.ph47

vector.ph69:                                      ; preds = %.lr.ph47.preheader
  %n.vec71 = and i64 %29, 9223372036854775804
  br label %vector.body73

vector.body73:                                    ; preds = %vector.body73, %vector.ph69
  %index74 = phi i64 [ 0, %vector.ph69 ], [ %index.next79, %vector.body73 ]
  %vec.ind75 = phi <2 x i64> [ <i64 0, i64 1>, %vector.ph69 ], [ %vec.ind.next78, %vector.body73 ]
  %step.add76 = add <2 x i64> %vec.ind75, <i64 2, i64 2>
  %52 = getelementptr inbounds i64, ptr %36, i64 %index74
  %53 = getelementptr inbounds i8, ptr %52, i64 16
  store <2 x i64> %vec.ind75, ptr %52, align 8, !tbaa !5
  store <2 x i64> %step.add76, ptr %53, align 8, !tbaa !5
  %index.next79 = add nuw i64 %index74, 4
  %vec.ind.next78 = add <2 x i64> %vec.ind75, <i64 4, i64 4>
  %54 = icmp eq i64 %index.next79, %n.vec71
  br i1 %54, label %middle.block66, label %vector.body73, !llvm.loop !19

middle.block66:                                   ; preds = %vector.body73
  %cmp.n80 = icmp eq i64 %29, %n.vec71
  br i1 %cmp.n80, label %._crit_edge48, label %.lr.ph47.preheader81

.lr.ph45:                                         ; preds = %.lr.ph45.preheader82, %.lr.ph45
  %.03243 = phi i64 [ %56, %.lr.ph45 ], [ %.03243.ph, %.lr.ph45.preheader82 ]
  %55 = getelementptr inbounds i64, ptr %32, i64 %.03243
  store i64 %.03243, ptr %55, align 8, !tbaa !5
  %56 = add nuw nsw i64 %.03243, 1
  %exitcond55.not = icmp eq i64 %56, %.lcssa
  br i1 %exitcond55.not, label %.preheader, label %.lr.ph45, !llvm.loop !20

._crit_edge48:                                    ; preds = %.lr.ph47, %middle.block66, %.preheader
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %57 = load i64, ptr %3, align 8, !tbaa !5
  %58 = add nsw i64 %57, -1
  store i64 %58, ptr %3, align 8, !tbaa !5
  %.not49 = icmp eq i64 %57, 0
  br i1 %.not49, label %._crit_edge52, label %.lr.ph51

.lr.ph47:                                         ; preds = %.lr.ph47.preheader81, %.lr.ph47
  %.03146 = phi i64 [ %60, %.lr.ph47 ], [ %.03146.ph, %.lr.ph47.preheader81 ]
  %59 = getelementptr inbounds i64, ptr %36, i64 %.03146
  store i64 %.03146, ptr %59, align 8, !tbaa !5
  %60 = add nuw nsw i64 %.03146, 1
  %exitcond56.not = icmp eq i64 %60, %29
  br i1 %exitcond56.not, label %._crit_edge48, label %.lr.ph47, !llvm.loop !21

.lr.ph51:                                         ; preds = %._crit_edge48, %86
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %4)
  %62 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %63 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %62, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %64 = load i64, ptr %5, align 8, !tbaa !5
  %65 = add nsw i64 %64, -1
  store i64 %65, ptr %5, align 8, !tbaa !5
  %66 = load i64, ptr %6, align 8, !tbaa !5
  %67 = add nsw i64 %66, -1
  store i64 %67, ptr %6, align 8, !tbaa !5
  %68 = load i8, ptr %4, align 1, !tbaa !22
  switch i8 %68, label %83 [
    i8 103, label %69
    i8 114, label %80
  ]

69:                                               ; preds = %.lr.ph51
  %70 = getelementptr inbounds i64, ptr %32, i64 %65
  %71 = load i64, ptr %70, align 8, !tbaa !5
  %72 = getelementptr inbounds i64, ptr %36, i64 %67
  %73 = load i64, ptr %72, align 8, !tbaa !5
  %74 = getelementptr inbounds ptr, ptr %14, i64 %71
  %75 = load ptr, ptr %74, align 8, !tbaa !9
  %76 = getelementptr inbounds i64, ptr %75, i64 %73
  %77 = load i64, ptr %76, align 8, !tbaa !5
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %77)
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %78, ptr noundef nonnull @.str)
  br label %86

80:                                               ; preds = %.lr.ph51
  %81 = getelementptr inbounds i64, ptr %32, i64 %65
  %82 = getelementptr inbounds i64, ptr %32, i64 %67
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef nonnull align 8 dereferenceable(8) %82) #7
  br label %86

83:                                               ; preds = %.lr.ph51
  %84 = getelementptr inbounds i64, ptr %36, i64 %65
  %85 = getelementptr inbounds i64, ptr %36, i64 %67
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef nonnull align 8 dereferenceable(8) %85) #7
  br label %86

86:                                               ; preds = %80, %83, %69
  %87 = load i64, ptr %3, align 8, !tbaa !5
  %88 = add nsw i64 %87, -1
  store i64 %88, ptr %3, align 8, !tbaa !5
  %.not = icmp eq i64 %87, 0
  br i1 %.not, label %._crit_edge52, label %.lr.ph51, !llvm.loop !23

._crit_edge52:                                    ; preds = %86, %._crit_edge48
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret i32 0
}

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

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #4

; 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 #5

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { inlinehint 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 #7 = { nounwind }
attributes #8 = { 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, !15}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !12, !17}
!17 = !{!"llvm.loop.unswitch.partial.disable"}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12, !14, !15}
!20 = distinct !{!20, !12, !15, !14}
!21 = distinct !{!21, !12, !15, !14}
!22 = !{!7, !7, i64 0}
!23 = distinct !{!23, !12}


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