; LLVM IR from AdarshGaur/Competitive-Programming :: Codeforces/Codeforces Round #796 (Div. 2)/B. Patchouli's Magical Talisman.ll (Z5solvev)

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #2 {
  %1 = alloca i64, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #5
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %15 = load i64, ptr %1, align 8, !tbaa !5
  %16 = call ptr @llvm.stacksave.p0()
  store ptr %16, ptr %2, align 8
  %17 = alloca i64, i64 %15, align 16
  store i64 %15, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store i64 32, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store i64 0, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store i64 0, ptr %6, align 8, !tbaa !5
  br label %18

18:                                               ; preds = %37, %0
  %19 = load i64, ptr %6, align 8, !tbaa !5
  %20 = load i64, ptr %1, align 8, !tbaa !5
  %21 = icmp slt i64 %19, %20
  br i1 %21, label %23, label %22

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

23:                                               ; preds = %18
  %24 = load i64, ptr %6, align 8, !tbaa !5
  %25 = getelementptr inbounds i64, ptr %17, i64 %24
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %25)
  %27 = load i64, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds i64, ptr %17, i64 %27
  %29 = load i64, ptr %28, align 8, !tbaa !5
  %30 = srem i64 %29, 2
  %31 = icmp eq i64 %30, 0
  %32 = zext i1 %31 to i64
  %33 = select i1 %31, i32 1, i32 0
  %34 = sext i32 %33 to i64
  %35 = load i64, ptr %5, align 8, !tbaa !5
  %36 = add nsw i64 %35, %34
  store i64 %36, ptr %5, align 8, !tbaa !5
  br label %37

37:                                               ; preds = %23
  %38 = load i64, ptr %6, align 8, !tbaa !5
  %39 = add nsw i64 %38, 1
  store i64 %39, ptr %6, align 8, !tbaa !5
  br label %18, !llvm.loop !9

40:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i64 0, ptr %7, align 8, !tbaa !5
  %41 = load i64, ptr %1, align 8, !tbaa !5
  %42 = load i64, ptr %5, align 8, !tbaa !5
  %43 = sub nsw i64 %41, %42
  %44 = icmp ne i64 %43, 0
  br i1 %44, label %45, label %47

45:                                               ; preds = %40
  %46 = load i64, ptr %5, align 8, !tbaa !5
  store i64 %46, ptr %7, align 8, !tbaa !5
  br label %88

47:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store ptr %17, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %48 = load ptr, ptr %8, align 8, !tbaa !11
  store ptr %48, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %49 = load ptr, ptr %8, align 8, !tbaa !11
  %50 = mul nuw i64 8, %15
  %51 = udiv i64 %50, 8
  %52 = getelementptr inbounds i64, ptr %49, i64 %51
  store ptr %52, ptr %10, align 8, !tbaa !11
  br label %53

53:                                               ; preds = %80, %47
  %54 = load ptr, ptr %9, align 8, !tbaa !11
  %55 = load ptr, ptr %10, align 8, !tbaa !11
  %56 = icmp ne ptr %54, %55
  br i1 %56, label %58, label %57

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

58:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %59 = load ptr, ptr %9, align 8, !tbaa !11
  %60 = load i64, ptr %59, align 8, !tbaa !5
  store i64 %60, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store i64 0, ptr %13, align 8, !tbaa !5
  br label %61

61:                                               ; preds = %75, %58
  %62 = load i64, ptr %13, align 8, !tbaa !5
  %63 = icmp slt i64 %62, 33
  br i1 %63, label %65, label %64

64:                                               ; preds = %61
  store i32 7, ptr %11, align 4
  br label %78

65:                                               ; preds = %61
  %66 = load i64, ptr %13, align 8, !tbaa !5
  %67 = shl i64 1, %66
  %68 = load i64, ptr %12, align 8, !tbaa !5
  %69 = and i64 %67, %68
  %70 = icmp ne i64 %69, 0
  br i1 %70, label %71, label %74

71:                                               ; preds = %65
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %73 = load i64, ptr %72, align 8, !tbaa !5
  store i64 %73, ptr %4, align 8, !tbaa !5
  store i32 7, ptr %11, align 4
  br label %78

74:                                               ; preds = %65
  br label %75

75:                                               ; preds = %74
  %76 = load i64, ptr %13, align 8, !tbaa !5
  %77 = add nsw i64 %76, 1
  store i64 %77, ptr %13, align 8, !tbaa !5
  br label %61, !llvm.loop !13

78:                                               ; preds = %71, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %79

79:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %80

80:                                               ; preds = %79
  %81 = load ptr, ptr %9, align 8, !tbaa !11
  %82 = getelementptr inbounds i64, ptr %81, i32 1
  store ptr %82, ptr %9, align 8, !tbaa !11
  br label %53

83:                                               ; preds = %57
  %84 = load i64, ptr %4, align 8, !tbaa !5
  %85 = load i64, ptr %5, align 8, !tbaa !5
  %86 = add nsw i64 %84, %85
  %87 = sub nsw i64 %86, 1
  store i64 %87, ptr %7, align 8, !tbaa !5
  br label %88

88:                                               ; preds = %83, %45
  %89 = load i64, ptr %7, align 8, !tbaa !5
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(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 @.str)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  %92 = load ptr, ptr %2, align 8
  call void @llvm.stackrestore.p0(ptr %92)
  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 @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

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


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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #2 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  %4 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %5 = load i64, ptr %1, align 8, !tbaa !5
  %6 = call ptr @llvm.stacksave.p0()
  %7 = alloca i64, i64 %5, align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  store i64 32, ptr %2, align 8, !tbaa !5
  %8 = load i64, ptr %1, align 8, !tbaa !5
  %9 = icmp sgt i64 %8, 0
  br i1 %9, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %.0.lcssa = phi i64 [ 0, %0 ], [ %15, %.lr.ph ]
  %.lcssa = phi i64 [ %8, %0 ], [ %17, %.lr.ph ]
  %.not = icmp eq i64 %.lcssa, %.0.lcssa
  br i1 %.not, label %19, label %94

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.024 = phi i64 [ %15, %.lr.ph ], [ 0, %0 ]
  %.01623 = phi i64 [ %16, %.lr.ph ], [ 0, %0 ]
  %10 = getelementptr inbounds i64, ptr %7, i64 %.01623
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %12 = load i64, ptr %10, align 8, !tbaa !5
  %13 = and i64 %12, 1
  %14 = xor i64 %13, 1
  %15 = add nuw nsw i64 %14, %.024
  %16 = add nuw nsw i64 %.01623, 1
  %17 = load i64, ptr %1, align 8, !tbaa !5
  %18 = icmp slt i64 %16, %17
  br i1 %18, label %.lr.ph, label %._crit_edge, !llvm.loop !9

19:                                               ; preds = %._crit_edge
  %20 = getelementptr inbounds i64, ptr %7, i64 %5
  %.not2128 = icmp eq i64 %5, 0
  br i1 %.not2128, label %._crit_edge32, label %.lr.ph31

._crit_edge32:                                    ; preds = %.loopexit, %19
  %21 = load i64, ptr %2, align 8, !tbaa !5
  %22 = add i64 %.0.lcssa, -1
  %23 = add i64 %22, %21
  br label %94

.lr.ph31:                                         ; preds = %19, %.loopexit
  %.01729 = phi ptr [ %93, %.loopexit ], [ %7, %19 ]
  %24 = load i64, ptr %.01729, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %25 = and i64 %24, 1
  %.not22 = icmp eq i64 %25, 0
  br i1 %.not22, label %29, label %26

26:                                               ; preds = %91, %89, %87, %85, %83, %81, %79, %77, %75, %73, %71, %69, %67, %65, %63, %61, %59, %57, %55, %53, %51, %49, %47, %45, %43, %41, %39, %37, %35, %33, %31, %29, %.lr.ph31
  %storemerge27.lcssa = phi i64 [ 0, %.lr.ph31 ], [ 1, %29 ], [ 2, %31 ], [ 3, %33 ], [ 4, %35 ], [ 5, %37 ], [ 6, %39 ], [ 7, %41 ], [ 8, %43 ], [ 9, %45 ], [ 10, %47 ], [ 11, %49 ], [ 12, %51 ], [ 13, %53 ], [ 14, %55 ], [ 15, %57 ], [ 16, %59 ], [ 17, %61 ], [ 18, %63 ], [ 19, %65 ], [ 20, %67 ], [ 21, %69 ], [ 22, %71 ], [ 23, %73 ], [ 24, %75 ], [ 25, %77 ], [ 26, %79 ], [ 27, %81 ], [ 28, %83 ], [ 29, %85 ], [ 30, %87 ], [ 31, %89 ], [ 32, %91 ]
  store i64 %storemerge27.lcssa, ptr %3, align 8, !tbaa !5
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %28 = load i64, ptr %27, align 8, !tbaa !5
  store i64 %28, ptr %2, align 8, !tbaa !5
  br label %.loopexit

29:                                               ; preds = %.lr.ph31
  %30 = and i64 %24, 2
  %.not22.1 = icmp eq i64 %30, 0
  br i1 %.not22.1, label %31, label %26

31:                                               ; preds = %29
  %32 = and i64 %24, 4
  %.not22.2 = icmp eq i64 %32, 0
  br i1 %.not22.2, label %33, label %26

33:                                               ; preds = %31
  %34 = and i64 %24, 8
  %.not22.3 = icmp eq i64 %34, 0
  br i1 %.not22.3, label %35, label %26

35:                                               ; preds = %33
  %36 = and i64 %24, 16
  %.not22.4 = icmp eq i64 %36, 0
  br i1 %.not22.4, label %37, label %26

37:                                               ; preds = %35
  %38 = and i64 %24, 32
  %.not22.5 = icmp eq i64 %38, 0
  br i1 %.not22.5, label %39, label %26

39:                                               ; preds = %37
  %40 = and i64 %24, 64
  %.not22.6 = icmp eq i64 %40, 0
  br i1 %.not22.6, label %41, label %26

41:                                               ; preds = %39
  %42 = and i64 %24, 128
  %.not22.7 = icmp eq i64 %42, 0
  br i1 %.not22.7, label %43, label %26

43:                                               ; preds = %41
  %44 = and i64 %24, 256
  %.not22.8 = icmp eq i64 %44, 0
  br i1 %.not22.8, label %45, label %26

45:                                               ; preds = %43
  %46 = and i64 %24, 512
  %.not22.9 = icmp eq i64 %46, 0
  br i1 %.not22.9, label %47, label %26

47:                                               ; preds = %45
  %48 = and i64 %24, 1024
  %.not22.10 = icmp eq i64 %48, 0
  br i1 %.not22.10, label %49, label %26

49:                                               ; preds = %47
  %50 = and i64 %24, 2048
  %.not22.11 = icmp eq i64 %50, 0
  br i1 %.not22.11, label %51, label %26

51:                                               ; preds = %49
  %52 = and i64 %24, 4096
  %.not22.12 = icmp eq i64 %52, 0
  br i1 %.not22.12, label %53, label %26

53:                                               ; preds = %51
  %54 = and i64 %24, 8192
  %.not22.13 = icmp eq i64 %54, 0
  br i1 %.not22.13, label %55, label %26

55:                                               ; preds = %53
  %56 = and i64 %24, 16384
  %.not22.14 = icmp eq i64 %56, 0
  br i1 %.not22.14, label %57, label %26

57:                                               ; preds = %55
  %58 = and i64 %24, 32768
  %.not22.15 = icmp eq i64 %58, 0
  br i1 %.not22.15, label %59, label %26

59:                                               ; preds = %57
  %60 = and i64 %24, 65536
  %.not22.16 = icmp eq i64 %60, 0
  br i1 %.not22.16, label %61, label %26

61:                                               ; preds = %59
  %62 = and i64 %24, 131072
  %.not22.17 = icmp eq i64 %62, 0
  br i1 %.not22.17, label %63, label %26

63:                                               ; preds = %61
  %64 = and i64 %24, 262144
  %.not22.18 = icmp eq i64 %64, 0
  br i1 %.not22.18, label %65, label %26

65:                                               ; preds = %63
  %66 = and i64 %24, 524288
  %.not22.19 = icmp eq i64 %66, 0
  br i1 %.not22.19, label %67, label %26

67:                                               ; preds = %65
  %68 = and i64 %24, 1048576
  %.not22.20 = icmp eq i64 %68, 0
  br i1 %.not22.20, label %69, label %26

69:                                               ; preds = %67
  %70 = and i64 %24, 2097152
  %.not22.21 = icmp eq i64 %70, 0
  br i1 %.not22.21, label %71, label %26

71:                                               ; preds = %69
  %72 = and i64 %24, 4194304
  %.not22.22 = icmp eq i64 %72, 0
  br i1 %.not22.22, label %73, label %26

73:                                               ; preds = %71
  %74 = and i64 %24, 8388608
  %.not22.23 = icmp eq i64 %74, 0
  br i1 %.not22.23, label %75, label %26

75:                                               ; preds = %73
  %76 = and i64 %24, 16777216
  %.not22.24 = icmp eq i64 %76, 0
  br i1 %.not22.24, label %77, label %26

77:                                               ; preds = %75
  %78 = and i64 %24, 33554432
  %.not22.25 = icmp eq i64 %78, 0
  br i1 %.not22.25, label %79, label %26

79:                                               ; preds = %77
  %80 = and i64 %24, 67108864
  %.not22.26 = icmp eq i64 %80, 0
  br i1 %.not22.26, label %81, label %26

81:                                               ; preds = %79
  %82 = and i64 %24, 134217728
  %.not22.27 = icmp eq i64 %82, 0
  br i1 %.not22.27, label %83, label %26

83:                                               ; preds = %81
  %84 = and i64 %24, 268435456
  %.not22.28 = icmp eq i64 %84, 0
  br i1 %.not22.28, label %85, label %26

85:                                               ; preds = %83
  %86 = and i64 %24, 536870912
  %.not22.29 = icmp eq i64 %86, 0
  br i1 %.not22.29, label %87, label %26

87:                                               ; preds = %85
  %88 = and i64 %24, 1073741824
  %.not22.30 = icmp eq i64 %88, 0
  br i1 %.not22.30, label %89, label %26

89:                                               ; preds = %87
  %90 = and i64 %24, 2147483648
  %.not22.31 = icmp eq i64 %90, 0
  br i1 %.not22.31, label %91, label %26

91:                                               ; preds = %89
  %92 = and i64 %24, 4294967296
  %.not22.32 = icmp eq i64 %92, 0
  br i1 %.not22.32, label %.loopexit, label %26

.loopexit:                                        ; preds = %91, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  %93 = getelementptr inbounds i8, ptr %.01729, i64 8
  %.not21 = icmp eq ptr %93, %20
  br i1 %.not21, label %._crit_edge32, label %.lr.ph31

94:                                               ; preds = %._crit_edge, %._crit_edge32
  %.018 = phi i64 [ %23, %._crit_edge32 ], [ %.0.lcssa, %._crit_edge ]
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.018)
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %95, ptr noundef nonnull @.str)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.stackrestore.p0(ptr %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret void
}

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

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


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