; LLVM IR from ryanlayer/giggle :: test/unit (test_lists)

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

@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [17 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 void @UnityAssertEqualNumber(i64 noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef) #1

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

; Function Attrs: nounwind
declare i32 @rand() #2

declare noalias ptr @fopen(ptr noundef, ptr noundef) #1

declare i32 @fclose(ptr noundef) #1

; Function Attrs: nounwind
declare i32 @remove(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @test_bit_map() #3 {
  %1 = alloca ptr, align 8
  %2 = alloca [500 x i32], align 16
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #4
  %8 = call ptr @bit_map_init(i64 noundef 100)
  store ptr %8, ptr %1, align 8, !tbaa !5
  %9 = load ptr, ptr %1, align 8, !tbaa !5
  %10 = call i32 @bit_map_get(ptr noundef %9, i64 noundef 1000)
  %11 = zext i32 %10 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %11, ptr noundef null, i64 noundef 904, i32 noundef 148)
  %12 = load ptr, ptr %1, align 8, !tbaa !5
  call void @bit_map_set(ptr noundef %12, i64 noundef 1000)
  %13 = load ptr, ptr %1, align 8, !tbaa !5
  %14 = call i32 @bit_map_get(ptr noundef %13, i64 noundef 1000)
  %15 = zext i32 %14 to i64
  call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %15, ptr noundef null, i64 noundef 908, i32 noundef 148)
  call void @llvm.lifetime.start.p0(i64 2000, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %16 = getelementptr inbounds [500 x i32], ptr %2, i64 0, i64 0
  store i32 1000, ptr %16, align 16, !tbaa !9
  store i32 1, ptr %3, align 4, !tbaa !9
  br label %17

17:                                               ; preds = %32, %0
  %18 = load i32, ptr %3, align 4, !tbaa !9
  %19 = icmp ult i32 %18, 500
  br i1 %19, label %20, label %35

20:                                               ; preds = %17
  %21 = call i32 @rand() #4
  %22 = srem i32 %21, 10000
  %23 = load i32, ptr %3, align 4, !tbaa !9
  %24 = zext i32 %23 to i64
  %25 = getelementptr inbounds [500 x i32], ptr %2, i64 0, i64 %24
  store i32 %22, ptr %25, align 4, !tbaa !9
  %26 = load ptr, ptr %1, align 8, !tbaa !5
  %27 = load i32, ptr %3, align 4, !tbaa !9
  %28 = zext i32 %27 to i64
  %29 = getelementptr inbounds [500 x i32], ptr %2, i64 0, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !9
  %31 = zext i32 %30 to i64
  call void @bit_map_set(ptr noundef %26, i64 noundef %31)
  br label %32

32:                                               ; preds = %20
  %33 = load i32, ptr %3, align 4, !tbaa !9
  %34 = add i32 %33, 1
  store i32 %34, ptr %3, align 4, !tbaa !9
  br label %17, !llvm.loop !11

35:                                               ; preds = %17
  %36 = getelementptr inbounds [500 x i32], ptr %2, i64 0, i64 0
  call void @qsort(ptr noundef %36, i64 noundef 500, i64 noundef 4, ptr noundef @uint32_t_cmp)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %72, %35
  %38 = load i32, ptr %3, align 4, !tbaa !9
  %39 = icmp ult i32 %38, 499
  br i1 %39, label %40, label %75

40:                                               ; preds = %37
  %41 = load ptr, ptr %1, align 8, !tbaa !5
  %42 = load i32, ptr %3, align 4, !tbaa !9
  %43 = zext i32 %42 to i64
  %44 = getelementptr inbounds [500 x i32], ptr %2, i64 0, i64 %43
  %45 = load i32, ptr %44, align 4, !tbaa !9
  %46 = zext i32 %45 to i64
  %47 = call i32 @bit_map_get(ptr noundef %41, i64 noundef %46)
  %48 = zext i32 %47 to i64
  call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %48, ptr noundef null, i64 noundef 926, i32 noundef 148)
  %49 = load i32, ptr %3, align 4, !tbaa !9
  %50 = zext i32 %49 to i64
  %51 = getelementptr inbounds [500 x i32], ptr %2, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !9
  %53 = add i32 %52, 1
  store i32 %53, ptr %4, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %68, %40
  %55 = load i32, ptr %4, align 4, !tbaa !9
  %56 = load i32, ptr %3, align 4, !tbaa !9
  %57 = add i32 %56, 1
  %58 = zext i32 %57 to i64
  %59 = getelementptr inbounds [500 x i32], ptr %2, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !9
  %61 = icmp ult i32 %55, %60
  br i1 %61, label %62, label %71

62:                                               ; preds = %54
  %63 = load ptr, ptr %1, align 8, !tbaa !5
  %64 = load i32, ptr %4, align 4, !tbaa !9
  %65 = zext i32 %64 to i64
  %66 = call i32 @bit_map_get(ptr noundef %63, i64 noundef %65)
  %67 = zext i32 %66 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %67, ptr noundef null, i64 noundef 928, i32 noundef 148)
  br label %68

68:                                               ; preds = %62
  %69 = load i32, ptr %4, align 4, !tbaa !9
  %70 = add i32 %69, 1
  store i32 %70, ptr %4, align 4, !tbaa !9
  br label %54, !llvm.loop !13

71:                                               ; preds = %54
  br label %72

72:                                               ; preds = %71
  %73 = load i32, ptr %3, align 4, !tbaa !9
  %74 = add i32 %73, 1
  store i32 %74, ptr %3, align 4, !tbaa !9
  br label %37, !llvm.loop !14

75:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store ptr @.str.17, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = call noalias ptr @fopen(ptr noundef %76, ptr noundef @.str.1)
  store ptr %77, ptr %6, align 8, !tbaa !5
  %78 = load ptr, ptr %1, align 8, !tbaa !5
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  call void @bit_map_store(ptr noundef %78, ptr noundef %79, ptr noundef %80)
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = call i32 @fclose(ptr noundef %81)
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = call noalias ptr @fopen(ptr noundef %83, ptr noundef @.str.2)
  store ptr %84, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = call ptr @bit_map_load(ptr noundef %85, ptr noundef %86)
  store ptr %87, ptr %7, align 8, !tbaa !5
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = call i32 @fclose(ptr noundef %88)
  %90 = load ptr, ptr %1, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.bit_map, ptr %90, i32 0, i32 0
  %92 = load i64, ptr %91, align 8, !tbaa !15
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.bit_map, ptr %93, i32 0, i32 0
  %95 = load i64, ptr %94, align 8, !tbaa !15
  call void @UnityAssertEqualNumber(i64 noundef %92, i64 noundef %95, ptr noundef null, i64 noundef 943, i32 noundef 148)
  %96 = load ptr, ptr %1, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.bit_map, ptr %96, i32 0, i32 1
  %98 = load i32, ptr %97, align 8, !tbaa !18
  %99 = zext i32 %98 to i64
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.bit_map, ptr %100, i32 0, i32 1
  %102 = load i32, ptr %101, align 8, !tbaa !18
  %103 = zext i32 %102 to i64
  call void @UnityAssertEqualNumber(i64 noundef %99, i64 noundef %103, ptr noundef null, i64 noundef 944, i32 noundef 148)
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %104

104:                                              ; preds = %139, %75
  %105 = load i32, ptr %3, align 4, !tbaa !9
  %106 = icmp ult i32 %105, 499
  br i1 %106, label %107, label %142

107:                                              ; preds = %104
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  %109 = load i32, ptr %3, align 4, !tbaa !9
  %110 = zext i32 %109 to i64
  %111 = getelementptr inbounds [500 x i32], ptr %2, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !9
  %113 = zext i32 %112 to i64
  %114 = call i32 @bit_map_get(ptr noundef %108, i64 noundef %113)
  %115 = zext i32 %114 to i64
  call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %115, ptr noundef null, i64 noundef 947, i32 noundef 148)
  %116 = load i32, ptr %3, align 4, !tbaa !9
  %117 = zext i32 %116 to i64
  %118 = getelementptr inbounds [500 x i32], ptr %2, i64 0, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !9
  %120 = add i32 %119, 1
  store i32 %120, ptr %4, align 4, !tbaa !9
  br label %121

121:                                              ; preds = %135, %107
  %122 = load i32, ptr %4, align 4, !tbaa !9
  %123 = load i32, ptr %3, align 4, !tbaa !9
  %124 = add i32 %123, 1
  %125 = zext i32 %124 to i64
  %126 = getelementptr inbounds [500 x i32], ptr %2, i64 0, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !9
  %128 = icmp ult i32 %122, %127
  br i1 %128, label %129, label %138

129:                                              ; preds = %121
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  %131 = load i32, ptr %4, align 4, !tbaa !9
  %132 = zext i32 %131 to i64
  %133 = call i32 @bit_map_get(ptr noundef %130, i64 noundef %132)
  %134 = zext i32 %133 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %134, ptr noundef null, i64 noundef 949, i32 noundef 148)
  br label %135

135:                                              ; preds = %129
  %136 = load i32, ptr %4, align 4, !tbaa !9
  %137 = add i32 %136, 1
  store i32 %137, ptr %4, align 4, !tbaa !9
  br label %121, !llvm.loop !19

138:                                              ; preds = %121
  br label %139

139:                                              ; preds = %138
  %140 = load i32, ptr %3, align 4, !tbaa !9
  %141 = add i32 %140, 1
  store i32 %141, ptr %3, align 4, !tbaa !9
  br label %104, !llvm.loop !20

142:                                              ; preds = %104
  call void @bit_map_destroy(ptr noundef %1)
  call void @bit_map_destroy(ptr noundef %7)
  %143 = load ptr, ptr %5, align 8, !tbaa !5
  %144 = call i32 @remove(ptr noundef %143) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 2000, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  ret void
}

declare ptr @bit_map_init(i64 noundef) #1

declare i32 @bit_map_get(ptr noundef, i64 noundef) #1

declare void @bit_map_set(ptr noundef, i64 noundef) #1

declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #1

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

declare void @bit_map_store(ptr noundef, ptr noundef, ptr noundef) #1

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

declare void @bit_map_destroy(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 = { 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 }

!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 = distinct !{!14, !12}
!15 = !{!16, !17, i64 0}
!16 = !{!"bit_map", !17, i64 0, !10, i64 8, !6, i64 16}
!17 = !{!"long", !7, i64 0}
!18 = !{!16, !10, i64 8}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !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.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [17 x i8], align 1

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

declare void @UnityAssertEqualNumber(i64 noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
define dso_local void @test_bit_map() local_unnamed_addr #4 {
  %1 = alloca ptr, align 8
  %2 = alloca [500 x i32], align 16
  %3 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  %4 = tail call ptr @bit_map_init(i64 noundef 100) #6
  store ptr %4, ptr %1, align 8, !tbaa !5
  %5 = tail call i32 @bit_map_get(ptr noundef %4, i64 noundef 1000) #6
  %6 = zext i32 %5 to i64
  tail call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %6, ptr noundef null, i64 noundef 904, i32 noundef 148) #6
  tail call void @bit_map_set(ptr noundef %4, i64 noundef 1000) #6
  %7 = tail call i32 @bit_map_get(ptr noundef %4, i64 noundef 1000) #6
  %8 = zext i32 %7 to i64
  tail call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %8, ptr noundef null, i64 noundef 908, i32 noundef 148) #6
  call void @llvm.lifetime.start.p0(i64 2000, ptr nonnull %2) #6
  store i32 1000, ptr %2, align 16, !tbaa !9
  br label %9

9:                                                ; preds = %0, %9
  %indvars.iv = phi i64 [ 1, %0 ], [ %indvars.iv.next, %9 ]
  %10 = tail call i32 @rand() #6
  %11 = srem i32 %10, 10000
  %12 = getelementptr inbounds [500 x i32], ptr %2, i64 0, i64 %indvars.iv
  store i32 %11, ptr %12, align 4, !tbaa !9
  %13 = zext i32 %11 to i64
  tail call void @bit_map_set(ptr noundef %4, i64 noundef %13) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 500
  br i1 %exitcond.not, label %14, label %9, !llvm.loop !11

14:                                               ; preds = %9
  call void @qsort(ptr noundef nonnull %2, i64 noundef 500, i64 noundef 4, ptr noundef nonnull @uint32_t_cmp) #6
  %.pre = load i32, ptr %2, align 16, !tbaa !9
  br label %16

.loopexit30:                                      ; preds = %.lr.ph, %16
  %15 = phi i32 [ %24, %16 ], [ %29, %.lr.ph ]
  %exitcond47.not = icmp eq i64 %indvars.iv.next45, 499
  br i1 %exitcond47.not, label %32, label %16, !llvm.loop !13

16:                                               ; preds = %14, %.loopexit30
  %17 = phi i32 [ %.pre, %14 ], [ %15, %.loopexit30 ]
  %indvars.iv44 = phi i64 [ 0, %14 ], [ %indvars.iv.next45, %.loopexit30 ]
  %18 = getelementptr inbounds [500 x i32], ptr %2, i64 0, i64 %indvars.iv44
  %19 = zext i32 %17 to i64
  %20 = call i32 @bit_map_get(ptr noundef %4, i64 noundef %19) #6
  %21 = zext i32 %20 to i64
  call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %21, ptr noundef null, i64 noundef 926, i32 noundef 148) #6
  %22 = load i32, ptr %18, align 4, !tbaa !9
  %indvars.iv.next45 = add nuw nsw i64 %indvars.iv44, 1
  %23 = getelementptr inbounds [500 x i32], ptr %2, i64 0, i64 %indvars.iv.next45
  %.02833 = add i32 %22, 1
  %24 = load i32, ptr %23, align 4, !tbaa !9
  %25 = icmp ult i32 %.02833, %24
  br i1 %25, label %.lr.ph.preheader, label %.loopexit30

.lr.ph.preheader:                                 ; preds = %16
  %26 = zext i32 %.02833 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv41 = phi i64 [ %26, %.lr.ph.preheader ], [ %indvars.iv.next42, %.lr.ph ]
  %27 = call i32 @bit_map_get(ptr noundef %4, i64 noundef %indvars.iv41) #6
  %28 = zext i32 %27 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %28, ptr noundef null, i64 noundef 928, i32 noundef 148) #6
  %indvars.iv.next42 = add nuw nsw i64 %indvars.iv41, 1
  %29 = load i32, ptr %23, align 4, !tbaa !9
  %30 = zext i32 %29 to i64
  %31 = icmp ult i64 %indvars.iv.next42, %30
  br i1 %31, label %.lr.ph, label %.loopexit30, !llvm.loop !14

32:                                               ; preds = %.loopexit30
  %33 = call noalias ptr @fopen(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.1)
  call void @bit_map_store(ptr noundef %4, ptr noundef %33, ptr noundef nonnull @.str.17) #6
  %34 = call i32 @fclose(ptr noundef %33)
  %35 = call noalias ptr @fopen(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %36 = call ptr @bit_map_load(ptr noundef %35, ptr noundef nonnull @.str.17) #6
  store ptr %36, ptr %3, align 8, !tbaa !5
  %37 = call i32 @fclose(ptr noundef %35)
  %38 = load i64, ptr %4, align 8, !tbaa !15
  %39 = load i64, ptr %36, align 8, !tbaa !15
  call void @UnityAssertEqualNumber(i64 noundef %38, i64 noundef %39, ptr noundef null, i64 noundef 943, i32 noundef 148) #6
  %40 = getelementptr inbounds i8, ptr %4, i64 8
  %41 = load i32, ptr %40, align 8, !tbaa !18
  %42 = zext i32 %41 to i64
  %43 = getelementptr inbounds i8, ptr %36, i64 8
  %44 = load i32, ptr %43, align 8, !tbaa !18
  %45 = zext i32 %44 to i64
  call void @UnityAssertEqualNumber(i64 noundef %42, i64 noundef %45, ptr noundef null, i64 noundef 944, i32 noundef 148) #6
  %.pre55 = load i32, ptr %2, align 16, !tbaa !9
  br label %47

.loopexit:                                        ; preds = %.lr.ph38, %47
  %46 = phi i32 [ %55, %47 ], [ %60, %.lr.ph38 ]
  %exitcond54.not = icmp eq i64 %indvars.iv.next52, 499
  br i1 %exitcond54.not, label %63, label %47, !llvm.loop !19

47:                                               ; preds = %32, %.loopexit
  %48 = phi i32 [ %.pre55, %32 ], [ %46, %.loopexit ]
  %indvars.iv51 = phi i64 [ 0, %32 ], [ %indvars.iv.next52, %.loopexit ]
  %49 = getelementptr inbounds [500 x i32], ptr %2, i64 0, i64 %indvars.iv51
  %50 = zext i32 %48 to i64
  %51 = call i32 @bit_map_get(ptr noundef nonnull %36, i64 noundef %50) #6
  %52 = zext i32 %51 to i64
  call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %52, ptr noundef null, i64 noundef 947, i32 noundef 148) #6
  %53 = load i32, ptr %49, align 4, !tbaa !9
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %54 = getelementptr inbounds [500 x i32], ptr %2, i64 0, i64 %indvars.iv.next52
  %.12936 = add i32 %53, 1
  %55 = load i32, ptr %54, align 4, !tbaa !9
  %56 = icmp ult i32 %.12936, %55
  br i1 %56, label %.lr.ph38.preheader, label %.loopexit

.lr.ph38.preheader:                               ; preds = %47
  %57 = zext i32 %.12936 to i64
  br label %.lr.ph38

.lr.ph38:                                         ; preds = %.lr.ph38.preheader, %.lr.ph38
  %indvars.iv48 = phi i64 [ %57, %.lr.ph38.preheader ], [ %indvars.iv.next49, %.lr.ph38 ]
  %58 = call i32 @bit_map_get(ptr noundef nonnull %36, i64 noundef %indvars.iv48) #6
  %59 = zext i32 %58 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %59, ptr noundef null, i64 noundef 949, i32 noundef 148) #6
  %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1
  %60 = load i32, ptr %54, align 4, !tbaa !9
  %61 = zext i32 %60 to i64
  %62 = icmp ult i64 %indvars.iv.next49, %61
  br i1 %62, label %.lr.ph38, label %.loopexit, !llvm.loop !20

63:                                               ; preds = %.loopexit
  call void @bit_map_destroy(ptr noundef nonnull %1) #6
  call void @bit_map_destroy(ptr noundef nonnull %3) #6
  %64 = call i32 @remove(ptr noundef nonnull @.str.17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 2000, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret void
}

declare ptr @bit_map_init(i64 noundef) local_unnamed_addr #1

declare i32 @bit_map_get(ptr noundef, i64 noundef) local_unnamed_addr #1

declare void @bit_map_set(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nofree
declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #5

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

declare void @bit_map_store(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @bit_map_load(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @bit_map_destroy(ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress 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 = { 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 = { 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 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 #5 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!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 = distinct !{!14, !12}
!15 = !{!16, !17, i64 0}
!16 = !{!"bit_map", !17, i64 0, !10, i64 8, !6, i64 16}
!17 = !{!"long", !7, i64 0}
!18 = !{!16, !10, i64 8}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}


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