; LLVM IR from MostafaTwfiq/C-DataStructures-And-Algorithms :: Unit Test/Tests/DataStructuresTests/TablesTest/HashMapTest (HashMapTest)

; 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 }
%struct.HashMap = type { ptr, i32, i32, i32, ptr, ptr, ptr, ptr }
%struct.Entry = type { ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [151 x i8], align 1
@ERROR_TEST = external dso_local global ptr, align 8
@__const.testHashMapInsert.numbersArr = external hidden unnamed_addr constant [13 x [10 x i8]], align 16

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

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

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

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

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

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

declare void @destroyHashMap(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @testHashMapInsert(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca [13 x [10 x i8]], align 16
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca [13 x i32], align 16
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %10 = call ptr @hashMapInitialization(ptr noundef @free, ptr noundef @free, ptr noundef @compareIntPointersHMT, ptr noundef @intHashFunHMT)
  store ptr %10, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 130, ptr %4) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %4, ptr align 16 @__const.testHashMapInsert.numbersArr, i64 130, i1 false)
  call void @hashMapInsert(ptr noundef null, ptr noundef null, ptr noundef null)
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.ErrorTestStruct, ptr %12, i32 0, i32 0
  %14 = load i32, ptr %13, align 4, !tbaa !9
  call void @CuAssertIntEquals_LineMsg(ptr noundef %11, ptr noundef @.str, i32 noundef 130, ptr noundef null, i32 noundef -83386157, i32 noundef %14)
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  call void @hashMapInsert(ptr noundef %15, ptr noundef null, ptr noundef null)
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  %17 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.ErrorTestStruct, ptr %17, i32 0, i32 0
  %19 = load i32, ptr %18, align 4, !tbaa !9
  call void @CuAssertIntEquals_LineMsg(ptr noundef %16, ptr noundef @.str, i32 noundef 133, ptr noundef null, i32 noundef -83384987, i32 noundef %19)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 10, ptr %5, align 4, !tbaa !12
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  call void @hashMapInsert(ptr noundef %20, ptr noundef %5, ptr noundef null)
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.ErrorTestStruct, ptr %22, i32 0, i32 0
  %24 = load i32, ptr %23, align 4, !tbaa !9
  call void @CuAssertIntEquals_LineMsg(ptr noundef %21, ptr noundef @.str, i32 noundef 137, ptr noundef null, i32 noundef -83384987, i32 noundef %24)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !12
  br label %25

25:                                               ; preds = %39, %1
  %26 = load i32, ptr %6, align 4, !tbaa !12
  %27 = icmp slt i32 %26, 13
  br i1 %27, label %29, label %28

28:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %42

29:                                               ; preds = %25
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = load i32, ptr %6, align 4, !tbaa !12
  %32 = add nsw i32 %31, 1
  %33 = call ptr @generateIntPointerHMT(i32 noundef %32)
  %34 = load i32, ptr %6, align 4, !tbaa !12
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [13 x [10 x i8]], ptr %4, i64 0, i64 %35
  %37 = getelementptr inbounds [10 x i8], ptr %36, i64 0, i64 0
  %38 = call ptr @generateCharPointerHMT(ptr noundef %37)
  call void @hashMapInsert(ptr noundef %30, ptr noundef %33, ptr noundef %38)
  br label %39

39:                                               ; preds = %29
  %40 = load i32, ptr %6, align 4, !tbaa !12
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %6, align 4, !tbaa !12
  br label %25, !llvm.loop !13

42:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 52, ptr %7) #6
  call void @llvm.memset.p0.i64(ptr align 16 %7, i8 0, i64 52, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !12
  br label %43

43:                                               ; preds = %100, %42
  %44 = load i32, ptr %8, align 4, !tbaa !12
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.HashMap, ptr %45, i32 0, i32 1
  %47 = load i32, ptr %46, align 8, !tbaa !15
  %48 = icmp slt i32 %44, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %103

50:                                               ; preds = %43
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.HashMap, ptr %51, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !17
  %54 = load i32, ptr %8, align 4, !tbaa !12
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds ptr, ptr %53, i64 %55
  %57 = load ptr, ptr %56, align 8, !tbaa !5
  %58 = icmp ne ptr %57, null
  br i1 %58, label %59, label %99

59:                                               ; preds = %50
  %60 = load ptr, ptr %2, align 8, !tbaa !5
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.HashMap, ptr %61, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8, !tbaa !17
  %64 = load i32, ptr %8, align 4, !tbaa !12
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds ptr, ptr %63, i64 %65
  %67 = load ptr, ptr %66, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.Entry, ptr %67, i32 0, i32 0
  %69 = load ptr, ptr %68, align 8, !tbaa !18
  %70 = load i32, ptr %69, align 4, !tbaa !12
  %71 = sub nsw i32 %70, 1
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [13 x [10 x i8]], ptr %4, i64 0, i64 %72
  %74 = getelementptr inbounds [10 x i8], ptr %73, i64 0, i64 0
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.HashMap, ptr %75, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8, !tbaa !17
  %78 = load i32, ptr %8, align 4, !tbaa !12
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds ptr, ptr %77, i64 %79
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.Entry, ptr %81, i32 0, i32 1
  %83 = load ptr, ptr %82, align 8, !tbaa !20
  call void @CuAssertStrEquals_LineMsg(ptr noundef %60, ptr noundef @.str, i32 noundef 147, ptr noundef null, ptr noundef %74, ptr noundef %83)
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.HashMap, ptr %84, i32 0, i32 0
  %86 = load ptr, ptr %85, align 8, !tbaa !17
  %87 = load i32, ptr %8, align 4, !tbaa !12
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds ptr, ptr %86, i64 %88
  %90 = load ptr, ptr %89, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.Entry, ptr %90, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8, !tbaa !18
  %93 = load i32, ptr %92, align 4, !tbaa !12
  %94 = sub nsw i32 %93, 1
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [13 x i32], ptr %7, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !12
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %96, align 4, !tbaa !12
  br label %99

99:                                               ; preds = %59, %50
  br label %100

100:                                              ; preds = %99
  %101 = load i32, ptr %8, align 4, !tbaa !12
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %8, align 4, !tbaa !12
  br label %43, !llvm.loop !21

103:                                              ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !12
  br label %104

104:                                              ; preds = %114, %103
  %105 = load i32, ptr %9, align 4, !tbaa !12
  %106 = icmp slt i32 %105, 13
  br i1 %106, label %108, label %107

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

108:                                              ; preds = %104
  %109 = load ptr, ptr %2, align 8, !tbaa !5
  %110 = load i32, ptr %9, align 4, !tbaa !12
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [13 x i32], ptr %7, i64 0, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !12
  call void @CuAssertIntEquals_LineMsg(ptr noundef %109, ptr noundef @.str, i32 noundef 154, ptr noundef null, i32 noundef 1, i32 noundef %113)
  br label %114

114:                                              ; preds = %108
  %115 = load i32, ptr %9, align 4, !tbaa !12
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %9, align 4, !tbaa !12
  br label %104, !llvm.loop !22

117:                                              ; preds = %107
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  call void @destroyHashMap(ptr noundef %118)
  call void @llvm.lifetime.end.p0(i64 52, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 130, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  ret void
}

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

declare void @CuAssertStrEquals_LineMsg(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #2

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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, !11, i64 0}
!10 = !{!"ErrorTestStruct", !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !11, i64 8}
!16 = !{!"HashMap", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!17 = !{!16, !6, i64 0}
!18 = !{!19, !6, i64 0}
!19 = !{!"Entry", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!20 = !{!19, !6, i64 8}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}


; 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 [151 x i8], align 1
@ERROR_TEST = external dso_local local_unnamed_addr global ptr, align 8
@__const.testHashMapInsert.numbersArr = external hidden unnamed_addr constant [13 x [10 x i8]], align 16

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @generateCharPointerHMT(ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) #3

declare void @destroyHashMap(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @testHashMapInsert(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca [13 x [10 x i8]], align 16
  %3 = alloca i32, align 4
  %4 = alloca [13 x i32], align 16
  %5 = tail call ptr @hashMapInitialization(ptr noundef nonnull @free, ptr noundef nonnull @free, ptr noundef nonnull @compareIntPointersHMT, ptr noundef nonnull @intHashFunHMT) #6
  call void @llvm.lifetime.start.p0(i64 130, ptr nonnull %2) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(130) %2, ptr noundef nonnull align 16 dereferenceable(130) @__const.testHashMapInsert.numbersArr, i64 130, i1 false)
  tail call void @hashMapInsert(ptr noundef null, ptr noundef null, ptr noundef null) #6
  %6 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %7 = load i32, ptr %6, align 4, !tbaa !9
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 130, ptr noundef null, i32 noundef -83386157, i32 noundef %7) #6
  tail call void @hashMapInsert(ptr noundef %5, ptr noundef null, ptr noundef null) #6
  %8 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %9 = load i32, ptr %8, align 4, !tbaa !9
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 133, ptr noundef null, i32 noundef -83384987, i32 noundef %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  store i32 10, ptr %3, align 4, !tbaa !12
  call void @hashMapInsert(ptr noundef %5, ptr noundef nonnull %3, ptr noundef null) #6
  %10 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %11 = load i32, ptr %10, align 4, !tbaa !9
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 137, ptr noundef null, i32 noundef -83384987, i32 noundef %11) #6
  %12 = call ptr @generateIntPointerHMT(i32 noundef 1)
  %13 = call ptr @generateCharPointerHMT(ptr noundef nonnull %2)
  call void @hashMapInsert(ptr noundef %5, ptr noundef %12, ptr noundef %13) #6
  %14 = call ptr @generateIntPointerHMT(i32 noundef 2)
  %15 = getelementptr inbounds i8, ptr %2, i64 10
  %16 = call ptr @generateCharPointerHMT(ptr noundef nonnull %15)
  call void @hashMapInsert(ptr noundef %5, ptr noundef %14, ptr noundef %16) #6
  %17 = call ptr @generateIntPointerHMT(i32 noundef 3)
  %18 = getelementptr inbounds i8, ptr %2, i64 20
  %19 = call ptr @generateCharPointerHMT(ptr noundef nonnull %18)
  call void @hashMapInsert(ptr noundef %5, ptr noundef %17, ptr noundef %19) #6
  %20 = call ptr @generateIntPointerHMT(i32 noundef 4)
  %21 = getelementptr inbounds i8, ptr %2, i64 30
  %22 = call ptr @generateCharPointerHMT(ptr noundef nonnull %21)
  call void @hashMapInsert(ptr noundef %5, ptr noundef %20, ptr noundef %22) #6
  %23 = call ptr @generateIntPointerHMT(i32 noundef 5)
  %24 = getelementptr inbounds i8, ptr %2, i64 40
  %25 = call ptr @generateCharPointerHMT(ptr noundef nonnull %24)
  call void @hashMapInsert(ptr noundef %5, ptr noundef %23, ptr noundef %25) #6
  %26 = call ptr @generateIntPointerHMT(i32 noundef 6)
  %27 = getelementptr inbounds i8, ptr %2, i64 50
  %28 = call ptr @generateCharPointerHMT(ptr noundef nonnull %27)
  call void @hashMapInsert(ptr noundef %5, ptr noundef %26, ptr noundef %28) #6
  %29 = call ptr @generateIntPointerHMT(i32 noundef 7)
  %30 = getelementptr inbounds i8, ptr %2, i64 60
  %31 = call ptr @generateCharPointerHMT(ptr noundef nonnull %30)
  call void @hashMapInsert(ptr noundef %5, ptr noundef %29, ptr noundef %31) #6
  %32 = call ptr @generateIntPointerHMT(i32 noundef 8)
  %33 = getelementptr inbounds i8, ptr %2, i64 70
  %34 = call ptr @generateCharPointerHMT(ptr noundef nonnull %33)
  call void @hashMapInsert(ptr noundef %5, ptr noundef %32, ptr noundef %34) #6
  %35 = call ptr @generateIntPointerHMT(i32 noundef 9)
  %36 = getelementptr inbounds i8, ptr %2, i64 80
  %37 = call ptr @generateCharPointerHMT(ptr noundef nonnull %36)
  call void @hashMapInsert(ptr noundef %5, ptr noundef %35, ptr noundef %37) #6
  %38 = call ptr @generateIntPointerHMT(i32 noundef 10)
  %39 = getelementptr inbounds i8, ptr %2, i64 90
  %40 = call ptr @generateCharPointerHMT(ptr noundef nonnull %39)
  call void @hashMapInsert(ptr noundef %5, ptr noundef %38, ptr noundef %40) #6
  %41 = call ptr @generateIntPointerHMT(i32 noundef 11)
  %42 = getelementptr inbounds i8, ptr %2, i64 100
  %43 = call ptr @generateCharPointerHMT(ptr noundef nonnull %42)
  call void @hashMapInsert(ptr noundef %5, ptr noundef %41, ptr noundef %43) #6
  %44 = call ptr @generateIntPointerHMT(i32 noundef 12)
  %45 = getelementptr inbounds i8, ptr %2, i64 110
  %46 = call ptr @generateCharPointerHMT(ptr noundef nonnull %45)
  call void @hashMapInsert(ptr noundef %5, ptr noundef %44, ptr noundef %46) #6
  %47 = call ptr @generateIntPointerHMT(i32 noundef 13)
  %48 = getelementptr inbounds i8, ptr %2, i64 120
  %49 = call ptr @generateCharPointerHMT(ptr noundef nonnull %48)
  call void @hashMapInsert(ptr noundef %5, ptr noundef %47, ptr noundef %49) #6
  call void @llvm.lifetime.start.p0(i64 52, ptr nonnull %4) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(52) %4, i8 0, i64 52, i1 false)
  %50 = getelementptr inbounds i8, ptr %5, i64 8
  %51 = load i32, ptr %50, align 8, !tbaa !13
  %52 = icmp sgt i32 %51, 0
  br i1 %52, label %.lr.ph.preheader, label %.preheader

.lr.ph.preheader:                                 ; preds = %1
  %.pre = load ptr, ptr %5, align 8, !tbaa !15
  br label %.lr.ph

.preheader.loopexit:                              ; preds = %88
  %.pre38 = load i32, ptr %4, align 16, !tbaa !12
  %.phi.trans.insert = getelementptr inbounds i8, ptr %4, i64 4
  %.pre39 = load i32, ptr %.phi.trans.insert, align 4, !tbaa !12
  %.phi.trans.insert40 = getelementptr inbounds i8, ptr %4, i64 8
  %.pre41 = load i32, ptr %.phi.trans.insert40, align 8, !tbaa !12
  %.phi.trans.insert42 = getelementptr inbounds i8, ptr %4, i64 12
  %.pre43 = load i32, ptr %.phi.trans.insert42, align 4, !tbaa !12
  %.phi.trans.insert44 = getelementptr inbounds i8, ptr %4, i64 16
  %.pre45 = load i32, ptr %.phi.trans.insert44, align 16, !tbaa !12
  %.phi.trans.insert46 = getelementptr inbounds i8, ptr %4, i64 20
  %.pre47 = load i32, ptr %.phi.trans.insert46, align 4, !tbaa !12
  %.phi.trans.insert48 = getelementptr inbounds i8, ptr %4, i64 24
  %.pre49 = load i32, ptr %.phi.trans.insert48, align 8, !tbaa !12
  %.phi.trans.insert50 = getelementptr inbounds i8, ptr %4, i64 28
  %.pre51 = load i32, ptr %.phi.trans.insert50, align 4, !tbaa !12
  %.phi.trans.insert52 = getelementptr inbounds i8, ptr %4, i64 32
  %.pre53 = load i32, ptr %.phi.trans.insert52, align 16, !tbaa !12
  %.phi.trans.insert54 = getelementptr inbounds i8, ptr %4, i64 36
  %.pre55 = load i32, ptr %.phi.trans.insert54, align 4, !tbaa !12
  %.phi.trans.insert56 = getelementptr inbounds i8, ptr %4, i64 40
  %.pre57 = load i32, ptr %.phi.trans.insert56, align 8, !tbaa !12
  %.phi.trans.insert58 = getelementptr inbounds i8, ptr %4, i64 44
  %.pre59 = load i32, ptr %.phi.trans.insert58, align 4, !tbaa !12
  %.phi.trans.insert60 = getelementptr inbounds i8, ptr %4, i64 48
  %.pre61 = load i32, ptr %.phi.trans.insert60, align 16, !tbaa !12
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %1
  %53 = phi i32 [ %.pre61, %.preheader.loopexit ], [ 0, %1 ]
  %54 = phi i32 [ %.pre59, %.preheader.loopexit ], [ 0, %1 ]
  %55 = phi i32 [ %.pre57, %.preheader.loopexit ], [ 0, %1 ]
  %56 = phi i32 [ %.pre55, %.preheader.loopexit ], [ 0, %1 ]
  %57 = phi i32 [ %.pre53, %.preheader.loopexit ], [ 0, %1 ]
  %58 = phi i32 [ %.pre51, %.preheader.loopexit ], [ 0, %1 ]
  %59 = phi i32 [ %.pre49, %.preheader.loopexit ], [ 0, %1 ]
  %60 = phi i32 [ %.pre47, %.preheader.loopexit ], [ 0, %1 ]
  %61 = phi i32 [ %.pre45, %.preheader.loopexit ], [ 0, %1 ]
  %62 = phi i32 [ %.pre43, %.preheader.loopexit ], [ 0, %1 ]
  %63 = phi i32 [ %.pre41, %.preheader.loopexit ], [ 0, %1 ]
  %64 = phi i32 [ %.pre39, %.preheader.loopexit ], [ 0, %1 ]
  %65 = phi i32 [ %.pre38, %.preheader.loopexit ], [ 0, %1 ]
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 154, ptr noundef null, i32 noundef 1, i32 noundef %65) #6
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 154, ptr noundef null, i32 noundef 1, i32 noundef %64) #6
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 154, ptr noundef null, i32 noundef 1, i32 noundef %63) #6
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 154, ptr noundef null, i32 noundef 1, i32 noundef %62) #6
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 154, ptr noundef null, i32 noundef 1, i32 noundef %61) #6
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 154, ptr noundef null, i32 noundef 1, i32 noundef %60) #6
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 154, ptr noundef null, i32 noundef 1, i32 noundef %59) #6
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 154, ptr noundef null, i32 noundef 1, i32 noundef %58) #6
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 154, ptr noundef null, i32 noundef 1, i32 noundef %57) #6
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 154, ptr noundef null, i32 noundef 1, i32 noundef %56) #6
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 154, ptr noundef null, i32 noundef 1, i32 noundef %55) #6
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 154, ptr noundef null, i32 noundef 1, i32 noundef %54) #6
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 154, ptr noundef null, i32 noundef 1, i32 noundef %53) #6
  call void @destroyHashMap(ptr noundef %5) #6
  call void @llvm.lifetime.end.p0(i64 52, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 130, ptr nonnull %2) #6
  ret void

.lr.ph:                                           ; preds = %.lr.ph.preheader, %88
  %66 = phi i32 [ %51, %.lr.ph.preheader ], [ %89, %88 ]
  %67 = phi ptr [ %.pre, %.lr.ph.preheader ], [ %90, %88 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %88 ]
  %68 = getelementptr inbounds ptr, ptr %67, i64 %indvars.iv
  %69 = load ptr, ptr %68, align 8, !tbaa !5
  %.not = icmp eq ptr %69, null
  br i1 %.not, label %88, label %70

70:                                               ; preds = %.lr.ph
  %71 = load ptr, ptr %69, align 8, !tbaa !16
  %72 = load i32, ptr %71, align 4, !tbaa !12
  %73 = add nsw i32 %72, -1
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [13 x [10 x i8]], ptr %2, i64 0, i64 %74
  %76 = getelementptr inbounds i8, ptr %69, i64 8
  %77 = load ptr, ptr %76, align 8, !tbaa !18
  call void @CuAssertStrEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 147, ptr noundef null, ptr noundef nonnull %75, ptr noundef %77) #6
  %78 = load ptr, ptr %5, align 8, !tbaa !15
  %79 = getelementptr inbounds ptr, ptr %78, i64 %indvars.iv
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = load ptr, ptr %80, align 8, !tbaa !16
  %82 = load i32, ptr %81, align 4, !tbaa !12
  %83 = add nsw i32 %82, -1
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [13 x i32], ptr %4, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !12
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %85, align 4, !tbaa !12
  %.pre37 = load i32, ptr %50, align 8, !tbaa !13
  br label %88

88:                                               ; preds = %.lr.ph, %70
  %89 = phi i32 [ %66, %.lr.ph ], [ %.pre37, %70 ]
  %90 = phi ptr [ %67, %.lr.ph ], [ %78, %70 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %91 = sext i32 %89 to i64
  %92 = icmp slt i64 %indvars.iv.next, %91
  br i1 %92, label %.lr.ph, label %.preheader.loopexit, !llvm.loop !19
}

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

declare void @CuAssertStrEquals_LineMsg(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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 = { "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 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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, !11, i64 0}
!10 = !{!"ErrorTestStruct", !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !11, i64 8}
!14 = !{!"HashMap", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!15 = !{!14, !6, i64 0}
!16 = !{!17, !6, i64 0}
!17 = !{!"Entry", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!18 = !{!17, !6, i64 8}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass,TailCallElimPass