; LLVM IR from ravireddy07/cpp-book :: src/Code-Forces/belted-rooms.ll (Z4testv)

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

@s = external dso_local global [1000005 x i8], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4testv() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i8, align 1
  %3 = alloca i8, align 1
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_PS3_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef @s)
  call void @llvm.lifetime.start.p0(i64 1, ptr %2) #4
  store i8 1, ptr %2, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #4
  store i8 1, ptr %3, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %9

9:                                                ; preds = %31, %0
  %10 = load i32, ptr %4, align 4, !tbaa !9
  %11 = load i32, ptr %1, align 4, !tbaa !9
  %12 = icmp slt i32 %10, %11
  br i1 %12, label %14, label %13

13:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %34

14:                                               ; preds = %9
  %15 = load i32, ptr %4, align 4, !tbaa !9
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [1000005 x i8], ptr @s, i64 0, i64 %16
  %18 = load i8, ptr %17, align 1, !tbaa !11
  %19 = sext i8 %18 to i32
  %20 = icmp eq i32 %19, 62
  br i1 %20, label %21, label %22

21:                                               ; preds = %14
  store i8 0, ptr %2, align 1, !tbaa !5
  br label %22

22:                                               ; preds = %21, %14
  %23 = load i32, ptr %4, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [1000005 x i8], ptr @s, i64 0, i64 %24
  %26 = load i8, ptr %25, align 1, !tbaa !11
  %27 = sext i8 %26 to i32
  %28 = icmp eq i32 %27, 60
  br i1 %28, label %29, label %30

29:                                               ; preds = %22
  store i8 0, ptr %3, align 1, !tbaa !5
  br label %30

30:                                               ; preds = %29, %22
  br label %31

31:                                               ; preds = %30
  %32 = load i32, ptr %4, align 4, !tbaa !9
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %4, align 4, !tbaa !9
  br label %9, !llvm.loop !12

34:                                               ; preds = %13
  %35 = load i8, ptr %2, align 1, !tbaa !5, !range !14, !noundef !15
  %36 = trunc i8 %35 to i1
  br i1 %36, label %40, label %37

37:                                               ; preds = %34
  %38 = load i8, ptr %3, align 1, !tbaa !5, !range !14, !noundef !15
  %39 = trunc i8 %38 to i1
  br i1 %39, label %40, label %44

40:                                               ; preds = %37, %34
  %41 = load i32, ptr %1, align 4, !tbaa !9
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %41)
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %78

44:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %71, %44
  %46 = load i32, ptr %6, align 4, !tbaa !9
  %47 = load i32, ptr %1, align 4, !tbaa !9
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %74

50:                                               ; preds = %45
  %51 = load i32, ptr %6, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [1000005 x i8], ptr @s, i64 0, i64 %52
  %54 = load i8, ptr %53, align 1, !tbaa !11
  %55 = sext i8 %54 to i32
  %56 = icmp eq i32 %55, 45
  br i1 %56, label %67, label %57

57:                                               ; preds = %50
  %58 = load i32, ptr %6, align 4, !tbaa !9
  %59 = add nsw i32 %58, 1
  %60 = load i32, ptr %1, align 4, !tbaa !9
  %61 = srem i32 %59, %60
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [1000005 x i8], ptr @s, i64 0, i64 %62
  %64 = load i8, ptr %63, align 1, !tbaa !11
  %65 = sext i8 %64 to i32
  %66 = icmp eq i32 %65, 45
  br i1 %66, label %67, label %70

67:                                               ; preds = %57, %50
  %68 = load i32, ptr %5, align 4, !tbaa !9
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %5, align 4, !tbaa !9
  br label %70

70:                                               ; preds = %67, %57
  br label %71

71:                                               ; preds = %70
  %72 = load i32, ptr %6, align 4, !tbaa !9
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %6, align 4, !tbaa !9
  br label %45, !llvm.loop !16

74:                                               ; preds = %49
  %75 = load i32, ptr %5, align 4, !tbaa !9
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %75)
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %78

78:                                               ; preds = %74, %40
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  ret void
}

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

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


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

@s = external dso_local global [1000005 x i8], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4testv() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  %2 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %3 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_PS3_(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef @s)
  %4 = load i32, ptr %1, align 4, !tbaa !5
  %5 = icmp slt i32 %4, 1
  br i1 %5, label %._crit_edge.thread, label %iter.check

iter.check:                                       ; preds = %0
  %wide.trip.count = zext nneg i32 %4 to i64
  %min.iters.check = icmp ult i32 %4, 8
  br i1 %min.iters.check, label %.lr.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  %min.iters.check36 = icmp ult i32 %4, 32
  br i1 %min.iters.check36, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %wide.trip.count, 2147483616
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <16 x i1> [ zeroinitializer, %vector.ph ], [ %10, %vector.body ]
  %vec.phi37 = phi <16 x i1> [ zeroinitializer, %vector.ph ], [ %11, %vector.body ]
  %vec.phi38 = phi <16 x i1> [ zeroinitializer, %vector.ph ], [ %8, %vector.body ]
  %vec.phi39 = phi <16 x i1> [ zeroinitializer, %vector.ph ], [ %9, %vector.body ]
  %6 = getelementptr inbounds [1000005 x i8], ptr @s, i64 0, i64 %index
  %7 = getelementptr inbounds i8, ptr %6, i64 16
  %wide.load = load <16 x i8>, ptr %6, align 16, !tbaa !9
  %wide.load40 = load <16 x i8>, ptr %7, align 16, !tbaa !9
  %.not = icmp eq <16 x i8> %wide.load, <i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62>
  %.not58 = icmp eq <16 x i8> %wide.load40, <i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62>
  %8 = or <16 x i1> %vec.phi38, %.not
  %9 = or <16 x i1> %vec.phi39, %.not58
  %.not59 = icmp eq <16 x i8> %wide.load, <i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60>
  %.not60 = icmp eq <16 x i8> %wide.load40, <i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60>
  %10 = or <16 x i1> %vec.phi, %.not59
  %11 = or <16 x i1> %vec.phi37, %.not60
  %index.next = add nuw i64 %index, 32
  %12 = icmp eq i64 %index.next, %n.vec
  br i1 %12, label %middle.block, label %vector.body, !llvm.loop !10

middle.block:                                     ; preds = %vector.body
  %bin.rdx = or <16 x i1> %11, %10
  %bin.rdx.fr = freeze <16 x i1> %bin.rdx
  %13 = bitcast <16 x i1> %bin.rdx.fr to i16
  %.not61 = icmp eq i16 %13, 0
  %bin.rdx41 = or <16 x i1> %9, %8
  %bin.rdx41.fr = freeze <16 x i1> %bin.rdx41
  %14 = bitcast <16 x i1> %bin.rdx41.fr to i16
  %.not62 = icmp eq i16 %14, 0
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %n.vec.remaining = and i64 %wide.trip.count, 24
  %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check, label %.lr.ph.preheader, label %vec.epilog.ph

.lr.ph.preheader:                                 ; preds = %vec.epilog.middle.block, %iter.check, %vec.epilog.iter.check
  %indvars.iv.ph = phi i64 [ 0, %iter.check ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec45, %vec.epilog.middle.block ]
  %.01420.ph = phi i1 [ true, %iter.check ], [ %.not61, %vec.epilog.iter.check ], [ %.not66, %vec.epilog.middle.block ]
  %.01619.ph = phi i1 [ true, %iter.check ], [ %.not62, %vec.epilog.iter.check ], [ %.not68, %vec.epilog.middle.block ]
  br label %.lr.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %bc.merge.rdx = phi i1 [ %.not61, %vec.epilog.iter.check ], [ true, %vector.main.loop.iter.check ]
  %bc.merge.rdx43 = phi i1 [ %.not62, %vec.epilog.iter.check ], [ true, %vector.main.loop.iter.check ]
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %15 = xor i1 %bc.merge.rdx43, true
  %16 = xor i1 %bc.merge.rdx, true
  %n.vec45 = and i64 %wide.trip.count, 2147483640
  %minmax.ident.splatinsert = insertelement <8 x i1> poison, i1 %16, i64 0
  %minmax.ident.splat = shufflevector <8 x i1> %minmax.ident.splatinsert, <8 x i1> poison, <8 x i32> zeroinitializer
  %minmax.ident.splatinsert49 = insertelement <8 x i1> poison, i1 %15, i64 0
  %minmax.ident.splat50 = shufflevector <8 x i1> %minmax.ident.splatinsert49, <8 x i1> poison, <8 x i32> zeroinitializer
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index46 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next52, %vec.epilog.vector.body ]
  %vec.phi47 = phi <8 x i1> [ %minmax.ident.splat, %vec.epilog.ph ], [ %.fr65, %vec.epilog.vector.body ]
  %vec.phi48 = phi <8 x i1> [ %minmax.ident.splat50, %vec.epilog.ph ], [ %.fr67, %vec.epilog.vector.body ]
  %17 = getelementptr inbounds [1000005 x i8], ptr @s, i64 0, i64 %index46
  %wide.load51 = load <8 x i8>, ptr %17, align 8, !tbaa !9
  %.not63 = icmp eq <8 x i8> %wide.load51, <i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62, i8 62>
  %18 = or <8 x i1> %vec.phi48, %.not63
  %.fr67 = freeze <8 x i1> %18
  %.not64 = icmp eq <8 x i8> %wide.load51, <i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60, i8 60>
  %19 = or <8 x i1> %vec.phi47, %.not64
  %.fr65 = freeze <8 x i1> %19
  %index.next52 = add nuw i64 %index46, 8
  %20 = icmp eq i64 %index.next52, %n.vec45
  br i1 %20, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !14

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %21 = bitcast <8 x i1> %.fr65 to i8
  %.not66 = icmp eq i8 %21, 0
  %22 = bitcast <8 x i1> %.fr67 to i8
  %.not68 = icmp eq i8 %22, 0
  %cmp.n55 = icmp eq i64 %n.vec45, %wide.trip.count
  br i1 %cmp.n55, label %._crit_edge, label %.lr.ph.preheader

._crit_edge:                                      ; preds = %.lr.ph, %vec.epilog.middle.block, %middle.block
  %spec.select.lcssa = phi i1 [ %.not62, %middle.block ], [ %.not68, %vec.epilog.middle.block ], [ %spec.select, %.lr.ph ]
  %.115.lcssa = phi i1 [ %.not61, %middle.block ], [ %.not66, %vec.epilog.middle.block ], [ %.115, %.lr.ph ]
  %23 = select i1 %spec.select.lcssa, i1 true, i1 %.115.lcssa
  %brmerge = or i1 %23, %5
  %.mux = select i1 %23, i32 %4, i32 0
  br i1 %brmerge, label %._crit_edge.thread, label %.lr.ph26.preheader

.lr.ph26.preheader:                               ; preds = %._crit_edge
  %24 = zext nneg i32 %4 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %25 = icmp eq i32 %4, 1
  br i1 %25, label %._crit_edge.thread.loopexit.unr-lcssa, label %.lr.ph26.preheader.new

.lr.ph26.preheader.new:                           ; preds = %.lr.ph26.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %.lr.ph26

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader ]
  %.01420 = phi i1 [ %.115, %.lr.ph ], [ %.01420.ph, %.lr.ph.preheader ]
  %.01619 = phi i1 [ %spec.select, %.lr.ph ], [ %.01619.ph, %.lr.ph.preheader ]
  %26 = getelementptr inbounds [1000005 x i8], ptr @s, i64 0, i64 %indvars.iv
  %27 = load i8, ptr %26, align 1, !tbaa !9
  %28 = icmp ne i8 %27, 62
  %spec.select = select i1 %28, i1 %.01619, i1 false
  %29 = icmp ne i8 %27, 60
  %.115 = select i1 %29, i1 %.01420, i1 false
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !15

.lr.ph26:                                         ; preds = %52, %.lr.ph26.preheader.new
  %indvars.iv29 = phi i64 [ 0, %.lr.ph26.preheader.new ], [ %.pre34.1, %52 ]
  %.01224 = phi i32 [ 0, %.lr.ph26.preheader.new ], [ %.1.1, %52 ]
  %niter = phi i64 [ 0, %.lr.ph26.preheader.new ], [ %niter.next.1, %52 ]
  %30 = getelementptr inbounds [1000005 x i8], ptr @s, i64 0, i64 %indvars.iv29
  %31 = load i8, ptr %30, align 2, !tbaa !9
  %32 = icmp eq i8 %31, 45
  %.pre34 = or disjoint i64 %indvars.iv29, 1
  br i1 %32, label %.lr.ph26._crit_edge, label %33

33:                                               ; preds = %.lr.ph26
  %34 = icmp eq i64 %.pre34, %24
  %35 = and i64 %.pre34, 4294967295
  %36 = select i1 %34, i64 0, i64 %35
  %37 = getelementptr inbounds [1000005 x i8], ptr @s, i64 0, i64 %36
  %38 = load i8, ptr %37, align 1, !tbaa !9
  %39 = icmp eq i8 %38, 45
  br i1 %39, label %.lr.ph26._crit_edge, label %.lr.ph26.1

.lr.ph26._crit_edge:                              ; preds = %.lr.ph26, %33
  %40 = add nsw i32 %.01224, 1
  br label %.lr.ph26.1

.lr.ph26.1:                                       ; preds = %33, %.lr.ph26._crit_edge
  %.1 = phi i32 [ %.01224, %33 ], [ %40, %.lr.ph26._crit_edge ]
  %41 = getelementptr inbounds [1000005 x i8], ptr @s, i64 0, i64 %.pre34
  %42 = load i8, ptr %41, align 1, !tbaa !9
  %43 = icmp eq i8 %42, 45
  %.pre34.1 = add nuw nsw i64 %indvars.iv29, 2
  br i1 %43, label %.lr.ph26._crit_edge.1, label %44

44:                                               ; preds = %.lr.ph26.1
  %45 = icmp eq i64 %.pre34.1, %24
  %46 = and i64 %.pre34.1, 4294967294
  %47 = select i1 %45, i64 0, i64 %46
  %48 = getelementptr inbounds [1000005 x i8], ptr @s, i64 0, i64 %47
  %49 = load i8, ptr %48, align 2, !tbaa !9
  %50 = icmp eq i8 %49, 45
  br i1 %50, label %.lr.ph26._crit_edge.1, label %52

.lr.ph26._crit_edge.1:                            ; preds = %44, %.lr.ph26.1
  %51 = add nsw i32 %.1, 1
  br label %52

52:                                               ; preds = %.lr.ph26._crit_edge.1, %44
  %.1.1 = phi i32 [ %.1, %44 ], [ %51, %.lr.ph26._crit_edge.1 ]
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.thread.loopexit.unr-lcssa, label %.lr.ph26, !llvm.loop !16

._crit_edge.thread.loopexit.unr-lcssa:            ; preds = %52, %.lr.ph26.preheader
  %.1.lcssa.ph = phi i32 [ poison, %.lr.ph26.preheader ], [ %.1.1, %52 ]
  %indvars.iv29.unr = phi i64 [ 0, %.lr.ph26.preheader ], [ %.pre34.1, %52 ]
  %.01224.unr = phi i32 [ 0, %.lr.ph26.preheader ], [ %.1.1, %52 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge.thread, label %.lr.ph26.epil

.lr.ph26.epil:                                    ; preds = %._crit_edge.thread.loopexit.unr-lcssa
  %53 = getelementptr inbounds [1000005 x i8], ptr @s, i64 0, i64 %indvars.iv29.unr
  %54 = load i8, ptr %53, align 1, !tbaa !9
  %55 = icmp eq i8 %54, 45
  br i1 %55, label %.lr.ph26._crit_edge.epil, label %56

56:                                               ; preds = %.lr.ph26.epil
  %.pre34.epil = add nuw nsw i64 %indvars.iv29.unr, 1
  %57 = icmp eq i64 %.pre34.epil, %24
  %58 = and i64 %.pre34.epil, 4294967295
  %59 = select i1 %57, i64 0, i64 %58
  %60 = getelementptr inbounds [1000005 x i8], ptr @s, i64 0, i64 %59
  %61 = load i8, ptr %60, align 1, !tbaa !9
  %62 = icmp eq i8 %61, 45
  br i1 %62, label %.lr.ph26._crit_edge.epil, label %._crit_edge.thread

.lr.ph26._crit_edge.epil:                         ; preds = %56, %.lr.ph26.epil
  %63 = add nsw i32 %.01224.unr, 1
  br label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %._crit_edge.thread.loopexit.unr-lcssa, %.lr.ph26._crit_edge.epil, %56, %._crit_edge, %0
  %.012.lcssa.sink = phi i32 [ %4, %0 ], [ %.mux, %._crit_edge ], [ %.1.lcssa.ph, %._crit_edge.thread.loopexit.unr-lcssa ], [ %.01224.unr, %56 ], [ %63, %.lr.ph26._crit_edge.epil ]
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.012.lcssa.sink)
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret void
}

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11, !12, !13}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !11, !12, !13}
!15 = distinct !{!15, !11, !13, !12}
!16 = distinct !{!16, !11}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass