; LLVM IR from ThePhysicsGuys/Physics3D :: application/builtinWorlds.ll (ZN3P3D11Application19buildBenchmarkWorldERNS0_11PlayerWorldE)

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

%"struct.P3D::PartProperties" = type { double, double, double, %"struct.P3D::Vector" }
%"struct.P3D::Vector" = type { %union.anon }
%union.anon = type { [3 x double] }
%"class.P3D::GlobalCFrame" = type { %"struct.P3D::PositionTemplate", %"class.P3D::MatrixRotationTemplate" }
%"struct.P3D::PositionTemplate" = type { %"struct.P3D::Fix", %"struct.P3D::Fix", %"struct.P3D::Fix" }
%"struct.P3D::Fix" = type { i64 }
%"class.P3D::MatrixRotationTemplate" = type { %"class.P3D::Matrix" }
%"class.P3D::Matrix" = type { [9 x double] }
%"class.P3D::Shape" = type { %"class.P3D::intrusive_ptr", %"class.P3D::DiagonalMatrix" }
%"class.P3D::intrusive_ptr" = type { ptr }
%"class.P3D::DiagonalMatrix" = type { [3 x double] }
%"struct.P3D::CFrameTemplate" = type { %"struct.P3D::Vector", %"class.P3D::MatrixRotationTemplate" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.33 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.33 = type { i64, [8 x i8] }
%"class.std::allocator.30" = type { i8 }

@_ZN3P3D11Application12WorldBuilder15basicPropertiesE = external global %"struct.P3D::PartProperties", align 8
@.str = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D11Application19buildBenchmarkWorldERNS0_11PlayerWorldE(ptr noundef nonnull align 8 dereferenceable(224) %0) #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.P3D::GlobalCFrame", align 8
  %4 = alloca %"class.P3D::MatrixRotationTemplate", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.P3D::Shape", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.P3D::GlobalCFrame", align 8
  %13 = alloca %"struct.P3D::CFrameTemplate", align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator.30", align 1
  %19 = alloca i32, align 4
  %20 = alloca i1, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @_ZN3P3D11Application12WorldBuilder10buildFloorEddi(double noundef 1.500000e+02, double noundef 1.500000e+02, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 96, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 72, ptr %4) #8
  %21 = call noundef double @_ZN3P3D2piIdEET_v()
  %22 = fdiv double %21, 4.000000e+00
  %23 = call noundef double @_ZN3P3D2piIdEET_v()
  %24 = fdiv double %23, 4.000000e+00
  call void @_ZN3P3D22MatrixRotationTemplateIdE15fromEulerAnglesEddd(ptr dead_on_unwind writable sret(%"class.P3D::MatrixRotationTemplate") align 8 %4, double noundef 0.000000e+00, double noundef %22, double noundef %24)
  call void @_ZN3P3D12GlobalCFrameC2EdddRKNS_22MatrixRotationTemplateIdEE(ptr noundef nonnull align 8 dereferenceable(96) %3, double noundef 0.000000e+00, double noundef 2.000000e+01, double noundef 0.000000e+00, ptr noundef nonnull align 8 dereferenceable(72) %4)
  call void @llvm.lifetime.end.p0(i64 72, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %90, %1
  %26 = load i32, ptr %5, align 4, !tbaa !9
  %27 = icmp slt i32 %26, 10
  br i1 %27, label %29, label %28

28:                                               ; preds = %25
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %93

29:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %30

30:                                               ; preds = %86, %29
  %31 = load i32, ptr %7, align 4, !tbaa !9
  %32 = icmp slt i32 %31, 10
  br i1 %32, label %34, label %33

33:                                               ; preds = %30
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  br label %89

34:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %60, %34
  %36 = load i32, ptr %8, align 4, !tbaa !9
  %37 = icmp slt i32 %36, 10
  br i1 %37, label %39, label %38

38:                                               ; preds = %35
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %85

39:                                               ; preds = %35
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 208) #9
  store i1 true, ptr %20, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #8
  invoke void @_ZN3P3D8boxShapeEddd(ptr dead_on_unwind writable sret(%"class.P3D::Shape") align 8 %9, double noundef 1.000000e+00, double noundef 1.000000e+00, double noundef 1.000000e+00)
          to label %42 unwind label %63

42:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 96, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 96, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %43 = load i32, ptr %5, align 4, !tbaa !9
  %44 = sitofp i32 %43 to double
  %45 = fmul double %44, 1.000010e+00
  store double %45, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = sitofp i32 %46 to double
  %48 = fmul double %47, 1.000010e+00
  store double %48, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = sitofp i32 %49 to double
  %51 = fmul double %50, 1.000100e+00
  store double %51, ptr %16, align 8, !tbaa !11
  invoke void @_ZN3P3D14CFrameTemplateIdEC2ERKdS3_S3_(ptr noundef nonnull align 8 dereferenceable(96) %13, ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %52 unwind label %67

52:                                               ; preds = %42
  invoke void @_ZNK3P3D12GlobalCFrame13localToGlobalERKNS_14CFrameTemplateIdEE(ptr dead_on_unwind writable sret(%"class.P3D::GlobalCFrame") align 8 %12, ptr noundef nonnull align 8 dereferenceable(96) %3, ptr noundef nonnull align 8 dereferenceable(96) %13)
          to label %53 unwind label %67

53:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %54 unwind label %71

54:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 0, ptr %19, align 4, !tbaa !9
  invoke void @_ZN3P3D11Application12ExtendedPartC1ERKNS_5ShapeERKNS_12GlobalCFrameERKNS_14PartPropertiesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKj(ptr noundef nonnull align 8 dereferenceable(204) %41, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(96) %12, ptr noundef nonnull align 8 dereferenceable(48) @_ZN3P3D11Application12WorldBuilder15basicPropertiesE, ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %55 unwind label %75

55:                                               ; preds = %54
  store i1 false, ptr %20, align 1
  %56 = load ptr, ptr %40, align 8, !tbaa !13
  %57 = getelementptr inbounds ptr, ptr %56, i64 4
  %58 = load ptr, ptr %57, align 8
  invoke void %58(ptr noundef nonnull align 8 dereferenceable(224) %40, ptr noundef %41, i32 noundef 0)
          to label %59 unwind label %75

59:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 96, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 96, ptr %12) #8
  call void @_ZN3P3D5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #8
  br label %60

60:                                               ; preds = %59
  %61 = load i32, ptr %8, align 4, !tbaa !9
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %8, align 4, !tbaa !9
  br label %35, !llvm.loop !15

63:                                               ; preds = %39
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %10, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %11, align 4
  br label %81

67:                                               ; preds = %52, %42
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %10, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %11, align 4
  br label %80

71:                                               ; preds = %53
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %10, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %11, align 4
  br label %79

75:                                               ; preds = %55, %54
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %10, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #8
  br label %79

79:                                               ; preds = %75, %71
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #8
  br label %80

80:                                               ; preds = %79, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 96, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 96, ptr %12) #8
  call void @_ZN3P3D5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  br label %81

81:                                               ; preds = %80, %63
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #8
  %82 = load i1, ptr %20, align 1
  br i1 %82, label %83, label %84

83:                                               ; preds = %81
  call void @_ZdlPvm(ptr noundef %41, i64 noundef 208) #10
  br label %84

84:                                               ; preds = %83, %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 96, ptr %3) #8
  br label %94

85:                                               ; preds = %38
  br label %86

86:                                               ; preds = %85
  %87 = load i32, ptr %7, align 4, !tbaa !9
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %7, align 4, !tbaa !9
  br label %30, !llvm.loop !17

89:                                               ; preds = %33
  br label %90

90:                                               ; preds = %89
  %91 = load i32, ptr %5, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %5, align 4, !tbaa !9
  br label %25, !llvm.loop !18

93:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 96, ptr %3) #8
  ret void

94:                                               ; preds = %84
  %95 = load ptr, ptr %10, align 8
  %96 = load i32, ptr %11, align 4
  %97 = insertvalue { ptr, i32 } poison, ptr %95, 0
  %98 = insertvalue { ptr, i32 } %97, i32 %96, 1
  resume { ptr, i32 } %98
}

declare void @_ZN3P3D11Application12WorldBuilder10buildFloorEddi(double noundef, double noundef, i32 noundef) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D22MatrixRotationTemplateIdE15fromEulerAnglesEddd(ptr dead_on_unwind noalias writable sret(%"class.P3D::MatrixRotationTemplate") align 8, double noundef, double noundef, double noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN3P3D2piIdEET_v() #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D12GlobalCFrameC2EdddRKNS_22MatrixRotationTemplateIdEE(ptr noundef nonnull align 8 dereferenceable(96), double noundef, double noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #3 align 2

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #4

declare void @_ZN3P3D8boxShapeEddd(ptr dead_on_unwind writable sret(%"class.P3D::Shape") align 8, double noundef, double noundef, double noundef) #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3P3D12GlobalCFrame13localToGlobalERKNS_14CFrameTemplateIdEE(ptr dead_on_unwind noalias writable sret(%"class.P3D::GlobalCFrame") align 8, ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(96)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D14CFrameTemplateIdEC2ERKdS3_S3_(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare void @_ZN3P3D11Application12ExtendedPartC1ERKNS_5ShapeERKNS_12GlobalCFrameERKNS_14PartPropertiesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKj(ptr noundef nonnull align 8 dereferenceable(204), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

; Function Attrs: nounwind
declare void @_ZN3P3D5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { nobuiltin allocsize(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 = { 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 #6 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}


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

%"struct.P3D::PartProperties" = type { double, double, double, %"struct.P3D::Vector" }
%"struct.P3D::Vector" = type { %union.anon }
%union.anon = type { [3 x double] }
%"class.P3D::GlobalCFrame" = type { %"struct.P3D::PositionTemplate", %"class.P3D::MatrixRotationTemplate" }
%"struct.P3D::PositionTemplate" = type { %"struct.P3D::Fix", %"struct.P3D::Fix", %"struct.P3D::Fix" }
%"struct.P3D::Fix" = type { i64 }
%"class.P3D::MatrixRotationTemplate" = type { %"class.P3D::Matrix" }
%"class.P3D::Matrix" = type { [9 x double] }
%"class.P3D::Shape" = type { %"class.P3D::intrusive_ptr", %"class.P3D::DiagonalMatrix" }
%"class.P3D::intrusive_ptr" = type { ptr }
%"class.P3D::DiagonalMatrix" = type { [3 x double] }
%"struct.P3D::CFrameTemplate" = type { %"struct.P3D::Vector", %"class.P3D::MatrixRotationTemplate" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.33 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.33 = type { i64, [8 x i8] }
%"class.std::allocator.30" = type { i8 }

@_ZN3P3D11Application12WorldBuilder15basicPropertiesE = external global %"struct.P3D::PartProperties", align 8
@.str = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D11Application19buildBenchmarkWorldERNS0_11PlayerWorldE(ptr noundef nonnull align 8 dereferenceable(224) %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.P3D::GlobalCFrame", align 8
  %3 = alloca %"class.P3D::MatrixRotationTemplate", align 8
  %4 = alloca %"class.P3D::Shape", align 8
  %5 = alloca %"class.P3D::GlobalCFrame", align 8
  %6 = alloca %"struct.P3D::CFrameTemplate", align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator.30", align 1
  %12 = alloca i32, align 4
  tail call void @_ZN3P3D11Application12WorldBuilder10buildFloorEddi(double noundef 1.500000e+02, double noundef 1.500000e+02, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %3) #8
  %13 = tail call noundef double @_ZN3P3D2piIdEET_v()
  %14 = fmul double %13, 2.500000e-01
  %15 = tail call noundef double @_ZN3P3D2piIdEET_v()
  %16 = fmul double %15, 2.500000e-01
  call void @_ZN3P3D22MatrixRotationTemplateIdE15fromEulerAnglesEddd(ptr dead_on_unwind nonnull writable sret(%"class.P3D::MatrixRotationTemplate") align 8 %3, double noundef 0.000000e+00, double noundef %14, double noundef %16)
  call void @_ZN3P3D12GlobalCFrameC2EdddRKNS_22MatrixRotationTemplateIdEE(ptr noundef nonnull align 8 dereferenceable(96) %2, double noundef 0.000000e+00, double noundef 2.000000e+01, double noundef 0.000000e+00, ptr noundef nonnull align 8 dereferenceable(72) %3)
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %3) #8
  br label %.preheader31

.preheader31:                                     ; preds = %1, %22
  %.02037 = phi i32 [ 0, %1 ], [ %23, %22 ]
  %17 = uitofp nneg i32 %.02037 to double
  %18 = fmul double %17, 1.000010e+00
  br label %.preheader

19:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %2) #8
  ret void

.preheader:                                       ; preds = %.preheader31, %24
  %.01936 = phi i32 [ 0, %.preheader31 ], [ %25, %24 ]
  %20 = uitofp nneg i32 %.01936 to double
  %21 = fmul double %20, 1.000010e+00
  br label %26

22:                                               ; preds = %24
  %23 = add nuw nsw i32 %.02037, 1
  %exitcond43.not = icmp eq i32 %23, 10
  br i1 %exitcond43.not, label %19, label %.preheader31, !llvm.loop !5

24:                                               ; preds = %38
  %25 = add nuw nsw i32 %.01936, 1
  %exitcond42.not = icmp eq i32 %25, 10
  br i1 %exitcond42.not, label %22, label %.preheader, !llvm.loop !7

26:                                               ; preds = %.preheader, %38
  %.01835 = phi i32 [ 0, %.preheader ], [ %39, %38 ]
  %27 = call noalias noundef nonnull dereferenceable(208) ptr @_Znwm(i64 noundef 208) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #8
  invoke void @_ZN3P3D8boxShapeEddd(ptr dead_on_unwind nonnull writable sret(%"class.P3D::Shape") align 8 %4, double noundef 1.000000e+00, double noundef 1.000000e+00, double noundef 1.000000e+00)
          to label %28 unwind label %.thread

28:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  store double %18, ptr %7, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  store double %21, ptr %8, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %29 = uitofp nneg i32 %.01835 to double
  %30 = fmul double %29, 1.000100e+00
  store double %30, ptr %9, align 8, !tbaa !8
  invoke void @_ZN3P3D14CFrameTemplateIdEC2ERKdS3_S3_(ptr noundef nonnull align 8 dereferenceable(96) %6, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %31 unwind label %.thread28

31:                                               ; preds = %28
  invoke void @_ZNK3P3D12GlobalCFrame13localToGlobalERKNS_14CFrameTemplateIdEE(ptr dead_on_unwind nonnull writable sret(%"class.P3D::GlobalCFrame") align 8 %5, ptr noundef nonnull align 8 dereferenceable(96) %2, ptr noundef nonnull align 8 dereferenceable(96) %6)
          to label %32 unwind label %.thread28

32:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %33 unwind label %42

33:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  store i32 0, ptr %12, align 4, !tbaa !12
  invoke void @_ZN3P3D11Application12ExtendedPartC1ERKNS_5ShapeERKNS_12GlobalCFrameERKNS_14PartPropertiesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKj(ptr noundef nonnull align 8 dereferenceable(204) %27, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(96) %5, ptr noundef nonnull align 8 dereferenceable(48) @_ZN3P3D11Application12WorldBuilder15basicPropertiesE, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %34 unwind label %44

34:                                               ; preds = %33
  %35 = load ptr, ptr %0, align 8, !tbaa !14
  %36 = getelementptr inbounds i8, ptr %35, i64 32
  %37 = load ptr, ptr %36, align 8
  invoke void %37(ptr noundef nonnull align 8 dereferenceable(224) %0, ptr noundef nonnull %27, i32 noundef 0)
          to label %38 unwind label %44

38:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %5) #8
  call void @_ZN3P3D5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  %39 = add nuw nsw i32 %.01835, 1
  %exitcond.not = icmp eq i32 %39, 10
  br i1 %exitcond.not, label %24, label %26, !llvm.loop !16

.thread:                                          ; preds = %26
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  br label %47

.thread28:                                        ; preds = %28, %31
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %5) #8
  call void @_ZN3P3D5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  br label %47

42:                                               ; preds = %32
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %46

44:                                               ; preds = %34, %33
  %.0 = phi i1 [ false, %34 ], [ true, %33 ]
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  br label %46

46:                                               ; preds = %42, %44
  %.pn = phi { ptr, i32 } [ %45, %44 ], [ %43, %42 ]
  %.1 = phi i1 [ %.0, %44 ], [ true, %42 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %5) #8
  call void @_ZN3P3D5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  br i1 %.1, label %47, label %48

47:                                               ; preds = %.thread28, %.thread, %46
  %.pn.pn.pn27 = phi { ptr, i32 } [ %40, %.thread ], [ %.pn, %46 ], [ %41, %.thread28 ]
  call void @_ZdlPvm(ptr noundef nonnull %27, i64 noundef 208) #10
  br label %48

48:                                               ; preds = %47, %46
  %.pn.pn.pn26 = phi { ptr, i32 } [ %.pn.pn.pn27, %47 ], [ %.pn, %46 ]
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %2) #8
  resume { ptr, i32 } %.pn.pn.pn26
}

declare void @_ZN3P3D11Application12WorldBuilder10buildFloorEddi(double noundef, double noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D22MatrixRotationTemplateIdE15fromEulerAnglesEddd(ptr dead_on_unwind noalias writable sret(%"class.P3D::MatrixRotationTemplate") align 8, double noundef, double noundef, double noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN3P3D2piIdEET_v() local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D12GlobalCFrameC2EdddRKNS_22MatrixRotationTemplateIdEE(ptr noundef nonnull align 8 dereferenceable(96), double noundef, double noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #3 align 2

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #4

declare void @_ZN3P3D8boxShapeEddd(ptr dead_on_unwind writable sret(%"class.P3D::Shape") align 8, double noundef, double noundef, double noundef) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3P3D12GlobalCFrame13localToGlobalERKNS_14CFrameTemplateIdEE(ptr dead_on_unwind noalias writable sret(%"class.P3D::GlobalCFrame") align 8, ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D14CFrameTemplateIdEC2ERKdS3_S3_(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare void @_ZN3P3D11Application12ExtendedPartC1ERKNS_5ShapeERKNS_12GlobalCFrameERKNS_14PartPropertiesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKj(ptr noundef nonnull align 8 dereferenceable(204), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

; Function Attrs: nounwind
declare void @_ZN3P3D5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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 = { "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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { nobuiltin allocsize(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 = { 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 #6 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = !{!9, !9, i64 0}
!9 = !{!"double", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !10, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"vtable pointer", !11, i64 0}
!16 = distinct !{!16, !6}


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