; LLVM IR from MostafaTwfiq/C-DataStructures-And-Algorithms :: Algorithms/ArraysAlg/Sources (ArraysAlg)

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

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [31 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [33 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @nullFreeFunArrAlg(ptr 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: 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) #2

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

declare ptr @vectorInitialization(i32 noundef, ptr noundef, ptr noundef) #5

declare void @vectorAdd(ptr noundef, ptr noundef) #5

declare void @destroyVector(ptr noundef) #5

; Function Attrs: nounwind uwtable
define dso_local i32 @arrRemoveDuplicatesA(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4) #0 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = icmp eq ptr %16, null
  br i1 %17, label %18, label %21

18:                                               ; preds = %5
  %19 = load ptr, ptr @stderr, align 8, !tbaa !5
  %20 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.43) #6
  call void @exit(i32 noundef -83386157) #7
  unreachable

21:                                               ; preds = %5
  %22 = load ptr, ptr %9, align 8, !tbaa !5
  %23 = icmp eq ptr %22, null
  br i1 %23, label %24, label %27

24:                                               ; preds = %21
  %25 = load ptr, ptr @stderr, align 8, !tbaa !5
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef @.str.3, ptr noundef @.str.7, ptr noundef @.str.43) #6
  call void @exit(i32 noundef -83384987) #7
  unreachable

27:                                               ; preds = %21
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = icmp slt i32 %28, 0
  br i1 %29, label %30, label %33

30:                                               ; preds = %27
  %31 = load ptr, ptr @stderr, align 8, !tbaa !5
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef @.str.3, ptr noundef @.str.4, ptr noundef @.str.43) #6
  call void @exit(i32 noundef -83384987) #7
  unreachable

33:                                               ; preds = %27
  %34 = load i32, ptr %8, align 4, !tbaa !9
  %35 = icmp sle i32 %34, 0
  br i1 %35, label %36, label %39

36:                                               ; preds = %33
  %37 = load ptr, ptr @stderr, align 8, !tbaa !5
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef @.str.3, ptr noundef @.str.5, ptr noundef @.str.43) #6
  call void @exit(i32 noundef -83384987) #7
  unreachable

39:                                               ; preds = %33
  br label %40

40:                                               ; preds = %39
  br label %41

41:                                               ; preds = %40
  br label %42

42:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %43, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %44 = load i32, ptr %7, align 4, !tbaa !9
  %45 = sdiv i32 %44, 2
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %48

47:                                               ; preds = %42
  br label %51

48:                                               ; preds = %42
  %49 = load i32, ptr %7, align 4, !tbaa !9
  %50 = sdiv i32 %49, 2
  br label %51

51:                                               ; preds = %48, %47
  %52 = phi i32 [ 1, %47 ], [ %50, %48 ]
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  %54 = call ptr @vectorInitialization(i32 noundef %52, ptr noundef @nullFreeFunArrAlg, ptr noundef %53)
  store ptr %54, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %55

55:                                               ; preds = %110, %51
  %56 = load i32, ptr %13, align 4, !tbaa !9
  %57 = load i32, ptr %7, align 4, !tbaa !9
  %58 = icmp slt i32 %56, %57
  br i1 %58, label %59, label %111

59:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %60 = load ptr, ptr %11, align 8, !tbaa !5
  %61 = load i32, ptr %13, align 4, !tbaa !9
  %62 = load i32, ptr %8, align 4, !tbaa !9
  %63 = mul nsw i32 %61, %62
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds i8, ptr %60, i64 %64
  store ptr %65, ptr %14, align 8, !tbaa !5
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = load ptr, ptr %14, align 8, !tbaa !5
  %68 = call i32 @vectorContains(ptr noundef %66, ptr noundef %67)
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %70, label %105

70:                                               ; preds = %59
  %71 = load i32, ptr %7, align 4, !tbaa !9
  %72 = add nsw i32 %71, -1
  store i32 %72, ptr %7, align 4, !tbaa !9
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = icmp ne ptr %73, null
  br i1 %74, label %75, label %78

75:                                               ; preds = %70
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = load ptr, ptr %14, align 8, !tbaa !5
  call void %76(ptr noundef %77)
  br label %78

78:                                               ; preds = %75, %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %79 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %79, ptr %15, align 4, !tbaa !9
  br label %80

80:                                               ; preds = %101, %78
  %81 = load i32, ptr %15, align 4, !tbaa !9
  %82 = load i32, ptr %7, align 4, !tbaa !9
  %83 = icmp slt i32 %81, %82
  br i1 %83, label %85, label %84

84:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %104

85:                                               ; preds = %80
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = load i32, ptr %15, align 4, !tbaa !9
  %88 = load i32, ptr %8, align 4, !tbaa !9
  %89 = mul nsw i32 %87, %88
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds i8, ptr %86, i64 %90
  %92 = load ptr, ptr %11, align 8, !tbaa !5
  %93 = load i32, ptr %15, align 4, !tbaa !9
  %94 = add nsw i32 %93, 1
  %95 = load i32, ptr %8, align 4, !tbaa !9
  %96 = mul nsw i32 %94, %95
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds i8, ptr %92, i64 %97
  %99 = load i32, ptr %8, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %91, ptr align 1 %98, i64 %100, i1 false)
  br label %101

101:                                              ; preds = %85
  %102 = load i32, ptr %15, align 4, !tbaa !9
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %15, align 4, !tbaa !9
  br label %80, !llvm.loop !11

104:                                              ; preds = %84
  br label %110

105:                                              ; preds = %59
  %106 = load ptr, ptr %12, align 8, !tbaa !5
  %107 = load ptr, ptr %14, align 8, !tbaa !5
  call void @vectorAdd(ptr noundef %106, ptr noundef %107)
  %108 = load i32, ptr %13, align 4, !tbaa !9
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %13, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %105, %104
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %55, !llvm.loop !13

111:                                              ; preds = %55
  %112 = load ptr, ptr %12, align 8, !tbaa !5
  call void @destroyVector(ptr noundef %112)
  %113 = load i32, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  ret i32 %113
}

declare i32 @vectorContains(ptr noundef, ptr noundef) #5

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [31 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [33 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @nullFreeFunArrAlg(ptr noundef) #0

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

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

declare ptr @vectorInitialization(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @vectorAdd(ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @destroyVector(ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local i32 @arrRemoveDuplicatesA(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef readonly %4) local_unnamed_addr #0 {
  %6 = icmp eq ptr %0, null
  br i1 %6, label %7, label %10

7:                                                ; preds = %5
  %8 = load ptr, ptr @stderr, align 8, !tbaa !5
  %9 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %8, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.43) #5
  tail call void @exit(i32 noundef -83386157) #6
  unreachable

10:                                               ; preds = %5
  %11 = icmp eq ptr %3, null
  br i1 %11, label %12, label %15

12:                                               ; preds = %10
  %13 = load ptr, ptr @stderr, align 8, !tbaa !5
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.43) #5
  tail call void @exit(i32 noundef -83384987) #6
  unreachable

15:                                               ; preds = %10
  %16 = icmp slt i32 %1, 0
  br i1 %16, label %17, label %20

17:                                               ; preds = %15
  %18 = load ptr, ptr @stderr, align 8, !tbaa !5
  %19 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.43) #5
  tail call void @exit(i32 noundef -83384987) #6
  unreachable

20:                                               ; preds = %15
  %21 = icmp slt i32 %2, 1
  br i1 %21, label %22, label %25

22:                                               ; preds = %20
  %23 = load ptr, ptr @stderr, align 8, !tbaa !5
  %24 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.43) #5
  tail call void @exit(i32 noundef -83384987) #6
  unreachable

25:                                               ; preds = %20
  %26 = lshr i32 %1, 1
  %.inv = icmp ugt i32 %1, 1
  %spec.select = select i1 %.inv, i32 %26, i32 1
  %27 = tail call ptr @vectorInitialization(i32 noundef %spec.select, ptr noundef nonnull @nullFreeFunArrAlg, ptr noundef nonnull %3) #7
  %.not49 = icmp eq i32 %1, 0
  br i1 %.not49, label %._crit_edge, label %.lr.ph48

.lr.ph48:                                         ; preds = %25
  %.not44 = icmp eq ptr %4, null
  %28 = zext nneg i32 %2 to i64
  %29 = zext nneg i32 %2 to i64
  br i1 %.not44, label %.lr.ph48.split.us, label %.lr.ph48.split

.lr.ph48.split.us:                                ; preds = %.lr.ph48, %.loopexit.us
  %.03447.us = phi i32 [ %.1.us, %.loopexit.us ], [ %1, %.lr.ph48 ]
  %.03546.us = phi i32 [ %.136.us, %.loopexit.us ], [ 0, %.lr.ph48 ]
  %30 = mul nsw i32 %.03546.us, %2
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds i8, ptr %0, i64 %31
  %33 = tail call i32 @vectorContains(ptr noundef %27, ptr noundef nonnull %32) #7
  %.not.us = icmp eq i32 %33, 0
  br i1 %.not.us, label %53, label %34

34:                                               ; preds = %.lr.ph48.split.us
  %35 = add nsw i32 %.03447.us, -1
  %36 = icmp slt i32 %.03546.us, %35
  br i1 %36, label %.lr.ph.us.preheader, label %.loopexit.us

.lr.ph.us.preheader:                              ; preds = %34
  %37 = sext i32 %.03546.us to i64
  %wide.trip.count55 = sext i32 %35 to i64
  %38 = sub nsw i64 %wide.trip.count55, %37
  %xtraiter60 = and i64 %38, 1
  %lcmp.mod61.not = icmp eq i64 %xtraiter60, 0
  br i1 %lcmp.mod61.not, label %.lr.ph.us.prol.loopexit, label %.lr.ph.us.prol

.lr.ph.us.prol:                                   ; preds = %.lr.ph.us.preheader
  %39 = mul nsw i64 %37, %29
  %40 = getelementptr inbounds i8, ptr %0, i64 %39
  %indvars.iv.next53.prol = add nsw i64 %37, 1
  %41 = mul nsw i64 %indvars.iv.next53.prol, %29
  %42 = getelementptr inbounds i8, ptr %0, i64 %41
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %40, ptr nonnull align 1 %42, i64 %28, i1 false)
  br label %.lr.ph.us.prol.loopexit

.lr.ph.us.prol.loopexit:                          ; preds = %.lr.ph.us.prol, %.lr.ph.us.preheader
  %indvars.iv52.unr = phi i64 [ %37, %.lr.ph.us.preheader ], [ %indvars.iv.next53.prol, %.lr.ph.us.prol ]
  %43 = add nsw i64 %wide.trip.count55, -1
  %44 = icmp eq i64 %43, %37
  br i1 %44, label %.loopexit.us, label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.prol.loopexit, %.lr.ph.us
  %indvars.iv52 = phi i64 [ %indvars.iv.next53.1, %.lr.ph.us ], [ %indvars.iv52.unr, %.lr.ph.us.prol.loopexit ]
  %45 = mul nsw i64 %indvars.iv52, %29
  %46 = getelementptr inbounds i8, ptr %0, i64 %45
  %indvars.iv.next53 = add nsw i64 %indvars.iv52, 1
  %47 = mul nsw i64 %indvars.iv.next53, %29
  %48 = getelementptr inbounds i8, ptr %0, i64 %47
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %46, ptr nonnull align 1 %48, i64 %28, i1 false)
  %49 = mul nsw i64 %indvars.iv.next53, %29
  %50 = getelementptr inbounds i8, ptr %0, i64 %49
  %indvars.iv.next53.1 = add nsw i64 %indvars.iv52, 2
  %51 = mul nsw i64 %indvars.iv.next53.1, %29
  %52 = getelementptr inbounds i8, ptr %0, i64 %51
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %50, ptr nonnull align 1 %52, i64 %28, i1 false)
  %exitcond56.not.1 = icmp eq i64 %indvars.iv.next53.1, %wide.trip.count55
  br i1 %exitcond56.not.1, label %.loopexit.us, label %.lr.ph.us, !llvm.loop !9

53:                                               ; preds = %.lr.ph48.split.us
  tail call void @vectorAdd(ptr noundef %27, ptr noundef nonnull %32) #7
  %54 = add nsw i32 %.03546.us, 1
  br label %.loopexit.us

.loopexit.us:                                     ; preds = %.lr.ph.us.prol.loopexit, %.lr.ph.us, %34, %53
  %.136.us = phi i32 [ %54, %53 ], [ %.03546.us, %34 ], [ %.03546.us, %.lr.ph.us ], [ %.03546.us, %.lr.ph.us.prol.loopexit ]
  %.1.us = phi i32 [ %.03447.us, %53 ], [ %35, %34 ], [ %35, %.lr.ph.us ], [ %35, %.lr.ph.us.prol.loopexit ]
  %55 = icmp slt i32 %.136.us, %.1.us
  br i1 %55, label %.lr.ph48.split.us, label %._crit_edge, !llvm.loop !11

.lr.ph48.split:                                   ; preds = %.lr.ph48, %.loopexit
  %.03447 = phi i32 [ %.1, %.loopexit ], [ %1, %.lr.ph48 ]
  %.03546 = phi i32 [ %.136, %.loopexit ], [ 0, %.lr.ph48 ]
  %56 = mul nsw i32 %.03546, %2
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds i8, ptr %0, i64 %57
  %59 = tail call i32 @vectorContains(ptr noundef %27, ptr noundef nonnull %58) #7
  %.not = icmp eq i32 %59, 0
  br i1 %.not, label %79, label %60

60:                                               ; preds = %.lr.ph48.split
  %61 = add nsw i32 %.03447, -1
  tail call void %4(ptr noundef nonnull %58) #7
  %62 = icmp slt i32 %.03546, %61
  br i1 %62, label %.lr.ph.preheader, label %.loopexit

.lr.ph.preheader:                                 ; preds = %60
  %63 = sext i32 %.03546 to i64
  %wide.trip.count = sext i32 %61 to i64
  %64 = sub nsw i64 %wide.trip.count, %63
  %xtraiter = and i64 %64, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader
  %65 = mul nsw i64 %63, %29
  %66 = getelementptr inbounds i8, ptr %0, i64 %65
  %indvars.iv.next.prol = add nsw i64 %63, 1
  %67 = mul nsw i64 %indvars.iv.next.prol, %29
  %68 = getelementptr inbounds i8, ptr %0, i64 %67
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %66, ptr nonnull align 1 %68, i64 %28, i1 false)
  br label %.lr.ph.prol.loopexit

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ %63, %.lr.ph.preheader ], [ %indvars.iv.next.prol, %.lr.ph.prol ]
  %69 = add nsw i64 %wide.trip.count, -1
  %70 = icmp eq i64 %69, %63
  br i1 %70, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %.lr.ph ], [ %indvars.iv.unr, %.lr.ph.prol.loopexit ]
  %71 = mul nsw i64 %indvars.iv, %29
  %72 = getelementptr inbounds i8, ptr %0, i64 %71
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %73 = mul nsw i64 %indvars.iv.next, %29
  %74 = getelementptr inbounds i8, ptr %0, i64 %73
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %72, ptr nonnull align 1 %74, i64 %28, i1 false)
  %75 = mul nsw i64 %indvars.iv.next, %29
  %76 = getelementptr inbounds i8, ptr %0, i64 %75
  %indvars.iv.next.1 = add nsw i64 %indvars.iv, 2
  %77 = mul nsw i64 %indvars.iv.next.1, %29
  %78 = getelementptr inbounds i8, ptr %0, i64 %77
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %76, ptr nonnull align 1 %78, i64 %28, i1 false)
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond.not.1, label %.loopexit, label %.lr.ph, !llvm.loop !9

79:                                               ; preds = %.lr.ph48.split
  tail call void @vectorAdd(ptr noundef %27, ptr noundef nonnull %58) #7
  %80 = add nsw i32 %.03546, 1
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %60, %79
  %.136 = phi i32 [ %80, %79 ], [ %.03546, %60 ], [ %.03546, %.lr.ph ], [ %.03546, %.lr.ph.prol.loopexit ]
  %.1 = phi i32 [ %.03447, %79 ], [ %61, %60 ], [ %61, %.lr.ph ], [ %61, %.lr.ph.prol.loopexit ]
  %81 = icmp slt i32 %.136, %.1
  br i1 %81, label %.lr.ph48.split, label %._crit_edge, !llvm.loop !11

._crit_edge:                                      ; preds = %.loopexit, %.loopexit.us, %25
  %.034.lcssa = phi i32 [ 0, %25 ], [ %.1.us, %.loopexit.us ], [ %.1, %.loopexit ]
  tail call void @destroyVector(ptr noundef %27) #7
  ret i32 %.034.lcssa
}

declare i32 @vectorContains(ptr noundef, ptr noundef) local_unnamed_addr #4

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


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