; LLVM IR from drohmer/cgp :: library/cgp/16_drawable/mesh_drawable (mesh_drawable)

; 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::mesh_drawable" = type <{ %"struct.cgp::opengl_shader_structure", %"struct.cgp::opengl_texture_image_structure", %"class.std::map", %"struct.cgp::opengl_vbo_structure", %"struct.cgp::opengl_vbo_structure", %"struct.cgp::opengl_vbo_structure", %"struct.cgp::opengl_vbo_structure", %"class.std::vector", %"struct.cgp::opengl_ebo_structure", i32, %"struct.cgp::affine", %"struct.cgp::affine_rts", %"struct.cgp::matrix_stack", %"struct.cgp::material_mesh_drawable_phong", [4 x i8] }>
%"struct.cgp::opengl_shader_structure" = type { i32 }
%"struct.cgp::opengl_texture_image_structure" = type { i32, i32, i32, i32, i32 }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, cgp::opengl_texture_image_structure>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, cgp::opengl_texture_image_structure>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, cgp::opengl_texture_image_structure>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, cgp::opengl_texture_image_structure>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.cgp::opengl_vbo_structure" = type { %"struct.cgp::opengl_gpu_buffer", i32 }
%"struct.cgp::opengl_gpu_buffer" = type { i32, i32, i32, %"struct.cgp::opengl_gpu_buffer_details" }
%"struct.cgp::opengl_gpu_buffer_details" = type { i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<cgp::opengl_vbo_structure, std::allocator<cgp::opengl_vbo_structure>>::_Vector_impl" }
%"struct.std::_Vector_base<cgp::opengl_vbo_structure, std::allocator<cgp::opengl_vbo_structure>>::_Vector_impl" = type { %"struct.std::_Vector_base<cgp::opengl_vbo_structure, std::allocator<cgp::opengl_vbo_structure>>::_Vector_impl_data" }
%"struct.std::_Vector_base<cgp::opengl_vbo_structure, std::allocator<cgp::opengl_vbo_structure>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.cgp::opengl_ebo_structure" = type { %"struct.cgp::opengl_gpu_buffer" }
%"struct.cgp::affine" = type { %"struct.cgp::rotation_transform", %"struct.cgp::numarray_stack.6", float, %"struct.cgp::numarray_stack.6" }
%"struct.cgp::rotation_transform" = type { %"struct.cgp::quaternion" }
%"struct.cgp::quaternion" = type { %"struct.cgp::numarray_stack" }
%"struct.cgp::numarray_stack" = type { float, float, float, float }
%"struct.cgp::numarray_stack.6" = type { float, float, float }
%"struct.cgp::affine_rts" = type { %"struct.cgp::rotation_transform", %"struct.cgp::numarray_stack.6", float }
%"struct.cgp::matrix_stack" = type { %"struct.cgp::numarray_stack.7" }
%"struct.cgp::numarray_stack.7" = type { %"struct.cgp::numarray_stack", %"struct.cgp::numarray_stack", %"struct.cgp::numarray_stack", %"struct.cgp::numarray_stack" }
%"struct.cgp::material_mesh_drawable_phong" = type <{ %"struct.cgp::numarray_stack.6", float, %"struct.cgp::phong_parameters", %"struct.cgp::texture_settings_parameters", i8 }>
%"struct.cgp::phong_parameters" = type { float, float, float, float }
%"struct.cgp::texture_settings_parameters" = type { i8, i8, i8 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str.2 = external hidden unnamed_addr constant [101 x i8], align 1
@glad_glPolygonMode = external global ptr, align 8
@glad_glEnable = external global ptr, align 8
@glad_glPolygonOffset = external global ptr, align 8
@__func__._ZN3cgp14draw_wireframeERKNS_13mesh_drawableERKNS_29environment_generic_structureERKNS_14numarray_stackIfLi3EEEibRKNS_25uniform_generic_structureE = external hidden unnamed_addr constant [15 x i8], align 1
@glad_glDisable = 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: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

declare void @_ZN3cgp18check_opengl_errorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_i(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3cgp4drawERKNS_13mesh_drawableERKNS_29environment_generic_structureEibRKNS_25uniform_generic_structureEj(ptr noundef nonnull align 8 dereferenceable(412), ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, i1 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(384), i32 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3cgp14draw_wireframeERKNS_13mesh_drawableERKNS_29environment_generic_structureERKNS_14numarray_stackIfLi3EEEibRKNS_25uniform_generic_structureE(ptr noundef nonnull align 8 dereferenceable(412) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, i32 noundef %3, i1 noundef zeroext %4, ptr noundef nonnull align 8 dereferenceable(384) %5) #2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i8, align 1
  %12 = alloca ptr, align 8
  %13 = alloca %"struct.cgp::mesh_drawable", align 8
  %14 = alloca %"struct.cgp::phong_parameters", align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator", align 1
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator", align 1
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::allocator", align 1
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store i32 %3, ptr %10, align 4, !tbaa !9
  %25 = zext i1 %4 to i8
  store i8 %25, ptr %11, align 1, !tbaa !11
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 416, ptr %13) #7
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN3cgp13mesh_drawableC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(412) %13, ptr noundef nonnull align 8 dereferenceable(412) %26)
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #7
  %27 = getelementptr inbounds %"struct.cgp::phong_parameters", ptr %14, i32 0, i32 0
  store float 1.000000e+00, ptr %27, align 4, !tbaa !13
  %28 = getelementptr inbounds %"struct.cgp::phong_parameters", ptr %14, i32 0, i32 1
  store float 0.000000e+00, ptr %28, align 4, !tbaa !16
  %29 = getelementptr inbounds %"struct.cgp::phong_parameters", ptr %14, i32 0, i32 2
  store float 0.000000e+00, ptr %29, align 4, !tbaa !17
  %30 = getelementptr inbounds %"struct.cgp::phong_parameters", ptr %14, i32 0, i32 3
  store float 6.400000e+01, ptr %30, align 4, !tbaa !18
  %31 = getelementptr inbounds %"struct.cgp::mesh_drawable", ptr %13, i32 0, i32 13
  %32 = getelementptr inbounds %"struct.cgp::material_mesh_drawable_phong", ptr %31, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %32, ptr align 4 %14, i64 16, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.cgp::mesh_drawable", ptr %13, i32 0, i32 13
  %35 = getelementptr inbounds %"struct.cgp::material_mesh_drawable_phong", ptr %34, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %35, ptr align 4 %33, i64 12, i1 false), !tbaa.struct !21
  %36 = getelementptr inbounds %"struct.cgp::mesh_drawable", ptr %13, i32 0, i32 13
  %37 = getelementptr inbounds %"struct.cgp::material_mesh_drawable_phong", ptr %36, i32 0, i32 3
  %38 = getelementptr inbounds %"struct.cgp::texture_settings_parameters", ptr %37, i32 0, i32 0
  store i8 0, ptr %38, align 8, !tbaa !22
  %39 = load ptr, ptr @glad_glPolygonMode, align 8, !tbaa !5
  invoke void %39(i32 noundef 1032, i32 noundef 6913)
          to label %40 unwind label %61

40:                                               ; preds = %6
  %41 = load ptr, ptr @glad_glEnable, align 8, !tbaa !5
  invoke void %41(i32 noundef 10754)
          to label %42 unwind label %61

42:                                               ; preds = %40
  %43 = load ptr, ptr @glad_glPolygonOffset, align 8, !tbaa !5
  invoke void %43(float noundef -1.000000e+00, float noundef 1.000000e+00)
          to label %44 unwind label %61

44:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %45 unwind label %65

45:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef @__func__._ZN3cgp14draw_wireframeERKNS_13mesh_drawableERKNS_29environment_generic_structureERKNS_14numarray_stackIfLi3EEEibRKNS_25uniform_generic_structureE, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %46 unwind label %69

46:                                               ; preds = %45
  invoke void @_ZN3cgp18check_opengl_errorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_i(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %19, i32 noundef 236)
          to label %47 unwind label %73

47:                                               ; preds = %46
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = load i32, ptr %10, align 4, !tbaa !9
  %50 = load i8, ptr %11, align 1, !tbaa !11, !range !53, !noundef !54
  %51 = trunc i8 %50 to i1
  %52 = load ptr, ptr %12, align 8, !tbaa !5
  invoke void @_ZN3cgp4drawERKNS_13mesh_drawableERKNS_29environment_generic_structureEibRKNS_25uniform_generic_structureEj(ptr noundef nonnull align 8 dereferenceable(412) %13, ptr noundef nonnull align 8 dereferenceable(8) %48, i32 noundef %49, i1 noundef zeroext %51, ptr noundef nonnull align 8 dereferenceable(384) %52, i32 noundef 4)
          to label %53 unwind label %61

53:                                               ; preds = %47
  %54 = load ptr, ptr @glad_glDisable, align 8, !tbaa !5
  invoke void %54(i32 noundef 10754)
          to label %55 unwind label %61

55:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %56 unwind label %79

56:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef @__func__._ZN3cgp14draw_wireframeERKNS_13mesh_drawableERKNS_29environment_generic_structureERKNS_14numarray_stackIfLi3EEEibRKNS_25uniform_generic_structureE, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %57 unwind label %83

57:                                               ; preds = %56
  invoke void @_ZN3cgp18check_opengl_errorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_i(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(32) %23, i32 noundef 238)
          to label %58 unwind label %87

58:                                               ; preds = %57
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #7
  %59 = load ptr, ptr @glad_glPolygonMode, align 8, !tbaa !5
  invoke void %59(i32 noundef 1032, i32 noundef 6914)
          to label %60 unwind label %61

60:                                               ; preds = %58
  call void @_ZN3cgp13mesh_drawableD2Ev(ptr noundef nonnull align 8 dereferenceable(412) %13) #7
  call void @llvm.lifetime.end.p0(i64 416, ptr %13) #7
  ret void

61:                                               ; preds = %58, %53, %47, %42, %40, %6
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %15, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %16, align 4
  br label %93

65:                                               ; preds = %44
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %15, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %16, align 4
  br label %78

69:                                               ; preds = %45
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %15, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %16, align 4
  br label %77

73:                                               ; preds = %46
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %15, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  br label %77

77:                                               ; preds = %73, %69
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %78

78:                                               ; preds = %77, %65
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  br label %93

79:                                               ; preds = %55
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %15, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %16, align 4
  br label %92

83:                                               ; preds = %56
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %15, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %16, align 4
  br label %91

87:                                               ; preds = %57
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %15, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  br label %91

91:                                               ; preds = %87, %83
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  br label %92

92:                                               ; preds = %91, %79
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #7
  br label %93

93:                                               ; preds = %92, %78, %61
  call void @_ZN3cgp13mesh_drawableD2Ev(ptr noundef nonnull align 8 dereferenceable(412) %13) #7
  call void @llvm.lifetime.end.p0(i64 416, ptr %13) #7
  br label %94

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3cgp13mesh_drawableC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(412), ptr noundef nonnull align 8 dereferenceable(412)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3cgp13mesh_drawableD2Ev(ptr noundef nonnull align 8 dereferenceable(412)) unnamed_addr #6 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTSN3cgp16phong_parametersE", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12}
!15 = !{!"float", !7, i64 0}
!16 = !{!14, !15, i64 4}
!17 = !{!14, !15, i64 8}
!18 = !{!14, !15, i64 12}
!19 = !{i64 0, i64 4, !20, i64 4, i64 4, !20, i64 8, i64 4, !20, i64 12, i64 4, !20}
!20 = !{!15, !15, i64 0}
!21 = !{i64 0, i64 4, !20, i64 4, i64 4, !20, i64 8, i64 4, !20}
!22 = !{!23, !12, i64 408}
!23 = !{!"_ZTSN3cgp13mesh_drawableE", !24, i64 0, !25, i64 4, !26, i64 24, !35, i64 72, !35, i64 100, !35, i64 128, !35, i64 156, !38, i64 184, !42, i64 208, !10, i64 232, !43, i64 236, !48, i64 280, !49, i64 312, !51, i64 376}
!24 = !{!"_ZTSN3cgp23opengl_shader_structureE", !10, i64 0}
!25 = !{!"_ZTSN3cgp30opengl_texture_image_structureE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}
!26 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3cgp30opengl_texture_image_structureESt4lessIS5_ESaISt4pairIKS5_S7_EEE", !27, i64 0}
!27 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N3cgp30opengl_texture_image_structureEESt10_Select1stISA_ESt4lessIS5_ESaISA_EE", !28, i64 0}
!28 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N3cgp30opengl_texture_image_structureEESt10_Select1stISA_ESt4lessIS5_ESaISA_EE13_Rb_tree_implISE_Lb1EEE", !29, i64 0, !31, i64 8}
!29 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !30, i64 0}
!30 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!31 = !{!"_ZTSSt15_Rb_tree_header", !32, i64 0, !34, i64 32}
!32 = !{!"_ZTSSt18_Rb_tree_node_base", !33, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!33 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!34 = !{!"long", !7, i64 0}
!35 = !{!"_ZTSN3cgp20opengl_vbo_structureE", !36, i64 0, !10, i64 24}
!36 = !{!"_ZTSN3cgp17opengl_gpu_bufferE", !10, i64 0, !10, i64 4, !10, i64 8, !37, i64 12}
!37 = !{!"_ZTSN3cgp25opengl_gpu_buffer_detailsE", !10, i64 0, !10, i64 4, !10, i64 8}
!38 = !{!"_ZTSSt6vectorIN3cgp20opengl_vbo_structureESaIS1_EE", !39, i64 0}
!39 = !{!"_ZTSSt12_Vector_baseIN3cgp20opengl_vbo_structureESaIS1_EE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIN3cgp20opengl_vbo_structureESaIS1_EE12_Vector_implE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseIN3cgp20opengl_vbo_structureESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!42 = !{!"_ZTSN3cgp20opengl_ebo_structureE", !36, i64 0}
!43 = !{!"_ZTSN3cgp6affineE", !44, i64 0, !47, i64 16, !15, i64 28, !47, i64 32}
!44 = !{!"_ZTSN3cgp18rotation_transformE", !45, i64 0}
!45 = !{!"_ZTSN3cgp10quaternionE", !46, i64 0}
!46 = !{!"_ZTSN3cgp14numarray_stackIfLi4EEE", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12}
!47 = !{!"_ZTSN3cgp14numarray_stackIfLi3EEE", !15, i64 0, !15, i64 4, !15, i64 8}
!48 = !{!"_ZTSN3cgp10affine_rtsE", !44, i64 0, !47, i64 16, !15, i64 28}
!49 = !{!"_ZTSN3cgp12matrix_stackIfLi4ELi4EEE", !50, i64 0}
!50 = !{!"_ZTSN3cgp14numarray_stackINS0_IfLi4EEELi4EEE", !46, i64 0, !46, i64 16, !46, i64 32, !46, i64 48}
!51 = !{!"_ZTSN3cgp28material_mesh_drawable_phongE", !47, i64 0, !15, i64 12, !14, i64 16, !52, i64 32}
!52 = !{!"_ZTSN3cgp27texture_settings_parametersE", !12, i64 0, !12, i64 1, !12, i64 2}
!53 = !{i8 0, i8 2}
!54 = !{}


; 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::mesh_drawable" = type <{ %"struct.cgp::opengl_shader_structure", %"struct.cgp::opengl_texture_image_structure", %"class.std::map", %"struct.cgp::opengl_vbo_structure", %"struct.cgp::opengl_vbo_structure", %"struct.cgp::opengl_vbo_structure", %"struct.cgp::opengl_vbo_structure", %"class.std::vector", %"struct.cgp::opengl_ebo_structure", i32, %"struct.cgp::affine", %"struct.cgp::affine_rts", %"struct.cgp::matrix_stack", %"struct.cgp::material_mesh_drawable_phong", [4 x i8] }>
%"struct.cgp::opengl_shader_structure" = type { i32 }
%"struct.cgp::opengl_texture_image_structure" = type { i32, i32, i32, i32, i32 }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, cgp::opengl_texture_image_structure>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, cgp::opengl_texture_image_structure>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, cgp::opengl_texture_image_structure>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, cgp::opengl_texture_image_structure>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.cgp::opengl_vbo_structure" = type { %"struct.cgp::opengl_gpu_buffer", i32 }
%"struct.cgp::opengl_gpu_buffer" = type { i32, i32, i32, %"struct.cgp::opengl_gpu_buffer_details" }
%"struct.cgp::opengl_gpu_buffer_details" = type { i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<cgp::opengl_vbo_structure, std::allocator<cgp::opengl_vbo_structure>>::_Vector_impl" }
%"struct.std::_Vector_base<cgp::opengl_vbo_structure, std::allocator<cgp::opengl_vbo_structure>>::_Vector_impl" = type { %"struct.std::_Vector_base<cgp::opengl_vbo_structure, std::allocator<cgp::opengl_vbo_structure>>::_Vector_impl_data" }
%"struct.std::_Vector_base<cgp::opengl_vbo_structure, std::allocator<cgp::opengl_vbo_structure>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.cgp::opengl_ebo_structure" = type { %"struct.cgp::opengl_gpu_buffer" }
%"struct.cgp::affine" = type { %"struct.cgp::rotation_transform", %"struct.cgp::numarray_stack.6", float, %"struct.cgp::numarray_stack.6" }
%"struct.cgp::rotation_transform" = type { %"struct.cgp::quaternion" }
%"struct.cgp::quaternion" = type { %"struct.cgp::numarray_stack" }
%"struct.cgp::numarray_stack" = type { float, float, float, float }
%"struct.cgp::numarray_stack.6" = type { float, float, float }
%"struct.cgp::affine_rts" = type { %"struct.cgp::rotation_transform", %"struct.cgp::numarray_stack.6", float }
%"struct.cgp::matrix_stack" = type { %"struct.cgp::numarray_stack.7" }
%"struct.cgp::numarray_stack.7" = type { %"struct.cgp::numarray_stack", %"struct.cgp::numarray_stack", %"struct.cgp::numarray_stack", %"struct.cgp::numarray_stack" }
%"struct.cgp::material_mesh_drawable_phong" = type <{ %"struct.cgp::numarray_stack.6", float, %"struct.cgp::phong_parameters", %"struct.cgp::texture_settings_parameters", i8 }>
%"struct.cgp::phong_parameters" = type { float, float, float, float }
%"struct.cgp::texture_settings_parameters" = type { i8, i8, i8 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str.2 = external hidden unnamed_addr constant [101 x i8], align 1
@glad_glPolygonMode = external local_unnamed_addr global ptr, align 8
@glad_glEnable = external local_unnamed_addr global ptr, align 8
@glad_glPolygonOffset = external local_unnamed_addr global ptr, align 8
@__func__._ZN3cgp14draw_wireframeERKNS_13mesh_drawableERKNS_29environment_generic_structureERKNS_14numarray_stackIfLi3EEEibRKNS_25uniform_generic_structureE = external hidden unnamed_addr constant [15 x i8], align 1
@glad_glDisable = 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 nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

declare void @_ZN3cgp18check_opengl_errorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_i(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3cgp4drawERKNS_13mesh_drawableERKNS_29environment_generic_structureEibRKNS_25uniform_generic_structureEj(ptr noundef nonnull align 8 dereferenceable(412), ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, i1 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(384), i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3cgp14draw_wireframeERKNS_13mesh_drawableERKNS_29environment_generic_structureERKNS_14numarray_stackIfLi3EEEibRKNS_25uniform_generic_structureE(ptr noundef nonnull align 8 dereferenceable(412) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr nocapture noundef nonnull readonly align 4 dereferenceable(12) %2, i32 noundef %3, i1 noundef zeroext %4, ptr noundef nonnull align 8 dereferenceable(384) %5) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %7 = alloca %"struct.cgp::mesh_drawable", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator", align 1
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 416, ptr nonnull %7) #7
  call void @_ZN3cgp13mesh_drawableC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(412) %7, ptr noundef nonnull align 8 dereferenceable(412) %0)
  %16 = getelementptr inbounds i8, ptr %7, i64 376
  %17 = getelementptr inbounds i8, ptr %7, i64 392
  store <4 x float> <float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 6.400000e+01>, ptr %17, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %16, ptr noundef nonnull align 4 dereferenceable(12) %2, i64 12, i1 false), !tbaa.struct !9
  %18 = getelementptr inbounds i8, ptr %7, i64 408
  store i8 0, ptr %18, align 8, !tbaa !10
  %19 = load ptr, ptr @glad_glPolygonMode, align 8, !tbaa !45
  invoke void %19(i32 noundef 1032, i32 noundef 6913)
          to label %20 unwind label %36

20:                                               ; preds = %6
  %21 = load ptr, ptr @glad_glEnable, align 8, !tbaa !45
  invoke void %21(i32 noundef 10754)
          to label %22 unwind label %36

22:                                               ; preds = %20
  %23 = load ptr, ptr @glad_glPolygonOffset, align 8, !tbaa !45
  invoke void %23(float noundef -1.000000e+00, float noundef 1.000000e+00)
          to label %24 unwind label %36

24:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %25 unwind label %38

25:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @__func__._ZN3cgp14draw_wireframeERKNS_13mesh_drawableERKNS_29environment_generic_structureERKNS_14numarray_stackIfLi3EEEibRKNS_25uniform_generic_structureE, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %26 unwind label %40

26:                                               ; preds = %25
  invoke void @_ZN3cgp18check_opengl_errorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_i(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef 236)
          to label %27 unwind label %42

27:                                               ; preds = %26
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  invoke void @_ZN3cgp4drawERKNS_13mesh_drawableERKNS_29environment_generic_structureEibRKNS_25uniform_generic_structureEj(ptr noundef nonnull align 8 dereferenceable(412) %7, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %3, i1 noundef zeroext %4, ptr noundef nonnull align 8 dereferenceable(384) %5, i32 noundef 4)
          to label %28 unwind label %36

28:                                               ; preds = %27
  %29 = load ptr, ptr @glad_glDisable, align 8, !tbaa !45
  invoke void %29(i32 noundef 10754)
          to label %30 unwind label %36

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %31 unwind label %46

31:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull @__func__._ZN3cgp14draw_wireframeERKNS_13mesh_drawableERKNS_29environment_generic_structureERKNS_14numarray_stackIfLi3EEEibRKNS_25uniform_generic_structureE, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %32 unwind label %48

32:                                               ; preds = %31
  invoke void @_ZN3cgp18check_opengl_errorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_i(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %14, i32 noundef 238)
          to label %33 unwind label %50

33:                                               ; preds = %32
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  %34 = load ptr, ptr @glad_glPolygonMode, align 8, !tbaa !45
  invoke void %34(i32 noundef 1032, i32 noundef 6914)
          to label %35 unwind label %36

35:                                               ; preds = %33
  call void @_ZN3cgp13mesh_drawableD2Ev(ptr noundef nonnull align 8 dereferenceable(412) %7) #7
  call void @llvm.lifetime.end.p0(i64 416, ptr nonnull %7) #7
  ret void

36:                                               ; preds = %33, %28, %27, %22, %20, %6
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %54

38:                                               ; preds = %24
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %45

40:                                               ; preds = %25
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %44

42:                                               ; preds = %26
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  br label %44

44:                                               ; preds = %42, %40
  %.pn = phi { ptr, i32 } [ %43, %42 ], [ %41, %40 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  br label %45

45:                                               ; preds = %44, %38
  %.pn.pn = phi { ptr, i32 } [ %.pn, %44 ], [ %39, %38 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  br label %54

46:                                               ; preds = %30
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %53

48:                                               ; preds = %31
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %52

50:                                               ; preds = %32
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br label %52

52:                                               ; preds = %50, %48
  %.pn14 = phi { ptr, i32 } [ %51, %50 ], [ %49, %48 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  br label %53

53:                                               ; preds = %52, %46
  %.pn14.pn = phi { ptr, i32 } [ %.pn14, %52 ], [ %47, %46 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  br label %54

54:                                               ; preds = %53, %45, %36
  %.pn17 = phi { ptr, i32 } [ %37, %36 ], [ %.pn14.pn, %53 ], [ %.pn.pn, %45 ]
  call void @_ZN3cgp13mesh_drawableD2Ev(ptr noundef nonnull align 8 dereferenceable(412) %7) #7
  call void @llvm.lifetime.end.p0(i64 416, ptr nonnull %7) #7
  resume { ptr, i32 } %.pn17
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3cgp13mesh_drawableC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(412), ptr noundef nonnull align 8 dereferenceable(412)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3cgp13mesh_drawableD2Ev(ptr noundef nonnull align 8 dereferenceable(412)) unnamed_addr #6 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5}
!10 = !{!11, !44, i64 408}
!11 = !{!"_ZTSN3cgp13mesh_drawableE", !12, i64 0, !14, i64 4, !15, i64 24, !25, i64 72, !25, i64 100, !25, i64 128, !25, i64 156, !28, i64 184, !32, i64 208, !13, i64 232, !33, i64 236, !38, i64 280, !39, i64 312, !41, i64 376}
!12 = !{!"_ZTSN3cgp23opengl_shader_structureE", !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSN3cgp30opengl_texture_image_structureE", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16}
!15 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3cgp30opengl_texture_image_structureESt4lessIS5_ESaISt4pairIKS5_S7_EEE", !16, i64 0}
!16 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N3cgp30opengl_texture_image_structureEESt10_Select1stISA_ESt4lessIS5_ESaISA_EE", !17, i64 0}
!17 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N3cgp30opengl_texture_image_structureEESt10_Select1stISA_ESt4lessIS5_ESaISA_EE13_Rb_tree_implISE_Lb1EEE", !18, i64 0, !20, i64 8}
!18 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !19, i64 0}
!19 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!20 = !{!"_ZTSSt15_Rb_tree_header", !21, i64 0, !24, i64 32}
!21 = !{!"_ZTSSt18_Rb_tree_node_base", !22, i64 0, !23, i64 8, !23, i64 16, !23, i64 24}
!22 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!23 = !{!"any pointer", !7, i64 0}
!24 = !{!"long", !7, i64 0}
!25 = !{!"_ZTSN3cgp20opengl_vbo_structureE", !26, i64 0, !13, i64 24}
!26 = !{!"_ZTSN3cgp17opengl_gpu_bufferE", !13, i64 0, !13, i64 4, !13, i64 8, !27, i64 12}
!27 = !{!"_ZTSN3cgp25opengl_gpu_buffer_detailsE", !13, i64 0, !13, i64 4, !13, i64 8}
!28 = !{!"_ZTSSt6vectorIN3cgp20opengl_vbo_structureESaIS1_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseIN3cgp20opengl_vbo_structureESaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIN3cgp20opengl_vbo_structureESaIS1_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIN3cgp20opengl_vbo_structureESaIS1_EE17_Vector_impl_dataE", !23, i64 0, !23, i64 8, !23, i64 16}
!32 = !{!"_ZTSN3cgp20opengl_ebo_structureE", !26, i64 0}
!33 = !{!"_ZTSN3cgp6affineE", !34, i64 0, !37, i64 16, !6, i64 28, !37, i64 32}
!34 = !{!"_ZTSN3cgp18rotation_transformE", !35, i64 0}
!35 = !{!"_ZTSN3cgp10quaternionE", !36, i64 0}
!36 = !{!"_ZTSN3cgp14numarray_stackIfLi4EEE", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!37 = !{!"_ZTSN3cgp14numarray_stackIfLi3EEE", !6, i64 0, !6, i64 4, !6, i64 8}
!38 = !{!"_ZTSN3cgp10affine_rtsE", !34, i64 0, !37, i64 16, !6, i64 28}
!39 = !{!"_ZTSN3cgp12matrix_stackIfLi4ELi4EEE", !40, i64 0}
!40 = !{!"_ZTSN3cgp14numarray_stackINS0_IfLi4EEELi4EEE", !36, i64 0, !36, i64 16, !36, i64 32, !36, i64 48}
!41 = !{!"_ZTSN3cgp28material_mesh_drawable_phongE", !37, i64 0, !6, i64 12, !42, i64 16, !43, i64 32}
!42 = !{!"_ZTSN3cgp16phong_parametersE", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!43 = !{!"_ZTSN3cgp27texture_settings_parametersE", !44, i64 0, !44, i64 1, !44, i64 2}
!44 = !{!"bool", !7, i64 0}
!45 = !{!23, !23, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass