; LLVM IR from vokegpu/bicudo :: meow/src/graphics/immediate.ll (ZN4meow18immediate_graphics4drawEN6bicudo4vec4ES2_fj)

; 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.bicudo::vec4" = type { %union.anon.7 }
%union.anon.7 = type { %struct.anon.8 }
%struct.anon.8 = type { float, float, float, float }
%"struct.bicudo::mat4" = type { %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float }
%"struct.bicudo::vec2" = type { %union.anon.5 }
%union.anon.5 = type { %struct.anon.6 }
%struct.anon.6 = type { float, float }
%"struct.bicudo::vec3" = type { %union.anon.24 }
%union.anon.24 = type { %struct.anon.25 }
%struct.anon.25 = type { float, float, float }
%"class.std::basic_string_view" = type { i64, ptr }
%"class.meow::immediate_graphics" = type <{ i32, [4 x i8], %"struct.meow::gpu::uniform", %"struct.meow::gpu::draw_call_t", %"struct.bicudo::mat4", %"struct.bicudo::mat4", %"struct.bicudo::vec2", %"struct.bicudo::vec4", float, [4 x i8] }>
%"struct.meow::gpu::uniform" = type { i32, %"class.std::unordered_map" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"struct.meow::gpu::draw_call_t" = type { i32, i32, i32, i32, i64, i64, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@__glewUniformMatrix4fv = external global ptr, align 8
@__glewUniform4fv = external global ptr, align 8
@__glewUniform1i = external global ptr, align 8
@__glewActiveTexture = 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 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6bicudo4vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6bicudo4vec3C2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #3 align 2

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZN4meow3gpu7uniformixESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(64), i64, ptr) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6bicudo4mat44dataEv(ptr noundef nonnull align 4 dereferenceable(64)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4meow18immediate_graphics4drawEN6bicudo4vec4ES2_fj(ptr noundef nonnull align 8 dereferenceable(284) %0, <2 x float> %1, <2 x float> %2, <2 x float> %3, <2 x float> %4, float noundef %5, i32 noundef %6) #5 align 2 {
  %8 = alloca %"struct.bicudo::vec4", align 4
  %9 = alloca %"struct.bicudo::vec4", align 4
  %10 = alloca ptr, align 8
  %11 = alloca float, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"struct.bicudo::mat4", align 4
  %14 = alloca %"struct.bicudo::vec2", align 4
  %15 = alloca %"struct.bicudo::mat4", align 4
  %16 = alloca %"struct.bicudo::mat4", align 8
  %17 = alloca %"struct.bicudo::vec2", align 4
  %18 = alloca %"struct.bicudo::mat4", align 4
  %19 = alloca %"struct.bicudo::mat4", align 8
  %20 = alloca %"struct.bicudo::vec3", align 4
  %21 = alloca { <2 x float>, float }, align 4
  %22 = alloca %"struct.bicudo::mat4", align 4
  %23 = alloca %"struct.bicudo::mat4", align 8
  %24 = alloca %"struct.bicudo::vec2", align 4
  %25 = alloca %"class.std::basic_string_view", align 8
  %26 = alloca %"class.std::basic_string_view", align 8
  %27 = alloca %"class.std::basic_string_view", align 8
  %28 = alloca %"class.std::basic_string_view", align 8
  %29 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 0
  store <2 x float> %1, ptr %29, align 4
  %30 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 1
  store <2 x float> %2, ptr %30, align 4
  %31 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 0
  store <2 x float> %3, ptr %31, align 4
  %32 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 1
  store <2 x float> %4, ptr %32, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store float %5, ptr %11, align 4, !tbaa !9
  store i32 %6, ptr %12, align 4, !tbaa !11
  %33 = load ptr, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr %13) #7
  call void @_ZN6bicudo4mat4C2Ef(ptr noundef nonnull align 4 dereferenceable(64) %13, float noundef 1.000000e+00)
  %34 = getelementptr inbounds %"class.meow::immediate_graphics", ptr %33, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %34, ptr align 4 %13, i64 64, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #7
  %35 = load float, ptr %11, align 4, !tbaa !9
  %36 = call noundef zeroext i1 @_ZN6bicudo12assert_floatEff(float noundef %35, float noundef 0.000000e+00)
  br i1 %36, label %75, label %37

37:                                               ; preds = %7
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %38 = getelementptr inbounds %"struct.bicudo::vec4", ptr %8, i32 0, i32 0
  %39 = getelementptr inbounds %struct.anon.8, ptr %38, i32 0, i32 0
  %40 = load float, ptr %39, align 4, !tbaa !14
  %41 = getelementptr inbounds %"struct.bicudo::vec4", ptr %8, i32 0, i32 0
  %42 = getelementptr inbounds %struct.anon.8, ptr %41, i32 0, i32 2
  %43 = load float, ptr %42, align 4, !tbaa !14
  %44 = fdiv float %43, 2.000000e+00
  %45 = fadd float %40, %44
  %46 = getelementptr inbounds %"struct.bicudo::vec4", ptr %8, i32 0, i32 0
  %47 = getelementptr inbounds %struct.anon.8, ptr %46, i32 0, i32 1
  %48 = load float, ptr %47, align 4, !tbaa !14
  %49 = getelementptr inbounds %"struct.bicudo::vec4", ptr %8, i32 0, i32 0
  %50 = getelementptr inbounds %struct.anon.8, ptr %49, i32 0, i32 3
  %51 = load float, ptr %50, align 4, !tbaa !14
  %52 = fdiv float %51, 2.000000e+00
  %53 = fadd float %48, %52
  call void @_ZN6bicudo4vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %14, float noundef %45, float noundef %53)
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #7
  %54 = getelementptr inbounds %"class.meow::immediate_graphics", ptr %33, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 8 %54, i64 64, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 %14, i64 8, i1 false), !tbaa.struct !15
  %55 = getelementptr inbounds %"struct.bicudo::vec2", ptr %17, i32 0, i32 0
  %56 = getelementptr inbounds %union.anon.5, ptr %55, i32 0, i32 0
  %57 = load <2 x float>, ptr %56, align 4
  call void @_ZN6bicudo9translateENS_4mat4ENS_4vec2E(ptr dead_on_unwind writable sret(%"struct.bicudo::mat4") align 4 %15, ptr noundef byval(%"struct.bicudo::mat4") align 8 %16, <2 x float> %57)
  %58 = getelementptr inbounds %"class.meow::immediate_graphics", ptr %33, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %58, ptr align 4 %15, i64 64, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr %18) #7
  %59 = getelementptr inbounds %"class.meow::immediate_graphics", ptr %33, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 8 %59, i64 64, i1 false), !tbaa.struct !13
  call void @_ZN6bicudo4vec3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %20, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  %60 = load float, ptr %11, align 4, !tbaa !9
  %61 = fneg float %60
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %20, i64 12, i1 false)
  %62 = getelementptr inbounds { <2 x float>, float }, ptr %21, i32 0, i32 0
  %63 = load <2 x float>, ptr %62, align 4
  %64 = getelementptr inbounds { <2 x float>, float }, ptr %21, i32 0, i32 1
  %65 = load float, ptr %64, align 4
  call void @_ZN6bicudo6rotateENS_4mat4ENS_4vec3Ef(ptr dead_on_unwind writable sret(%"struct.bicudo::mat4") align 4 %18, ptr noundef byval(%"struct.bicudo::mat4") align 8 %19, <2 x float> %63, float %65, float noundef %61)
  %66 = getelementptr inbounds %"class.meow::immediate_graphics", ptr %33, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %66, ptr align 4 %18, i64 64, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 64, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr %22) #7
  %67 = getelementptr inbounds %"class.meow::immediate_graphics", ptr %33, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 8 %67, i64 64, i1 false), !tbaa.struct !13
  %68 = call <2 x float> @_ZN6bicudo4vec2ngEv(ptr noundef nonnull align 4 dereferenceable(8) %14)
  %69 = getelementptr inbounds %"struct.bicudo::vec2", ptr %24, i32 0, i32 0
  %70 = getelementptr inbounds %union.anon.5, ptr %69, i32 0, i32 0
  store <2 x float> %68, ptr %70, align 4
  %71 = getelementptr inbounds %"struct.bicudo::vec2", ptr %24, i32 0, i32 0
  %72 = getelementptr inbounds %union.anon.5, ptr %71, i32 0, i32 0
  %73 = load <2 x float>, ptr %72, align 4
  call void @_ZN6bicudo9translateENS_4mat4ENS_4vec2E(ptr dead_on_unwind writable sret(%"struct.bicudo::mat4") align 4 %22, ptr noundef byval(%"struct.bicudo::mat4") align 8 %23, <2 x float> %73)
  %74 = getelementptr inbounds %"class.meow::immediate_graphics", ptr %33, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %74, ptr align 4 %22, i64 64, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 64, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %75

75:                                               ; preds = %37, %7
  %76 = load ptr, ptr @__glewUniformMatrix4fv, align 8, !tbaa !5
  %77 = getelementptr inbounds %"class.meow::immediate_graphics", ptr %33, i32 0, i32 2
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef @.str.5) #7
  %78 = getelementptr inbounds { i64, ptr }, ptr %25, i32 0, i32 0
  %79 = load i64, ptr %78, align 8
  %80 = getelementptr inbounds { i64, ptr }, ptr %25, i32 0, i32 1
  %81 = load ptr, ptr %80, align 8
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4meow3gpu7uniformixESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(64) %77, i64 %79, ptr %81)
  %83 = load i32, ptr %82, align 4, !tbaa !11
  %84 = getelementptr inbounds %"class.meow::immediate_graphics", ptr %33, i32 0, i32 4
  %85 = call noundef ptr @_ZN6bicudo4mat44dataEv(ptr noundef nonnull align 4 dereferenceable(64) %84)
  call void %76(i32 noundef %83, i32 noundef 1, i8 noundef zeroext 0, ptr noundef %85)
  %86 = load ptr, ptr @__glewUniform4fv, align 8, !tbaa !5
  %87 = getelementptr inbounds %"class.meow::immediate_graphics", ptr %33, i32 0, i32 2
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef @.str.4) #7
  %88 = getelementptr inbounds { i64, ptr }, ptr %26, i32 0, i32 0
  %89 = load i64, ptr %88, align 8
  %90 = getelementptr inbounds { i64, ptr }, ptr %26, i32 0, i32 1
  %91 = load ptr, ptr %90, align 8
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4meow3gpu7uniformixESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(64) %87, i64 %89, ptr %91)
  %93 = load i32, ptr %92, align 4, !tbaa !11
  %94 = call noundef ptr @_ZN6bicudo4vec44dataEv(ptr noundef nonnull align 4 dereferenceable(16) %8)
  call void %86(i32 noundef %93, i32 noundef 1, ptr noundef %94)
  %95 = load ptr, ptr @__glewUniform4fv, align 8, !tbaa !5
  %96 = getelementptr inbounds %"class.meow::immediate_graphics", ptr %33, i32 0, i32 2
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef @.str.3) #7
  %97 = getelementptr inbounds { i64, ptr }, ptr %27, i32 0, i32 0
  %98 = load i64, ptr %97, align 8
  %99 = getelementptr inbounds { i64, ptr }, ptr %27, i32 0, i32 1
  %100 = load ptr, ptr %99, align 8
  %101 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4meow3gpu7uniformixESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(64) %96, i64 %98, ptr %100)
  %102 = load i32, ptr %101, align 4, !tbaa !11
  %103 = call noundef ptr @_ZN6bicudo4vec44dataEv(ptr noundef nonnull align 4 dereferenceable(16) %9)
  call void %95(i32 noundef %102, i32 noundef 1, ptr noundef %103)
  %104 = load i32, ptr %12, align 4, !tbaa !11
  %105 = icmp ugt i32 %104, 0
  br i1 %105, label %106, label %117

106:                                              ; preds = %75
  %107 = load ptr, ptr @__glewUniform1i, align 8, !tbaa !5
  %108 = getelementptr inbounds %"class.meow::immediate_graphics", ptr %33, i32 0, i32 2
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef @.str.2) #7
  %109 = getelementptr inbounds { i64, ptr }, ptr %28, i32 0, i32 0
  %110 = load i64, ptr %109, align 8
  %111 = getelementptr inbounds { i64, ptr }, ptr %28, i32 0, i32 1
  %112 = load ptr, ptr %111, align 8
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4meow3gpu7uniformixESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(64) %108, i64 %110, ptr %112)
  %114 = load i32, ptr %113, align 4, !tbaa !11
  call void %107(i32 noundef %114, i32 noundef 1)
  %115 = load ptr, ptr @__glewActiveTexture, align 8, !tbaa !5
  call void %115(i32 noundef 33984)
  %116 = load i32, ptr %12, align 4, !tbaa !11
  call void @glBindTexture(i32 noundef 3553, i32 noundef %116)
  br label %117

117:                                              ; preds = %106, %75
  %118 = getelementptr inbounds %"class.meow::immediate_graphics", ptr %33, i32 0, i32 3
  %119 = call noundef i64 @_ZN4meow22gpu_dispatch_draw_callEPNS_3gpu11draw_call_tE(ptr noundef %118)
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6bicudo4mat4C2Ef(ptr noundef nonnull align 4 dereferenceable(64), float noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6bicudo12assert_floatEff(float noundef, float noundef) #2

declare void @_ZN6bicudo9translateENS_4mat4ENS_4vec2E(ptr dead_on_unwind writable sret(%"struct.bicudo::mat4") align 4, ptr noundef byval(%"struct.bicudo::mat4") align 8, <2 x float>) #4

declare void @_ZN6bicudo6rotateENS_4mat4ENS_4vec3Ef(ptr dead_on_unwind writable sret(%"struct.bicudo::mat4") align 4, ptr noundef byval(%"struct.bicudo::mat4") align 8, <2 x float>, float, float noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZN6bicudo4vec2ngEv(ptr noundef nonnull align 4 dereferenceable(8)) #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6bicudo4vec44dataEv(ptr noundef nonnull align 4 dereferenceable(16)) #2 align 2

declare void @glBindTexture(i32 noundef, i32 noundef) #4

declare noundef i64 @_ZN4meow22gpu_dispatch_draw_callEPNS_3gpu11draw_call_tE(ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { inlinehint 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 = { "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"="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 = { inlinehint 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 #7 = { 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 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{i64 0, i64 64, !14}
!14 = !{!7, !7, i64 0}
!15 = !{i64 0, i64 8, !14}


; 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.bicudo::vec4" = type { %union.anon.7 }
%union.anon.7 = type { %struct.anon.8 }
%struct.anon.8 = type { float, float, float, float }
%"struct.bicudo::mat4" = type { %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float }
%"struct.bicudo::vec2" = type { %union.anon.5 }
%union.anon.5 = type { %struct.anon.6 }
%struct.anon.6 = type { float, float }
%"struct.bicudo::vec3" = type { %union.anon.24 }
%union.anon.24 = type { %struct.anon.25 }
%struct.anon.25 = type { float, float, float }
%"class.std::basic_string_view" = type { i64, ptr }

@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@__glewUniformMatrix4fv = external local_unnamed_addr global ptr, align 8
@__glewUniform4fv = external local_unnamed_addr global ptr, align 8
@__glewUniform1i = external local_unnamed_addr global ptr, align 8
@__glewActiveTexture = 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 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6bicudo4vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6bicudo4vec3C2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #3 align 2

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZN4meow3gpu7uniformixESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(64), i64, ptr) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6bicudo4mat44dataEv(ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4meow18immediate_graphics4drawEN6bicudo4vec4ES2_fj(ptr noundef nonnull align 8 dereferenceable(284) %0, <2 x float> %1, <2 x float> %2, <2 x float> %3, <2 x float> %4, float noundef %5, i32 noundef %6) local_unnamed_addr #5 align 2 {
  %8 = alloca %"struct.bicudo::vec4", align 8
  %9 = alloca %"struct.bicudo::vec4", align 8
  %10 = alloca %"struct.bicudo::mat4", align 4
  %11 = alloca %"struct.bicudo::vec2", align 8
  %12 = alloca %"struct.bicudo::mat4", align 4
  %13 = alloca %"struct.bicudo::mat4", align 4
  %14 = alloca %"struct.bicudo::mat4", align 8
  %15 = alloca %"struct.bicudo::vec3", align 8
  %16 = alloca %"struct.bicudo::mat4", align 4
  %17 = alloca %"struct.bicudo::mat4", align 8
  %18 = alloca %"class.std::basic_string_view", align 8
  %19 = alloca %"class.std::basic_string_view", align 8
  %20 = alloca %"class.std::basic_string_view", align 8
  %21 = alloca %"class.std::basic_string_view", align 8
  store <2 x float> %1, ptr %8, align 8
  %22 = getelementptr inbounds i8, ptr %8, i64 8
  store <2 x float> %2, ptr %22, align 8
  store <2 x float> %3, ptr %9, align 8
  %23 = getelementptr inbounds i8, ptr %9, i64 8
  store <2 x float> %4, ptr %23, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #7
  call void @_ZN6bicudo4mat4C2Ef(ptr noundef nonnull align 4 dereferenceable(64) %10, float noundef 1.000000e+00)
  %24 = getelementptr inbounds i8, ptr %0, i64 128
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %24, ptr noundef nonnull align 4 dereferenceable(64) %10, i64 64, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #7
  %25 = call noundef zeroext i1 @_ZN6bicudo12assert_floatEff(float noundef %5, float noundef 0.000000e+00)
  br i1 %25, label %37, label %26

26:                                               ; preds = %7
  %27 = extractelement <2 x float> %2, i64 1
  %28 = extractelement <2 x float> %1, i64 1
  %29 = extractelement <2 x float> %2, i64 0
  %30 = extractelement <2 x float> %1, i64 0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %31 = fmul float %29, 5.000000e-01
  %32 = fadd float %30, %31
  %33 = fmul float %27, 5.000000e-01
  %34 = fadd float %28, %33
  call void @_ZN6bicudo4vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %11, float noundef %32, float noundef %34)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #7
  %.sroa.02.0.copyload = load <2 x float>, ptr %11, align 8, !tbaa !6
  call void @_ZN6bicudo9translateENS_4mat4ENS_4vec2E(ptr dead_on_unwind nonnull writable sret(%"struct.bicudo::mat4") align 4 %12, ptr noundef nonnull byval(%"struct.bicudo::mat4") align 8 %24, <2 x float> %.sroa.02.0.copyload)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %24, ptr noundef nonnull align 4 dereferenceable(64) %12, i64 64, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %13) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %14, ptr noundef nonnull align 8 dereferenceable(64) %24, i64 64, i1 false), !tbaa.struct !5
  call void @_ZN6bicudo4vec3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %15, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  %35 = fneg float %5
  %.sroa.01.0.copyload = load <2 x float>, ptr %15, align 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %15, i64 8
  %.sroa.2.0.copyload = load float, ptr %.sroa.2.0..sroa_idx, align 8
  call void @_ZN6bicudo6rotateENS_4mat4ENS_4vec3Ef(ptr dead_on_unwind nonnull writable sret(%"struct.bicudo::mat4") align 4 %13, ptr noundef nonnull byval(%"struct.bicudo::mat4") align 8 %14, <2 x float> %.sroa.01.0.copyload, float %.sroa.2.0.copyload, float noundef %35)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %24, ptr noundef nonnull align 4 dereferenceable(64) %13, i64 64, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %16) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %17, ptr noundef nonnull align 8 dereferenceable(64) %24, i64 64, i1 false), !tbaa.struct !5
  %36 = call <2 x float> @_ZN6bicudo4vec2ngEv(ptr noundef nonnull align 4 dereferenceable(8) %11)
  call void @_ZN6bicudo9translateENS_4mat4ENS_4vec2E(ptr dead_on_unwind nonnull writable sret(%"struct.bicudo::mat4") align 4 %16, ptr noundef nonnull byval(%"struct.bicudo::mat4") align 8 %17, <2 x float> %36)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %24, ptr noundef nonnull align 4 dereferenceable(64) %16, i64 64, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br label %37

37:                                               ; preds = %26, %7
  %38 = load ptr, ptr @__glewUniformMatrix4fv, align 8, !tbaa !9
  %39 = getelementptr inbounds i8, ptr %0, i64 8
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef @.str.5) #7
  %40 = load i64, ptr %18, align 8
  %41 = getelementptr inbounds i8, ptr %18, i64 8
  %42 = load ptr, ptr %41, align 8
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4meow3gpu7uniformixESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(64) %39, i64 %40, ptr %42)
  %44 = load i32, ptr %43, align 4, !tbaa !11
  %45 = call noundef ptr @_ZN6bicudo4mat44dataEv(ptr noundef nonnull align 4 dereferenceable(64) %24)
  call void %38(i32 noundef %44, i32 noundef 1, i8 noundef zeroext 0, ptr noundef %45)
  %46 = load ptr, ptr @__glewUniform4fv, align 8, !tbaa !9
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef @.str.4) #7
  %47 = load i64, ptr %19, align 8
  %48 = getelementptr inbounds i8, ptr %19, i64 8
  %49 = load ptr, ptr %48, align 8
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4meow3gpu7uniformixESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(64) %39, i64 %47, ptr %49)
  %51 = load i32, ptr %50, align 4, !tbaa !11
  %52 = call noundef ptr @_ZN6bicudo4vec44dataEv(ptr noundef nonnull align 4 dereferenceable(16) %8)
  call void %46(i32 noundef %51, i32 noundef 1, ptr noundef %52)
  %53 = load ptr, ptr @__glewUniform4fv, align 8, !tbaa !9
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef @.str.3) #7
  %54 = load i64, ptr %20, align 8
  %55 = getelementptr inbounds i8, ptr %20, i64 8
  %56 = load ptr, ptr %55, align 8
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4meow3gpu7uniformixESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(64) %39, i64 %54, ptr %56)
  %58 = load i32, ptr %57, align 4, !tbaa !11
  %59 = call noundef ptr @_ZN6bicudo4vec44dataEv(ptr noundef nonnull align 4 dereferenceable(16) %9)
  call void %53(i32 noundef %58, i32 noundef 1, ptr noundef %59)
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %68, label %60

60:                                               ; preds = %37
  %61 = load ptr, ptr @__glewUniform1i, align 8, !tbaa !9
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef @.str.2) #7
  %62 = load i64, ptr %21, align 8
  %63 = getelementptr inbounds i8, ptr %21, i64 8
  %64 = load ptr, ptr %63, align 8
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4meow3gpu7uniformixESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(64) %39, i64 %62, ptr %64)
  %66 = load i32, ptr %65, align 4, !tbaa !11
  call void %61(i32 noundef %66, i32 noundef 1)
  %67 = load ptr, ptr @__glewActiveTexture, align 8, !tbaa !9
  call void %67(i32 noundef 33984)
  call void @glBindTexture(i32 noundef 3553, i32 noundef %6)
  br label %68

68:                                               ; preds = %60, %37
  %69 = getelementptr inbounds i8, ptr %0, i64 72
  %70 = call noundef i64 @_ZN4meow22gpu_dispatch_draw_callEPNS_3gpu11draw_call_tE(ptr noundef nonnull %69)
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6bicudo4mat4C2Ef(ptr noundef nonnull align 4 dereferenceable(64), float noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6bicudo12assert_floatEff(float noundef, float noundef) local_unnamed_addr #2

declare void @_ZN6bicudo9translateENS_4mat4ENS_4vec2E(ptr dead_on_unwind writable sret(%"struct.bicudo::mat4") align 4, ptr noundef byval(%"struct.bicudo::mat4") align 8, <2 x float>) local_unnamed_addr #4

declare void @_ZN6bicudo6rotateENS_4mat4ENS_4vec3Ef(ptr dead_on_unwind writable sret(%"struct.bicudo::mat4") align 4, ptr noundef byval(%"struct.bicudo::mat4") align 8, <2 x float>, float, float noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZN6bicudo4vec2ngEv(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6bicudo4vec44dataEv(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #2 align 2

declare void @glBindTexture(i32 noundef, i32 noundef) local_unnamed_addr #4

declare noundef i64 @_ZN4meow22gpu_dispatch_draw_callEPNS_3gpu11draw_call_tE(ptr noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { inlinehint 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 = { "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"="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 = { inlinehint 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 #7 = { 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 = !{i64 0, i64 64, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}


; Effective O3 passes: BDCEPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SCCPPass,SROAPass