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

; 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.QMmat4 = type { [4 x <4 x float>] }
%struct.DNvolume = type { i32, i32, i32, %struct.DNuvec3, i64, i64, i64, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, %union.QMvec3, %union.QMvec3, float, i32, %union.QMvec3, %union.QMvec3, %union.QMvec3, i32, i32, float, i8, i32, %union.QMvec3, %union.QMvec3, i32, float }
%struct.DNuvec3 = type { i32, i32, i32 }
%union.QMvec3 = type { [3 x float] }

@g_materialBuffer = external dso_local global i32, align 4
@g_drawProgram = external dso_local global i32, align 4
@glad_glBindBufferBase = external global ptr, align 8
@glad_glBindBuffer = external global ptr, align 8
@glad_glMemoryBarrier = external global ptr, align 8
@glad_glUseProgram = external global ptr, align 8
@glad_glBindImageTexture = external global ptr, align 8
@glad_glBufferSubData = external global ptr, align 8
@glad_glBindTexture = external global ptr, align 8
@glad_glGetTexLevelParameteriv = external global ptr, align 8
@.str.20 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [12 x i8], align 1
@glad_glActiveTexture = external global ptr, align 8
@.str.23 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [17 x i8], align 1
@glad_glUniform3uiv = external global ptr, align 8
@glad_glGetUniformLocation = external global ptr, align 8
@.str.33 = external hidden unnamed_addr constant [8 x i8], align 1
@glad_glDispatchCompute = external global ptr, align 8

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @DN_draw(ptr noundef %0, i32 noundef %1, ptr noundef byval(%union.QMmat4) align 16 %2, ptr noundef byval(%union.QMmat4) align 16 %3, i32 noundef %4, i32 noundef %5) #2 {
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %union.QMmat4, align 16
  %14 = alloca %union.QMmat4, align 16
  %15 = alloca %union.QMmat4, align 16
  %16 = alloca %union.QMmat4, align 16
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store i32 %4, ptr %9, align 4, !tbaa !9
  store i32 %5, ptr %10, align 4, !tbaa !9
  %17 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !5
  %18 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  call void %17(i32 noundef %18)
  %19 = load ptr, ptr @glad_glBindBufferBase, align 8, !tbaa !5
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.DNvolume, ptr %20, i32 0, i32 0
  %22 = load i32, ptr %21, align 8, !tbaa !11
  call void %19(i32 noundef 37074, i32 noundef 0, i32 noundef %22)
  %23 = load ptr, ptr @glad_glBindBufferBase, align 8, !tbaa !5
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.DNvolume, ptr %24, i32 0, i32 1
  %26 = load i32, ptr %25, align 4, !tbaa !17
  call void %23(i32 noundef 37074, i32 noundef 1, i32 noundef %26)
  %27 = load ptr, ptr @glad_glBindBufferBase, align 8, !tbaa !5
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.DNvolume, ptr %28, i32 0, i32 2
  %30 = load i32, ptr %29, align 8, !tbaa !18
  call void %27(i32 noundef 37074, i32 noundef 4, i32 noundef %30)
  %31 = load ptr, ptr @glad_glBindImageTexture, align 8, !tbaa !5
  %32 = load i32, ptr %8, align 4, !tbaa !9
  call void %31(i32 noundef 0, i32 noundef %32, i32 noundef 0, i8 noundef zeroext 0, i32 noundef 0, i32 noundef 35001, i32 noundef 34836)
  %33 = load ptr, ptr @glad_glBindBuffer, align 8, !tbaa !5
  %34 = load i32, ptr @g_materialBuffer, align 4, !tbaa !9
  call void %33(i32 noundef 37074, i32 noundef %34)
  %35 = load ptr, ptr @glad_glBufferSubData, align 8, !tbaa !5
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.DNvolume, ptr %36, i32 0, i32 12
  %38 = load ptr, ptr %37, align 8, !tbaa !19
  call void %35(i32 noundef 37074, i64 noundef 0, i64 noundef 8192, ptr noundef %38)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %39 = load ptr, ptr @glad_glBindTexture, align 8, !tbaa !5
  %40 = load i32, ptr %8, align 4, !tbaa !9
  call void %39(i32 noundef 3553, i32 noundef %40)
  %41 = load ptr, ptr @glad_glGetTexLevelParameteriv, align 8, !tbaa !5
  call void %41(i32 noundef 3553, i32 noundef 0, i32 noundef 4096, ptr noundef %11)
  %42 = load ptr, ptr @glad_glGetTexLevelParameteriv, align 8, !tbaa !5
  call void %42(i32 noundef 3553, i32 noundef 0, i32 noundef 4097, ptr noundef %12)
  %43 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  %44 = load i32, ptr %9, align 4, !tbaa !9
  %45 = icmp sge i32 %44, 0
  br i1 %45, label %46, label %49

46:                                               ; preds = %6
  %47 = load i32, ptr %10, align 4, !tbaa !9
  %48 = icmp sge i32 %47, 0
  br label %49

49:                                               ; preds = %46, %6
  %50 = phi i1 [ false, %6 ], [ %48, %46 ]
  %51 = zext i1 %50 to i32
  call void @DN_program_uniform_uint(i32 noundef %43, ptr noundef @.str.20, i32 noundef %51)
  %52 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  call void @DN_program_uniform_int(i32 noundef %52, ptr noundef @.str.21, i32 noundef 0)
  %53 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  call void @DN_program_uniform_int(i32 noundef %53, ptr noundef @.str.22, i32 noundef 1)
  %54 = load i32, ptr %9, align 4, !tbaa !9
  %55 = icmp sge i32 %54, 0
  br i1 %55, label %56, label %66

56:                                               ; preds = %49
  %57 = load i32, ptr %10, align 4, !tbaa !9
  %58 = icmp sge i32 %57, 0
  br i1 %58, label %59, label %66

59:                                               ; preds = %56
  %60 = load ptr, ptr @glad_glActiveTexture, align 8, !tbaa !5
  call void %60(i32 noundef 33984)
  %61 = load ptr, ptr @glad_glBindTexture, align 8, !tbaa !5
  %62 = load i32, ptr %9, align 4, !tbaa !9
  call void %61(i32 noundef 3553, i32 noundef %62)
  %63 = load ptr, ptr @glad_glActiveTexture, align 8, !tbaa !5
  call void %63(i32 noundef 33985)
  %64 = load ptr, ptr @glad_glBindTexture, align 8, !tbaa !5
  %65 = load i32, ptr %10, align 4, !tbaa !9
  call void %64(i32 noundef 3553, i32 noundef %65)
  br label %66

66:                                               ; preds = %59, %56, %49
  call void @llvm.lifetime.start.p0(i64 64, ptr %13) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %13, ptr align 16 %2, i64 64, i1 false), !tbaa.struct !20
  %67 = getelementptr inbounds [4 x [4 x float]], ptr %13, i64 0, i64 3
  %68 = getelementptr inbounds [4 x float], ptr %67, i64 0, i64 0
  store float 0.000000e+00, ptr %68, align 16, !tbaa !21
  %69 = getelementptr inbounds [4 x [4 x float]], ptr %13, i64 0, i64 3
  %70 = getelementptr inbounds [4 x float], ptr %69, i64 0, i64 1
  store float 0.000000e+00, ptr %70, align 4, !tbaa !21
  %71 = getelementptr inbounds [4 x [4 x float]], ptr %13, i64 0, i64 3
  %72 = getelementptr inbounds [4 x float], ptr %71, i64 0, i64 2
  store float 0.000000e+00, ptr %72, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #5
  call void @DN_mat4_inv(ptr dead_on_unwind writable sret(%union.QMmat4) align 16 %14, ptr noundef byval(%union.QMmat4) align 16 %2)
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #5
  call void @DN_mat4_inv(ptr dead_on_unwind writable sret(%union.QMmat4) align 16 %15, ptr noundef byval(%union.QMmat4) align 16 %13)
  call void @llvm.lifetime.start.p0(i64 64, ptr %16) #5
  call void @DN_mat4_inv(ptr dead_on_unwind writable sret(%union.QMmat4) align 16 %16, ptr noundef byval(%union.QMmat4) align 16 %3)
  %73 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.DNvolume, ptr %74, i32 0, i32 25
  %76 = load i8, ptr %75, align 8, !tbaa !22, !range !23, !noundef !24
  %77 = trunc i8 %76 to i1
  %78 = zext i1 %77 to i32
  call void @DN_program_uniform_uint(i32 noundef %73, ptr noundef @.str.23, i32 noundef %78)
  %79 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  call void @DN_program_uniform_int(i32 noundef %79, ptr noundef @.str.24, i32 noundef 2)
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.DNvolume, ptr %80, i32 0, i32 25
  %82 = load i8, ptr %81, align 8, !tbaa !22, !range !23, !noundef !24
  %83 = trunc i8 %82 to i1
  br i1 %83, label %84, label %90

84:                                               ; preds = %66
  %85 = load ptr, ptr @glad_glActiveTexture, align 8, !tbaa !5
  call void %85(i32 noundef 33986)
  %86 = load ptr, ptr @glad_glBindTexture, align 8, !tbaa !5
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.DNvolume, ptr %87, i32 0, i32 26
  %89 = load i32, ptr %88, align 4, !tbaa !25
  call void %86(i32 noundef 34067, i32 noundef %89)
  br label %97

90:                                               ; preds = %66
  %91 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.DNvolume, ptr %92, i32 0, i32 27
  call void @DN_program_uniform_vec3(i32 noundef %91, ptr noundef @.str.25, ptr noundef %93)
  %94 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.DNvolume, ptr %95, i32 0, i32 28
  call void @DN_program_uniform_vec3(i32 noundef %94, ptr noundef @.str.26, ptr noundef %96)
  br label %97

97:                                               ; preds = %90, %84
  %98 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.DNvolume, ptr %99, i32 0, i32 20
  call void @DN_program_uniform_vec3(i32 noundef %98, ptr noundef @.str.27, ptr noundef %100)
  %101 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.DNvolume, ptr %102, i32 0, i32 18
  %104 = load i32, ptr %103, align 4, !tbaa !26
  call void @DN_program_uniform_uint(i32 noundef %101, ptr noundef @.str.28, i32 noundef %104)
  %105 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.DNvolume, ptr %106, i32 0, i32 21
  call void @DN_program_uniform_vec3(i32 noundef %105, ptr noundef @.str.29, ptr noundef %107)
  %108 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  call void @DN_program_uniform_mat4(i32 noundef %108, ptr noundef @.str.30, ptr noundef %14)
  %109 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  call void @DN_program_uniform_mat4(i32 noundef %109, ptr noundef @.str.31, ptr noundef %15)
  %110 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  call void @DN_program_uniform_mat4(i32 noundef %110, ptr noundef @.str.32, ptr noundef %16)
  %111 = load ptr, ptr @glad_glUniform3uiv, align 8, !tbaa !5
  %112 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %113 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  %114 = call i32 %112(i32 noundef %113, ptr noundef @.str.33)
  %115 = load ptr, ptr %7, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.DNvolume, ptr %115, i32 0, i32 3
  call void %111(i32 noundef %114, i32 noundef 1, ptr noundef %116)
  %117 = load ptr, ptr @glad_glDispatchCompute, align 8, !tbaa !5
  %118 = load i32, ptr %11, align 4, !tbaa !9
  %119 = udiv i32 %118, 16
  %120 = load i32, ptr %12, align 4, !tbaa !9
  %121 = udiv i32 %120, 16
  call void %117(i32 noundef %119, i32 noundef %121, i32 noundef 1)
  %122 = load ptr, ptr @glad_glMemoryBarrier, align 8, !tbaa !5
  call void %122(i32 noundef 8224)
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  ret void
}

declare void @DN_program_uniform_uint(i32 noundef, ptr noundef, i32 noundef) #3

declare void @DN_program_uniform_int(i32 noundef, ptr noundef, i32 noundef) #3

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

declare void @DN_program_uniform_vec3(i32 noundef, ptr noundef, ptr noundef) #3

declare void @DN_program_uniform_mat4(i32 noundef, ptr noundef, ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "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"="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 #5 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"DNvolume", !10, i64 0, !10, i64 4, !10, i64 8, !13, i64 12, !14, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !7, i64 112, !7, i64 124, !15, i64 136, !10, i64 140, !7, i64 144, !7, i64 156, !7, i64 168, !10, i64 180, !10, i64 184, !15, i64 188, !16, i64 192, !10, i64 196, !7, i64 200, !7, i64 212, !10, i64 224, !15, i64 228}
!13 = !{!"DNuvec3", !10, i64 0, !10, i64 4, !10, i64 8}
!14 = !{!"long", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!"_Bool", !7, i64 0}
!17 = !{!12, !10, i64 4}
!18 = !{!12, !10, i64 8}
!19 = !{!12, !6, i64 88}
!20 = !{i64 0, i64 64, !21}
!21 = !{!7, !7, i64 0}
!22 = !{!12, !16, i64 192}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!12, !10, i64 196}
!26 = !{!12, !10, i64 140}


; 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.QMmat4 = type { [4 x <4 x float>] }

@g_materialBuffer = external dso_local local_unnamed_addr global i32, align 4
@g_drawProgram = external dso_local local_unnamed_addr global i32, align 4
@glad_glBindBufferBase = external local_unnamed_addr global ptr, align 8
@glad_glBindBuffer = external local_unnamed_addr global ptr, align 8
@glad_glMemoryBarrier = external local_unnamed_addr global ptr, align 8
@glad_glUseProgram = external local_unnamed_addr global ptr, align 8
@glad_glBindImageTexture = external local_unnamed_addr global ptr, align 8
@glad_glBufferSubData = external local_unnamed_addr global ptr, align 8
@glad_glBindTexture = external local_unnamed_addr global ptr, align 8
@glad_glGetTexLevelParameteriv = external local_unnamed_addr global ptr, align 8
@.str.20 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [12 x i8], align 1
@glad_glActiveTexture = external local_unnamed_addr global ptr, align 8
@.str.23 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [17 x i8], align 1
@glad_glUniform3uiv = external local_unnamed_addr global ptr, align 8
@glad_glGetUniformLocation = external local_unnamed_addr global ptr, align 8
@.str.33 = external hidden unnamed_addr constant [8 x i8], align 1
@glad_glDispatchCompute = external local_unnamed_addr global ptr, align 8

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @DN_draw(ptr noundef %0, i32 noundef %1, ptr noundef byval(%union.QMmat4) align 16 %2, ptr noundef byval(%union.QMmat4) align 16 %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #2 {
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %union.QMmat4, align 16
  %10 = alloca %union.QMmat4, align 16
  %11 = alloca %union.QMmat4, align 16
  %12 = alloca %union.QMmat4, align 16
  %13 = load ptr, ptr @glad_glUseProgram, align 8, !tbaa !5
  %14 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  tail call void %13(i32 noundef %14) #5
  %15 = load ptr, ptr @glad_glBindBufferBase, align 8, !tbaa !5
  %16 = load i32, ptr %0, align 8, !tbaa !11
  tail call void %15(i32 noundef 37074, i32 noundef 0, i32 noundef %16) #5
  %17 = load ptr, ptr @glad_glBindBufferBase, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %0, i64 4
  %19 = load i32, ptr %18, align 4, !tbaa !17
  tail call void %17(i32 noundef 37074, i32 noundef 1, i32 noundef %19) #5
  %20 = load ptr, ptr @glad_glBindBufferBase, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %0, i64 8
  %22 = load i32, ptr %21, align 8, !tbaa !18
  tail call void %20(i32 noundef 37074, i32 noundef 4, i32 noundef %22) #5
  %23 = load ptr, ptr @glad_glBindImageTexture, align 8, !tbaa !5
  tail call void %23(i32 noundef 0, i32 noundef %1, i32 noundef 0, i8 noundef zeroext 0, i32 noundef 0, i32 noundef 35001, i32 noundef 34836) #5
  %24 = load ptr, ptr @glad_glBindBuffer, align 8, !tbaa !5
  %25 = load i32, ptr @g_materialBuffer, align 4, !tbaa !9
  tail call void %24(i32 noundef 37074, i32 noundef %25) #5
  %26 = load ptr, ptr @glad_glBufferSubData, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %0, i64 88
  %28 = load ptr, ptr %27, align 8, !tbaa !19
  tail call void %26(i32 noundef 37074, i64 noundef 0, i64 noundef 8192, ptr noundef %28) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  %29 = load ptr, ptr @glad_glBindTexture, align 8, !tbaa !5
  tail call void %29(i32 noundef 3553, i32 noundef %1) #5
  %30 = load ptr, ptr @glad_glGetTexLevelParameteriv, align 8, !tbaa !5
  call void %30(i32 noundef 3553, i32 noundef 0, i32 noundef 4096, ptr noundef nonnull %7) #5
  %31 = load ptr, ptr @glad_glGetTexLevelParameteriv, align 8, !tbaa !5
  call void %31(i32 noundef 3553, i32 noundef 0, i32 noundef 4097, ptr noundef nonnull %8) #5
  %32 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  %33 = or i32 %5, %4
  %34 = icmp sgt i32 %33, -1
  %35 = zext i1 %34 to i32
  call void @DN_program_uniform_uint(i32 noundef %32, ptr noundef nonnull @.str.20, i32 noundef %35) #5
  %36 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  call void @DN_program_uniform_int(i32 noundef %36, ptr noundef nonnull @.str.21, i32 noundef 0) #5
  %37 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  call void @DN_program_uniform_int(i32 noundef %37, ptr noundef nonnull @.str.22, i32 noundef 1) #5
  br i1 %34, label %38, label %43

38:                                               ; preds = %6
  %39 = load ptr, ptr @glad_glActiveTexture, align 8, !tbaa !5
  call void %39(i32 noundef 33984) #5
  %40 = load ptr, ptr @glad_glBindTexture, align 8, !tbaa !5
  call void %40(i32 noundef 3553, i32 noundef %4) #5
  %41 = load ptr, ptr @glad_glActiveTexture, align 8, !tbaa !5
  call void %41(i32 noundef 33985) #5
  %42 = load ptr, ptr @glad_glBindTexture, align 8, !tbaa !5
  call void %42(i32 noundef 3553, i32 noundef %5) #5
  br label %43

43:                                               ; preds = %38, %6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %9, ptr noundef nonnull align 16 dereferenceable(64) %2, i64 64, i1 false), !tbaa.struct !20
  %44 = getelementptr inbounds i8, ptr %9, i64 48
  store <2 x float> zeroinitializer, ptr %44, align 16, !tbaa !21
  %45 = getelementptr inbounds i8, ptr %9, i64 56
  store float 0.000000e+00, ptr %45, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #5
  call void @DN_mat4_inv(ptr dead_on_unwind nonnull writable sret(%union.QMmat4) align 16 %10, ptr noundef nonnull byval(%union.QMmat4) align 16 %2)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #5
  call void @DN_mat4_inv(ptr dead_on_unwind nonnull writable sret(%union.QMmat4) align 16 %11, ptr noundef nonnull byval(%union.QMmat4) align 16 %9)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #5
  call void @DN_mat4_inv(ptr dead_on_unwind nonnull writable sret(%union.QMmat4) align 16 %12, ptr noundef nonnull byval(%union.QMmat4) align 16 %3)
  %46 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  %47 = getelementptr inbounds i8, ptr %0, i64 192
  %48 = load i8, ptr %47, align 8, !tbaa !22, !range !23, !noundef !24
  %49 = zext nneg i8 %48 to i32
  call void @DN_program_uniform_uint(i32 noundef %46, ptr noundef nonnull @.str.23, i32 noundef %49) #5
  %50 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  call void @DN_program_uniform_int(i32 noundef %50, ptr noundef nonnull @.str.24, i32 noundef 2) #5
  %51 = load i8, ptr %47, align 8, !tbaa !22, !range !23, !noundef !24
  %52 = trunc nuw i8 %51 to i1
  br i1 %52, label %53, label %58

53:                                               ; preds = %43
  %54 = load ptr, ptr @glad_glActiveTexture, align 8, !tbaa !5
  call void %54(i32 noundef 33986) #5
  %55 = load ptr, ptr @glad_glBindTexture, align 8, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %0, i64 196
  %57 = load i32, ptr %56, align 4, !tbaa !25
  call void %55(i32 noundef 34067, i32 noundef %57) #5
  br label %63

58:                                               ; preds = %43
  %59 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  %60 = getelementptr inbounds i8, ptr %0, i64 200
  call void @DN_program_uniform_vec3(i32 noundef %59, ptr noundef nonnull @.str.25, ptr noundef nonnull %60) #5
  %61 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  %62 = getelementptr inbounds i8, ptr %0, i64 212
  call void @DN_program_uniform_vec3(i32 noundef %61, ptr noundef nonnull @.str.26, ptr noundef nonnull %62) #5
  br label %63

63:                                               ; preds = %58, %53
  %64 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  %65 = getelementptr inbounds i8, ptr %0, i64 156
  call void @DN_program_uniform_vec3(i32 noundef %64, ptr noundef nonnull @.str.27, ptr noundef nonnull %65) #5
  %66 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  %67 = getelementptr inbounds i8, ptr %0, i64 140
  %68 = load i32, ptr %67, align 4, !tbaa !26
  call void @DN_program_uniform_uint(i32 noundef %66, ptr noundef nonnull @.str.28, i32 noundef %68) #5
  %69 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  %70 = getelementptr inbounds i8, ptr %0, i64 168
  call void @DN_program_uniform_vec3(i32 noundef %69, ptr noundef nonnull @.str.29, ptr noundef nonnull %70) #5
  %71 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  call void @DN_program_uniform_mat4(i32 noundef %71, ptr noundef nonnull @.str.30, ptr noundef nonnull %10) #5
  %72 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  call void @DN_program_uniform_mat4(i32 noundef %72, ptr noundef nonnull @.str.31, ptr noundef nonnull %11) #5
  %73 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  call void @DN_program_uniform_mat4(i32 noundef %73, ptr noundef nonnull @.str.32, ptr noundef nonnull %12) #5
  %74 = load ptr, ptr @glad_glUniform3uiv, align 8, !tbaa !5
  %75 = load ptr, ptr @glad_glGetUniformLocation, align 8, !tbaa !5
  %76 = load i32, ptr @g_drawProgram, align 4, !tbaa !9
  %77 = call i32 %75(i32 noundef %76, ptr noundef nonnull @.str.33) #5
  %78 = getelementptr inbounds i8, ptr %0, i64 12
  call void %74(i32 noundef %77, i32 noundef 1, ptr noundef nonnull %78) #5
  %79 = load ptr, ptr @glad_glDispatchCompute, align 8, !tbaa !5
  %80 = load i32, ptr %7, align 4, !tbaa !9
  %81 = lshr i32 %80, 4
  %82 = load i32, ptr %8, align 4, !tbaa !9
  %83 = lshr i32 %82, 4
  call void %79(i32 noundef %81, i32 noundef %83, i32 noundef 1) #5
  %84 = load ptr, ptr @glad_glMemoryBarrier, align 8, !tbaa !5
  call void %84(i32 noundef 8224) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  ret void
}

declare void @DN_program_uniform_uint(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

declare void @DN_program_uniform_int(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

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

declare void @DN_program_uniform_vec3(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @DN_program_uniform_mat4(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "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"="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 #5 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"DNvolume", !10, i64 0, !10, i64 4, !10, i64 8, !13, i64 12, !14, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !7, i64 112, !7, i64 124, !15, i64 136, !10, i64 140, !7, i64 144, !7, i64 156, !7, i64 168, !10, i64 180, !10, i64 184, !15, i64 188, !16, i64 192, !10, i64 196, !7, i64 200, !7, i64 212, !10, i64 224, !15, i64 228}
!13 = !{!"DNuvec3", !10, i64 0, !10, i64 4, !10, i64 8}
!14 = !{!"long", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!"_Bool", !7, i64 0}
!17 = !{!12, !10, i64 4}
!18 = !{!12, !10, i64 8}
!19 = !{!12, !6, i64 88}
!20 = !{i64 0, i64 64, !21}
!21 = !{!7, !7, i64 0}
!22 = !{!12, !16, i64 192}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!12, !10, i64 196}
!26 = !{!12, !10, i64 140}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass