; LLVM IR from hutusi/rethink-c :: test (test_hash_table)

; 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._HashTableEntity = type { ptr, ptr, ptr }

@.str.3 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [57 x i8], align 1
@__PRETTY_FUNCTION__.test_hash_table_first_last = external hidden unnamed_addr constant [34 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [33 x i8], align 1

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

declare ptr @hash_table_new(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare void @alloc_test_free(ptr noundef) #1

declare i32 @hash_table_insert(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

declare i32 @hash_table_delete(ptr noundef, ptr noundef) #1

declare void @hash_table_free(ptr noundef) #1

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

declare i32 @hash_int(ptr noundef) #1

declare i32 @int_equal(ptr noundef, ptr noundef) #1

declare ptr @intdup(i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @test_hash_table_first_last() #3 {
  %1 = alloca ptr, align 8
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #4
  %7 = call ptr @hash_table_new(ptr noundef @hash_int, ptr noundef @int_equal, ptr noundef @alloc_test_free, ptr noundef @alloc_test_free)
  store ptr %7, ptr %1, align 8, !tbaa !5
  %8 = load ptr, ptr %1, align 8, !tbaa !5
  %9 = call ptr @intdup(i32 noundef 1)
  %10 = call ptr @intdup(i32 noundef 2)
  %11 = call i32 @hash_table_insert(ptr noundef %8, ptr noundef %9, ptr noundef %10)
  %12 = icmp eq i32 %11, 0
  br i1 %12, label %13, label %14

13:                                               ; preds = %0
  br label %15

14:                                               ; preds = %0
  call void @__assert_fail(ptr noundef @.str.15, ptr noundef @.str.3, i32 noundef 85, ptr noundef @__PRETTY_FUNCTION__.test_hash_table_first_last) #5
  unreachable

15:                                               ; preds = %13
  %16 = load ptr, ptr %1, align 8, !tbaa !5
  %17 = call ptr @intdup(i32 noundef 3)
  %18 = call ptr @intdup(i32 noundef 4)
  %19 = call i32 @hash_table_insert(ptr noundef %16, ptr noundef %17, ptr noundef %18)
  %20 = icmp eq i32 %19, 0
  br i1 %20, label %21, label %22

21:                                               ; preds = %15
  br label %23

22:                                               ; preds = %15
  call void @__assert_fail(ptr noundef @.str.16, ptr noundef @.str.3, i32 noundef 86, ptr noundef @__PRETTY_FUNCTION__.test_hash_table_first_last) #5
  unreachable

23:                                               ; preds = %21
  %24 = load ptr, ptr %1, align 8, !tbaa !5
  %25 = call ptr @intdup(i32 noundef 5)
  %26 = call ptr @intdup(i32 noundef 6)
  %27 = call i32 @hash_table_insert(ptr noundef %24, ptr noundef %25, ptr noundef %26)
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %29, label %30

29:                                               ; preds = %23
  br label %31

30:                                               ; preds = %23
  call void @__assert_fail(ptr noundef @.str.17, ptr noundef @.str.3, i32 noundef 87, ptr noundef @__PRETTY_FUNCTION__.test_hash_table_first_last) #5
  unreachable

31:                                               ; preds = %29
  %32 = load ptr, ptr %1, align 8, !tbaa !5
  %33 = call i32 @hash_table_size(ptr noundef %32)
  %34 = icmp ne i32 %33, 3
  br i1 %34, label %35, label %45

35:                                               ; preds = %31
  %36 = load ptr, ptr %1, align 8, !tbaa !5
  %37 = call i32 @hash_table_size(ptr noundef %36)
  %38 = call i32 (ptr, ...) @printf(ptr noundef @.str.18, i32 noundef %37, i32 noundef 3)
  %39 = load ptr, ptr %1, align 8, !tbaa !5
  %40 = call i32 @hash_table_size(ptr noundef %39)
  %41 = icmp eq i32 %40, 3
  br i1 %41, label %42, label %43

42:                                               ; preds = %35
  br label %44

43:                                               ; preds = %35
  call void @__assert_fail(ptr noundef @.str.19, ptr noundef @.str.3, i32 noundef 88, ptr noundef @__PRETTY_FUNCTION__.test_hash_table_first_last) #5
  unreachable

44:                                               ; preds = %42
  br label %45

45:                                               ; preds = %44, %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 0, ptr %2, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %46 = load ptr, ptr %1, align 8, !tbaa !5
  %47 = call ptr @hash_table_first_entity(ptr noundef %46)
  store ptr %47, ptr %3, align 8, !tbaa !5
  br label %48

48:                                               ; preds = %55, %45
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = icmp ne ptr %49, null
  br i1 %50, label %52, label %51

51:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  br label %59

52:                                               ; preds = %48
  %53 = load i32, ptr %2, align 4, !tbaa !9
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %2, align 4, !tbaa !9
  br label %55

55:                                               ; preds = %52
  %56 = load ptr, ptr %1, align 8, !tbaa !5
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = call ptr @hash_table_next_entity(ptr noundef %56, ptr noundef %57)
  store ptr %58, ptr %3, align 8, !tbaa !5
  br label %48, !llvm.loop !11

59:                                               ; preds = %51
  %60 = load i32, ptr %2, align 4, !tbaa !9
  %61 = icmp ne i32 %60, 3
  br i1 %61, label %62, label %70

62:                                               ; preds = %59
  %63 = load i32, ptr %2, align 4, !tbaa !9
  %64 = call i32 (ptr, ...) @printf(ptr noundef @.str.18, i32 noundef %63, i32 noundef 3)
  %65 = load i32, ptr %2, align 4, !tbaa !9
  %66 = icmp eq i32 %65, 3
  br i1 %66, label %67, label %68

67:                                               ; preds = %62
  br label %69

68:                                               ; preds = %62
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.3, i32 noundef 96, ptr noundef @__PRETTY_FUNCTION__.test_hash_table_first_last) #5
  unreachable

69:                                               ; preds = %67
  br label %70

70:                                               ; preds = %69, %59
  store i32 0, ptr %2, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %71 = load ptr, ptr %1, align 8, !tbaa !5
  %72 = call ptr @hash_table_last_entity(ptr noundef %71)
  store ptr %72, ptr %4, align 8, !tbaa !5
  br label %73

73:                                               ; preds = %80, %70
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = icmp ne ptr %74, null
  br i1 %75, label %77, label %76

76:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  br label %84

77:                                               ; preds = %73
  %78 = load i32, ptr %2, align 4, !tbaa !9
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %2, align 4, !tbaa !9
  br label %80

80:                                               ; preds = %77
  %81 = load ptr, ptr %1, align 8, !tbaa !5
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = call ptr @hash_table_prev_entity(ptr noundef %81, ptr noundef %82)
  store ptr %83, ptr %4, align 8, !tbaa !5
  br label %73, !llvm.loop !13

84:                                               ; preds = %76
  %85 = load i32, ptr %2, align 4, !tbaa !9
  %86 = icmp ne i32 %85, 3
  br i1 %86, label %87, label %95

87:                                               ; preds = %84
  %88 = load i32, ptr %2, align 4, !tbaa !9
  %89 = call i32 (ptr, ...) @printf(ptr noundef @.str.18, i32 noundef %88, i32 noundef 3)
  %90 = load i32, ptr %2, align 4, !tbaa !9
  %91 = icmp eq i32 %90, 3
  br i1 %91, label %92, label %93

92:                                               ; preds = %87
  br label %94

93:                                               ; preds = %87
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.3, i32 noundef 104, ptr noundef @__PRETTY_FUNCTION__.test_hash_table_first_last) #5
  unreachable

94:                                               ; preds = %92
  br label %95

95:                                               ; preds = %94, %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %96 = load ptr, ptr %1, align 8, !tbaa !5
  %97 = call ptr @hash_table_last_entity(ptr noundef %96)
  store ptr %97, ptr %5, align 8, !tbaa !5
  br label %98

98:                                               ; preds = %101, %95
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = icmp ne ptr %99, null
  br i1 %100, label %101, label %111

101:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %102, ptr %6, align 8, !tbaa !5
  %103 = load ptr, ptr %1, align 8, !tbaa !5
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = call ptr @hash_table_prev_entity(ptr noundef %103, ptr noundef %104)
  store ptr %105, ptr %5, align 8, !tbaa !5
  %106 = load ptr, ptr %1, align 8, !tbaa !5
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct._HashTableEntity, ptr %107, i32 0, i32 0
  %109 = load ptr, ptr %108, align 8, !tbaa !14
  %110 = call i32 @hash_table_delete(ptr noundef %106, ptr noundef %109)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %98, !llvm.loop !16

111:                                              ; preds = %98
  %112 = load ptr, ptr %1, align 8, !tbaa !5
  %113 = call i32 @hash_table_size(ptr noundef %112)
  %114 = icmp ne i32 %113, 0
  br i1 %114, label %115, label %125

115:                                              ; preds = %111
  %116 = load ptr, ptr %1, align 8, !tbaa !5
  %117 = call i32 @hash_table_size(ptr noundef %116)
  %118 = call i32 (ptr, ...) @printf(ptr noundef @.str.18, i32 noundef %117, i32 noundef 0)
  %119 = load ptr, ptr %1, align 8, !tbaa !5
  %120 = call i32 @hash_table_size(ptr noundef %119)
  %121 = icmp eq i32 %120, 0
  br i1 %121, label %122, label %123

122:                                              ; preds = %115
  br label %124

123:                                              ; preds = %115
  call void @__assert_fail(ptr noundef @.str.21, ptr noundef @.str.3, i32 noundef 120, ptr noundef @__PRETTY_FUNCTION__.test_hash_table_first_last) #5
  unreachable

124:                                              ; preds = %122
  br label %125

125:                                              ; preds = %124, %111
  %126 = load ptr, ptr %1, align 8, !tbaa !5
  call void @hash_table_free(ptr noundef %126)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  ret void
}

declare i32 @hash_table_size(ptr noundef) #1

declare i32 @printf(ptr noundef, ...) #1

declare ptr @hash_table_first_entity(ptr noundef) #1

declare ptr @hash_table_next_entity(ptr noundef, ptr noundef) #1

declare ptr @hash_table_last_entity(ptr noundef) #1

declare ptr @hash_table_prev_entity(ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #3 = { 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 #4 = { nounwind }
attributes #5 = { 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}
!14 = !{!15, !6, i64 0}
!15 = !{!"_HashTableEntity", !6, i64 0, !6, i64 8, !6, i64 16}
!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"

@.str.3 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [57 x i8], align 1
@__PRETTY_FUNCTION__.test_hash_table_first_last = external hidden unnamed_addr constant [34 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [33 x i8], align 1

declare ptr @hash_table_new(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @alloc_test_free(ptr noundef) #0

declare i32 @hash_table_insert(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare i32 @hash_table_delete(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @hash_table_free(ptr noundef) local_unnamed_addr #0

declare i32 @hash_int(ptr noundef) #0

declare i32 @int_equal(ptr noundef, ptr noundef) #0

declare ptr @intdup(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @test_hash_table_first_last() local_unnamed_addr #2 {
  %1 = tail call ptr @hash_table_new(ptr noundef nonnull @hash_int, ptr noundef nonnull @int_equal, ptr noundef nonnull @alloc_test_free, ptr noundef nonnull @alloc_test_free) #4
  %2 = tail call ptr @intdup(i32 noundef 1) #4
  %3 = tail call ptr @intdup(i32 noundef 2) #4
  %4 = tail call i32 @hash_table_insert(ptr noundef %1, ptr noundef %2, ptr noundef %3) #4
  %5 = icmp eq i32 %4, 0
  br i1 %5, label %7, label %6

6:                                                ; preds = %0
  tail call void @__assert_fail(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.3, i32 noundef 85, ptr noundef nonnull @__PRETTY_FUNCTION__.test_hash_table_first_last) #5
  unreachable

7:                                                ; preds = %0
  %8 = tail call ptr @intdup(i32 noundef 3) #4
  %9 = tail call ptr @intdup(i32 noundef 4) #4
  %10 = tail call i32 @hash_table_insert(ptr noundef %1, ptr noundef %8, ptr noundef %9) #4
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %13, label %12

12:                                               ; preds = %7
  tail call void @__assert_fail(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.3, i32 noundef 86, ptr noundef nonnull @__PRETTY_FUNCTION__.test_hash_table_first_last) #5
  unreachable

13:                                               ; preds = %7
  %14 = tail call ptr @intdup(i32 noundef 5) #4
  %15 = tail call ptr @intdup(i32 noundef 6) #4
  %16 = tail call i32 @hash_table_insert(ptr noundef %1, ptr noundef %14, ptr noundef %15) #4
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %19, label %18

18:                                               ; preds = %13
  tail call void @__assert_fail(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.3, i32 noundef 87, ptr noundef nonnull @__PRETTY_FUNCTION__.test_hash_table_first_last) #5
  unreachable

19:                                               ; preds = %13
  %20 = tail call i32 @hash_table_size(ptr noundef %1) #4
  %.not = icmp eq i32 %20, 3
  br i1 %.not, label %27, label %21

21:                                               ; preds = %19
  %22 = tail call i32 @hash_table_size(ptr noundef %1) #4
  %23 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18, i32 noundef %22, i32 noundef 3)
  %24 = tail call i32 @hash_table_size(ptr noundef %1) #4
  %25 = icmp eq i32 %24, 3
  br i1 %25, label %27, label %26

26:                                               ; preds = %21
  tail call void @__assert_fail(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.3, i32 noundef 88, ptr noundef nonnull @__PRETTY_FUNCTION__.test_hash_table_first_last) #5
  unreachable

27:                                               ; preds = %21, %19
  %28 = tail call ptr @hash_table_first_entity(ptr noundef %1) #4
  %.not3541 = icmp eq ptr %28, null
  br i1 %.not3541, label %._crit_edge.thread, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph
  %.not36 = icmp eq i32 %29, 3
  br i1 %.not36, label %32, label %._crit_edge.thread

.lr.ph:                                           ; preds = %27, %.lr.ph
  %.043 = phi i32 [ %29, %.lr.ph ], [ 0, %27 ]
  %.03442 = phi ptr [ %30, %.lr.ph ], [ %28, %27 ]
  %29 = add nuw nsw i32 %.043, 1
  %30 = tail call ptr @hash_table_next_entity(ptr noundef %1, ptr noundef nonnull %.03442) #4
  %.not35 = icmp eq ptr %30, null
  br i1 %.not35, label %._crit_edge, label %.lr.ph, !llvm.loop !5

._crit_edge.thread:                               ; preds = %27, %._crit_edge
  %.0.lcssa59 = phi i32 [ %29, %._crit_edge ], [ 0, %27 ]
  %31 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18, i32 noundef %.0.lcssa59, i32 noundef 3)
  tail call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.3, i32 noundef 96, ptr noundef nonnull @__PRETTY_FUNCTION__.test_hash_table_first_last) #5
  unreachable

32:                                               ; preds = %._crit_edge
  %33 = tail call ptr @hash_table_last_entity(ptr noundef %1) #4
  %.not3744 = icmp eq ptr %33, null
  br i1 %.not3744, label %._crit_edge49.thread, label %.lr.ph48

._crit_edge49:                                    ; preds = %.lr.ph48
  %.not38 = icmp eq i32 %34, 3
  br i1 %.not38, label %37, label %._crit_edge49.thread

.lr.ph48:                                         ; preds = %32, %.lr.ph48
  %.146 = phi i32 [ %34, %.lr.ph48 ], [ 0, %32 ]
  %.03345 = phi ptr [ %35, %.lr.ph48 ], [ %33, %32 ]
  %34 = add nuw nsw i32 %.146, 1
  %35 = tail call ptr @hash_table_prev_entity(ptr noundef %1, ptr noundef nonnull %.03345) #4
  %.not37 = icmp eq ptr %35, null
  br i1 %.not37, label %._crit_edge49, label %.lr.ph48, !llvm.loop !7

._crit_edge49.thread:                             ; preds = %32, %._crit_edge49
  %.1.lcssa62 = phi i32 [ %34, %._crit_edge49 ], [ 0, %32 ]
  %36 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18, i32 noundef %.1.lcssa62, i32 noundef 3)
  tail call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.3, i32 noundef 104, ptr noundef nonnull @__PRETTY_FUNCTION__.test_hash_table_first_last) #5
  unreachable

37:                                               ; preds = %._crit_edge49
  %38 = tail call ptr @hash_table_last_entity(ptr noundef %1) #4
  %.not3951 = icmp eq ptr %38, null
  br i1 %.not3951, label %._crit_edge55, label %.lr.ph54

.lr.ph54:                                         ; preds = %37, %.lr.ph54
  %.03252 = phi ptr [ %39, %.lr.ph54 ], [ %38, %37 ]
  %39 = tail call ptr @hash_table_prev_entity(ptr noundef %1, ptr noundef nonnull %.03252) #4
  %40 = load ptr, ptr %.03252, align 8, !tbaa !8
  %41 = tail call i32 @hash_table_delete(ptr noundef %1, ptr noundef %40) #4
  %.not39 = icmp eq ptr %39, null
  br i1 %.not39, label %._crit_edge55, label %.lr.ph54, !llvm.loop !13

._crit_edge55:                                    ; preds = %.lr.ph54, %37
  %42 = tail call i32 @hash_table_size(ptr noundef %1) #4
  %.not40 = icmp eq i32 %42, 0
  br i1 %.not40, label %49, label %43

43:                                               ; preds = %._crit_edge55
  %44 = tail call i32 @hash_table_size(ptr noundef %1) #4
  %45 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18, i32 noundef %44, i32 noundef 0)
  %46 = tail call i32 @hash_table_size(ptr noundef %1) #4
  %47 = icmp eq i32 %46, 0
  br i1 %47, label %49, label %48

48:                                               ; preds = %43
  tail call void @__assert_fail(ptr noundef nonnull @.str.21, ptr noundef nonnull @.str.3, i32 noundef 120, ptr noundef nonnull @__PRETTY_FUNCTION__.test_hash_table_first_last) #5
  unreachable

49:                                               ; preds = %43, %._crit_edge55
  tail call void @hash_table_free(ptr noundef %1) #4
  ret void
}

declare i32 @hash_table_size(ptr noundef) local_unnamed_addr #0

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

declare ptr @hash_table_first_entity(ptr noundef) local_unnamed_addr #0

declare ptr @hash_table_next_entity(ptr noundef, ptr noundef) local_unnamed_addr #0

declare ptr @hash_table_last_entity(ptr noundef) local_unnamed_addr #0

declare ptr @hash_table_prev_entity(ptr noundef, ptr noundef) local_unnamed_addr #0

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { 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 #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 = { nounwind }
attributes #5 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = !{!9, !10, i64 0}
!9 = !{!"_HashTableEntity", !10, i64 0, !10, i64 8, !10, i64 16}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C/C++ TBAA"}
!13 = distinct !{!13, !6}


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