; LLVM IR from dafer45/TBTK :: doc/examples/ManyParticle (BitRegister)

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.TBTK::BitRegister" = type { i32 }

@_ZN4TBTK7Streams3outE = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [12 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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %1 = alloca i32, align 4
  %2 = alloca [2 x %"class.TBTK::BitRegister"], align 4
  %3 = alloca %"class.TBTK::BitRegister", align 4
  %4 = alloca %"class.TBTK::BitRegister", align 4
  %5 = alloca %"class.TBTK::BitRegister", align 4
  %6 = alloca %"class.TBTK::BitRegister", align 4
  %7 = alloca %"class.TBTK::BitRegister", align 4
  %8 = alloca %"class.TBTK::BitRegister", align 4
  %9 = alloca %"class.TBTK::BitRegister", align 4
  store i32 0, ptr %1, align 4
  call void @_ZN4TBTK10InitializeEv()
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  %10 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i32 0, i32 0
  %11 = getelementptr inbounds %"class.TBTK::BitRegister", ptr %10, i64 2
  br label %12

12:                                               ; preds = %12, %0
  %13 = phi ptr [ %10, %0 ], [ %14, %12 ]
  call void @_ZN4TBTK11BitRegisterC1Ej(ptr noundef nonnull align 4 dereferenceable(4) %13, i32 noundef 32)
  %14 = getelementptr inbounds %"class.TBTK::BitRegister", ptr %13, i64 1
  %15 = icmp eq ptr %14, %11
  br i1 %15, label %16, label %12

16:                                               ; preds = %12
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef @.str.2)
  %18 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i64 0, i64 0
  call void @_ZN4TBTK11BitRegisteraSEj(ptr noundef nonnull align 4 dereferenceable(4) %18, i32 noundef -16711936)
  %19 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i64 0, i64 0
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef @.str.3)
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef @.str.4)
  %23 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i64 0, i64 0
  call void @_ZN4TBTK11BitRegister6setBitEjb(ptr noundef nonnull align 4 dereferenceable(4) %23, i32 noundef 2, i1 noundef zeroext true)
  %24 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i64 0, i64 0
  call void @_ZN4TBTK11BitRegister6setBitEjb(ptr noundef nonnull align 4 dereferenceable(4) %24, i32 noundef 30, i1 noundef zeroext false)
  %25 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i64 0, i64 0
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %25)
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef @.str.3)
  %28 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i64 0, i64 0
  call void @_ZN4TBTK11BitRegisteraSEj(ptr noundef nonnull align 4 dereferenceable(4) %28, i32 noundef -65536)
  %29 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i64 0, i64 1
  call void @_ZN4TBTK11BitRegisteraSEj(ptr noundef nonnull align 4 dereferenceable(4) %29, i32 noundef 16711935)
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef @.str.5)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %31 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i64 0, i64 0
  %32 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i64 0, i64 1
  call void @_ZNK4TBTK11BitRegisterorERKS0_(ptr dead_on_unwind writable sret(%"class.TBTK::BitRegister") align 4 %3, ptr noundef nonnull align 4 dereferenceable(4) %31, ptr noundef nonnull align 4 dereferenceable(4) %32)
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef @.str.3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %35 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i64 0, i64 0
  %36 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i64 0, i64 1
  call void @_ZNK4TBTK11BitRegisteranERKS0_(ptr dead_on_unwind writable sret(%"class.TBTK::BitRegister") align 4 %4, ptr noundef nonnull align 4 dereferenceable(4) %35, ptr noundef nonnull align 4 dereferenceable(4) %36)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef @.str.3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %39 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i64 0, i64 0
  %40 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i64 0, i64 1
  call void @_ZNK4TBTK11BitRegistereoERKS0_(ptr dead_on_unwind writable sret(%"class.TBTK::BitRegister") align 4 %5, ptr noundef nonnull align 4 dereferenceable(4) %39, ptr noundef nonnull align 4 dereferenceable(4) %40)
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef @.str.3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef @.str.6)
  %44 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i64 0, i64 0
  %45 = call noundef i32 @_ZNK4TBTK11BitRegister13getNumOneBitsEv(ptr noundef nonnull align 4 dereferenceable(4) %44)
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, i32 noundef %45)
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef @.str.3)
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef @.str.7)
  %49 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i64 0, i64 0
  call void @_ZN4TBTK11BitRegister5clearEv(ptr noundef nonnull align 4 dereferenceable(4) %49)
  %50 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i64 0, i64 0
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %50)
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef @.str.3)
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef @.str.8)
  %54 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i64 0, i64 1
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %54)
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef @.str.3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %57 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i64 0, i64 1
  call void @_ZNK4TBTK11BitRegisterlsEj(ptr dead_on_unwind writable sret(%"class.TBTK::BitRegister") align 4 %6, ptr noundef nonnull align 4 dereferenceable(4) %57, i32 noundef 1)
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef @.str.3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %60 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i64 0, i64 1
  call void @_ZNK4TBTK11BitRegisterlsEj(ptr dead_on_unwind writable sret(%"class.TBTK::BitRegister") align 4 %7, ptr noundef nonnull align 4 dereferenceable(4) %60, i32 noundef 2)
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef @.str.3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %63 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i64 0, i64 1
  call void @_ZNK4TBTK11BitRegisterrsEj(ptr dead_on_unwind writable sret(%"class.TBTK::BitRegister") align 4 %8, ptr noundef nonnull align 4 dereferenceable(4) %63, i32 noundef 1)
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef @.str.3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %66 = getelementptr inbounds [2 x %"class.TBTK::BitRegister"], ptr %2, i64 0, i64 1
  call void @_ZNK4TBTK11BitRegisterrsEj(ptr dead_on_unwind writable sret(%"class.TBTK::BitRegister") align 4 %9, ptr noundef nonnull align 4 dereferenceable(4) %66, i32 noundef 2)
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef @.str.3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %69 = load i32, ptr %1, align 4
  ret i32 %69
}

declare void @_ZN4TBTK10InitializeEv() #2

declare void @_ZN4TBTK11BitRegisterC1Ej(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4TBTK11BitRegisteraSEj(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4TBTK11BitRegister6setBitEjb(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef, i1 noundef zeroext) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK4TBTK11BitRegisterorERKS0_(ptr dead_on_unwind noalias writable sret(%"class.TBTK::BitRegister") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK4TBTK11BitRegisteranERKS0_(ptr dead_on_unwind noalias writable sret(%"class.TBTK::BitRegister") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK4TBTK11BitRegistereoERKS0_(ptr dead_on_unwind noalias writable sret(%"class.TBTK::BitRegister") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4TBTK11BitRegister13getNumOneBitsEv(ptr noundef nonnull align 4 dereferenceable(4)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4TBTK11BitRegister5clearEv(ptr noundef nonnull align 4 dereferenceable(4)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK4TBTK11BitRegisterlsEj(ptr dead_on_unwind noalias writable sret(%"class.TBTK::BitRegister") align 4, ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK4TBTK11BitRegisterrsEj(ptr dead_on_unwind noalias writable sret(%"class.TBTK::BitRegister") align 4, ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress norecurse 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint 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 #4 = { inlinehint 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 #5 = { 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 #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)"}


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.TBTK::BitRegister" = type { i32 }

@_ZN4TBTK7Streams3outE = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [12 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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca [2 x %"class.TBTK::BitRegister"], align 4
  %2 = alloca %"class.TBTK::BitRegister", align 4
  %3 = alloca %"class.TBTK::BitRegister", align 4
  %4 = alloca %"class.TBTK::BitRegister", align 4
  %5 = alloca %"class.TBTK::BitRegister", align 4
  %6 = alloca %"class.TBTK::BitRegister", align 4
  %7 = alloca %"class.TBTK::BitRegister", align 4
  %8 = alloca %"class.TBTK::BitRegister", align 4
  tail call void @_ZN4TBTK10InitializeEv()
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @_ZN4TBTK11BitRegisterC1Ej(ptr noundef nonnull align 4 dereferenceable(4) %1, i32 noundef 32)
  %.ptr.1 = getelementptr inbounds i8, ptr %1, i64 4
  call void @_ZN4TBTK11BitRegisterC1Ej(ptr noundef nonnull align 4 dereferenceable(4) %.ptr.1, i32 noundef 32)
  %9 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull @.str.2)
  call void @_ZN4TBTK11BitRegisteraSEj(ptr noundef nonnull align 4 dereferenceable(4) %1, i32 noundef -16711936)
  %10 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %11 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull @.str.3)
  %12 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull @.str.4)
  call void @_ZN4TBTK11BitRegister6setBitEjb(ptr noundef nonnull align 4 dereferenceable(4) %1, i32 noundef 2, i1 noundef zeroext true)
  call void @_ZN4TBTK11BitRegister6setBitEjb(ptr noundef nonnull align 4 dereferenceable(4) %1, i32 noundef 30, i1 noundef zeroext false)
  %13 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %14 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull @.str.3)
  call void @_ZN4TBTK11BitRegisteraSEj(ptr noundef nonnull align 4 dereferenceable(4) %1, i32 noundef -65536)
  call void @_ZN4TBTK11BitRegisteraSEj(ptr noundef nonnull align 4 dereferenceable(4) %.ptr.1, i32 noundef 16711935)
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull @.str.5)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @_ZNK4TBTK11BitRegisterorERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.TBTK::BitRegister") align 4 %2, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %.ptr.1)
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull @.str.3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @_ZNK4TBTK11BitRegisteranERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.TBTK::BitRegister") align 4 %3, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %.ptr.1)
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull @.str.3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  call void @_ZNK4TBTK11BitRegistereoERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.TBTK::BitRegister") align 4 %4, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %.ptr.1)
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull @.str.3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull @.str.6)
  %23 = call noundef i32 @_ZNK4TBTK11BitRegister13getNumOneBitsEv(ptr noundef nonnull align 4 dereferenceable(4) %1)
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, i32 noundef %23)
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull @.str.3)
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull @.str.7)
  call void @_ZN4TBTK11BitRegister5clearEv(ptr noundef nonnull align 4 dereferenceable(4) %1)
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull @.str.3)
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull @.str.8)
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %.ptr.1)
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull @.str.3)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  call void @_ZNK4TBTK11BitRegisterlsEj(ptr dead_on_unwind nonnull writable sret(%"class.TBTK::BitRegister") align 4 %5, ptr noundef nonnull align 4 dereferenceable(4) %.ptr.1, i32 noundef 1)
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull @.str.3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  call void @_ZNK4TBTK11BitRegisterlsEj(ptr dead_on_unwind nonnull writable sret(%"class.TBTK::BitRegister") align 4 %6, ptr noundef nonnull align 4 dereferenceable(4) %.ptr.1, i32 noundef 2)
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull @.str.3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  call void @_ZNK4TBTK11BitRegisterrsEj(ptr dead_on_unwind nonnull writable sret(%"class.TBTK::BitRegister") align 4 %7, ptr noundef nonnull align 4 dereferenceable(4) %.ptr.1, i32 noundef 1)
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @.str.3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  call void @_ZNK4TBTK11BitRegisterrsEj(ptr dead_on_unwind nonnull writable sret(%"class.TBTK::BitRegister") align 4 %8, ptr noundef nonnull align 4 dereferenceable(4) %.ptr.1, i32 noundef 2)
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN4TBTK7Streams3outE, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull @.str.3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 0
}

declare void @_ZN4TBTK10InitializeEv() local_unnamed_addr #2

declare void @_ZN4TBTK11BitRegisterC1Ej(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4TBTK11BitRegisteraSEj(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN4TBTKlsERSoRKNS_11BitRegisterE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4TBTK11BitRegister6setBitEjb(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef, i1 noundef zeroext) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK4TBTK11BitRegisterorERKS0_(ptr dead_on_unwind noalias writable sret(%"class.TBTK::BitRegister") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK4TBTK11BitRegisteranERKS0_(ptr dead_on_unwind noalias writable sret(%"class.TBTK::BitRegister") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK4TBTK11BitRegistereoERKS0_(ptr dead_on_unwind noalias writable sret(%"class.TBTK::BitRegister") align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4TBTK11BitRegister13getNumOneBitsEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4TBTK11BitRegister5clearEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK4TBTK11BitRegisterlsEj(ptr dead_on_unwind noalias writable sret(%"class.TBTK::BitRegister") align 4, ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK4TBTK11BitRegisterrsEj(ptr dead_on_unwind noalias writable sret(%"class.TBTK::BitRegister") align 4, ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #3 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress norecurse 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint 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 #4 = { inlinehint 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 #5 = { 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 #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)"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,TailCallElimPass