; 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.6 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [28 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @intCmpArrAlg(ptr noundef, ptr noundef) #0

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

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

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

23:                                               ; preds = %4
  %24 = load ptr, ptr @stderr, align 8, !tbaa !5
  %25 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.6) #5
  call void @exit(i32 noundef -83386157) #6
  unreachable

26:                                               ; preds = %4
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %32

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

32:                                               ; preds = %26
  %33 = load i32, ptr %6, align 4, !tbaa !9
  %34 = icmp slt i32 %33, 0
  br i1 %34, label %35, label %38

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

38:                                               ; preds = %32
  %39 = load i32, ptr %7, align 4, !tbaa !9
  %40 = icmp sle i32 %39, 0
  br i1 %40, label %41, label %44

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

44:                                               ; preds = %38
  br label %45

45:                                               ; preds = %44
  br label %46

46:                                               ; preds = %45
  br label %47

47:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %48, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %49 = load i32, ptr %6, align 4, !tbaa !9
  %50 = sdiv i32 %49, 2
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %52, label %53

52:                                               ; preds = %47
  br label %56

53:                                               ; preds = %47
  %54 = load i32, ptr %6, align 4, !tbaa !9
  %55 = sdiv i32 %54, 2
  br label %56

56:                                               ; preds = %53, %52
  %57 = phi i32 [ 1, %52 ], [ %55, %53 ]
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = call ptr @vectorInitialization(i32 noundef %57, ptr noundef @nullFreeFunArrAlg, ptr noundef %58)
  store ptr %59, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %60 = load i32, ptr %6, align 4, !tbaa !9
  %61 = sdiv i32 %60, 2
  %62 = icmp eq i32 %61, 0
  br i1 %62, label %63, label %64

63:                                               ; preds = %56
  br label %67

64:                                               ; preds = %56
  %65 = load i32, ptr %6, align 4, !tbaa !9
  %66 = sdiv i32 %65, 2
  br label %67

67:                                               ; preds = %64, %63
  %68 = phi i32 [ 1, %63 ], [ %66, %64 ]
  %69 = call ptr @vectorInitialization(i32 noundef %68, ptr noundef @intFreeFunArrAlg, ptr noundef @intCmpArrAlg)
  store ptr %69, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 1, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %70

70:                                               ; preds = %100, %67
  %71 = load i32, ptr %13, align 4, !tbaa !9
  %72 = load i32, ptr %6, align 4, !tbaa !9
  %73 = icmp slt i32 %71, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %103

75:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = load i32, ptr %13, align 4, !tbaa !9
  %78 = load i32, ptr %7, align 4, !tbaa !9
  %79 = mul nsw i32 %77, %78
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds i8, ptr %76, i64 %80
  store ptr %81, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  %83 = load ptr, ptr %14, align 8, !tbaa !5
  %84 = call i32 @vectorGetIndex(ptr noundef %82, ptr noundef %83)
  store i32 %84, ptr %15, align 4, !tbaa !9
  %85 = load i32, ptr %15, align 4, !tbaa !9
  %86 = icmp eq i32 %85, -1
  br i1 %86, label %87, label %92

87:                                               ; preds = %75
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = load ptr, ptr %14, align 8, !tbaa !5
  call void @vectorAdd(ptr noundef %88, ptr noundef %89)
  %90 = load ptr, ptr %11, align 8, !tbaa !5
  %91 = call ptr @generateIntPointerArrAlg(ptr noundef %12)
  call void @vectorAdd(ptr noundef %90, ptr noundef %91)
  br label %99

92:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  %94 = load i32, ptr %15, align 4, !tbaa !9
  %95 = call ptr @vectorGet(ptr noundef %93, i32 noundef %94)
  store ptr %95, ptr %16, align 8, !tbaa !5
  %96 = load ptr, ptr %16, align 8, !tbaa !5
  %97 = load i32, ptr %96, align 4, !tbaa !9
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %96, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %99

99:                                               ; preds = %92, %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %100

100:                                              ; preds = %99
  %101 = load i32, ptr %13, align 4, !tbaa !9
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %13, align 4, !tbaa !9
  br label %70, !llvm.loop !11

103:                                              ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  store ptr null, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 -1, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 -1, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %104

104:                                              ; preds = %124, %103
  %105 = load i32, ptr %20, align 4, !tbaa !9
  %106 = load ptr, ptr %11, align 8, !tbaa !5
  %107 = call i32 @vectorGetLength(ptr noundef %106)
  %108 = icmp slt i32 %105, %107
  br i1 %108, label %110, label %109

109:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %127

110:                                              ; preds = %104
  %111 = load i32, ptr %18, align 4, !tbaa !9
  %112 = load ptr, ptr %11, align 8, !tbaa !5
  %113 = load i32, ptr %20, align 4, !tbaa !9
  %114 = call ptr @vectorGet(ptr noundef %112, i32 noundef %113)
  %115 = load i32, ptr %114, align 4, !tbaa !9
  %116 = icmp slt i32 %111, %115
  br i1 %116, label %117, label %123

117:                                              ; preds = %110
  %118 = load ptr, ptr %11, align 8, !tbaa !5
  %119 = load i32, ptr %20, align 4, !tbaa !9
  %120 = call ptr @vectorGet(ptr noundef %118, i32 noundef %119)
  %121 = load i32, ptr %120, align 4, !tbaa !9
  store i32 %121, ptr %18, align 4, !tbaa !9
  %122 = load i32, ptr %20, align 4, !tbaa !9
  store i32 %122, ptr %19, align 4, !tbaa !9
  br label %123

123:                                              ; preds = %117, %110
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %20, align 4, !tbaa !9
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %20, align 4, !tbaa !9
  br label %104, !llvm.loop !13

127:                                              ; preds = %109
  %128 = load i32, ptr %19, align 4, !tbaa !9
  %129 = icmp ne i32 %128, -1
  br i1 %129, label %130, label %134

130:                                              ; preds = %127
  %131 = load ptr, ptr %10, align 8, !tbaa !5
  %132 = load i32, ptr %19, align 4, !tbaa !9
  %133 = call ptr @vectorGet(ptr noundef %131, i32 noundef %132)
  store ptr %133, ptr %17, align 8, !tbaa !5
  br label %134

134:                                              ; preds = %130, %127
  %135 = load ptr, ptr %10, align 8, !tbaa !5
  call void @destroyVector(ptr noundef %135)
  %136 = load ptr, ptr %11, align 8, !tbaa !5
  call void @destroyVector(ptr noundef %136)
  %137 = load ptr, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  ret ptr %137
}

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

declare i32 @vectorGetIndex(ptr noundef, ptr noundef) #4

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

declare ptr @vectorGet(ptr noundef, i32 noundef) #4

declare i32 @vectorGetLength(ptr noundef) #4

declare void @destroyVector(ptr noundef) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { nounwind }
attributes #6 = { 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.6 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [28 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @intCmpArrAlg(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @generateIntPointerArrAlg(ptr 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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

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

7:                                                ; preds = %4
  %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.6) #5
  tail call void @exit(i32 noundef -83386157) #6
  unreachable

10:                                               ; preds = %4
  %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.6) #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.6) #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.6) #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
  %28 = tail call ptr @vectorInitialization(i32 noundef %spec.select, ptr noundef nonnull @intFreeFunArrAlg, ptr noundef nonnull @intCmpArrAlg) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 1, ptr %5, align 4, !tbaa !9
  %.not56 = icmp eq i32 %1, 0
  br i1 %.not56, label %.preheader, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %25
  %29 = zext nneg i32 %2 to i64
  %wide.trip.count = zext nneg i32 %1 to i64
  br label %.lr.ph

.preheader:                                       ; preds = %42, %25
  %30 = call i32 @vectorGetLength(ptr noundef %28) #7
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %.lr.ph55, label %._crit_edge.thread

.lr.ph:                                           ; preds = %.lr.ph.preheader, %42
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %42 ]
  %32 = mul nuw nsw i64 %indvars.iv, %29
  %33 = getelementptr inbounds i8, ptr %0, i64 %32
  %34 = call i32 @vectorGetIndex(ptr noundef %27, ptr noundef nonnull %33) #7
  %35 = icmp eq i32 %34, -1
  br i1 %35, label %36, label %38

36:                                               ; preds = %.lr.ph
  call void @vectorAdd(ptr noundef %27, ptr noundef nonnull %33) #7
  %37 = call ptr @generateIntPointerArrAlg(ptr noundef nonnull %5)
  call void @vectorAdd(ptr noundef %28, ptr noundef %37) #7
  br label %42

38:                                               ; preds = %.lr.ph
  %39 = call ptr @vectorGet(ptr noundef %28, i32 noundef %34) #7
  %40 = load i32, ptr %39, align 4, !tbaa !9
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %39, align 4, !tbaa !9
  br label %42

42:                                               ; preds = %38, %36
  %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 %.preheader, label %.lr.ph, !llvm.loop !11

._crit_edge:                                      ; preds = %49
  %.not = icmp eq i32 %.1, -1
  br i1 %.not, label %._crit_edge.thread, label %53

.lr.ph55:                                         ; preds = %.preheader, %49
  %.054 = phi i32 [ %50, %49 ], [ 0, %.preheader ]
  %.03953 = phi i32 [ %.1, %49 ], [ -1, %.preheader ]
  %.04052 = phi i32 [ %.141, %49 ], [ -1, %.preheader ]
  %43 = call ptr @vectorGet(ptr noundef %28, i32 noundef %.054) #7
  %44 = load i32, ptr %43, align 4, !tbaa !9
  %45 = icmp slt i32 %.04052, %44
  br i1 %45, label %46, label %49

46:                                               ; preds = %.lr.ph55
  %47 = call ptr @vectorGet(ptr noundef %28, i32 noundef %.054) #7
  %48 = load i32, ptr %47, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %.lr.ph55, %46
  %.141 = phi i32 [ %48, %46 ], [ %.04052, %.lr.ph55 ]
  %.1 = phi i32 [ %.054, %46 ], [ %.03953, %.lr.ph55 ]
  %50 = add nuw nsw i32 %.054, 1
  %51 = call i32 @vectorGetLength(ptr noundef %28) #7
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %.lr.ph55, label %._crit_edge, !llvm.loop !13

53:                                               ; preds = %._crit_edge
  %54 = call ptr @vectorGet(ptr noundef %27, i32 noundef %.1) #7
  br label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %.preheader, %53, %._crit_edge
  %.042 = phi ptr [ %54, %53 ], [ null, %._crit_edge ], [ null, %.preheader ]
  call void @destroyVector(ptr noundef %27) #7
  call void @destroyVector(ptr noundef %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  ret ptr %.042
}

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

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

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

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

declare i32 @vectorGetLength(ptr noundef) local_unnamed_addr #4

declare void @destroyVector(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 nosync 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 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


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