; LLVM IR from MostafaTwfiq/C-DataStructures-And-Algorithms :: Unit Test/Tests/AlgorithmsTests/CharArrayAlgTest (CharArrayAlgTest)

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

%struct.ErrorTestStruct = type { i32 }

@.str = external hidden unnamed_addr constant [146 x i8], align 1
@ERROR_TEST = external dso_local global ptr, align 8
@__const.testCharArrHashFun.words = external hidden unnamed_addr constant [5 x [20 x i8]], align 16

declare void @CuAssertIntEquals_LineMsg(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) #0

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

; Function Attrs: 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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: nounwind uwtable
define dso_local void @testCharArrHashFun(ptr noundef %0) #4 {
  %2 = alloca ptr, align 8
  %3 = alloca [5 x [20 x i8]], align 16
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %9 = call i32 @charArrHashFun(ptr noundef null)
  %10 = load ptr, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.ErrorTestStruct, ptr %11, i32 0, i32 0
  %13 = load i32, ptr %12, align 4, !tbaa !9
  call void @CuAssertIntEquals_LineMsg(ptr noundef %10, ptr noundef @.str, i32 noundef 360, ptr noundef null, i32 noundef -83386157, i32 noundef %13)
  call void @llvm.lifetime.start.p0(i64 100, ptr %3) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %3, ptr align 16 @__const.testCharArrHashFun.words, i64 100, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !12
  br label %14

14:                                               ; preds = %52, %1
  %15 = load i32, ptr %4, align 4, !tbaa !12
  %16 = icmp slt i32 %15, 5
  br i1 %16, label %18, label %17

17:                                               ; preds = %14
  store i32 2, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %55

18:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %19 = load i32, ptr %4, align 4, !tbaa !12
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [5 x [20 x i8]], ptr %3, i64 0, i64 %20
  %22 = getelementptr inbounds [20 x i8], ptr %21, i64 0, i64 0
  %23 = call i64 @strlen(ptr noundef %22) #6
  %24 = trunc i64 %23 to i32
  store i32 %24, ptr %7, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !12
  br label %25

25:                                               ; preds = %41, %18
  %26 = load i32, ptr %8, align 4, !tbaa !12
  %27 = load i32, ptr %7, align 4, !tbaa !12
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %44

30:                                               ; preds = %25
  %31 = load i32, ptr %4, align 4, !tbaa !12
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [5 x [20 x i8]], ptr %3, i64 0, i64 %32
  %34 = load i32, ptr %8, align 4, !tbaa !12
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [20 x i8], ptr %33, i64 0, i64 %35
  %37 = load i8, ptr %36, align 1, !tbaa !13
  %38 = sext i8 %37 to i32
  %39 = load i32, ptr %6, align 4, !tbaa !12
  %40 = add nsw i32 %39, %38
  store i32 %40, ptr %6, align 4, !tbaa !12
  br label %41

41:                                               ; preds = %30
  %42 = load i32, ptr %8, align 4, !tbaa !12
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %8, align 4, !tbaa !12
  br label %25, !llvm.loop !14

44:                                               ; preds = %29
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  %46 = load i32, ptr %6, align 4, !tbaa !12
  %47 = load i32, ptr %4, align 4, !tbaa !12
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [5 x [20 x i8]], ptr %3, i64 0, i64 %48
  %50 = getelementptr inbounds [20 x i8], ptr %49, i64 0, i64 0
  %51 = call i32 @charArrHashFun(ptr noundef %50)
  call void @CuAssertIntEquals_LineMsg(ptr noundef %45, ptr noundef @.str, i32 noundef 370, ptr noundef null, i32 noundef %46, i32 noundef %51)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %52

52:                                               ; preds = %44
  %53 = load i32, ptr %4, align 4, !tbaa !12
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %4, align 4, !tbaa !12
  br label %14, !llvm.loop !16

55:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 100, ptr %3) #5
  ret void
}

declare i32 @charArrHashFun(ptr noundef) #0

attributes #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 }
attributes #6 = { 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/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"ErrorTestStruct", !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


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

@.str = external hidden unnamed_addr constant [146 x i8], align 1
@ERROR_TEST = external dso_local local_unnamed_addr global ptr, align 8
@__const.testCharArrHashFun.words = external hidden unnamed_addr constant [5 x [20 x i8]], align 16

declare void @CuAssertIntEquals_LineMsg(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: nounwind uwtable
define dso_local void @testCharArrHashFun(ptr noundef %0) local_unnamed_addr #4 {
  %2 = alloca [5 x [20 x i8]], align 16
  %3 = tail call i32 @charArrHashFun(ptr noundef null) #6
  %4 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %5 = load i32, ptr %4, align 4, !tbaa !9
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 360, ptr noundef null, i32 noundef -83386157, i32 noundef %5) #6
  call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %2) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(100) %2, ptr noundef nonnull align 16 dereferenceable(100) @__const.testCharArrHashFun.words, i64 100, i1 false)
  %6 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #7
  %7 = trunc i64 %6 to i32
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %1
  %wide.trip.count = and i64 %6, 2147483647
  %min.iters.check = icmp ult i64 %wide.trip.count, 8
  br i1 %min.iters.check, label %.lr.ph.preheader111, label %vector.ph

.lr.ph.preheader111:                              ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  %.01314.ph = phi i32 [ 0, %.lr.ph.preheader ], [ %16, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.mod.vf = and i64 %6, 7
  %n.vec = sub nsw i64 %wide.trip.count, %n.mod.vf
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %13, %vector.body ]
  %vec.phi30 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %14, %vector.body ]
  %9 = getelementptr inbounds [5 x [20 x i8]], ptr %2, i64 0, i64 0, i64 %index
  %10 = getelementptr inbounds i8, ptr %9, i64 4
  %wide.load = load <4 x i8>, ptr %9, align 8, !tbaa !12
  %wide.load31 = load <4 x i8>, ptr %10, align 4, !tbaa !12
  %11 = sext <4 x i8> %wide.load to <4 x i32>
  %12 = sext <4 x i8> %wide.load31 to <4 x i32>
  %13 = add <4 x i32> %vec.phi, %11
  %14 = add <4 x i32> %vec.phi30, %12
  %index.next = add nuw i64 %index, 8
  %15 = icmp eq i64 %index.next, %n.vec
  br i1 %15, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %14, %13
  %16 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %n.mod.vf, 0
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader111

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %1
  %.013.lcssa = phi i32 [ 0, %1 ], [ %16, %middle.block ], [ %89, %.lr.ph ]
  %17 = call i32 @charArrHashFun(ptr noundef nonnull %2) #6
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 370, ptr noundef null, i32 noundef %.013.lcssa, i32 noundef %17) #6
  %18 = getelementptr inbounds i8, ptr %2, i64 20
  %19 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %18) #7
  %20 = trunc i64 %19 to i32
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph.preheader.1, label %._crit_edge.1

.lr.ph.preheader.1:                               ; preds = %._crit_edge
  %wide.trip.count.1 = and i64 %19, 2147483647
  %min.iters.check34 = icmp ult i64 %wide.trip.count.1, 8
  br i1 %min.iters.check34, label %.lr.ph.1.preheader, label %vector.ph35

vector.ph35:                                      ; preds = %.lr.ph.preheader.1
  %n.mod.vf36 = and i64 %19, 7
  %n.vec37 = sub nsw i64 %wide.trip.count.1, %n.mod.vf36
  br label %vector.body39

vector.body39:                                    ; preds = %vector.body39, %vector.ph35
  %index40 = phi i64 [ 0, %vector.ph35 ], [ %index.next45, %vector.body39 ]
  %vec.phi41 = phi <4 x i32> [ zeroinitializer, %vector.ph35 ], [ %26, %vector.body39 ]
  %vec.phi42 = phi <4 x i32> [ zeroinitializer, %vector.ph35 ], [ %27, %vector.body39 ]
  %22 = getelementptr inbounds [5 x [20 x i8]], ptr %2, i64 0, i64 1, i64 %index40
  %23 = getelementptr inbounds i8, ptr %22, i64 4
  %wide.load43 = load <4 x i8>, ptr %22, align 4, !tbaa !12
  %wide.load44 = load <4 x i8>, ptr %23, align 8, !tbaa !12
  %24 = sext <4 x i8> %wide.load43 to <4 x i32>
  %25 = sext <4 x i8> %wide.load44 to <4 x i32>
  %26 = add <4 x i32> %vec.phi41, %24
  %27 = add <4 x i32> %vec.phi42, %25
  %index.next45 = add nuw i64 %index40, 8
  %28 = icmp eq i64 %index.next45, %n.vec37
  br i1 %28, label %middle.block32, label %vector.body39, !llvm.loop !17

middle.block32:                                   ; preds = %vector.body39
  %bin.rdx46 = add <4 x i32> %27, %26
  %29 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx46)
  %cmp.n47 = icmp eq i64 %n.mod.vf36, 0
  br i1 %cmp.n47, label %._crit_edge.1, label %.lr.ph.1.preheader

.lr.ph.1.preheader:                               ; preds = %middle.block32, %.lr.ph.preheader.1
  %indvars.iv.1.ph = phi i64 [ 0, %.lr.ph.preheader.1 ], [ %n.vec37, %middle.block32 ]
  %.01314.1.ph = phi i32 [ 0, %.lr.ph.preheader.1 ], [ %29, %middle.block32 ]
  br label %.lr.ph.1

.lr.ph.1:                                         ; preds = %.lr.ph.1.preheader, %.lr.ph.1
  %indvars.iv.1 = phi i64 [ %indvars.iv.next.1, %.lr.ph.1 ], [ %indvars.iv.1.ph, %.lr.ph.1.preheader ]
  %.01314.1 = phi i32 [ %33, %.lr.ph.1 ], [ %.01314.1.ph, %.lr.ph.1.preheader ]
  %30 = getelementptr inbounds [5 x [20 x i8]], ptr %2, i64 0, i64 1, i64 %indvars.iv.1
  %31 = load i8, ptr %30, align 1, !tbaa !12
  %32 = sext i8 %31 to i32
  %33 = add nsw i32 %.01314.1, %32
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1
  %exitcond.1.not = icmp eq i64 %indvars.iv.next.1, %wide.trip.count.1
  br i1 %exitcond.1.not, label %._crit_edge.1, label %.lr.ph.1, !llvm.loop !18

._crit_edge.1:                                    ; preds = %.lr.ph.1, %middle.block32, %._crit_edge
  %.013.lcssa.1 = phi i32 [ 0, %._crit_edge ], [ %29, %middle.block32 ], [ %33, %.lr.ph.1 ]
  %34 = call i32 @charArrHashFun(ptr noundef nonnull %18) #6
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 370, ptr noundef null, i32 noundef %.013.lcssa.1, i32 noundef %34) #6
  %35 = getelementptr inbounds i8, ptr %2, i64 40
  %36 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %35) #7
  %37 = trunc i64 %36 to i32
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %.lr.ph.preheader.2, label %._crit_edge.2

.lr.ph.preheader.2:                               ; preds = %._crit_edge.1
  %wide.trip.count.2 = and i64 %36, 2147483647
  %min.iters.check51 = icmp ult i64 %wide.trip.count.2, 8
  br i1 %min.iters.check51, label %.lr.ph.2.preheader, label %vector.ph52

vector.ph52:                                      ; preds = %.lr.ph.preheader.2
  %n.mod.vf53 = and i64 %36, 7
  %n.vec54 = sub nsw i64 %wide.trip.count.2, %n.mod.vf53
  br label %vector.body56

vector.body56:                                    ; preds = %vector.body56, %vector.ph52
  %index57 = phi i64 [ 0, %vector.ph52 ], [ %index.next62, %vector.body56 ]
  %vec.phi58 = phi <4 x i32> [ zeroinitializer, %vector.ph52 ], [ %43, %vector.body56 ]
  %vec.phi59 = phi <4 x i32> [ zeroinitializer, %vector.ph52 ], [ %44, %vector.body56 ]
  %39 = getelementptr inbounds [5 x [20 x i8]], ptr %2, i64 0, i64 2, i64 %index57
  %40 = getelementptr inbounds i8, ptr %39, i64 4
  %wide.load60 = load <4 x i8>, ptr %39, align 8, !tbaa !12
  %wide.load61 = load <4 x i8>, ptr %40, align 4, !tbaa !12
  %41 = sext <4 x i8> %wide.load60 to <4 x i32>
  %42 = sext <4 x i8> %wide.load61 to <4 x i32>
  %43 = add <4 x i32> %vec.phi58, %41
  %44 = add <4 x i32> %vec.phi59, %42
  %index.next62 = add nuw i64 %index57, 8
  %45 = icmp eq i64 %index.next62, %n.vec54
  br i1 %45, label %middle.block49, label %vector.body56, !llvm.loop !19

middle.block49:                                   ; preds = %vector.body56
  %bin.rdx63 = add <4 x i32> %44, %43
  %46 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx63)
  %cmp.n64 = icmp eq i64 %n.mod.vf53, 0
  br i1 %cmp.n64, label %._crit_edge.2, label %.lr.ph.2.preheader

.lr.ph.2.preheader:                               ; preds = %middle.block49, %.lr.ph.preheader.2
  %indvars.iv.2.ph = phi i64 [ 0, %.lr.ph.preheader.2 ], [ %n.vec54, %middle.block49 ]
  %.01314.2.ph = phi i32 [ 0, %.lr.ph.preheader.2 ], [ %46, %middle.block49 ]
  br label %.lr.ph.2

.lr.ph.2:                                         ; preds = %.lr.ph.2.preheader, %.lr.ph.2
  %indvars.iv.2 = phi i64 [ %indvars.iv.next.2, %.lr.ph.2 ], [ %indvars.iv.2.ph, %.lr.ph.2.preheader ]
  %.01314.2 = phi i32 [ %50, %.lr.ph.2 ], [ %.01314.2.ph, %.lr.ph.2.preheader ]
  %47 = getelementptr inbounds [5 x [20 x i8]], ptr %2, i64 0, i64 2, i64 %indvars.iv.2
  %48 = load i8, ptr %47, align 1, !tbaa !12
  %49 = sext i8 %48 to i32
  %50 = add nsw i32 %.01314.2, %49
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.2, 1
  %exitcond.2.not = icmp eq i64 %indvars.iv.next.2, %wide.trip.count.2
  br i1 %exitcond.2.not, label %._crit_edge.2, label %.lr.ph.2, !llvm.loop !20

._crit_edge.2:                                    ; preds = %.lr.ph.2, %middle.block49, %._crit_edge.1
  %.013.lcssa.2 = phi i32 [ 0, %._crit_edge.1 ], [ %46, %middle.block49 ], [ %50, %.lr.ph.2 ]
  %51 = call i32 @charArrHashFun(ptr noundef nonnull %35) #6
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 370, ptr noundef null, i32 noundef %.013.lcssa.2, i32 noundef %51) #6
  %52 = getelementptr inbounds i8, ptr %2, i64 60
  %53 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %52) #7
  %54 = trunc i64 %53 to i32
  %55 = icmp sgt i32 %54, 0
  br i1 %55, label %.lr.ph.preheader.3, label %._crit_edge.3

.lr.ph.preheader.3:                               ; preds = %._crit_edge.2
  %wide.trip.count.3 = and i64 %53, 2147483647
  %min.iters.check68 = icmp ult i64 %wide.trip.count.3, 8
  br i1 %min.iters.check68, label %.lr.ph.3.preheader, label %vector.ph69

vector.ph69:                                      ; preds = %.lr.ph.preheader.3
  %n.mod.vf70 = and i64 %53, 7
  %n.vec71 = sub nsw i64 %wide.trip.count.3, %n.mod.vf70
  br label %vector.body73

vector.body73:                                    ; preds = %vector.body73, %vector.ph69
  %index74 = phi i64 [ 0, %vector.ph69 ], [ %index.next79, %vector.body73 ]
  %vec.phi75 = phi <4 x i32> [ zeroinitializer, %vector.ph69 ], [ %60, %vector.body73 ]
  %vec.phi76 = phi <4 x i32> [ zeroinitializer, %vector.ph69 ], [ %61, %vector.body73 ]
  %56 = getelementptr inbounds [5 x [20 x i8]], ptr %2, i64 0, i64 3, i64 %index74
  %57 = getelementptr inbounds i8, ptr %56, i64 4
  %wide.load77 = load <4 x i8>, ptr %56, align 4, !tbaa !12
  %wide.load78 = load <4 x i8>, ptr %57, align 8, !tbaa !12
  %58 = sext <4 x i8> %wide.load77 to <4 x i32>
  %59 = sext <4 x i8> %wide.load78 to <4 x i32>
  %60 = add <4 x i32> %vec.phi75, %58
  %61 = add <4 x i32> %vec.phi76, %59
  %index.next79 = add nuw i64 %index74, 8
  %62 = icmp eq i64 %index.next79, %n.vec71
  br i1 %62, label %middle.block66, label %vector.body73, !llvm.loop !21

middle.block66:                                   ; preds = %vector.body73
  %bin.rdx80 = add <4 x i32> %61, %60
  %63 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx80)
  %cmp.n81 = icmp eq i64 %n.mod.vf70, 0
  br i1 %cmp.n81, label %._crit_edge.3, label %.lr.ph.3.preheader

.lr.ph.3.preheader:                               ; preds = %middle.block66, %.lr.ph.preheader.3
  %indvars.iv.3.ph = phi i64 [ 0, %.lr.ph.preheader.3 ], [ %n.vec71, %middle.block66 ]
  %.01314.3.ph = phi i32 [ 0, %.lr.ph.preheader.3 ], [ %63, %middle.block66 ]
  br label %.lr.ph.3

.lr.ph.3:                                         ; preds = %.lr.ph.3.preheader, %.lr.ph.3
  %indvars.iv.3 = phi i64 [ %indvars.iv.next.3, %.lr.ph.3 ], [ %indvars.iv.3.ph, %.lr.ph.3.preheader ]
  %.01314.3 = phi i32 [ %67, %.lr.ph.3 ], [ %.01314.3.ph, %.lr.ph.3.preheader ]
  %64 = getelementptr inbounds [5 x [20 x i8]], ptr %2, i64 0, i64 3, i64 %indvars.iv.3
  %65 = load i8, ptr %64, align 1, !tbaa !12
  %66 = sext i8 %65 to i32
  %67 = add nsw i32 %.01314.3, %66
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv.3, 1
  %exitcond.3.not = icmp eq i64 %indvars.iv.next.3, %wide.trip.count.3
  br i1 %exitcond.3.not, label %._crit_edge.3, label %.lr.ph.3, !llvm.loop !22

._crit_edge.3:                                    ; preds = %.lr.ph.3, %middle.block66, %._crit_edge.2
  %.013.lcssa.3 = phi i32 [ 0, %._crit_edge.2 ], [ %63, %middle.block66 ], [ %67, %.lr.ph.3 ]
  %68 = call i32 @charArrHashFun(ptr noundef nonnull %52) #6
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 370, ptr noundef null, i32 noundef %.013.lcssa.3, i32 noundef %68) #6
  %69 = getelementptr inbounds i8, ptr %2, i64 80
  %70 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %69) #7
  %71 = trunc i64 %70 to i32
  %72 = icmp sgt i32 %71, 0
  br i1 %72, label %.lr.ph.preheader.4, label %._crit_edge.4

.lr.ph.preheader.4:                               ; preds = %._crit_edge.3
  %wide.trip.count.4 = and i64 %70, 2147483647
  %min.iters.check85 = icmp ult i64 %wide.trip.count.4, 8
  br i1 %min.iters.check85, label %.lr.ph.4.preheader, label %vector.ph86

vector.ph86:                                      ; preds = %.lr.ph.preheader.4
  %n.mod.vf87 = and i64 %70, 7
  %n.vec88 = sub nsw i64 %wide.trip.count.4, %n.mod.vf87
  br label %vector.body90

vector.body90:                                    ; preds = %vector.body90, %vector.ph86
  %index91 = phi i64 [ 0, %vector.ph86 ], [ %index.next96, %vector.body90 ]
  %vec.phi92 = phi <4 x i32> [ zeroinitializer, %vector.ph86 ], [ %77, %vector.body90 ]
  %vec.phi93 = phi <4 x i32> [ zeroinitializer, %vector.ph86 ], [ %78, %vector.body90 ]
  %73 = getelementptr inbounds [5 x [20 x i8]], ptr %2, i64 0, i64 4, i64 %index91
  %74 = getelementptr inbounds i8, ptr %73, i64 4
  %wide.load94 = load <4 x i8>, ptr %73, align 8, !tbaa !12
  %wide.load95 = load <4 x i8>, ptr %74, align 4, !tbaa !12
  %75 = sext <4 x i8> %wide.load94 to <4 x i32>
  %76 = sext <4 x i8> %wide.load95 to <4 x i32>
  %77 = add <4 x i32> %vec.phi92, %75
  %78 = add <4 x i32> %vec.phi93, %76
  %index.next96 = add nuw i64 %index91, 8
  %79 = icmp eq i64 %index.next96, %n.vec88
  br i1 %79, label %middle.block83, label %vector.body90, !llvm.loop !23

middle.block83:                                   ; preds = %vector.body90
  %bin.rdx97 = add <4 x i32> %78, %77
  %80 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx97)
  %cmp.n98 = icmp eq i64 %n.mod.vf87, 0
  br i1 %cmp.n98, label %._crit_edge.4, label %.lr.ph.4.preheader

.lr.ph.4.preheader:                               ; preds = %middle.block83, %.lr.ph.preheader.4
  %indvars.iv.4.ph = phi i64 [ 0, %.lr.ph.preheader.4 ], [ %n.vec88, %middle.block83 ]
  %.01314.4.ph = phi i32 [ 0, %.lr.ph.preheader.4 ], [ %80, %middle.block83 ]
  br label %.lr.ph.4

.lr.ph.4:                                         ; preds = %.lr.ph.4.preheader, %.lr.ph.4
  %indvars.iv.4 = phi i64 [ %indvars.iv.next.4, %.lr.ph.4 ], [ %indvars.iv.4.ph, %.lr.ph.4.preheader ]
  %.01314.4 = phi i32 [ %84, %.lr.ph.4 ], [ %.01314.4.ph, %.lr.ph.4.preheader ]
  %81 = getelementptr inbounds [5 x [20 x i8]], ptr %2, i64 0, i64 4, i64 %indvars.iv.4
  %82 = load i8, ptr %81, align 1, !tbaa !12
  %83 = sext i8 %82 to i32
  %84 = add nsw i32 %.01314.4, %83
  %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv.4, 1
  %exitcond.4.not = icmp eq i64 %indvars.iv.next.4, %wide.trip.count.4
  br i1 %exitcond.4.not, label %._crit_edge.4, label %.lr.ph.4, !llvm.loop !24

._crit_edge.4:                                    ; preds = %.lr.ph.4, %middle.block83, %._crit_edge.3
  %.013.lcssa.4 = phi i32 [ 0, %._crit_edge.3 ], [ %80, %middle.block83 ], [ %84, %.lr.ph.4 ]
  %85 = call i32 @charArrHashFun(ptr noundef nonnull %69) #6
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 370, ptr noundef null, i32 noundef %.013.lcssa.4, i32 noundef %85) #6
  call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %2) #6
  ret void

.lr.ph:                                           ; preds = %.lr.ph.preheader111, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader111 ]
  %.01314 = phi i32 [ %89, %.lr.ph ], [ %.01314.ph, %.lr.ph.preheader111 ]
  %86 = getelementptr inbounds [5 x [20 x i8]], ptr %2, i64 0, i64 0, i64 %indvars.iv
  %87 = load i8, ptr %86, align 1, !tbaa !12
  %88 = sext i8 %87 to i32
  %89 = add nsw i32 %.01314, %88
  %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 !25
}

declare i32 @charArrHashFun(ptr noundef) local_unnamed_addr #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #5

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { 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/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"ErrorTestStruct", !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!7, !7, i64 0}
!13 = distinct !{!13, !14, !15, !16}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !14, !15, !16}
!18 = distinct !{!18, !14, !16, !15}
!19 = distinct !{!19, !14, !15, !16}
!20 = distinct !{!20, !14, !16, !15}
!21 = distinct !{!21, !14, !15, !16}
!22 = distinct !{!22, !14, !16, !15}
!23 = distinct !{!23, !14, !15, !16}
!24 = distinct !{!24, !14, !16, !15}
!25 = distinct !{!25, !14, !16, !15}


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