; LLVM IR from kimwalisch/primesieve :: src/popcount.ll (ZN10primesieve8popcountEPKmm)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN10primesieve8popcountEPKmm(ptr noundef %0, i64 noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store i64 0, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store i64 0, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store i64 0, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store i64 0, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store i64 0, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store i64 0, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %19 = load i64, ptr %4, align 8, !tbaa !9
  %20 = load i64, ptr %4, align 8, !tbaa !9
  %21 = urem i64 %20, 16
  %22 = sub i64 %19, %21
  store i64 %22, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %23

23:                                               ; preds = %141, %2
  %24 = load i64, ptr %18, align 8, !tbaa !9
  %25 = load i64, ptr %17, align 8, !tbaa !9
  %26 = icmp ult i64 %24, %25
  br i1 %26, label %27, label %144

27:                                               ; preds = %23
  %28 = load i64, ptr %6, align 8, !tbaa !9
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = load i64, ptr %18, align 8, !tbaa !9
  %31 = add i64 %30, 0
  %32 = getelementptr inbounds i64, ptr %29, i64 %31
  %33 = load i64, ptr %32, align 8, !tbaa !9
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = load i64, ptr %18, align 8, !tbaa !9
  %36 = add i64 %35, 1
  %37 = getelementptr inbounds i64, ptr %34, i64 %36
  %38 = load i64, ptr %37, align 8, !tbaa !9
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %28, i64 noundef %33, i64 noundef %38)
  %39 = load i64, ptr %6, align 8, !tbaa !9
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = load i64, ptr %18, align 8, !tbaa !9
  %42 = add i64 %41, 2
  %43 = getelementptr inbounds i64, ptr %40, i64 %42
  %44 = load i64, ptr %43, align 8, !tbaa !9
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = load i64, ptr %18, align 8, !tbaa !9
  %47 = add i64 %46, 3
  %48 = getelementptr inbounds i64, ptr %45, i64 %47
  %49 = load i64, ptr %48, align 8, !tbaa !9
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %39, i64 noundef %44, i64 noundef %49)
  %50 = load i64, ptr %7, align 8, !tbaa !9
  %51 = load i64, ptr %11, align 8, !tbaa !9
  %52 = load i64, ptr %12, align 8, !tbaa !9
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %7, i64 noundef %50, i64 noundef %51, i64 noundef %52)
  %53 = load i64, ptr %6, align 8, !tbaa !9
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = load i64, ptr %18, align 8, !tbaa !9
  %56 = add i64 %55, 4
  %57 = getelementptr inbounds i64, ptr %54, i64 %56
  %58 = load i64, ptr %57, align 8, !tbaa !9
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = load i64, ptr %18, align 8, !tbaa !9
  %61 = add i64 %60, 5
  %62 = getelementptr inbounds i64, ptr %59, i64 %61
  %63 = load i64, ptr %62, align 8, !tbaa !9
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %53, i64 noundef %58, i64 noundef %63)
  %64 = load i64, ptr %6, align 8, !tbaa !9
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = load i64, ptr %18, align 8, !tbaa !9
  %67 = add i64 %66, 6
  %68 = getelementptr inbounds i64, ptr %65, i64 %67
  %69 = load i64, ptr %68, align 8, !tbaa !9
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = load i64, ptr %18, align 8, !tbaa !9
  %72 = add i64 %71, 7
  %73 = getelementptr inbounds i64, ptr %70, i64 %72
  %74 = load i64, ptr %73, align 8, !tbaa !9
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %64, i64 noundef %69, i64 noundef %74)
  %75 = load i64, ptr %7, align 8, !tbaa !9
  %76 = load i64, ptr %11, align 8, !tbaa !9
  %77 = load i64, ptr %12, align 8, !tbaa !9
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %7, i64 noundef %75, i64 noundef %76, i64 noundef %77)
  %78 = load i64, ptr %8, align 8, !tbaa !9
  %79 = load i64, ptr %13, align 8, !tbaa !9
  %80 = load i64, ptr %14, align 8, !tbaa !9
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %8, i64 noundef %78, i64 noundef %79, i64 noundef %80)
  %81 = load i64, ptr %6, align 8, !tbaa !9
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = load i64, ptr %18, align 8, !tbaa !9
  %84 = add i64 %83, 8
  %85 = getelementptr inbounds i64, ptr %82, i64 %84
  %86 = load i64, ptr %85, align 8, !tbaa !9
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = load i64, ptr %18, align 8, !tbaa !9
  %89 = add i64 %88, 9
  %90 = getelementptr inbounds i64, ptr %87, i64 %89
  %91 = load i64, ptr %90, align 8, !tbaa !9
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %81, i64 noundef %86, i64 noundef %91)
  %92 = load i64, ptr %6, align 8, !tbaa !9
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = load i64, ptr %18, align 8, !tbaa !9
  %95 = add i64 %94, 10
  %96 = getelementptr inbounds i64, ptr %93, i64 %95
  %97 = load i64, ptr %96, align 8, !tbaa !9
  %98 = load ptr, ptr %3, align 8, !tbaa !5
  %99 = load i64, ptr %18, align 8, !tbaa !9
  %100 = add i64 %99, 11
  %101 = getelementptr inbounds i64, ptr %98, i64 %100
  %102 = load i64, ptr %101, align 8, !tbaa !9
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %92, i64 noundef %97, i64 noundef %102)
  %103 = load i64, ptr %7, align 8, !tbaa !9
  %104 = load i64, ptr %11, align 8, !tbaa !9
  %105 = load i64, ptr %12, align 8, !tbaa !9
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %7, i64 noundef %103, i64 noundef %104, i64 noundef %105)
  %106 = load i64, ptr %6, align 8, !tbaa !9
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = load i64, ptr %18, align 8, !tbaa !9
  %109 = add i64 %108, 12
  %110 = getelementptr inbounds i64, ptr %107, i64 %109
  %111 = load i64, ptr %110, align 8, !tbaa !9
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = load i64, ptr %18, align 8, !tbaa !9
  %114 = add i64 %113, 13
  %115 = getelementptr inbounds i64, ptr %112, i64 %114
  %116 = load i64, ptr %115, align 8, !tbaa !9
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %106, i64 noundef %111, i64 noundef %116)
  %117 = load i64, ptr %6, align 8, !tbaa !9
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  %119 = load i64, ptr %18, align 8, !tbaa !9
  %120 = add i64 %119, 14
  %121 = getelementptr inbounds i64, ptr %118, i64 %120
  %122 = load i64, ptr %121, align 8, !tbaa !9
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = load i64, ptr %18, align 8, !tbaa !9
  %125 = add i64 %124, 15
  %126 = getelementptr inbounds i64, ptr %123, i64 %125
  %127 = load i64, ptr %126, align 8, !tbaa !9
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %117, i64 noundef %122, i64 noundef %127)
  %128 = load i64, ptr %7, align 8, !tbaa !9
  %129 = load i64, ptr %11, align 8, !tbaa !9
  %130 = load i64, ptr %12, align 8, !tbaa !9
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %7, i64 noundef %128, i64 noundef %129, i64 noundef %130)
  %131 = load i64, ptr %8, align 8, !tbaa !9
  %132 = load i64, ptr %13, align 8, !tbaa !9
  %133 = load i64, ptr %14, align 8, !tbaa !9
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %8, i64 noundef %131, i64 noundef %132, i64 noundef %133)
  %134 = load i64, ptr %9, align 8, !tbaa !9
  %135 = load i64, ptr %15, align 8, !tbaa !9
  %136 = load i64, ptr %16, align 8, !tbaa !9
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %9, i64 noundef %134, i64 noundef %135, i64 noundef %136)
  %137 = load i64, ptr %10, align 8, !tbaa !9
  %138 = call noundef i64 @_ZN12_GLOBAL__N_18popcnt64Em(i64 noundef %137)
  %139 = load i64, ptr %5, align 8, !tbaa !9
  %140 = add i64 %139, %138
  store i64 %140, ptr %5, align 8, !tbaa !9
  br label %141

141:                                              ; preds = %27
  %142 = load i64, ptr %18, align 8, !tbaa !9
  %143 = add i64 %142, 16
  store i64 %143, ptr %18, align 8, !tbaa !9
  br label %23, !llvm.loop !11

144:                                              ; preds = %23
  %145 = load i64, ptr %5, align 8, !tbaa !9
  %146 = mul i64 %145, 16
  store i64 %146, ptr %5, align 8, !tbaa !9
  %147 = load i64, ptr %9, align 8, !tbaa !9
  %148 = call noundef i64 @_ZN12_GLOBAL__N_18popcnt64Em(i64 noundef %147)
  %149 = mul i64 8, %148
  %150 = load i64, ptr %5, align 8, !tbaa !9
  %151 = add i64 %150, %149
  store i64 %151, ptr %5, align 8, !tbaa !9
  %152 = load i64, ptr %8, align 8, !tbaa !9
  %153 = call noundef i64 @_ZN12_GLOBAL__N_18popcnt64Em(i64 noundef %152)
  %154 = mul i64 4, %153
  %155 = load i64, ptr %5, align 8, !tbaa !9
  %156 = add i64 %155, %154
  store i64 %156, ptr %5, align 8, !tbaa !9
  %157 = load i64, ptr %7, align 8, !tbaa !9
  %158 = call noundef i64 @_ZN12_GLOBAL__N_18popcnt64Em(i64 noundef %157)
  %159 = mul i64 2, %158
  %160 = load i64, ptr %5, align 8, !tbaa !9
  %161 = add i64 %160, %159
  store i64 %161, ptr %5, align 8, !tbaa !9
  %162 = load i64, ptr %6, align 8, !tbaa !9
  %163 = call noundef i64 @_ZN12_GLOBAL__N_18popcnt64Em(i64 noundef %162)
  %164 = mul i64 1, %163
  %165 = load i64, ptr %5, align 8, !tbaa !9
  %166 = add i64 %165, %164
  store i64 %166, ptr %5, align 8, !tbaa !9
  br label %167

167:                                              ; preds = %179, %144
  %168 = load i64, ptr %18, align 8, !tbaa !9
  %169 = load i64, ptr %4, align 8, !tbaa !9
  %170 = icmp ult i64 %168, %169
  br i1 %170, label %171, label %182

171:                                              ; preds = %167
  %172 = load ptr, ptr %3, align 8, !tbaa !5
  %173 = load i64, ptr %18, align 8, !tbaa !9
  %174 = getelementptr inbounds i64, ptr %172, i64 %173
  %175 = load i64, ptr %174, align 8, !tbaa !9
  %176 = call noundef i64 @_ZN12_GLOBAL__N_18popcnt64Em(i64 noundef %175)
  %177 = load i64, ptr %5, align 8, !tbaa !9
  %178 = add i64 %177, %176
  store i64 %178, ptr %5, align 8, !tbaa !9
  br label %179

179:                                              ; preds = %171
  %180 = load i64, ptr %18, align 8, !tbaa !9
  %181 = add i64 %180, 1
  store i64 %181, ptr %18, align 8, !tbaa !9
  br label %167, !llvm.loop !13

182:                                              ; preds = %167
  %183 = load i64, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #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
  ret i64 %183
}

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i64 noundef, i64 noundef) #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef i64 @_ZN12_GLOBAL__N_18popcnt64Em(i64 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 = { mustprogress 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 = { mustprogress 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 = { alwaysinline mustprogress 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !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"

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i64 @_ZN10primesieve8popcountEPKmm(ptr nocapture noundef readonly %0, i64 noundef %1) local_unnamed_addr #0 {
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  store i64 0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  store i64 0, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  store i64 0, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  store i64 0, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  store i64 0, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #3
  %14 = and i64 %1, -16
  %.not = icmp eq i64 %14, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2, %.lr.ph
  %.052 = phi i64 [ %94, %.lr.ph ], [ 0, %2 ]
  %.04951 = phi i64 [ %93, %.lr.ph ], [ 0, %2 ]
  %15 = load i64, ptr %3, align 8, !tbaa !5
  %16 = getelementptr inbounds i64, ptr %0, i64 %.052
  %17 = load i64, ptr %16, align 8, !tbaa !5
  %18 = or disjoint i64 %.052, 1
  %19 = getelementptr inbounds i64, ptr %0, i64 %18
  %20 = load i64, ptr %19, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %15, i64 noundef %17, i64 noundef %20)
  %21 = load i64, ptr %3, align 8, !tbaa !5
  %22 = or disjoint i64 %.052, 2
  %23 = getelementptr inbounds i64, ptr %0, i64 %22
  %24 = load i64, ptr %23, align 8, !tbaa !5
  %25 = or disjoint i64 %.052, 3
  %26 = getelementptr inbounds i64, ptr %0, i64 %25
  %27 = load i64, ptr %26, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %21, i64 noundef %24, i64 noundef %27)
  %28 = load i64, ptr %4, align 8, !tbaa !5
  %29 = load i64, ptr %8, align 8, !tbaa !5
  %30 = load i64, ptr %9, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %28, i64 noundef %29, i64 noundef %30)
  %31 = load i64, ptr %3, align 8, !tbaa !5
  %32 = or disjoint i64 %.052, 4
  %33 = getelementptr inbounds i64, ptr %0, i64 %32
  %34 = load i64, ptr %33, align 8, !tbaa !5
  %35 = or disjoint i64 %.052, 5
  %36 = getelementptr inbounds i64, ptr %0, i64 %35
  %37 = load i64, ptr %36, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %31, i64 noundef %34, i64 noundef %37)
  %38 = load i64, ptr %3, align 8, !tbaa !5
  %39 = or disjoint i64 %.052, 6
  %40 = getelementptr inbounds i64, ptr %0, i64 %39
  %41 = load i64, ptr %40, align 8, !tbaa !5
  %42 = or disjoint i64 %.052, 7
  %43 = getelementptr inbounds i64, ptr %0, i64 %42
  %44 = load i64, ptr %43, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %38, i64 noundef %41, i64 noundef %44)
  %45 = load i64, ptr %4, align 8, !tbaa !5
  %46 = load i64, ptr %8, align 8, !tbaa !5
  %47 = load i64, ptr %9, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %45, i64 noundef %46, i64 noundef %47)
  %48 = load i64, ptr %5, align 8, !tbaa !5
  %49 = load i64, ptr %10, align 8, !tbaa !5
  %50 = load i64, ptr %11, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %5, i64 noundef %48, i64 noundef %49, i64 noundef %50)
  %51 = load i64, ptr %3, align 8, !tbaa !5
  %52 = or disjoint i64 %.052, 8
  %53 = getelementptr inbounds i64, ptr %0, i64 %52
  %54 = load i64, ptr %53, align 8, !tbaa !5
  %55 = or disjoint i64 %.052, 9
  %56 = getelementptr inbounds i64, ptr %0, i64 %55
  %57 = load i64, ptr %56, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %51, i64 noundef %54, i64 noundef %57)
  %58 = load i64, ptr %3, align 8, !tbaa !5
  %59 = or disjoint i64 %.052, 10
  %60 = getelementptr inbounds i64, ptr %0, i64 %59
  %61 = load i64, ptr %60, align 8, !tbaa !5
  %62 = or disjoint i64 %.052, 11
  %63 = getelementptr inbounds i64, ptr %0, i64 %62
  %64 = load i64, ptr %63, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %58, i64 noundef %61, i64 noundef %64)
  %65 = load i64, ptr %4, align 8, !tbaa !5
  %66 = load i64, ptr %8, align 8, !tbaa !5
  %67 = load i64, ptr %9, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %65, i64 noundef %66, i64 noundef %67)
  %68 = load i64, ptr %3, align 8, !tbaa !5
  %69 = or disjoint i64 %.052, 12
  %70 = getelementptr inbounds i64, ptr %0, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !5
  %72 = or disjoint i64 %.052, 13
  %73 = getelementptr inbounds i64, ptr %0, i64 %72
  %74 = load i64, ptr %73, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %68, i64 noundef %71, i64 noundef %74)
  %75 = load i64, ptr %3, align 8, !tbaa !5
  %76 = or disjoint i64 %.052, 14
  %77 = getelementptr inbounds i64, ptr %0, i64 %76
  %78 = load i64, ptr %77, align 8, !tbaa !5
  %79 = or disjoint i64 %.052, 15
  %80 = getelementptr inbounds i64, ptr %0, i64 %79
  %81 = load i64, ptr %80, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %75, i64 noundef %78, i64 noundef %81)
  %82 = load i64, ptr %4, align 8, !tbaa !5
  %83 = load i64, ptr %8, align 8, !tbaa !5
  %84 = load i64, ptr %9, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %82, i64 noundef %83, i64 noundef %84)
  %85 = load i64, ptr %5, align 8, !tbaa !5
  %86 = load i64, ptr %10, align 8, !tbaa !5
  %87 = load i64, ptr %11, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %5, i64 noundef %85, i64 noundef %86, i64 noundef %87)
  %88 = load i64, ptr %6, align 8, !tbaa !5
  %89 = load i64, ptr %12, align 8, !tbaa !5
  %90 = load i64, ptr %13, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %88, i64 noundef %89, i64 noundef %90)
  %91 = load i64, ptr %7, align 8, !tbaa !5
  %92 = call noundef i64 @_ZN12_GLOBAL__N_18popcnt64Em(i64 noundef %91)
  %93 = add i64 %92, %.04951
  %94 = add nuw i64 %.052, 16
  %95 = icmp ult i64 %94, %14
  br i1 %95, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !9

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i64, ptr %6, align 8, !tbaa !5
  %96 = shl i64 %93, 4
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %2
  %97 = phi i64 [ 0, %2 ], [ %.pre, %._crit_edge.loopexit ]
  %.049.lcssa = phi i64 [ 0, %2 ], [ %96, %._crit_edge.loopexit ]
  %.0.lcssa = phi i64 [ 0, %2 ], [ %94, %._crit_edge.loopexit ]
  %98 = call noundef i64 @_ZN12_GLOBAL__N_18popcnt64Em(i64 noundef %97)
  %99 = shl i64 %98, 3
  %100 = add i64 %99, %.049.lcssa
  %101 = load i64, ptr %5, align 8, !tbaa !5
  %102 = call noundef i64 @_ZN12_GLOBAL__N_18popcnt64Em(i64 noundef %101)
  %103 = shl i64 %102, 2
  %104 = add i64 %100, %103
  %105 = load i64, ptr %4, align 8, !tbaa !5
  %106 = call noundef i64 @_ZN12_GLOBAL__N_18popcnt64Em(i64 noundef %105)
  %107 = shl i64 %106, 1
  %108 = add i64 %104, %107
  %109 = load i64, ptr %3, align 8, !tbaa !5
  %110 = call noundef i64 @_ZN12_GLOBAL__N_18popcnt64Em(i64 noundef %109)
  %111 = add i64 %108, %110
  %112 = icmp ult i64 %.0.lcssa, %1
  br i1 %112, label %.lr.ph57, label %._crit_edge58

.lr.ph57:                                         ; preds = %._crit_edge, %.lr.ph57
  %.155 = phi i64 [ %117, %.lr.ph57 ], [ %.0.lcssa, %._crit_edge ]
  %.15054 = phi i64 [ %116, %.lr.ph57 ], [ %111, %._crit_edge ]
  %113 = getelementptr inbounds i64, ptr %0, i64 %.155
  %114 = load i64, ptr %113, align 8, !tbaa !5
  %115 = call noundef i64 @_ZN12_GLOBAL__N_18popcnt64Em(i64 noundef %114)
  %116 = add i64 %115, %.15054
  %117 = add i64 %.155, 1
  %exitcond.not = icmp eq i64 %117, %1
  br i1 %exitcond.not, label %._crit_edge58, label %.lr.ph57, !llvm.loop !11

._crit_edge58:                                    ; preds = %.lr.ph57, %._crit_edge
  %.150.lcssa = phi i64 [ %111, %._crit_edge ], [ %116, %.lr.ph57 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  ret i64 %.150.lcssa
}

; 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 nounwind uwtable
declare hidden void @_ZN12_GLOBAL__N_13CSAERmS0_mmm(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden noundef i64 @_ZN12_GLOBAL__N_18popcnt64Em(i64 noundef) local_unnamed_addr #2

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

attributes #0 = { mustprogress 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 = { alwaysinline mustprogress 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 = { 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++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


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