; LLVM IR from mickypaganini/SSI2016-jet-clustering :: spartyjet-4.0.2_mac/External/fastjet-3.0.0/plugins/SISCone/siscone/siscone/qua_994570ab (ZN7siscone9CquadtreeD2Ev)

; 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.siscone::Cquadtree" = type <{ double, double, double, double, ptr, [2 x [2 x ptr]], i8, [7 x i8] }>

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN7siscone9CquadtreeD2Ev(ptr noundef nonnull align 8 dereferenceable(73) %0) unnamed_addr #0 align 2 {
  %2 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %3 = load ptr, ptr %2, align 8
  %4 = getelementptr inbounds %"class.siscone::Cquadtree", ptr %3, i32 0, i32 6
  %5 = load i8, ptr %4, align 8, !tbaa !9, !range !13, !noundef !14
  %6 = trunc i8 %5 to i1
  br i1 %6, label %7, label %46

7:                                                ; preds = %1
  %8 = getelementptr inbounds %"class.siscone::Cquadtree", ptr %3, i32 0, i32 4
  %9 = load ptr, ptr %8, align 8, !tbaa !15
  %10 = icmp ne ptr %9, null
  br i1 %10, label %11, label %17

11:                                               ; preds = %7
  %12 = getelementptr inbounds %"class.siscone::Cquadtree", ptr %3, i32 0, i32 4
  %13 = load ptr, ptr %12, align 8, !tbaa !15
  %14 = icmp eq ptr %13, null
  br i1 %14, label %16, label %15

15:                                               ; preds = %11
  call void @_ZN7siscone9CmomentumD1Ev(ptr noundef nonnull align 8 dereferenceable(68) %13) #3
  call void @_ZdlPvm(ptr noundef %13, i64 noundef 72) #4
  br label %16

16:                                               ; preds = %15, %11
  br label %17

17:                                               ; preds = %16, %7
  %18 = getelementptr inbounds %"class.siscone::Cquadtree", ptr %3, i32 0, i32 5
  %19 = getelementptr inbounds [2 x [2 x ptr]], ptr %18, i64 0, i64 0
  %20 = getelementptr inbounds [2 x ptr], ptr %19, i64 0, i64 0
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  %22 = icmp eq ptr %21, null
  br i1 %22, label %24, label %23

23:                                               ; preds = %17
  call void @_ZN7siscone9CquadtreeD1Ev(ptr noundef nonnull align 8 dereferenceable(73) %21) #3
  call void @_ZdlPvm(ptr noundef %21, i64 noundef 80) #4
  br label %24

24:                                               ; preds = %23, %17
  %25 = getelementptr inbounds %"class.siscone::Cquadtree", ptr %3, i32 0, i32 5
  %26 = getelementptr inbounds [2 x [2 x ptr]], ptr %25, i64 0, i64 0
  %27 = getelementptr inbounds [2 x ptr], ptr %26, i64 0, i64 1
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  %29 = icmp eq ptr %28, null
  br i1 %29, label %31, label %30

30:                                               ; preds = %24
  call void @_ZN7siscone9CquadtreeD1Ev(ptr noundef nonnull align 8 dereferenceable(73) %28) #3
  call void @_ZdlPvm(ptr noundef %28, i64 noundef 80) #4
  br label %31

31:                                               ; preds = %30, %24
  %32 = getelementptr inbounds %"class.siscone::Cquadtree", ptr %3, i32 0, i32 5
  %33 = getelementptr inbounds [2 x [2 x ptr]], ptr %32, i64 0, i64 1
  %34 = getelementptr inbounds [2 x ptr], ptr %33, i64 0, i64 0
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  %36 = icmp eq ptr %35, null
  br i1 %36, label %38, label %37

37:                                               ; preds = %31
  call void @_ZN7siscone9CquadtreeD1Ev(ptr noundef nonnull align 8 dereferenceable(73) %35) #3
  call void @_ZdlPvm(ptr noundef %35, i64 noundef 80) #4
  br label %38

38:                                               ; preds = %37, %31
  %39 = getelementptr inbounds %"class.siscone::Cquadtree", ptr %3, i32 0, i32 5
  %40 = getelementptr inbounds [2 x [2 x ptr]], ptr %39, i64 0, i64 1
  %41 = getelementptr inbounds [2 x ptr], ptr %40, i64 0, i64 1
  %42 = load ptr, ptr %41, align 8, !tbaa !5
  %43 = icmp eq ptr %42, null
  br i1 %43, label %45, label %44

44:                                               ; preds = %38
  call void @_ZN7siscone9CquadtreeD1Ev(ptr noundef nonnull align 8 dereferenceable(73) %42) #3
  call void @_ZdlPvm(ptr noundef %42, i64 noundef 80) #4
  br label %45

45:                                               ; preds = %44, %38
  br label %46

46:                                               ; preds = %45, %1
  ret void
}

; Function Attrs: nounwind
declare void @_ZN7siscone9CmomentumD1Ev(ptr noundef nonnull align 8 dereferenceable(68)) unnamed_addr #1

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #2

declare void @_ZN7siscone9CquadtreeD1Ev(ptr)

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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
attributes #4 = { builtin 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, !12, i64 72}
!10 = !{!"_ZTSN7siscone9CquadtreeE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !6, i64 32, !7, i64 40, !12, i64 72}
!11 = !{!"double", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!10, !6, i64 32}


; 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 void @_ZN7siscone9CquadtreeD2Ev(ptr nocapture noundef nonnull readonly align 8 dereferenceable(73) %0) unnamed_addr #0 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 72
  %3 = load i8, ptr %2, align 8, !tbaa !5, !range !12, !noundef !13
  %4 = trunc nuw i8 %3 to i1
  br i1 %4, label %5, label %29

5:                                                ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 32
  %7 = load ptr, ptr %6, align 8, !tbaa !14
  %.not = icmp eq ptr %7, null
  br i1 %.not, label %9, label %8

8:                                                ; preds = %5
  tail call void @_ZN7siscone9CmomentumD1Ev(ptr noundef nonnull align 8 dereferenceable(68) %7) #3
  tail call void @_ZdlPvm(ptr noundef nonnull %7, i64 noundef 72) #4
  br label %9

9:                                                ; preds = %8, %5
  %10 = getelementptr inbounds i8, ptr %0, i64 40
  %11 = load ptr, ptr %10, align 8, !tbaa !15
  %12 = icmp eq ptr %11, null
  br i1 %12, label %14, label %13

13:                                               ; preds = %9
  tail call void @_ZN7siscone9CquadtreeD1Ev(ptr noundef nonnull align 8 dereferenceable(73) %11) #3
  tail call void @_ZdlPvm(ptr noundef nonnull %11, i64 noundef 80) #4
  br label %14

14:                                               ; preds = %13, %9
  %15 = getelementptr inbounds i8, ptr %0, i64 48
  %16 = load ptr, ptr %15, align 8, !tbaa !15
  %17 = icmp eq ptr %16, null
  br i1 %17, label %19, label %18

18:                                               ; preds = %14
  tail call void @_ZN7siscone9CquadtreeD1Ev(ptr noundef nonnull align 8 dereferenceable(73) %16) #3
  tail call void @_ZdlPvm(ptr noundef nonnull %16, i64 noundef 80) #4
  br label %19

19:                                               ; preds = %18, %14
  %20 = getelementptr inbounds i8, ptr %0, i64 56
  %21 = load ptr, ptr %20, align 8, !tbaa !15
  %22 = icmp eq ptr %21, null
  br i1 %22, label %24, label %23

23:                                               ; preds = %19
  tail call void @_ZN7siscone9CquadtreeD1Ev(ptr noundef nonnull align 8 dereferenceable(73) %21) #3
  tail call void @_ZdlPvm(ptr noundef nonnull %21, i64 noundef 80) #4
  br label %24

24:                                               ; preds = %23, %19
  %25 = getelementptr inbounds i8, ptr %0, i64 64
  %26 = load ptr, ptr %25, align 8, !tbaa !15
  %27 = icmp eq ptr %26, null
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  tail call void @_ZN7siscone9CquadtreeD1Ev(ptr noundef nonnull align 8 dereferenceable(73) %26) #3
  tail call void @_ZdlPvm(ptr noundef nonnull %26, i64 noundef 80) #4
  br label %29

29:                                               ; preds = %24, %28, %1
  ret void
}

; Function Attrs: nounwind
declare void @_ZN7siscone9CmomentumD1Ev(ptr noundef nonnull align 8 dereferenceable(68)) unnamed_addr #1

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #2

declare void @_ZN7siscone9CquadtreeD1Ev(ptr) local_unnamed_addr

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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
attributes #4 = { builtin 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, !11, i64 72}
!6 = !{!"_ZTSN7siscone9CquadtreeE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !8, i64 40, !11, i64 72}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{i8 0, i8 2}
!13 = !{}
!14 = !{!6, !10, i64 32}
!15 = !{!10, !10, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass