; LLVM IR from next-step-for-interview-prep/Coding-Ninjas-DSA-course_code_and_notes_cpp :: Milestone-2=Intro_to_C++/questions and solutions/Test-2 (2-Minimum_length_word)

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z13minLengthWordPcS_(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 -1, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  store i32 2147483647, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = call i64 @strlen(ptr noundef %15) #4
  %17 = trunc i64 %16 to i32
  store i32 %17, ptr %9, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %44, %2
  %19 = load i32, ptr %8, align 4, !tbaa !9
  %20 = load i32, ptr %9, align 4, !tbaa !9
  %21 = icmp slt i32 %19, %20
  br i1 %21, label %22, label %47

22:                                               ; preds = %18
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = load i32, ptr %8, align 4, !tbaa !9
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds i8, ptr %23, i64 %25
  %27 = load i8, ptr %26, align 1, !tbaa !11
  %28 = sext i8 %27 to i32
  %29 = icmp eq i32 %28, 32
  br i1 %29, label %30, label %43

30:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %31 = load i32, ptr %8, align 4, !tbaa !9
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = sub nsw i32 %31, %32
  store i32 %33, ptr %10, align 4, !tbaa !9
  %34 = load i32, ptr %10, align 4, !tbaa !9
  %35 = load i32, ptr %6, align 4, !tbaa !9
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %37, label %40

37:                                               ; preds = %30
  %38 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %38, ptr %5, align 4, !tbaa !9
  %39 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %39, ptr %6, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %37, %30
  %41 = load i32, ptr %8, align 4, !tbaa !9
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %43

43:                                               ; preds = %40, %22
  br label %44

44:                                               ; preds = %43
  %45 = load i32, ptr %8, align 4, !tbaa !9
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %8, align 4, !tbaa !9
  br label %18, !llvm.loop !12

47:                                               ; preds = %18
  %48 = load i32, ptr %5, align 4, !tbaa !9
  %49 = icmp eq i32 %48, -1
  br i1 %49, label %50, label %70

50:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %51

51:                                               ; preds = %66, %50
  %52 = load i32, ptr %11, align 4, !tbaa !9
  %53 = load i32, ptr %9, align 4, !tbaa !9
  %54 = icmp sle i32 %52, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %69

56:                                               ; preds = %51
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = load i32, ptr %11, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds i8, ptr %57, i64 %59
  %61 = load i8, ptr %60, align 1, !tbaa !11
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = load i32, ptr %11, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds i8, ptr %62, i64 %64
  store i8 %61, ptr %65, align 1, !tbaa !11
  br label %66

66:                                               ; preds = %56
  %67 = load i32, ptr %11, align 4, !tbaa !9
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %11, align 4, !tbaa !9
  br label %51, !llvm.loop !14

69:                                               ; preds = %55
  br label %108

70:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %71 = load i32, ptr %8, align 4, !tbaa !9
  %72 = load i32, ptr %7, align 4, !tbaa !9
  %73 = sub nsw i32 %71, %72
  store i32 %73, ptr %12, align 4, !tbaa !9
  %74 = load i32, ptr %12, align 4, !tbaa !9
  %75 = load i32, ptr %6, align 4, !tbaa !9
  %76 = icmp slt i32 %74, %75
  br i1 %76, label %77, label %80

77:                                               ; preds = %70
  %78 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %78, ptr %5, align 4, !tbaa !9
  %79 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %79, ptr %6, align 4, !tbaa !9
  br label %80

80:                                               ; preds = %77, %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %81 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %81, ptr %14, align 4, !tbaa !9
  br label %82

82:                                               ; preds = %100, %80
  %83 = load i32, ptr %14, align 4, !tbaa !9
  %84 = load i32, ptr %5, align 4, !tbaa !9
  %85 = load i32, ptr %6, align 4, !tbaa !9
  %86 = add nsw i32 %84, %85
  %87 = icmp slt i32 %83, %86
  br i1 %87, label %89, label %88

88:                                               ; preds = %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  br label %103

89:                                               ; preds = %82
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = load i32, ptr %14, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds i8, ptr %90, i64 %92
  %94 = load i8, ptr %93, align 1, !tbaa !11
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = load i32, ptr %13, align 4, !tbaa !9
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %13, align 4, !tbaa !9
  %98 = sext i32 %96 to i64
  %99 = getelementptr inbounds i8, ptr %95, i64 %98
  store i8 %94, ptr %99, align 1, !tbaa !11
  br label %100

100:                                              ; preds = %89
  %101 = load i32, ptr %14, align 4, !tbaa !9
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %14, align 4, !tbaa !9
  br label %82, !llvm.loop !15

103:                                              ; preds = %88
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = load i32, ptr %13, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds i8, ptr %104, i64 %106
  store i8 0, ptr %107, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  br label %108

108:                                              ; preds = %103, %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  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: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #2

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind willreturn memory(read) "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 = { nounwind }
attributes #4 = { nounwind willreturn memory(read) }

!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 = !{!"any pointer", !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 = distinct !{!14, !13}
!15 = distinct !{!15, !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"

; Function Attrs: mustprogress nofree nounwind memory(argmem: readwrite) uwtable
define dso_local void @_Z13minLengthWordPcS_(ptr nocapture noundef readonly %0, ptr nocapture noundef writeonly %1) local_unnamed_addr #0 {
  %3 = ptrtoint ptr %0 to i64
  %4 = ptrtoint ptr %1 to i64
  %5 = ptrtoint ptr %0 to i64
  %6 = ptrtoint ptr %1 to i64
  %7 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %0) #3
  %8 = trunc i64 %7 to i32
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph.preheader, label %.preheader

.lr.ph.preheader:                                 ; preds = %2
  %wide.trip.count = and i64 %7, 2147483647
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %19
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.pre-phi, %19 ]
  %.03856 = phi i32 [ -1, %.lr.ph.preheader ], [ %.2, %19 ]
  %.04055 = phi i32 [ 2147483647, %.lr.ph.preheader ], [ %.242, %19 ]
  %.04454 = phi i32 [ 0, %.lr.ph.preheader ], [ %.145, %19 ]
  %10 = getelementptr inbounds i8, ptr %0, i64 %indvars.iv
  %11 = load i8, ptr %10, align 1, !tbaa !5
  %12 = icmp eq i8 %11, 32
  br i1 %12, label %13, label %.lr.ph._crit_edge

.lr.ph._crit_edge:                                ; preds = %.lr.ph
  %.pre = add nuw nsw i64 %indvars.iv, 1
  br label %19

13:                                               ; preds = %.lr.ph
  %14 = trunc nuw nsw i64 %indvars.iv to i32
  %15 = sub nsw i32 %14, %.04454
  %16 = icmp slt i32 %15, %.04055
  %spec.select = tail call i32 @llvm.smin.i32(i32 %15, i32 %.04055)
  %spec.select50 = select i1 %16, i32 %.04454, i32 %.03856
  %17 = add nuw nsw i64 %indvars.iv, 1
  %18 = trunc nuw nsw i64 %17 to i32
  br label %19

19:                                               ; preds = %.lr.ph._crit_edge, %13
  %indvars.iv.next.pre-phi = phi i64 [ %.pre, %.lr.ph._crit_edge ], [ %17, %13 ]
  %.145 = phi i32 [ %.04454, %.lr.ph._crit_edge ], [ %18, %13 ]
  %.242 = phi i32 [ %.04055, %.lr.ph._crit_edge ], [ %spec.select, %13 ]
  %.2 = phi i32 [ %.03856, %.lr.ph._crit_edge ], [ %spec.select50, %13 ]
  %exitcond.not = icmp eq i64 %indvars.iv.next.pre-phi, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !8

._crit_edge:                                      ; preds = %19
  %20 = icmp eq i32 %.2, -1
  br i1 %20, label %.preheader, label %49

.preheader:                                       ; preds = %2, %._crit_edge
  %.not66 = icmp slt i32 %8, 0
  br i1 %.not66, label %.loopexit, label %iter.check

iter.check:                                       ; preds = %.preheader
  %21 = add nuw nsw i64 %7, 1
  %wide.trip.count81 = and i64 %21, 4294967295
  %min.iters.check93 = icmp ult i64 %wide.trip.count81, 8
  %22 = sub i64 %4, %3
  %diff.check90 = icmp ult i64 %22, 32
  %or.cond = or i1 %min.iters.check93, %diff.check90
  br i1 %or.cond, label %.lr.ph68.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  %min.iters.check95 = icmp ult i64 %wide.trip.count81, 32
  br i1 %min.iters.check95, label %vec.epilog.ph, label %vector.ph96

vector.ph96:                                      ; preds = %vector.main.loop.iter.check
  %n.mod.vf97 = and i64 %21, 31
  %n.vec98 = sub nsw i64 %wide.trip.count81, %n.mod.vf97
  br label %vector.body99

vector.body99:                                    ; preds = %vector.body99, %vector.ph96
  %index100 = phi i64 [ 0, %vector.ph96 ], [ %index.next103, %vector.body99 ]
  %23 = getelementptr inbounds i8, ptr %0, i64 %index100
  %24 = getelementptr inbounds i8, ptr %23, i64 16
  %wide.load101 = load <16 x i8>, ptr %23, align 1, !tbaa !5
  %wide.load102 = load <16 x i8>, ptr %24, align 1, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %1, i64 %index100
  %26 = getelementptr inbounds i8, ptr %25, i64 16
  store <16 x i8> %wide.load101, ptr %25, align 1, !tbaa !5
  store <16 x i8> %wide.load102, ptr %26, align 1, !tbaa !5
  %index.next103 = add nuw i64 %index100, 32
  %27 = icmp eq i64 %index.next103, %n.vec98
  br i1 %27, label %middle.block91, label %vector.body99, !llvm.loop !10

middle.block91:                                   ; preds = %vector.body99
  %cmp.n104 = icmp eq i64 %n.mod.vf97, 0
  br i1 %cmp.n104, label %.loopexit, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block91
  %min.epilog.iters.check = icmp ult i64 %n.mod.vf97, 8
  br i1 %min.epilog.iters.check, label %.lr.ph68.preheader, label %vec.epilog.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec98, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.mod.vf105 = and i64 %21, 7
  %n.vec106 = sub nsw i64 %wide.trip.count81, %n.mod.vf105
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index108 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next110, %vec.epilog.vector.body ]
  %28 = getelementptr inbounds i8, ptr %0, i64 %index108
  %wide.load109 = load <8 x i8>, ptr %28, align 1, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %1, i64 %index108
  store <8 x i8> %wide.load109, ptr %29, align 1, !tbaa !5
  %index.next110 = add nuw i64 %index108, 8
  %30 = icmp eq i64 %index.next110, %n.vec106
  br i1 %30, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !13

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n111 = icmp eq i64 %n.mod.vf105, 0
  br i1 %cmp.n111, label %.loopexit, label %.lr.ph68.preheader

.lr.ph68.preheader:                               ; preds = %vec.epilog.middle.block, %iter.check, %vec.epilog.iter.check
  %indvars.iv78.ph = phi i64 [ 0, %iter.check ], [ %n.vec98, %vec.epilog.iter.check ], [ %n.vec106, %vec.epilog.middle.block ]
  %31 = sub i64 %21, %indvars.iv78.ph
  %xtraiter = and i64 %31, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph68.prol.loopexit, label %.lr.ph68.prol

.lr.ph68.prol:                                    ; preds = %.lr.ph68.preheader, %.lr.ph68.prol
  %indvars.iv78.prol = phi i64 [ %indvars.iv.next79.prol, %.lr.ph68.prol ], [ %indvars.iv78.ph, %.lr.ph68.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph68.prol ], [ 0, %.lr.ph68.preheader ]
  %32 = getelementptr inbounds i8, ptr %0, i64 %indvars.iv78.prol
  %33 = load i8, ptr %32, align 1, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv78.prol
  store i8 %33, ptr %34, align 1, !tbaa !5
  %indvars.iv.next79.prol = add nuw nsw i64 %indvars.iv78.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph68.prol.loopexit, label %.lr.ph68.prol, !llvm.loop !14

.lr.ph68.prol.loopexit:                           ; preds = %.lr.ph68.prol, %.lr.ph68.preheader
  %indvars.iv78.unr = phi i64 [ %indvars.iv78.ph, %.lr.ph68.preheader ], [ %indvars.iv.next79.prol, %.lr.ph68.prol ]
  %35 = sub nsw i64 %indvars.iv78.ph, %wide.trip.count81
  %36 = icmp ugt i64 %35, -4
  br i1 %36, label %.loopexit, label %.lr.ph68

.lr.ph68:                                         ; preds = %.lr.ph68.prol.loopexit, %.lr.ph68
  %indvars.iv78 = phi i64 [ %indvars.iv.next79.3, %.lr.ph68 ], [ %indvars.iv78.unr, %.lr.ph68.prol.loopexit ]
  %37 = getelementptr inbounds i8, ptr %0, i64 %indvars.iv78
  %38 = load i8, ptr %37, align 1, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv78
  store i8 %38, ptr %39, align 1, !tbaa !5
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %40 = getelementptr inbounds i8, ptr %0, i64 %indvars.iv.next79
  %41 = load i8, ptr %40, align 1, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv.next79
  store i8 %41, ptr %42, align 1, !tbaa !5
  %indvars.iv.next79.1 = add nuw nsw i64 %indvars.iv78, 2
  %43 = getelementptr inbounds i8, ptr %0, i64 %indvars.iv.next79.1
  %44 = load i8, ptr %43, align 1, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv.next79.1
  store i8 %44, ptr %45, align 1, !tbaa !5
  %indvars.iv.next79.2 = add nuw nsw i64 %indvars.iv78, 3
  %46 = getelementptr inbounds i8, ptr %0, i64 %indvars.iv.next79.2
  %47 = load i8, ptr %46, align 1, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv.next79.2
  store i8 %47, ptr %48, align 1, !tbaa !5
  %indvars.iv.next79.3 = add nuw nsw i64 %indvars.iv78, 4
  %exitcond82.not.3 = icmp eq i64 %indvars.iv.next79.3, %wide.trip.count81
  br i1 %exitcond82.not.3, label %.loopexit, label %.lr.ph68, !llvm.loop !16

49:                                               ; preds = %._crit_edge
  %50 = trunc i64 %7 to i32
  %51 = sub nsw i32 %50, %.145
  %spec.select51 = tail call i32 @llvm.smin.i32(i32 %51, i32 %.242)
  %52 = icmp sgt i32 %spec.select51, 0
  br i1 %52, label %.lr.ph63.preheader, label %._crit_edge64

.lr.ph63.preheader:                               ; preds = %49
  %53 = icmp slt i32 %51, %.242
  %spec.select52 = select i1 %53, i32 %.145, i32 %.2
  %54 = add nsw i32 %spec.select52, %spec.select51
  %55 = sext i32 %spec.select52 to i64
  %56 = sext i32 %54 to i64
  %57 = add nsw i64 %55, 1
  %smax = tail call i64 @llvm.smax.i64(i64 %56, i64 %57)
  %58 = sub i64 %smax, %55
  %min.iters.check = icmp ult i64 %58, 32
  br i1 %min.iters.check, label %.lr.ph63.preheader112, label %vector.memcheck

.lr.ph63.preheader112:                            ; preds = %middle.block, %vector.memcheck, %.lr.ph63.preheader
  %indvars.iv73.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph63.preheader ], [ %n.vec, %middle.block ]
  %indvars.iv71.ph = phi i64 [ %55, %vector.memcheck ], [ %55, %.lr.ph63.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph63

vector.memcheck:                                  ; preds = %.lr.ph63.preheader
  %59 = add i64 %5, %55
  %60 = sub i64 %6, %59
  %diff.check = icmp ult i64 %60, 32
  br i1 %diff.check, label %.lr.ph63.preheader112, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %58, -32
  %ind.end = add i64 %n.vec, %55
  %invariant.gep = getelementptr i8, ptr %0, i64 %55
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %gep = getelementptr i8, ptr %invariant.gep, i64 %index
  %61 = getelementptr inbounds i8, ptr %gep, i64 16
  %wide.load = load <16 x i8>, ptr %gep, align 1, !tbaa !5
  %wide.load88 = load <16 x i8>, ptr %61, align 1, !tbaa !5
  %62 = getelementptr inbounds i8, ptr %1, i64 %index
  %63 = getelementptr inbounds i8, ptr %62, i64 16
  store <16 x i8> %wide.load, ptr %62, align 1, !tbaa !5
  store <16 x i8> %wide.load88, ptr %63, align 1, !tbaa !5
  %index.next = add nuw i64 %index, 32
  %64 = icmp eq i64 %index.next, %n.vec
  br i1 %64, label %middle.block, label %vector.body, !llvm.loop !17

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %58, %n.vec
  br i1 %cmp.n, label %._crit_edge64.loopexit, label %.lr.ph63.preheader112

._crit_edge64.loopexit:                           ; preds = %.lr.ph63, %middle.block
  %indvars.iv.next74.lcssa = phi i64 [ %n.vec, %middle.block ], [ %indvars.iv.next74, %.lr.ph63 ]
  %65 = and i64 %indvars.iv.next74.lcssa, 4294967295
  br label %._crit_edge64

._crit_edge64:                                    ; preds = %._crit_edge64.loopexit, %49
  %.037.lcssa = phi i64 [ 0, %49 ], [ %65, %._crit_edge64.loopexit ]
  %66 = getelementptr inbounds i8, ptr %1, i64 %.037.lcssa
  store i8 0, ptr %66, align 1, !tbaa !5
  br label %.loopexit

.lr.ph63:                                         ; preds = %.lr.ph63.preheader112, %.lr.ph63
  %indvars.iv73 = phi i64 [ %indvars.iv.next74, %.lr.ph63 ], [ %indvars.iv73.ph, %.lr.ph63.preheader112 ]
  %indvars.iv71 = phi i64 [ %indvars.iv.next72, %.lr.ph63 ], [ %indvars.iv71.ph, %.lr.ph63.preheader112 ]
  %67 = getelementptr inbounds i8, ptr %0, i64 %indvars.iv71
  %68 = load i8, ptr %67, align 1, !tbaa !5
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %69 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv73
  store i8 %68, ptr %69, align 1, !tbaa !5
  %indvars.iv.next72 = add nsw i64 %indvars.iv71, 1
  %70 = icmp slt i64 %indvars.iv.next72, %56
  br i1 %70, label %.lr.ph63, label %._crit_edge64.loopexit, !llvm.loop !18

.loopexit:                                        ; preds = %.lr.ph68.prol.loopexit, %.lr.ph68, %middle.block91, %vec.epilog.middle.block, %.preheader, %._crit_edge64
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #2

attributes #0 = { mustprogress nofree nounwind memory(argmem: readwrite) 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 nofree nounwind willreturn memory(argmem: read) "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 speculatable willreturn memory(none) }
attributes #3 = { nounwind willreturn memory(read) }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9, !11, !12}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !9, !11, !12}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.unroll.disable"}
!16 = distinct !{!16, !9, !11}
!17 = distinct !{!17, !9, !11, !12}
!18 = distinct !{!18, !9, !11}


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