; LLVM IR from attractivechaos/klib :: test (kbit_test)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [54 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 100000000, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 1, ptr %7, align 4, !tbaa !5
  %8 = load i32, ptr %3, align 4, !tbaa !5
  %9 = sext i32 %8 to i64
  %10 = call noalias ptr @calloc(i64 noundef %9, i64 noundef 8) #8
  store ptr %10, ptr %4, align 8, !tbaa !9
  call void @srand48(i64 noundef 11) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %11

11:                                               ; preds = %24, %0
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = load i32, ptr %3, align 4, !tbaa !5
  %14 = icmp slt i32 %12, %13
  br i1 %14, label %15, label %27

15:                                               ; preds = %11
  %16 = call i64 @lrand48() #7
  %17 = shl i64 %16, 32
  %18 = call i64 @lrand48() #7
  %19 = xor i64 %17, %18
  %20 = load ptr, ptr %4, align 8, !tbaa !9
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds i64, ptr %20, i64 %22
  store i64 %19, ptr %23, align 8, !tbaa !11
  br label %24

24:                                               ; preds = %15
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %2, align 4, !tbaa !5
  br label %11, !llvm.loop !13

27:                                               ; preds = %11
  %28 = load ptr, ptr @stderr, align 8, !tbaa !9
  %29 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef @.str) #7
  %30 = call i64 @clock() #7
  store i64 %30, ptr %6, align 8, !tbaa !11
  store i64 0, ptr %5, align 8, !tbaa !11
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %44, %27
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %35, label %47

35:                                               ; preds = %31
  %36 = load ptr, ptr %4, align 8, !tbaa !9
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds i64, ptr %36, i64 %38
  %40 = load i64, ptr %39, align 8, !tbaa !11
  %41 = call i64 @kbi_popcount64(i64 noundef %40)
  %42 = load i64, ptr %5, align 8, !tbaa !11
  %43 = add i64 %42, %41
  store i64 %43, ptr %5, align 8, !tbaa !11
  br label %44

44:                                               ; preds = %35
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %2, align 4, !tbaa !5
  br label %31, !llvm.loop !15

47:                                               ; preds = %31
  %48 = load ptr, ptr @stderr, align 8, !tbaa !9
  %49 = load i64, ptr %5, align 8, !tbaa !11
  %50 = call i64 @clock() #7
  %51 = load i64, ptr %6, align 8, !tbaa !11
  %52 = sub nsw i64 %50, %51
  %53 = sitofp i64 %52 to double
  %54 = fdiv double %53, 1.000000e+06
  %55 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef @.str.1, ptr noundef @.str.2, i64 noundef %49, double noundef %54) #7
  %56 = call i64 @clock() #7
  store i64 %56, ptr %6, align 8, !tbaa !11
  store i64 0, ptr %5, align 8, !tbaa !11
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %71, %47
  %58 = load i32, ptr %2, align 4, !tbaa !5
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %61, label %74

61:                                               ; preds = %57
  %62 = load ptr, ptr %4, align 8, !tbaa !9
  %63 = load i32, ptr %2, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds i64, ptr %62, i64 %64
  %66 = load i64, ptr %65, align 8, !tbaa !11
  %67 = call i32 @bt1_pop64(i64 noundef %66)
  %68 = sext i32 %67 to i64
  %69 = load i64, ptr %5, align 8, !tbaa !11
  %70 = add i64 %69, %68
  store i64 %70, ptr %5, align 8, !tbaa !11
  br label %71

71:                                               ; preds = %61
  %72 = load i32, ptr %2, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %2, align 4, !tbaa !5
  br label %57, !llvm.loop !16

74:                                               ; preds = %57
  %75 = load ptr, ptr @stderr, align 8, !tbaa !9
  %76 = load i64, ptr %5, align 8, !tbaa !11
  %77 = call i64 @clock() #7
  %78 = load i64, ptr %6, align 8, !tbaa !11
  %79 = sub nsw i64 %77, %78
  %80 = sitofp i64 %79 to double
  %81 = fdiv double %80, 1.000000e+06
  %82 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef @.str.1, ptr noundef @.str.3, i64 noundef %76, double noundef %81) #7
  %83 = call i64 @clock() #7
  store i64 %83, ptr %6, align 8, !tbaa !11
  store i64 0, ptr %5, align 8, !tbaa !11
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %99, %74
  %85 = load i32, ptr %2, align 4, !tbaa !5
  %86 = load i32, ptr %3, align 4, !tbaa !5
  %87 = icmp slt i32 %85, %86
  br i1 %87, label %88, label %102

88:                                               ; preds = %84
  %89 = load ptr, ptr %4, align 8, !tbaa !9
  %90 = load i32, ptr %2, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds i64, ptr %89, i64 %91
  %93 = load i64, ptr %92, align 8, !tbaa !11
  %94 = call i64 @llvm.ctpop.i64(i64 %93)
  %95 = trunc i64 %94 to i32
  %96 = sext i32 %95 to i64
  %97 = load i64, ptr %5, align 8, !tbaa !11
  %98 = add i64 %97, %96
  store i64 %98, ptr %5, align 8, !tbaa !11
  br label %99

99:                                               ; preds = %88
  %100 = load i32, ptr %2, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %2, align 4, !tbaa !5
  br label %84, !llvm.loop !17

102:                                              ; preds = %84
  %103 = load ptr, ptr @stderr, align 8, !tbaa !9
  %104 = load i64, ptr %5, align 8, !tbaa !11
  %105 = call i64 @clock() #7
  %106 = load i64, ptr %6, align 8, !tbaa !11
  %107 = sub nsw i64 %105, %106
  %108 = sitofp i64 %107 to double
  %109 = fdiv double %108, 1.000000e+06
  %110 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef @.str.1, ptr noundef @.str.4, i64 noundef %104, double noundef %109) #7
  %111 = call i64 @clock() #7
  store i64 %111, ptr %6, align 8, !tbaa !11
  store i64 0, ptr %5, align 8, !tbaa !11
  %112 = load ptr, ptr %4, align 8, !tbaa !9
  %113 = load ptr, ptr %4, align 8, !tbaa !9
  %114 = load i32, ptr %3, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds i64, ptr %113, i64 %115
  %117 = call i32 @sse2_bit_count32(ptr noundef %112, ptr noundef %116)
  %118 = zext i32 %117 to i64
  %119 = load i64, ptr %5, align 8, !tbaa !11
  %120 = add i64 %119, %118
  store i64 %120, ptr %5, align 8, !tbaa !11
  %121 = load ptr, ptr @stderr, align 8, !tbaa !9
  %122 = load i64, ptr %5, align 8, !tbaa !11
  %123 = call i64 @clock() #7
  %124 = load i64, ptr %6, align 8, !tbaa !11
  %125 = sub nsw i64 %123, %124
  %126 = sitofp i64 %125 to double
  %127 = fdiv double %126, 1.000000e+06
  %128 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %121, ptr noundef @.str.1, ptr noundef @.str.5, i64 noundef %122, double noundef %127) #7
  %129 = load ptr, ptr @stderr, align 8, !tbaa !9
  %130 = load i32, ptr %7, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [5 x i8], ptr @.str.7, i64 0, i64 %131
  %133 = load i8, ptr %132, align 1, !tbaa !18
  %134 = sext i8 %133 to i32
  %135 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %129, ptr noundef @.str.6, i32 noundef %134) #7
  %136 = call i64 @clock() #7
  store i64 %136, ptr %6, align 8, !tbaa !11
  store i64 0, ptr %5, align 8, !tbaa !11
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %151, %102
  %138 = load i32, ptr %2, align 4, !tbaa !5
  %139 = load i32, ptr %3, align 4, !tbaa !5
  %140 = icmp slt i32 %138, %139
  br i1 %140, label %141, label %154

141:                                              ; preds = %137
  %142 = load ptr, ptr %4, align 8, !tbaa !9
  %143 = load i32, ptr %2, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds i64, ptr %142, i64 %144
  %146 = load i64, ptr %145, align 8, !tbaa !11
  %147 = load i32, ptr %7, align 4, !tbaa !5
  %148 = call i64 @kbi_DNAcount64(i64 noundef %146, i32 noundef %147)
  %149 = load i64, ptr %5, align 8, !tbaa !11
  %150 = add i64 %149, %148
  store i64 %150, ptr %5, align 8, !tbaa !11
  br label %151

151:                                              ; preds = %141
  %152 = load i32, ptr %2, align 4, !tbaa !5
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %2, align 4, !tbaa !5
  br label %137, !llvm.loop !19

154:                                              ; preds = %137
  %155 = load ptr, ptr @stderr, align 8, !tbaa !9
  %156 = load i64, ptr %5, align 8, !tbaa !11
  %157 = call i64 @clock() #7
  %158 = load i64, ptr %6, align 8, !tbaa !11
  %159 = sub nsw i64 %157, %158
  %160 = sitofp i64 %159 to double
  %161 = fdiv double %160, 1.000000e+06
  %162 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %155, ptr noundef @.str.1, ptr noundef @.str.2, i64 noundef %156, double noundef %161) #7
  %163 = call i64 @clock() #7
  store i64 %163, ptr %6, align 8, !tbaa !11
  store i64 0, ptr %5, align 8, !tbaa !11
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %164

164:                                              ; preds = %179, %154
  %165 = load i32, ptr %2, align 4, !tbaa !5
  %166 = load i32, ptr %3, align 4, !tbaa !5
  %167 = icmp slt i32 %165, %166
  br i1 %167, label %168, label %182

168:                                              ; preds = %164
  %169 = load ptr, ptr %4, align 8, !tbaa !9
  %170 = load i32, ptr %2, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds i64, ptr %169, i64 %171
  %173 = load i64, ptr %172, align 8, !tbaa !11
  %174 = load i32, ptr %7, align 4, !tbaa !5
  %175 = call i32 @bt1_countInU64(i64 noundef %173, i32 noundef %174)
  %176 = sext i32 %175 to i64
  %177 = load i64, ptr %5, align 8, !tbaa !11
  %178 = add i64 %177, %176
  store i64 %178, ptr %5, align 8, !tbaa !11
  br label %179

179:                                              ; preds = %168
  %180 = load i32, ptr %2, align 4, !tbaa !5
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %2, align 4, !tbaa !5
  br label %164, !llvm.loop !20

182:                                              ; preds = %164
  %183 = load ptr, ptr @stderr, align 8, !tbaa !9
  %184 = load i64, ptr %5, align 8, !tbaa !11
  %185 = call i64 @clock() #7
  %186 = load i64, ptr %6, align 8, !tbaa !11
  %187 = sub nsw i64 %185, %186
  %188 = sitofp i64 %187 to double
  %189 = fdiv double %188, 1.000000e+06
  %190 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %183, ptr noundef @.str.1, ptr noundef @.str.8, i64 noundef %184, double noundef %189) #7
  %191 = load ptr, ptr @stderr, align 8, !tbaa !9
  %192 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %191, ptr noundef @.str.9) #7
  %193 = load ptr, ptr %4, align 8, !tbaa !9
  call void @free(ptr noundef %193) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  ret i32 0
}

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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #2

; Function Attrs: nounwind
declare void @srand48(i64 noundef) #3

; Function Attrs: nounwind
declare i64 @lrand48() #3

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

; Function Attrs: nounwind
declare i64 @clock() #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @kbi_popcount64(i64 noundef) #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @bt1_pop64(i64 noundef) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.ctpop.i64(i64) #5

; Function Attrs: nounwind uwtable
declare hidden i32 @sse2_bit_count32(ptr noundef, ptr noundef) #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @kbi_DNAcount64(i64 noundef, i32 noundef) #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @bt1_countInU64(i64 noundef, i32 noundef) #4

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind allocsize(0,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 #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 = { inlinehint 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind uwtable "min-legal-vector-width"="128" "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 #7 = { nounwind }
attributes #8 = { nounwind allocsize(0,1) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !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"

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [54 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call noalias dereferenceable_or_null(800000000) ptr @calloc(i64 noundef 100000000, i64 noundef 8) #8
  tail call void @srand48(i64 noundef 11) #9
  br label %2

2:                                                ; preds = %0, %2
  %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %2 ]
  %3 = tail call i64 @lrand48() #9
  %4 = shl i64 %3, 32
  %5 = tail call i64 @lrand48() #9
  %6 = xor i64 %4, %5
  %7 = getelementptr inbounds i64, ptr %1, i64 %indvars.iv
  store i64 %6, ptr %7, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 100000000
  br i1 %exitcond.not, label %8, label %2, !llvm.loop !9

8:                                                ; preds = %2
  %9 = load ptr, ptr @stderr, align 8, !tbaa !11
  %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str) #10
  %11 = tail call i64 @clock() #9
  br label %12

12:                                               ; preds = %8, %12
  %indvars.iv76 = phi i64 [ 0, %8 ], [ %indvars.iv.next77, %12 ]
  %.05561 = phi i64 [ 0, %8 ], [ %16, %12 ]
  %13 = getelementptr inbounds i64, ptr %1, i64 %indvars.iv76
  %14 = load i64, ptr %13, align 8, !tbaa !5
  %15 = tail call i64 @kbi_popcount64(i64 noundef %14)
  %16 = add i64 %15, %.05561
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %exitcond79.not = icmp eq i64 %indvars.iv.next77, 100000000
  br i1 %exitcond79.not, label %17, label %12, !llvm.loop !13

17:                                               ; preds = %12
  %18 = load ptr, ptr @stderr, align 8, !tbaa !11
  %19 = tail call i64 @clock() #9
  %20 = sub nsw i64 %19, %11
  %21 = sitofp i64 %20 to double
  %22 = fdiv double %21, 1.000000e+06
  %23 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i64 noundef %16, double noundef %22) #10
  %24 = tail call i64 @clock() #9
  br label %25

25:                                               ; preds = %17, %25
  %indvars.iv80 = phi i64 [ 0, %17 ], [ %indvars.iv.next81, %25 ]
  %.15663 = phi i64 [ 0, %17 ], [ %30, %25 ]
  %26 = getelementptr inbounds i64, ptr %1, i64 %indvars.iv80
  %27 = load i64, ptr %26, align 8, !tbaa !5
  %28 = tail call i32 @bt1_pop64(i64 noundef %27)
  %29 = sext i32 %28 to i64
  %30 = add i64 %.15663, %29
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %exitcond83.not = icmp eq i64 %indvars.iv.next81, 100000000
  br i1 %exitcond83.not, label %vector.ph, label %25, !llvm.loop !14

vector.ph:                                        ; preds = %25
  %31 = load ptr, ptr @stderr, align 8, !tbaa !11
  %32 = tail call i64 @clock() #9
  %33 = sub nsw i64 %32, %24
  %34 = sitofp i64 %33 to double
  %35 = fdiv double %34, 1.000000e+06
  %36 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.3, i64 noundef %30, double noundef %35) #10
  %37 = tail call i64 @clock() #9
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %42, %vector.body ]
  %vec.phi104 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %43, %vector.body ]
  %38 = getelementptr inbounds i64, ptr %1, i64 %index
  %39 = getelementptr inbounds i8, ptr %38, i64 16
  %wide.load = load <2 x i64>, ptr %38, align 8, !tbaa !5
  %wide.load105 = load <2 x i64>, ptr %39, align 8, !tbaa !5
  %40 = tail call range(i64 0, 65) <2 x i64> @llvm.ctpop.v2i64(<2 x i64> %wide.load)
  %41 = tail call range(i64 0, 65) <2 x i64> @llvm.ctpop.v2i64(<2 x i64> %wide.load105)
  %42 = add <2 x i64> %40, %vec.phi
  %43 = add <2 x i64> %41, %vec.phi104
  %index.next = add nuw i64 %index, 4
  %44 = icmp eq i64 %index.next, 100000000
  br i1 %44, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %43, %42
  %45 = tail call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %46 = load ptr, ptr @stderr, align 8, !tbaa !11
  %47 = tail call i64 @clock() #9
  %48 = sub nsw i64 %47, %37
  %49 = sitofp i64 %48 to double
  %50 = fdiv double %49, 1.000000e+06
  %51 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.4, i64 noundef %45, double noundef %50) #10
  %52 = tail call i64 @clock() #9
  %53 = getelementptr inbounds i8, ptr %1, i64 800000000
  %54 = tail call i32 @sse2_bit_count32(ptr noundef nonnull %1, ptr noundef nonnull %53)
  %55 = zext i32 %54 to i64
  %56 = load ptr, ptr @stderr, align 8, !tbaa !11
  %57 = tail call i64 @clock() #9
  %58 = sub nsw i64 %57, %52
  %59 = sitofp i64 %58 to double
  %60 = fdiv double %59, 1.000000e+06
  %61 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.5, i64 noundef %55, double noundef %60) #10
  %62 = load ptr, ptr @stderr, align 8, !tbaa !11
  %63 = load i8, ptr getelementptr inbounds (i8, ptr @.str.7, i64 1), align 1, !tbaa !18
  %64 = sext i8 %63 to i32
  %65 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %62, ptr noundef nonnull @.str.6, i32 noundef %64) #10
  %66 = tail call i64 @clock() #9
  br label %67

67:                                               ; preds = %middle.block, %67
  %indvars.iv88 = phi i64 [ 0, %middle.block ], [ %indvars.iv.next89, %67 ]
  %.35867 = phi i64 [ 0, %middle.block ], [ %71, %67 ]
  %68 = getelementptr inbounds i64, ptr %1, i64 %indvars.iv88
  %69 = load i64, ptr %68, align 8, !tbaa !5
  %70 = tail call i64 @kbi_DNAcount64(i64 noundef %69, i32 noundef 1)
  %71 = add i64 %70, %.35867
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %exitcond91.not = icmp eq i64 %indvars.iv.next89, 100000000
  br i1 %exitcond91.not, label %72, label %67, !llvm.loop !19

72:                                               ; preds = %67
  %73 = load ptr, ptr @stderr, align 8, !tbaa !11
  %74 = tail call i64 @clock() #9
  %75 = sub nsw i64 %74, %66
  %76 = sitofp i64 %75 to double
  %77 = fdiv double %76, 1.000000e+06
  %78 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %73, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i64 noundef %71, double noundef %77) #10
  %79 = tail call i64 @clock() #9
  br label %80

80:                                               ; preds = %72, %80
  %indvars.iv92 = phi i64 [ 0, %72 ], [ %indvars.iv.next93, %80 ]
  %.45969 = phi i64 [ 0, %72 ], [ %85, %80 ]
  %81 = getelementptr inbounds i64, ptr %1, i64 %indvars.iv92
  %82 = load i64, ptr %81, align 8, !tbaa !5
  %83 = tail call i32 @bt1_countInU64(i64 noundef %82, i32 noundef 1)
  %84 = sext i32 %83 to i64
  %85 = add i64 %.45969, %84
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %exitcond95.not = icmp eq i64 %indvars.iv.next93, 100000000
  br i1 %exitcond95.not, label %86, label %80, !llvm.loop !20

86:                                               ; preds = %80
  %87 = load ptr, ptr @stderr, align 8, !tbaa !11
  %88 = tail call i64 @clock() #9
  %89 = sub nsw i64 %88, %79
  %90 = sitofp i64 %89 to double
  %91 = fdiv double %90, 1.000000e+06
  %92 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.8, i64 noundef %85, double noundef %91) #10
  %93 = load ptr, ptr @stderr, align 8, !tbaa !11
  %94 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %93, ptr noundef nonnull @.str.9) #10
  tail call void @free(ptr noundef nonnull %1) #9
  ret i32 0
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind
declare void @srand48(i64 noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare i64 @lrand48() local_unnamed_addr #2

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

; Function Attrs: nounwind
declare i64 @clock() local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @kbi_popcount64(i64 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @bt1_pop64(i64 noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden i32 @sse2_bit_count32(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @kbi_DNAcount64(i64 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @bt1_countInU64(i64 noundef, i32 noundef) local_unnamed_addr #4

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x i64> @llvm.ctpop.v2i64(<2 x i64>) #7

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #7

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 nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(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 = { 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 = { inlinehint 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 = { nounwind uwtable "min-legal-vector-width"="128" "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 = { 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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind allocsize(0,1) }
attributes #9 = { nounwind }
attributes #10 = { cold 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10, !16, !17}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopLoadEliminationPass,LoopRotatePass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass