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

%struct.Entry = type { ptr, ptr, ptr, ptr }

@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
@.str.8 = external hidden unnamed_addr constant [22 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
declare void @free(ptr noundef) #1

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @mostFrequentArrValueH(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 i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = 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
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = icmp eq ptr %22, null
  br i1 %23, label %24, label %27

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

27:                                               ; preds = %5
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  %29 = icmp eq ptr %28, null
  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.7, ptr noundef @.str.6) #5
  call void @exit(i32 noundef -83384987) #6
  unreachable

33:                                               ; preds = %27
  %34 = load i32, ptr %7, align 4, !tbaa !9
  %35 = icmp slt 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.4, ptr noundef @.str.6) #5
  call void @exit(i32 noundef -83384987) #6
  unreachable

39:                                               ; preds = %33
  %40 = load i32, ptr %8, align 4, !tbaa !9
  %41 = icmp sle i32 %40, 0
  br i1 %41, label %42, label %45

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

45:                                               ; preds = %39
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = icmp eq ptr %46, null
  br i1 %47, label %48, label %51

48:                                               ; preds = %45
  %49 = load ptr, ptr @stderr, align 8, !tbaa !5
  %50 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef @.str.3, ptr noundef @.str.8, ptr noundef @.str.6) #5
  call void @exit(i32 noundef -83384987) #6
  unreachable

51:                                               ; preds = %45
  br label %52

52:                                               ; preds = %51
  br label %53

53:                                               ; preds = %52
  br label %54

54:                                               ; preds = %53
  br label %55

55:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %56, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = call ptr @hashMapInitialization(ptr noundef @nullFreeFunArrAlg, ptr noundef @intFreeFunArrAlg, ptr noundef %57, ptr noundef %58)
  store ptr %59, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 1, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %86, %55
  %61 = load i32, ptr %14, align 4, !tbaa !9
  %62 = load i32, ptr %7, align 4, !tbaa !9
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %65, label %64

64:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %89

65:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  %67 = load i32, ptr %14, align 4, !tbaa !9
  %68 = load i32, ptr %8, align 4, !tbaa !9
  %69 = mul nsw i32 %67, %68
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds i8, ptr %66, i64 %70
  store ptr %71, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  %73 = load ptr, ptr %15, align 8, !tbaa !5
  %74 = call ptr @hashMapGet(ptr noundef %72, ptr noundef %73)
  store ptr %74, ptr %16, align 8, !tbaa !5
  %75 = load ptr, ptr %16, align 8, !tbaa !5
  %76 = icmp eq ptr %75, null
  br i1 %76, label %77, label %81

77:                                               ; preds = %65
  %78 = load ptr, ptr %12, align 8, !tbaa !5
  %79 = load ptr, ptr %15, align 8, !tbaa !5
  %80 = call ptr @generateIntPointerArrAlg(ptr noundef %13)
  call void @hashMapInsert(ptr noundef %78, ptr noundef %79, ptr noundef %80)
  br label %85

81:                                               ; preds = %65
  %82 = load ptr, ptr %16, align 8, !tbaa !5
  %83 = load i32, ptr %82, align 4, !tbaa !9
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %82, align 4, !tbaa !9
  br label %85

85:                                               ; preds = %81, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %86

86:                                               ; preds = %85
  %87 = load i32, ptr %14, align 4, !tbaa !9
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %14, align 4, !tbaa !9
  br label %60, !llvm.loop !11

89:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %90 = load ptr, ptr %12, align 8, !tbaa !5
  %91 = call ptr @hashMapToEntryArray(ptr noundef %90)
  store ptr %91, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  store ptr null, ptr %18, align 8, !tbaa !5
  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
  %92 = load ptr, ptr %12, align 8, !tbaa !5
  %93 = call i32 @hashMapGetLength(ptr noundef %92)
  store i32 %93, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %94

94:                                               ; preds = %135, %89
  %95 = load i32, ptr %21, align 4, !tbaa !9
  %96 = load i32, ptr %20, align 4, !tbaa !9
  %97 = icmp slt i32 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %138

99:                                               ; preds = %94
  %100 = load i32, ptr %19, align 4, !tbaa !9
  %101 = load ptr, ptr %17, align 8, !tbaa !5
  %102 = load i32, ptr %21, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds ptr, ptr %101, i64 %103
  %105 = load ptr, ptr %104, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.Entry, ptr %105, i32 0, i32 1
  %107 = load ptr, ptr %106, align 8, !tbaa !13
  %108 = load i32, ptr %107, align 4, !tbaa !9
  %109 = icmp slt i32 %100, %108
  br i1 %109, label %110, label %126

110:                                              ; preds = %99
  %111 = load ptr, ptr %17, align 8, !tbaa !5
  %112 = load i32, ptr %21, align 4, !tbaa !9
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds ptr, ptr %111, i64 %113
  %115 = load ptr, ptr %114, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.Entry, ptr %115, i32 0, i32 0
  %117 = load ptr, ptr %116, align 8, !tbaa !15
  store ptr %117, ptr %18, align 8, !tbaa !5
  %118 = load ptr, ptr %17, align 8, !tbaa !5
  %119 = load i32, ptr %21, align 4, !tbaa !9
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds ptr, ptr %118, i64 %120
  %122 = load ptr, ptr %121, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.Entry, ptr %122, i32 0, i32 1
  %124 = load ptr, ptr %123, align 8, !tbaa !13
  %125 = load i32, ptr %124, align 4, !tbaa !9
  store i32 %125, ptr %19, align 4, !tbaa !9
  br label %126

126:                                              ; preds = %110, %99
  %127 = load ptr, ptr %12, align 8, !tbaa !5
  %128 = load ptr, ptr %17, align 8, !tbaa !5
  %129 = load i32, ptr %21, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds ptr, ptr %128, i64 %130
  %132 = load ptr, ptr %131, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.Entry, ptr %132, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8, !tbaa !15
  call void @hashMapDelete(ptr noundef %127, ptr noundef %134)
  br label %135

135:                                              ; preds = %126
  %136 = load i32, ptr %21, align 4, !tbaa !9
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %21, align 4, !tbaa !9
  br label %94, !llvm.loop !16

138:                                              ; preds = %98
  %139 = load ptr, ptr %17, align 8, !tbaa !5
  call void @free(ptr noundef %139) #5
  %140 = load ptr, ptr %12, align 8, !tbaa !5
  call void @destroyHashMap(ptr noundef %140)
  %141 = load ptr, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  ret ptr %141
}

declare ptr @hashMapInitialization(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

declare ptr @hashMapGet(ptr noundef, ptr noundef) #4

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

declare ptr @hashMapToEntryArray(ptr noundef) #4

declare i32 @hashMapGetLength(ptr noundef) #4

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

declare void @destroyHashMap(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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!14, !6, i64 8}
!14 = !{!"Entry", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!14, !6, i64 0}
!16 = distinct !{!16, !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
@.str.8 = external hidden unnamed_addr constant [22 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: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #1

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

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

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

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

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

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

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

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

16:                                               ; preds = %11
  %17 = icmp slt i32 %1, 0
  br i1 %17, label %18, label %21

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

21:                                               ; preds = %16
  %22 = icmp slt i32 %2, 1
  br i1 %22, label %23, label %26

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

26:                                               ; preds = %21
  %27 = icmp eq ptr %4, null
  br i1 %27, label %28, label %31

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

31:                                               ; preds = %26
  %32 = tail call ptr @hashMapInitialization(ptr noundef nonnull @nullFreeFunArrAlg, ptr noundef nonnull @intFreeFunArrAlg, ptr noundef nonnull %3, ptr noundef nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #9
  store i32 1, ptr %6, align 4, !tbaa !9
  %.not = icmp eq i32 %1, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph.preheader

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

._crit_edge:                                      ; preds = %46, %31
  %34 = call ptr @hashMapToEntryArray(ptr noundef %32) #9
  %35 = call i32 @hashMapGetLength(ptr noundef %32) #9
  %36 = icmp sgt i32 %35, 0
  br i1 %36, label %.lr.ph53.preheader, label %._crit_edge54

.lr.ph53.preheader:                               ; preds = %._crit_edge
  %wide.trip.count59 = zext nneg i32 %35 to i64
  br label %.lr.ph53

.lr.ph:                                           ; preds = %.lr.ph.preheader, %46
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %46 ]
  %37 = mul nuw nsw i64 %indvars.iv, %33
  %38 = getelementptr inbounds i8, ptr %0, i64 %37
  %39 = call ptr @hashMapGet(ptr noundef %32, ptr noundef nonnull %38) #9
  %40 = icmp eq ptr %39, null
  br i1 %40, label %41, label %43

41:                                               ; preds = %.lr.ph
  %42 = call ptr @generateIntPointerArrAlg(ptr noundef nonnull %6)
  call void @hashMapInsert(ptr noundef %32, ptr noundef nonnull %38, ptr noundef %42) #9
  br label %46

43:                                               ; preds = %.lr.ph
  %44 = load i32, ptr %39, align 4, !tbaa !9
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %39, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %43, %41
  %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 !11

._crit_edge54:                                    ; preds = %.lr.ph53, %._crit_edge
  %.039.lcssa = phi ptr [ null, %._crit_edge ], [ %spec.select, %.lr.ph53 ]
  call void @free(ptr noundef %34) #9
  call void @destroyHashMap(ptr noundef %32) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  ret ptr %.039.lcssa

.lr.ph53:                                         ; preds = %.lr.ph53.preheader, %.lr.ph53
  %indvars.iv56 = phi i64 [ 0, %.lr.ph53.preheader ], [ %indvars.iv.next57, %.lr.ph53 ]
  %.03850 = phi i32 [ -1, %.lr.ph53.preheader ], [ %spec.select61, %.lr.ph53 ]
  %.03949 = phi ptr [ null, %.lr.ph53.preheader ], [ %spec.select, %.lr.ph53 ]
  %47 = getelementptr inbounds ptr, ptr %34, i64 %indvars.iv56
  %48 = load ptr, ptr %47, align 8, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %48, i64 8
  %50 = load ptr, ptr %49, align 8, !tbaa !13
  %51 = load i32, ptr %50, align 4, !tbaa !9
  %52 = icmp slt i32 %.03850, %51
  %.pre = load ptr, ptr %48, align 8, !tbaa !15
  %spec.select = select i1 %52, ptr %.pre, ptr %.03949
  %spec.select61 = call i32 @llvm.smax.i32(i32 %.03850, i32 %51)
  call void @hashMapDelete(ptr noundef %32, ptr noundef %.pre) #9
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %exitcond60.not = icmp eq i64 %indvars.iv.next57, %wide.trip.count59
  br i1 %exitcond60.not, label %._crit_edge54, label %.lr.ph53, !llvm.loop !16
}

declare ptr @hashMapInitialization(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare ptr @hashMapGet(ptr noundef, ptr noundef) local_unnamed_addr #5

declare void @hashMapInsert(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare ptr @hashMapToEntryArray(ptr noundef) local_unnamed_addr #5

declare i32 @hashMapGetLength(ptr noundef) local_unnamed_addr #5

declare void @hashMapDelete(ptr noundef, ptr noundef) local_unnamed_addr #5

declare void @destroyHashMap(ptr noundef) local_unnamed_addr #5

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

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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { cold nounwind }
attributes #8 = { noreturn nounwind }
attributes #9 = { 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 = !{!14, !6, i64 8}
!14 = !{!"Entry", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!14, !6, i64 0}
!16 = distinct !{!16, !12}


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