; LLVM IR from drohmer/cgp :: library/cgp/18_user_interactions/picking/picking_spheres (picking_spheres)

; 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.cgp::picking_structure" = type { i8, i32, %"struct.cgp::numarray_stack", %"struct.cgp::numarray_stack", %"struct.cgp::numarray_stack", %"struct.cgp::numarray_stack", %"struct.cgp::numarray_stack.0" }
%"struct.cgp::numarray_stack" = type { float, float, float }
%"struct.cgp::numarray_stack.0" = type { float, float }
%"struct.cgp::matrix_stack" = type { %"struct.cgp::numarray_stack.1" }
%"struct.cgp::numarray_stack.1" = type { %"struct.cgp::numarray_stack.2", %"struct.cgp::numarray_stack.2", %"struct.cgp::numarray_stack.2", %"struct.cgp::numarray_stack.2" }
%"struct.cgp::numarray_stack.2" = type { float, float, float, float }
%"struct.cgp::intersection_structure" = type { i8, %"struct.cgp::numarray_stack", %"struct.cgp::numarray_stack" }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3cgp15picking_spheresERKNS_14numarray_stackIfLi2EEERKNS_8numarrayINS0_IfLi3EEEEEfRKNS_19camera_generic_baseERKNS_29camera_projection_perspectiveE(ptr dead_on_unwind noalias writable sret(%"struct.cgp::picking_structure") align 4 %0, ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, float noundef %3, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(16) %5) #0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca float, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"struct.cgp::numarray_stack", align 4
  %13 = alloca %"struct.cgp::matrix_stack", align 4
  %14 = alloca %"struct.cgp::matrix_stack", align 4
  %15 = alloca { <2 x float>, float }, align 8
  %16 = alloca %"struct.cgp::numarray_stack", align 4
  %17 = alloca { <2 x float>, float }, align 8
  %18 = alloca %"struct.cgp::intersection_structure", align 4
  %19 = alloca %"struct.cgp::numarray_stack", align 4
  %20 = alloca %"struct.cgp::numarray_stack", align 4
  %21 = alloca { <2 x float>, float }, align 8
  %22 = alloca { <2 x float>, float }, align 8
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store float %3, ptr %9, align 4, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !5
  store ptr %5, ptr %11, align 8, !tbaa !5
  call void @_ZN3cgp17picking_structureC1Ev(ptr noundef nonnull align 4 dereferenceable(64) %0)
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %13) #6
  %23 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZNK3cgp19camera_generic_base12matrix_frameEv(ptr dead_on_unwind writable sret(%"struct.cgp::matrix_stack") align 4 %13, ptr noundef nonnull align 8 dereferenceable(8) %23)
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #6
  %24 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZNK3cgp29camera_projection_perspective14matrix_inverseEv(ptr dead_on_unwind writable sret(%"struct.cgp::matrix_stack") align 4 %14, ptr noundef nonnull align 4 dereferenceable(16) %24)
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = call { <2 x float>, float } @_ZN3cgp20camera_ray_directionERKNS_12matrix_stackIfLi4ELi4EEES3_RKNS_14numarray_stackIfLi2EEE(ptr noundef nonnull align 4 dereferenceable(64) %13, ptr noundef nonnull align 4 dereferenceable(64) %14, ptr noundef nonnull align 4 dereferenceable(8) %25)
  store { <2 x float>, float } %26, ptr %15, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 8 %15, i64 12, i1 false)
  %27 = getelementptr inbounds %"struct.cgp::picking_structure", ptr %0, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %12, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #6
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  %29 = load ptr, ptr %28, align 8, !tbaa !12
  %30 = getelementptr inbounds ptr, ptr %29, i64 0
  %31 = load ptr, ptr %30, align 8
  %32 = call { <2 x float>, float } %31(ptr noundef nonnull align 8 dereferenceable(8) %28)
  store { <2 x float>, float } %32, ptr %17, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 8 %17, i64 12, i1 false)
  %33 = getelementptr inbounds %"struct.cgp::picking_structure", ptr %0, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 4 %16, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #6
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.cgp::picking_structure", ptr %0, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %34, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.start.p0(i64 28, ptr %18) #6
  %36 = getelementptr inbounds %"struct.cgp::picking_structure", ptr %0, i32 0, i32 4
  %37 = getelementptr inbounds %"struct.cgp::picking_structure", ptr %0, i32 0, i32 5
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = load float, ptr %9, align 4, !tbaa !9
  %40 = getelementptr inbounds %"struct.cgp::picking_structure", ptr %0, i32 0, i32 1
  call void @_ZN3cgp32intersection_ray_spheres_closestERKNS_14numarray_stackIfLi3EEES3_RKNS_8numarrayIS1_EEfPi(ptr dead_on_unwind writable sret(%"struct.cgp::intersection_structure") align 4 %18, ptr noundef nonnull align 4 dereferenceable(12) %36, ptr noundef nonnull align 4 dereferenceable(12) %37, ptr noundef nonnull align 8 dereferenceable(24) %38, float noundef %39, ptr noundef %40)
  %41 = getelementptr inbounds %"struct.cgp::intersection_structure", ptr %18, i32 0, i32 0
  %42 = load i8, ptr %41, align 4, !tbaa !15, !range !19, !noundef !20
  %43 = trunc i8 %42 to i1
  %44 = zext i1 %43 to i32
  %45 = icmp eq i32 %44, 1
  br i1 %45, label %46, label %58

46:                                               ; preds = %6
  %47 = getelementptr inbounds %"struct.cgp::picking_structure", ptr %0, i32 0, i32 0
  store i8 1, ptr %47, align 4, !tbaa !21
  %48 = getelementptr inbounds %"struct.cgp::intersection_structure", ptr %18, i32 0, i32 1
  %49 = getelementptr inbounds %"struct.cgp::picking_structure", ptr %0, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %49, ptr align 4 %48, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #6
  %50 = getelementptr inbounds %"struct.cgp::picking_structure", ptr %0, i32 0, i32 2
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.cgp::picking_structure", ptr %0, i32 0, i32 1
  %53 = load i32, ptr %52, align 4, !tbaa !25
  %54 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3cgp8numarrayINS_14numarray_stackIfLi3EEEEixEi(ptr noundef nonnull align 8 dereferenceable(24) %51, i32 noundef %53)
  %55 = call { <2 x float>, float } @_ZN3cgpmiERKNS_14numarray_stackIfLi3EEES3_(ptr noundef nonnull align 4 dereferenceable(12) %50, ptr noundef nonnull align 4 dereferenceable(12) %54)
  store { <2 x float>, float } %55, ptr %21, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 8 %21, i64 12, i1 false)
  %56 = call { <2 x float>, float } @_ZN3cgp9normalizeIfLi3EEENS_14numarray_stackIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %20)
  store { <2 x float>, float } %56, ptr %22, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 8 %22, i64 12, i1 false)
  %57 = getelementptr inbounds %"struct.cgp::picking_structure", ptr %0, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %57, ptr align 4 %19, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #6
  br label %58

58:                                               ; preds = %46, %6
  call void @llvm.lifetime.end.p0(i64 28, ptr %18) #6
  ret void
}

declare void @_ZN3cgp17picking_structureC1Ev(ptr noundef nonnull align 4 dereferenceable(64)) unnamed_addr #1

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

declare { <2 x float>, float } @_ZN3cgp20camera_ray_directionERKNS_12matrix_stackIfLi4ELi4EEES3_RKNS_14numarray_stackIfLi2EEE(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(8)) #1

declare void @_ZNK3cgp19camera_generic_base12matrix_frameEv(ptr dead_on_unwind writable sret(%"struct.cgp::matrix_stack") align 4, ptr noundef nonnull align 8 dereferenceable(8)) #1

declare void @_ZNK3cgp29camera_projection_perspective14matrix_inverseEv(ptr dead_on_unwind writable sret(%"struct.cgp::matrix_stack") align 4, ptr noundef nonnull align 4 dereferenceable(16)) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

declare void @_ZN3cgp32intersection_ray_spheres_closestERKNS_14numarray_stackIfLi3EEES3_RKNS_8numarrayIS1_EEfPi(ptr dead_on_unwind writable sret(%"struct.cgp::intersection_structure") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(24), float noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN3cgp9normalizeIfLi3EEENS_14numarray_stackIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12)) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN3cgpmiERKNS_14numarray_stackIfLi3EEES3_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3cgp8numarrayINS_14numarray_stackIfLi3EEEEixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #5 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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)"}
!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 = !{!"float", !7, i64 0}
!11 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9}
!12 = !{!13, !13, i64 0}
!13 = !{!"vtable pointer", !8, i64 0}
!14 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}
!15 = !{!16, !17, i64 0}
!16 = !{!"_ZTSN3cgp22intersection_structureE", !17, i64 0, !18, i64 4, !18, i64 16}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTSN3cgp14numarray_stackIfLi3EEE", !10, i64 0, !10, i64 4, !10, i64 8}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!22, !17, i64 0}
!22 = !{!"_ZTSN3cgp17picking_structureE", !17, i64 0, !23, i64 4, !18, i64 8, !18, i64 20, !18, i64 32, !18, i64 44, !24, i64 56}
!23 = !{!"int", !7, i64 0}
!24 = !{!"_ZTSN3cgp14numarray_stackIfLi2EEE", !10, i64 0, !10, i64 4}
!25 = !{!22, !23, i64 4}


; 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.cgp::picking_structure" = type { i8, i32, %"struct.cgp::numarray_stack", %"struct.cgp::numarray_stack", %"struct.cgp::numarray_stack", %"struct.cgp::numarray_stack", %"struct.cgp::numarray_stack.0" }
%"struct.cgp::numarray_stack" = type { float, float, float }
%"struct.cgp::numarray_stack.0" = type { float, float }
%"struct.cgp::matrix_stack" = type { %"struct.cgp::numarray_stack.1" }
%"struct.cgp::numarray_stack.1" = type { %"struct.cgp::numarray_stack.2", %"struct.cgp::numarray_stack.2", %"struct.cgp::numarray_stack.2", %"struct.cgp::numarray_stack.2" }
%"struct.cgp::numarray_stack.2" = type { float, float, float, float }
%"struct.cgp::intersection_structure" = type { i8, %"struct.cgp::numarray_stack", %"struct.cgp::numarray_stack" }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3cgp15picking_spheresERKNS_14numarray_stackIfLi2EEERKNS_8numarrayINS0_IfLi3EEEEEfRKNS_19camera_generic_baseERKNS_29camera_projection_perspectiveE(ptr dead_on_unwind noalias nonnull writable sret(%"struct.cgp::picking_structure") align 4 %0, ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, float noundef %3, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(16) %5) local_unnamed_addr #0 {
  %7 = alloca %"struct.cgp::matrix_stack", align 4
  %8 = alloca %"struct.cgp::matrix_stack", align 4
  %9 = alloca %"struct.cgp::intersection_structure", align 4
  %10 = alloca %"struct.cgp::numarray_stack", align 8
  tail call void @_ZN3cgp17picking_structureC1Ev(ptr noundef nonnull align 4 dereferenceable(64) %0)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #6
  call void @_ZNK3cgp19camera_generic_base12matrix_frameEv(ptr dead_on_unwind nonnull writable sret(%"struct.cgp::matrix_stack") align 4 %7, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #6
  call void @_ZNK3cgp29camera_projection_perspective14matrix_inverseEv(ptr dead_on_unwind nonnull writable sret(%"struct.cgp::matrix_stack") align 4 %8, ptr noundef nonnull align 4 dereferenceable(16) %5)
  %11 = call { <2 x float>, float } @_ZN3cgp20camera_ray_directionERKNS_12matrix_stackIfLi4ELi4EEES3_RKNS_14numarray_stackIfLi2EEE(ptr noundef nonnull align 4 dereferenceable(64) %7, ptr noundef nonnull align 4 dereferenceable(64) %8, ptr noundef nonnull align 4 dereferenceable(8) %1)
  %.fca.0.extract12 = extractvalue { <2 x float>, float } %11, 0
  %.fca.1.extract13 = extractvalue { <2 x float>, float } %11, 1
  %12 = getelementptr inbounds i8, ptr %0, i64 44
  store <2 x float> %.fca.0.extract12, ptr %12, align 4
  %.sroa.417.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 52
  store float %.fca.1.extract13, ptr %.sroa.417.0..sroa_idx, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #6
  %13 = load ptr, ptr %4, align 8, !tbaa !9
  %14 = load ptr, ptr %13, align 8
  %15 = call { <2 x float>, float } %14(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %.fca.0.extract6 = extractvalue { <2 x float>, float } %15, 0
  %.fca.1.extract7 = extractvalue { <2 x float>, float } %15, 1
  %16 = getelementptr inbounds i8, ptr %0, i64 32
  store <2 x float> %.fca.0.extract6, ptr %16, align 4
  %.sroa.411.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 40
  store float %.fca.1.extract7, ptr %.sroa.411.0..sroa_idx, align 4, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %0, i64 56
  %18 = load i64, ptr %1, align 4
  store i64 %18, ptr %17, align 4
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %9) #6
  %19 = getelementptr inbounds i8, ptr %0, i64 4
  call void @_ZN3cgp32intersection_ray_spheres_closestERKNS_14numarray_stackIfLi3EEES3_RKNS_8numarrayIS1_EEfPi(ptr dead_on_unwind nonnull writable sret(%"struct.cgp::intersection_structure") align 4 %9, ptr noundef nonnull align 4 dereferenceable(12) %16, ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 8 dereferenceable(24) %2, float noundef %3, ptr noundef nonnull %19)
  %20 = load i8, ptr %9, align 4, !tbaa !11, !range !15, !noundef !16
  %21 = trunc nuw i8 %20 to i1
  br i1 %21, label %22, label %30

22:                                               ; preds = %6
  store i8 1, ptr %0, align 4, !tbaa !17
  %23 = getelementptr inbounds i8, ptr %9, i64 4
  %24 = getelementptr inbounds i8, ptr %0, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %24, ptr noundef nonnull align 4 dereferenceable(12) %23, i64 12, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #6
  %25 = load i32, ptr %19, align 4, !tbaa !22
  %26 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3cgp8numarrayINS_14numarray_stackIfLi3EEEEixEi(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %25)
  %27 = call { <2 x float>, float } @_ZN3cgpmiERKNS_14numarray_stackIfLi3EEES3_(ptr noundef nonnull align 4 dereferenceable(12) %24, ptr noundef nonnull align 4 dereferenceable(12) %26)
  %.fca.0.extract1 = extractvalue { <2 x float>, float } %27, 0
  %.fca.1.extract2 = extractvalue { <2 x float>, float } %27, 1
  store <2 x float> %.fca.0.extract1, ptr %10, align 8
  %.sroa.24.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  store float %.fca.1.extract2, ptr %.sroa.24.0..sroa_idx, align 8
  %28 = call { <2 x float>, float } @_ZN3cgp9normalizeIfLi3EEENS_14numarray_stackIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %10)
  %.fca.0.extract = extractvalue { <2 x float>, float } %28, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %28, 1
  %29 = getelementptr inbounds i8, ptr %0, i64 20
  store <2 x float> %.fca.0.extract, ptr %29, align 4
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 28
  store float %.fca.1.extract, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #6
  br label %30

30:                                               ; preds = %22, %6
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %9) #6
  ret void
}

declare void @_ZN3cgp17picking_structureC1Ev(ptr noundef nonnull align 4 dereferenceable(64)) 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

declare { <2 x float>, float } @_ZN3cgp20camera_ray_directionERKNS_12matrix_stackIfLi4ELi4EEES3_RKNS_14numarray_stackIfLi2EEE(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1

declare void @_ZNK3cgp19camera_generic_base12matrix_frameEv(ptr dead_on_unwind writable sret(%"struct.cgp::matrix_stack") align 4, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

declare void @_ZNK3cgp29camera_projection_perspective14matrix_inverseEv(ptr dead_on_unwind writable sret(%"struct.cgp::matrix_stack") align 4, ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

declare void @_ZN3cgp32intersection_ray_spheres_closestERKNS_14numarray_stackIfLi3EEES3_RKNS_8numarrayIS1_EEfPi(ptr dead_on_unwind writable sret(%"struct.cgp::intersection_structure") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(24), float noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN3cgp9normalizeIfLi3EEENS_14numarray_stackIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN3cgpmiERKNS_14numarray_stackIfLi3EEES3_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3cgp8numarrayINS_14numarray_stackIfLi3EEEEixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #5 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="64" "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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN3cgp22intersection_structureE", !13, i64 0, !14, i64 4, !14, i64 16}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN3cgp14numarray_stackIfLi3EEE", !6, i64 0, !6, i64 4, !6, i64 8}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !13, i64 0}
!18 = !{!"_ZTSN3cgp17picking_structureE", !13, i64 0, !19, i64 4, !14, i64 8, !14, i64 20, !14, i64 32, !14, i64 44, !20, i64 56}
!19 = !{!"int", !7, i64 0}
!20 = !{!"_ZTSN3cgp14numarray_stackIfLi2EEE", !6, i64 0, !6, i64 4}
!21 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5}
!22 = !{!18, !19, i64 4}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass