; LLVM IR from frozein/DoonEngine :: src/DoonEngine (voxelShapes)

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

%union.QMvec3 = type { [3 x float] }
%union.QMvec2 = type { [2 x float] }
%union.QMmat4 = type { [4 x <4 x float>] }
%struct.DNvoxel = type { i8, %union.QMvec3, %struct.DNcolor }
%struct.DNcolor = type { i8, i8, i8 }
%union.QMquaternion = type { <4 x float> }
%union.QMvec4 = type { <4 x float> }
%struct.anon = type { float, float, float }
%struct.anon.3 = type { float, float, float, float }

@g_height = external hidden global float, align 4
@__const.DN_shape_cone.upDir = external hidden unnamed_addr constant %union.QMvec3, align 4
@g_angles = external hidden global %union.QMvec2, align 4

; 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) #0

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @DN_mat4_translate(ptr dead_on_unwind noalias writable sret(%union.QMmat4) align 16, <2 x float>, float) #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @DN_mat4_mult(ptr dead_on_unwind noalias writable sret(%union.QMmat4) align 16, ptr noundef byval(%union.QMmat4) align 16, ptr noundef byval(%union.QMmat4) align 16) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @DN_quaternion_to_mat4(ptr dead_on_unwind noalias writable sret(%union.QMmat4) align 16, double, double) #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden { <2 x float>, float } @DN_vec3_scale(<2 x float>, float, float noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @_DN_shape(ptr noundef, ptr noundef byval(%struct.DNvoxel) align 8, ptr noundef, ptr noundef, i1 noundef zeroext, <2 x float>, float, <2 x float>, float, ptr noundef byval(%union.QMmat4) align 16, ptr noundef) #5

; Function Attrs: nounwind uwtable
define dso_local void @DN_shape_cone(ptr noundef %0, ptr noundef byval(%struct.DNvoxel) align 8 %1, i1 noundef zeroext %2, <2 x float> %3, float %4, float noundef %5, float noundef %6, double %7, double %8, ptr noundef %9, ptr noundef %10) #5 {
  %12 = alloca %union.QMvec3, align 4
  %13 = alloca { <2 x float>, float }, align 4
  %14 = alloca %union.QMquaternion, align 16
  %15 = alloca ptr, align 8
  %16 = alloca i8, align 1
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca %union.QMvec3, align 4
  %22 = alloca %union.QMmat4, align 16
  %23 = alloca %union.QMvec4, align 16
  %24 = alloca %union.QMvec4, align 16
  %25 = alloca %union.QMvec3, align 4
  %26 = alloca %union.QMmat4, align 16
  %27 = alloca %union.QMvec3, align 4
  %28 = alloca %union.QMvec3, align 4
  %29 = alloca { <2 x float>, float }, align 4
  %30 = alloca { <2 x float>, float }, align 8
  %31 = alloca { <2 x float>, float }, align 4
  %32 = alloca { <2 x float>, float }, align 4
  %33 = alloca { <2 x float>, float }, align 8
  %34 = alloca %union.QMmat4, align 16
  %35 = alloca { <2 x float>, float }, align 4
  %36 = alloca %union.QMmat4, align 16
  %37 = alloca float, align 4
  %38 = alloca %union.QMvec2, align 4
  %39 = alloca %union.QMvec3, align 4
  %40 = alloca %union.QMvec3, align 4
  %41 = alloca { <2 x float>, float }, align 4
  %42 = alloca { <2 x float>, float }, align 4
  %43 = getelementptr inbounds { <2 x float>, float }, ptr %13, i32 0, i32 0
  store <2 x float> %3, ptr %43, align 4
  %44 = getelementptr inbounds { <2 x float>, float }, ptr %13, i32 0, i32 1
  store float %4, ptr %44, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %13, i64 12, i1 false)
  %45 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  store double %7, ptr %45, align 16
  %46 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  store double %8, ptr %46, align 8
  store ptr %0, ptr %15, align 8, !tbaa !5
  %47 = zext i1 %2 to i8
  store i8 %47, ptr %16, align 1, !tbaa !9
  store float %5, ptr %17, align 4, !tbaa !11
  store float %6, ptr %18, align 4, !tbaa !11
  store ptr %9, ptr %19, align 8, !tbaa !5
  store ptr %10, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %21) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 @__const.DN_shape_cone.upDir, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 64, ptr %22) #8
  %48 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %49 = load double, ptr %48, align 16
  %50 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %51 = load double, ptr %50, align 8
  call void @DN_quaternion_to_mat4(ptr dead_on_unwind writable sret(%union.QMmat4) align 16 %22, double %49, double %51)
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #8
  %52 = getelementptr inbounds %struct.anon, ptr %21, i32 0, i32 0
  %53 = load float, ptr %52, align 4, !tbaa !13
  store float %53, ptr %24, align 4, !tbaa !11
  %54 = getelementptr inbounds float, ptr %24, i64 1
  %55 = getelementptr inbounds %struct.anon, ptr %21, i32 0, i32 1
  %56 = load float, ptr %55, align 4, !tbaa !13
  store float %56, ptr %54, align 4, !tbaa !11
  %57 = getelementptr inbounds float, ptr %24, i64 2
  %58 = getelementptr inbounds %struct.anon, ptr %21, i32 0, i32 2
  %59 = load float, ptr %58, align 4, !tbaa !13
  store float %59, ptr %57, align 4, !tbaa !11
  %60 = getelementptr inbounds float, ptr %24, i64 3
  store float 1.000000e+00, ptr %60, align 4, !tbaa !11
  %61 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %62 = load double, ptr %61, align 16
  %63 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %64 = load double, ptr %63, align 8
  %65 = call { double, double } @DN_mat4_mult_vec4(ptr noundef byval(%union.QMmat4) align 16 %22, double %62, double %64)
  %66 = getelementptr inbounds %union.QMvec4, ptr %23, i32 0, i32 0
  %67 = getelementptr inbounds { double, double }, ptr %66, i32 0, i32 0
  %68 = extractvalue { double, double } %65, 0
  store double %68, ptr %67, align 16
  %69 = getelementptr inbounds { double, double }, ptr %66, i32 0, i32 1
  %70 = extractvalue { double, double } %65, 1
  store double %70, ptr %69, align 8
  %71 = getelementptr inbounds %struct.anon.3, ptr %23, i32 0, i32 0
  %72 = load float, ptr %71, align 16, !tbaa !13
  store float %72, ptr %25, align 4, !tbaa !11
  %73 = getelementptr inbounds float, ptr %25, i64 1
  %74 = getelementptr inbounds %struct.anon.3, ptr %23, i32 0, i32 1
  %75 = load float, ptr %74, align 4, !tbaa !13
  store float %75, ptr %73, align 4, !tbaa !11
  %76 = getelementptr inbounds float, ptr %25, i64 2
  %77 = getelementptr inbounds %struct.anon.3, ptr %23, i32 0, i32 2
  %78 = load float, ptr %77, align 8, !tbaa !13
  store float %78, ptr %76, align 4, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %25, i64 12, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.start.p0(i64 64, ptr %26) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %27) #8
  %79 = load float, ptr %18, align 4, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %21, i64 12, i1 false)
  %80 = getelementptr inbounds { <2 x float>, float }, ptr %29, i32 0, i32 0
  %81 = load <2 x float>, ptr %80, align 4
  %82 = getelementptr inbounds { <2 x float>, float }, ptr %29, i32 0, i32 1
  %83 = load float, ptr %82, align 4
  %84 = call { <2 x float>, float } @DN_vec3_scale(<2 x float> %81, float %83, float noundef %79)
  %85 = getelementptr inbounds %union.QMvec3, ptr %28, i32 0, i32 0
  store { <2 x float>, float } %84, ptr %30, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %85, ptr align 8 %30, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 4 %12, i64 12, i1 false)
  %86 = getelementptr inbounds { <2 x float>, float }, ptr %31, i32 0, i32 0
  %87 = load <2 x float>, ptr %86, align 4
  %88 = getelementptr inbounds { <2 x float>, float }, ptr %31, i32 0, i32 1
  %89 = load float, ptr %88, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %28, i64 12, i1 false)
  %90 = getelementptr inbounds { <2 x float>, float }, ptr %32, i32 0, i32 0
  %91 = load <2 x float>, ptr %90, align 4
  %92 = getelementptr inbounds { <2 x float>, float }, ptr %32, i32 0, i32 1
  %93 = load float, ptr %92, align 4
  %94 = call { <2 x float>, float } @DN_vec3_add(<2 x float> %87, float %89, <2 x float> %91, float %93)
  %95 = getelementptr inbounds %union.QMvec3, ptr %27, i32 0, i32 0
  store { <2 x float>, float } %94, ptr %33, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %95, ptr align 8 %33, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %27, i64 12, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr %34) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %12, i64 12, i1 false)
  %96 = getelementptr inbounds { <2 x float>, float }, ptr %35, i32 0, i32 0
  %97 = load <2 x float>, ptr %96, align 4
  %98 = getelementptr inbounds { <2 x float>, float }, ptr %35, i32 0, i32 1
  %99 = load float, ptr %98, align 4
  call void @DN_mat4_translate(ptr dead_on_unwind writable sret(%union.QMmat4) align 16 %34, <2 x float> %97, float %99)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %26, ptr align 16 %34, i64 64, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 64, ptr %34) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr %36) #8
  call void @DN_mat4_mult(ptr dead_on_unwind writable sret(%union.QMmat4) align 16 %36, ptr noundef byval(%union.QMmat4) align 16 %26, ptr noundef byval(%union.QMmat4) align 16 %22)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %26, ptr align 16 %36, i64 64, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 64, ptr %36) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #8
  %100 = load float, ptr %17, align 4, !tbaa !11
  %101 = load float, ptr %17, align 4, !tbaa !11
  %102 = load float, ptr %18, align 4, !tbaa !11
  %103 = load float, ptr %18, align 4, !tbaa !11
  %104 = fmul float %102, %103
  %105 = call float @llvm.fmuladd.f32(float %100, float %101, float %104)
  %106 = call float @sqrtf(float noundef %105) #8
  store float %106, ptr %37, align 4, !tbaa !11
  %107 = load float, ptr %18, align 4, !tbaa !11
  %108 = load float, ptr %37, align 4, !tbaa !11
  %109 = fdiv float %107, %108
  store float %109, ptr %38, align 4, !tbaa !11
  %110 = getelementptr inbounds float, ptr %38, i64 1
  %111 = load float, ptr %17, align 4, !tbaa !11
  %112 = load float, ptr %37, align 4, !tbaa !11
  %113 = fdiv float %111, %112
  store float %113, ptr %110, align 4, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 @g_angles, ptr align 4 %38, i64 8, i1 false), !tbaa.struct !16
  %114 = load float, ptr %18, align 4, !tbaa !11
  store float %114, ptr @g_height, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 12, ptr %39) #8
  %115 = load float, ptr %17, align 4, !tbaa !11
  %116 = fneg float %115
  store float %116, ptr %39, align 4, !tbaa !11
  %117 = getelementptr inbounds float, ptr %39, i64 1
  %118 = load float, ptr %18, align 4, !tbaa !11
  %119 = fneg float %118
  store float %119, ptr %117, align 4, !tbaa !11
  %120 = getelementptr inbounds float, ptr %39, i64 2
  %121 = load float, ptr %17, align 4, !tbaa !11
  %122 = fneg float %121
  store float %122, ptr %120, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 12, ptr %40) #8
  %123 = load float, ptr %17, align 4, !tbaa !11
  store float %123, ptr %40, align 4, !tbaa !11
  %124 = getelementptr inbounds float, ptr %40, i64 1
  store float 0.000000e+00, ptr %124, align 4, !tbaa !11
  %125 = getelementptr inbounds float, ptr %40, i64 2
  %126 = load float, ptr %17, align 4, !tbaa !11
  store float %126, ptr %125, align 4, !tbaa !11
  %127 = load ptr, ptr %15, align 8, !tbaa !5
  %128 = load ptr, ptr %19, align 8, !tbaa !5
  %129 = load ptr, ptr %20, align 8, !tbaa !5
  %130 = load i8, ptr %16, align 1, !tbaa !9, !range !17, !noundef !18
  %131 = trunc i8 %130 to i1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %41, ptr align 4 %39, i64 12, i1 false)
  %132 = getelementptr inbounds { <2 x float>, float }, ptr %41, i32 0, i32 0
  %133 = load <2 x float>, ptr %132, align 4
  %134 = getelementptr inbounds { <2 x float>, float }, ptr %41, i32 0, i32 1
  %135 = load float, ptr %134, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %42, ptr align 4 %40, i64 12, i1 false)
  %136 = getelementptr inbounds { <2 x float>, float }, ptr %42, i32 0, i32 0
  %137 = load <2 x float>, ptr %136, align 4
  %138 = getelementptr inbounds { <2 x float>, float }, ptr %42, i32 0, i32 1
  %139 = load float, ptr %138, align 4
  call void @_DN_shape(ptr noundef %127, ptr noundef byval(%struct.DNvoxel) align 8 %1, ptr noundef %128, ptr noundef %129, i1 noundef zeroext %131, <2 x float> %133, float %135, <2 x float> %137, float %139, ptr noundef byval(%union.QMmat4) align 16 %26, ptr noundef @_DN_sdf_cone)
  call void @llvm.lifetime.end.p0(i64 12, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #8
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden { double, double } @DN_mat4_mult_vec4(ptr noundef byval(%union.QMmat4) align 16, double, double) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden { <2 x float>, float } @DN_vec3_add(<2 x float>, float, <2 x float>, float) #2

; Function Attrs: nounwind
declare float @sqrtf(float noundef) #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #7

; Function Attrs: nounwind uwtable
declare hidden float @_DN_sdf_cone(<2 x float>, float) #5

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint nounwind 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 #3 = { inlinehint nounwind uwtable "min-legal-vector-width"="128" "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 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 = { nounwind 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_Bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{i64 0, i64 12, !13}
!15 = !{i64 0, i64 64, !13}
!16 = !{i64 0, i64 8, !13}
!17 = !{i8 0, i8 2}
!18 = !{}


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

%union.QMvec3 = type { [3 x float] }
%union.QMvec2 = type { [2 x float] }
%union.QMmat4 = type { [4 x <4 x float>] }
%struct.DNvoxel = type { i8, %union.QMvec3, %struct.DNcolor }
%struct.DNcolor = type { i8, i8, i8 }

@g_height = external hidden local_unnamed_addr global float, align 4
@__const.DN_shape_cone.upDir = external hidden unnamed_addr constant %union.QMvec3, align 4
@g_angles = external hidden local_unnamed_addr global %union.QMvec2, align 4

; 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) #0

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @DN_mat4_translate(ptr dead_on_unwind noalias writable sret(%union.QMmat4) align 16, <2 x float>, float) local_unnamed_addr #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @DN_mat4_mult(ptr dead_on_unwind noalias writable sret(%union.QMmat4) align 16, ptr noundef byval(%union.QMmat4) align 16, ptr noundef byval(%union.QMmat4) align 16) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @DN_quaternion_to_mat4(ptr dead_on_unwind noalias writable sret(%union.QMmat4) align 16, double, double) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden { <2 x float>, float } @DN_vec3_scale(<2 x float>, float, float noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden void @_DN_shape(ptr noundef, ptr noundef byval(%struct.DNvoxel) align 8, ptr noundef, ptr noundef, i1 noundef zeroext, <2 x float>, float, <2 x float>, float, ptr noundef byval(%union.QMmat4) align 16, ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
define dso_local void @DN_shape_cone(ptr noundef %0, ptr noundef byval(%struct.DNvoxel) align 8 %1, i1 noundef zeroext %2, <2 x float> %3, float %4, float noundef %5, float noundef %6, double %7, double %8, ptr noundef %9, ptr noundef %10) local_unnamed_addr #5 {
  %12 = alloca %union.QMmat4, align 16
  %.sroa.331 = alloca double, align 8
  %13 = alloca %union.QMmat4, align 16
  %14 = alloca %union.QMmat4, align 16
  %.sroa.036.0.copyload66 = load double, ptr @__const.DN_shape_cone.upDir, align 4
  %.sroa.8.0.copyload = load float, ptr getelementptr inbounds (i8, ptr @__const.DN_shape_cone.upDir, i64 8), align 4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #8
  call void @DN_quaternion_to_mat4(ptr dead_on_unwind nonnull writable sret(%union.QMmat4) align 16 %12, double %7, double %8)
  store float %.sroa.8.0.copyload, ptr %.sroa.331, align 8, !tbaa !5
  %.sroa.331.4.sroa_idx67 = getelementptr inbounds i8, ptr %.sroa.331, i64 4
  store float 1.000000e+00, ptr %.sroa.331.4.sroa_idx67, align 4, !tbaa !5
  %.sroa.331.0..sroa.331.0..sroa.331.0..sroa.331.0..sroa.331.8. = load double, ptr %.sroa.331, align 8
  %15 = call { double, double } @DN_mat4_mult_vec4(ptr noundef nonnull byval(%union.QMmat4) align 16 %12, double %.sroa.036.0.copyload66, double %.sroa.331.0..sroa.331.0..sroa.331.0..sroa.331.0..sroa.331.8.)
  %16 = extractvalue { double, double } %15, 0
  %17 = extractvalue { double, double } %15, 1
  %18 = bitcast double %17 to i64
  %19 = trunc i64 %18 to i32
  %20 = bitcast i32 %19 to float
  %.sroa.036.4.vec.insert = bitcast double %16 to <2 x float>
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %13) #8
  %21 = call { <2 x float>, float } @DN_vec3_scale(<2 x float> %.sroa.036.4.vec.insert, float %20, float noundef %6)
  %.fca.0.extract19 = extractvalue { <2 x float>, float } %21, 0
  %.fca.1.extract20 = extractvalue { <2 x float>, float } %21, 1
  %22 = call { <2 x float>, float } @DN_vec3_add(<2 x float> %3, float %4, <2 x float> %.fca.0.extract19, float %.fca.1.extract20)
  %.fca.0.extract = extractvalue { <2 x float>, float } %22, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %22, 1
  call void @DN_mat4_translate(ptr dead_on_unwind nonnull writable sret(%union.QMmat4) align 16 %13, <2 x float> %.fca.0.extract, float %.fca.1.extract)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %14) #8
  call void @DN_mat4_mult(ptr dead_on_unwind nonnull writable sret(%union.QMmat4) align 16 %14, ptr noundef nonnull byval(%union.QMmat4) align 16 %13, ptr noundef nonnull byval(%union.QMmat4) align 16 %12)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %13, ptr noundef nonnull align 16 dereferenceable(64) %14, i64 64, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %14) #8
  %23 = fmul float %6, %6
  %24 = call float @llvm.fmuladd.f32(float %5, float %5, float %23)
  %sqrt = call float @llvm.sqrt.f32(float %24)
  %25 = insertelement <2 x float> poison, float %6, i64 0
  %26 = insertelement <2 x float> %25, float %5, i64 1
  %27 = insertelement <2 x float> poison, float %sqrt, i64 0
  %28 = shufflevector <2 x float> %27, <2 x float> poison, <2 x i32> zeroinitializer
  %29 = fdiv <2 x float> %26, %28
  store <2 x float> %29, ptr @g_angles, align 4
  store float %6, ptr @g_height, align 4, !tbaa !5
  %30 = insertelement <2 x float> poison, float %5, i64 0
  %31 = insertelement <2 x float> %30, float %6, i64 1
  %32 = fneg <2 x float> %31
  %.sroa.03.4.vec.insert = insertelement <2 x float> <float poison, float 0.000000e+00>, float %5, i64 0
  %33 = extractelement <2 x float> %32, i64 0
  call void @_DN_shape(ptr noundef %0, ptr noundef nonnull byval(%struct.DNvoxel) align 8 %1, ptr noundef %9, ptr noundef %10, i1 noundef zeroext %2, <2 x float> %32, float %33, <2 x float> %.sroa.03.4.vec.insert, float %5, ptr noundef nonnull byval(%union.QMmat4) align 16 %13, ptr noundef nonnull @_DN_sdf_cone)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #8
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden { double, double } @DN_mat4_mult_vec4(ptr noundef byval(%union.QMmat4) align 16, double, double) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden { <2 x float>, float } @DN_vec3_add(<2 x float>, float, <2 x float>, float) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #6

; Function Attrs: nounwind uwtable
declare hidden float @_DN_sdf_cone(<2 x float>, float) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.sqrt.f32(float) #7

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint nounwind 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 #3 = { inlinehint nounwind uwtable "min-legal-vector-width"="128" "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 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 = { nounwind 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 #6 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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/C++ TBAA"}
!9 = !{i64 0, i64 64, !10}
!10 = !{!7, !7, i64 0}


; Effective O3 passes: AggressiveInstCombinePass,BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SCCPPass,SLPVectorizerPass,SROAPass