; LLVM IR from tryingfly/nabo :: nabo_core/src/robot/cpg.ll (ZN3Cpg8cpgClassC2Ev)

; 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.Cpg::cpgClass" = type { i8, i8, double, double, [2 x double], [2 x double], [2 x double], [2 x double], [2 x double], [2 x double], [2 x double], [2 x double], [2 x i8], i8, [2 x i8], double, double, [2 x double], [2 x double], %struct.anon }
%struct.anon = type { double, [2 x double], [2 x double] }

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN3Cpg8cpgClassC2Ev(ptr noundef nonnull align 8 dereferenceable(248) %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.Cpg::cpgClass", ptr %3, i32 0, i32 0
  store i8 1, ptr %4, align 8, !tbaa !9
  %5 = getelementptr inbounds %"class.Cpg::cpgClass", ptr %3, i32 0, i32 1
  store i8 0, ptr %5, align 1, !tbaa !14
  %6 = getelementptr inbounds %"class.Cpg::cpgClass", ptr %3, i32 0, i32 2
  store double 0.000000e+00, ptr %6, align 8, !tbaa !15
  %7 = getelementptr inbounds %"class.Cpg::cpgClass", ptr %3, i32 0, i32 3
  store double -0.000000e+00, ptr %7, align 8, !tbaa !16
  %8 = getelementptr inbounds %"class.Cpg::cpgClass", ptr %3, i32 0, i32 4
  %9 = getelementptr inbounds double, ptr %8, i64 2
  br label %10

10:                                               ; preds = %10, %1
  %11 = phi ptr [ %8, %1 ], [ %12, %10 ]
  store double 0.000000e+00, ptr %11, align 8, !tbaa !17
  %12 = getelementptr inbounds double, ptr %11, i64 1
  %13 = icmp eq ptr %12, %9
  br i1 %13, label %14, label %10

14:                                               ; preds = %10
  %15 = getelementptr inbounds %"class.Cpg::cpgClass", ptr %3, i32 0, i32 5
  %16 = getelementptr inbounds double, ptr %15, i64 2
  br label %17

17:                                               ; preds = %17, %14
  %18 = phi ptr [ %15, %14 ], [ %19, %17 ]
  store double 0.000000e+00, ptr %18, align 8, !tbaa !17
  %19 = getelementptr inbounds double, ptr %18, i64 1
  %20 = icmp eq ptr %19, %16
  br i1 %20, label %21, label %17

21:                                               ; preds = %17
  %22 = getelementptr inbounds %"class.Cpg::cpgClass", ptr %3, i32 0, i32 6
  store double 1.000000e+00, ptr %22, align 8, !tbaa !17
  %23 = getelementptr inbounds double, ptr %22, i64 1
  store double 1.000000e+00, ptr %23, align 8, !tbaa !17
  %24 = getelementptr inbounds %"class.Cpg::cpgClass", ptr %3, i32 0, i32 7
  %25 = getelementptr inbounds double, ptr %24, i64 2
  br label %26

26:                                               ; preds = %26, %21
  %27 = phi ptr [ %24, %21 ], [ %28, %26 ]
  store double 0.000000e+00, ptr %27, align 8, !tbaa !17
  %28 = getelementptr inbounds double, ptr %27, i64 1
  %29 = icmp eq ptr %28, %25
  br i1 %29, label %30, label %26

30:                                               ; preds = %26
  %31 = getelementptr inbounds %"class.Cpg::cpgClass", ptr %3, i32 0, i32 8
  %32 = getelementptr inbounds double, ptr %31, i64 2
  br label %33

33:                                               ; preds = %33, %30
  %34 = phi ptr [ %31, %30 ], [ %35, %33 ]
  store double 0.000000e+00, ptr %34, align 8, !tbaa !17
  %35 = getelementptr inbounds double, ptr %34, i64 1
  %36 = icmp eq ptr %35, %32
  br i1 %36, label %37, label %33

37:                                               ; preds = %33
  %38 = getelementptr inbounds %"class.Cpg::cpgClass", ptr %3, i32 0, i32 9
  %39 = getelementptr inbounds double, ptr %38, i64 2
  br label %40

40:                                               ; preds = %40, %37
  %41 = phi ptr [ %38, %37 ], [ %42, %40 ]
  store double 0.000000e+00, ptr %41, align 8, !tbaa !17
  %42 = getelementptr inbounds double, ptr %41, i64 1
  %43 = icmp eq ptr %42, %39
  br i1 %43, label %44, label %40

44:                                               ; preds = %40
  %45 = getelementptr inbounds %"class.Cpg::cpgClass", ptr %3, i32 0, i32 12
  %46 = getelementptr inbounds i8, ptr %45, i64 2
  br label %47

47:                                               ; preds = %47, %44
  %48 = phi ptr [ %45, %44 ], [ %49, %47 ]
  store i8 0, ptr %48, align 1, !tbaa !18
  %49 = getelementptr inbounds i8, ptr %48, i64 1
  %50 = icmp eq ptr %49, %46
  br i1 %50, label %51, label %47

51:                                               ; preds = %47
  %52 = getelementptr inbounds %"class.Cpg::cpgClass", ptr %3, i32 0, i32 13
  store i8 0, ptr %52, align 2, !tbaa !19
  %53 = getelementptr inbounds %"class.Cpg::cpgClass", ptr %3, i32 0, i32 19
  ret void
}

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

!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, !11, i64 0}
!10 = !{!"_ZTSN3Cpg8cpgClassE", !11, i64 0, !11, i64 1, !12, i64 8, !12, i64 16, !7, i64 24, !7, i64 40, !7, i64 56, !7, i64 72, !7, i64 88, !7, i64 104, !7, i64 120, !7, i64 136, !7, i64 152, !11, i64 154, !7, i64 155, !12, i64 160, !12, i64 168, !7, i64 176, !7, i64 192, !13, i64 208}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!"_ZTSN3Cpg8cpgClassUt_E", !12, i64 0, !7, i64 8, !7, i64 24}
!14 = !{!10, !11, i64 1}
!15 = !{!10, !12, i64 8}
!16 = !{!10, !12, i64 16}
!17 = !{!12, !12, i64 0}
!18 = !{!11, !11, i64 0}
!19 = !{!10, !11, i64 154}


; 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 nofree norecurse nosync nounwind willreturn memory(argmem: write) uwtable
define dso_local void @_ZN3Cpg8cpgClassC2Ev(ptr nocapture noundef nonnull writeonly align 8 dereferenceable(248) %0) unnamed_addr #0 align 2 {
.preheader30.preheader:
  store i8 1, ptr %0, align 8, !tbaa !5
  %1 = getelementptr inbounds i8, ptr %0, i64 1
  store i8 0, ptr %1, align 1, !tbaa !12
  %2 = getelementptr inbounds i8, ptr %0, i64 8
  store <2 x double> <double 0.000000e+00, double -0.000000e+00>, ptr %2, align 8, !tbaa !13
  %scevgep = getelementptr inbounds i8, ptr %0, i64 24
  %3 = getelementptr inbounds i8, ptr %0, i64 56
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %scevgep, i8 0, i64 32, i1 false)
  store <2 x double> <double 1.000000e+00, double 1.000000e+00>, ptr %3, align 8, !tbaa !13
  %scevgep32 = getelementptr inbounds i8, ptr %0, i64 72
  %scevgep35 = getelementptr inbounds i8, ptr %0, i64 152
  store i16 0, ptr %scevgep35, align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 154
  store i8 0, ptr %4, align 2, !tbaa !14
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %scevgep32, i8 0, i64 48, i1 false)
  ret void
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write) 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 nounwind willreturn memory(argmem: write) }

!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, !7, i64 0}
!6 = !{!"_ZTSN3Cpg8cpgClassE", !7, i64 0, !7, i64 1, !10, i64 8, !10, i64 16, !8, i64 24, !8, i64 40, !8, i64 56, !8, i64 72, !8, i64 88, !8, i64 104, !8, i64 120, !8, i64 136, !8, i64 152, !7, i64 154, !8, i64 155, !10, i64 160, !10, i64 168, !8, i64 176, !8, i64 192, !11, i64 208}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"_ZTSN3Cpg8cpgClassUt_E", !10, i64 0, !8, i64 8, !8, i64 24}
!12 = !{!6, !7, i64 1}
!13 = !{!10, !10, i64 0}
!14 = !{!6, !7, i64 154}


; Effective O3 passes: EarlyCSEPass,GVNPass,IndVarSimplifyPass,InstCombinePass,LoopIdiomRecognizePass,LoopSimplifyPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass