; LLVM IR from Try/Tempest :: Engine/thirdparty/spirv_cross (spirv_glsl)

; 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.std::__detail::_Node_iterator.364" = type { %"struct.std::__detail::_Node_iterator_base.365" }
%"struct.std::__detail::_Node_iterator_base.365" = type { ptr }
%"struct.std::pair.362" = type <{ %"struct.std::__detail::_Node_iterator.364", i8, [7 x 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.spirv_cross::Compiler" = type { ptr, %"class.spirv_cross::ParsedIR", %"class.spirv_cross::SmallVector.92", %"class.spirv_cross::SmallVector.92", ptr, ptr, i32, %"class.std::unordered_set.95", i8, %"class.std::unordered_set", i8, i8, %"class.spirv_cross::SmallVector.114", %"class.spirv_cross::SmallVector.92", %"class.std::function", %"class.std::unordered_set", %"class.std::unordered_set", %"class.std::unordered_set", %"class.std::unordered_set", %"class.std::unordered_set", %"class.spirv_cross::Bitset", %"class.spirv_cross::Bitset", i32, i32, i8, %"class.std::unordered_set", i8, i8, i32, %"class.std::unordered_map.117", %"class.spirv_cross::SmallVector.92", %"class.std::unordered_map.131", %"class.std::unordered_set", i8, %"class.std::unordered_map.145" }
%"class.spirv_cross::ParsedIR" = type { %"class.std::unique_ptr", %"class.std::vector", %"class.spirv_cross::SmallVector", %"class.std::unordered_map", [14 x %"class.spirv_cross::SmallVector.7"], %"class.spirv_cross::SmallVector.7", %"class.spirv_cross::SmallVector.7", %"class.std::unordered_map.10", %"class.spirv_cross::SmallVector.24", %"class.spirv_cross::SmallVector.27", %"class.spirv_cross::SmallVector.30", %"class.std::unordered_map.33", %"class.std::unordered_map.52", %"class.spirv_cross::TypedID", %"struct.spirv_cross::ParsedIR::Source", i32, i32, i32, i32, %"class.std::__cxx11::basic_string", %"class.spirv_cross::Bitset", %"class.std::unordered_set" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.1" }
%"struct.std::_Head_base.1" = type { ptr }
%"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 }
%"class.spirv_cross::SmallVector" = type { %"class.spirv_cross::VectorView", i64, %"class.spirv_cross::AlignedBuffer" }
%"class.spirv_cross::VectorView" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer" = type { [192 x i8] }
%"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 }
%"class.spirv_cross::SmallVector.7" = type { %"class.spirv_cross::VectorView.8", i64, %"class.spirv_cross::AlignedBuffer.9" }
%"class.spirv_cross::VectorView.8" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.9" = type { [32 x i8] }
%"class.std::unordered_map.10" = type { %"class.std::_Hashtable.11" }
%"class.std::_Hashtable.11" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.spirv_cross::SmallVector.24" = type { %"class.spirv_cross::VectorView.25", i64, %"class.spirv_cross::AlignedBuffer.26" }
%"class.spirv_cross::VectorView.25" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.26" = type { [32 x i8] }
%"class.spirv_cross::SmallVector.27" = type { %"class.spirv_cross::VectorView.28", i64, %"class.spirv_cross::AlignedBuffer.29" }
%"class.spirv_cross::VectorView.28" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.29" = type { [256 x i8] }
%"class.spirv_cross::SmallVector.30" = type { %"class.spirv_cross::VectorView.31", i64, %"class.spirv_cross::AlignedBuffer.32" }
%"class.spirv_cross::VectorView.31" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.32" = type { [8 x i8] }
%"class.std::unordered_map.33" = type { %"class.std::_Hashtable.34" }
%"class.std::_Hashtable.34" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_map.52" = type { %"class.std::_Hashtable.53" }
%"class.std::_Hashtable.53" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.spirv_cross::TypedID" = type { i32 }
%"struct.spirv_cross::ParsedIR::Source" = type <{ i32, i8, i8, i8, i8 }>
%"class.std::unordered_set.95" = type { %"class.std::_Hashtable.96" }
%"class.std::_Hashtable.96" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.spirv_cross::SmallVector.114" = type { %"class.spirv_cross::VectorView.115", i64, %"class.spirv_cross::AlignedBuffer.116" }
%"class.spirv_cross::VectorView.115" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.116" = type { [96 x i8] }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.spirv_cross::Bitset" = type { i64, %"class.std::unordered_set" }
%"class.std::unordered_map.117" = type { %"class.std::_Hashtable.118" }
%"class.std::_Hashtable.118" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.spirv_cross::SmallVector.92" = type { %"class.spirv_cross::VectorView.93", i64, %"class.spirv_cross::AlignedBuffer.94" }
%"class.spirv_cross::VectorView.93" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.94" = type { [32 x i8] }
%"class.std::unordered_map.131" = type { %"class.std::_Hashtable.132" }
%"class.std::_Hashtable.132" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.74" }
%"class.std::_Hashtable.74" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_map.145" = type { %"class.std::_Hashtable.146" }
%"class.std::_Hashtable.146" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }

@.str.298 = external hidden unnamed_addr constant [2 x i8], align 1

; 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

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 uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertERKj(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(236) ptr @_ZN11spirv_cross12CompilerGLSL7emit_opEjjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb(ptr noundef nonnull align 8 dereferenceable(9848) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %3, i1 noundef zeroext %4, i1 noundef zeroext %5) #2 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i8, align 1
  %13 = alloca i8, align 1
  %14 = alloca %"struct.std::__detail::_Node_iterator.364", align 8
  %15 = alloca %"struct.std::__detail::_Node_iterator.364", align 8
  %16 = alloca %"struct.std::pair.362", align 8
  %17 = alloca %"struct.std::pair.362", align 8
  %18 = alloca i8, align 1
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca i8, align 1
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !9
  store i32 %2, ptr %10, align 4, !tbaa !9
  store ptr %3, ptr %11, align 8, !tbaa !5
  %24 = zext i1 %4 to i8
  store i8 %24, ptr %12, align 1, !tbaa !11
  %25 = zext i1 %5 to i8
  store i8 %25, ptr %13, align 1, !tbaa !11
  %26 = load ptr, ptr %8, align 8
  %27 = load i8, ptr %12, align 1, !tbaa !11, !range !13, !noundef !14
  %28 = trunc i8 %27 to i1
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  br i1 %28, label %29, label %39

29:                                               ; preds = %6
  %30 = getelementptr inbounds %"class.spirv_cross::Compiler", ptr %26, i32 0, i32 15
  %31 = call ptr @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE4findERKj(ptr noundef nonnull align 8 dereferenceable(56) %30, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %32 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.364", ptr %14, i32 0, i32 0
  %33 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.365", ptr %32, i32 0, i32 0
  store ptr %31, ptr %33, align 8
  %34 = getelementptr inbounds %"class.spirv_cross::Compiler", ptr %26, i32 0, i32 15
  %35 = call ptr @_ZSt3endISt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(56) %34)
  %36 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.364", ptr %15, i32 0, i32 0
  %37 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.365", ptr %36, i32 0, i32 0
  store ptr %35, ptr %37, align 8
  %38 = call noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseIjLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  br label %39

39:                                               ; preds = %29, %6
  %40 = phi i1 [ false, %6 ], [ %38, %29 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br i1 %40, label %41, label %61

41:                                               ; preds = %39
  %42 = getelementptr inbounds %"class.spirv_cross::Compiler", ptr %26, i32 0, i32 16
  %43 = call { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertERKj(ptr noundef nonnull align 8 dereferenceable(56) %42, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %44 = getelementptr inbounds { ptr, i8 }, ptr %16, i32 0, i32 0
  %45 = extractvalue { ptr, i8 } %43, 0
  store ptr %45, ptr %44, align 8
  %46 = getelementptr inbounds { ptr, i8 }, ptr %16, i32 0, i32 1
  %47 = extractvalue { ptr, i8 } %43, 1
  store i8 %47, ptr %46, align 8
  %48 = load i8, ptr %13, align 1, !tbaa !11, !range !13, !noundef !14
  %49 = trunc i8 %48 to i1
  br i1 %49, label %50, label %57

50:                                               ; preds = %41
  %51 = getelementptr inbounds %"class.spirv_cross::Compiler", ptr %26, i32 0, i32 17
  %52 = call { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertERKj(ptr noundef nonnull align 8 dereferenceable(56) %51, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %53 = getelementptr inbounds { ptr, i8 }, ptr %17, i32 0, i32 0
  %54 = extractvalue { ptr, i8 } %52, 0
  store ptr %54, ptr %53, align 8
  %55 = getelementptr inbounds { ptr, i8 }, ptr %17, i32 0, i32 1
  %56 = extractvalue { ptr, i8 } %52, 1
  store i8 %56, ptr %55, align 8
  br label %57

57:                                               ; preds = %50, %41
  %58 = load i32, ptr %10, align 4, !tbaa !9
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  store i8 1, ptr %18, align 1, !tbaa !11
  %60 = call noundef nonnull align 8 dereferenceable(236) ptr @_ZN11spirv_cross8Compiler3setINS_14SPIRExpressionEJRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERjbEEERT_jDpOT0_(ptr noundef nonnull align 8 dereferenceable(3176) %26, i32 noundef %58, ptr noundef nonnull align 8 dereferenceable(32) %59, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 1 dereferenceable(1) %18)
  store ptr %60, ptr %7, align 8
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  br label %81

61:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #5
  %62 = load i32, ptr %9, align 4, !tbaa !9
  %63 = load i32, ptr %10, align 4, !tbaa !9
  call void @_ZN11spirv_cross12CompilerGLSL17declare_temporaryB5cxx11Ejj(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %19, ptr noundef nonnull align 8 dereferenceable(9848) %26, i32 noundef %62, i32 noundef %63)
  %64 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZN11spirv_cross12CompilerGLSL9statementIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS7_RA2_KcEEEvDpOT_(ptr noundef nonnull align 8 dereferenceable(9848) %26, ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %64, ptr noundef nonnull align 1 dereferenceable(2) @.str.298)
          to label %65 unwind label %73

65:                                               ; preds = %61
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  %66 = load i32, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #5
  %67 = load i32, ptr %10, align 4, !tbaa !9
  %68 = load ptr, ptr %26, align 8, !tbaa !15
  %69 = getelementptr inbounds ptr, ptr %68, i64 6
  %70 = load ptr, ptr %69, align 8
  call void %70(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %22, ptr noundef nonnull align 8 dereferenceable(3176) %26, i32 noundef %67, i1 noundef zeroext true)
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #5
  store i8 1, ptr %23, align 1, !tbaa !11
  %71 = invoke noundef nonnull align 8 dereferenceable(236) ptr @_ZN11spirv_cross8Compiler3setINS_14SPIRExpressionEJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERjbEEERT_jDpOT0_(ptr noundef nonnull align 8 dereferenceable(3176) %26, i32 noundef %66, ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %72 unwind label %77

72:                                               ; preds = %65
  store ptr %71, ptr %7, align 8
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #5
  br label %81

73:                                               ; preds = %61
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %20, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %21, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  br label %83

77:                                               ; preds = %65
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %20, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #5
  br label %83

81:                                               ; preds = %72, %57
  %82 = load ptr, ptr %7, align 8
  ret ptr %82

83:                                               ; preds = %77, %73
  %84 = load ptr, ptr %20, align 8
  %85 = load i32, ptr %21, align 4
  %86 = insertvalue { ptr, i32 } poison, ptr %84, 0
  %87 = insertvalue { ptr, i32 } %86, i32 %85, 1
  resume { ptr, i32 } %87
}

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE4findERKj(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @_ZSt3endISt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(56)) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(236) ptr @_ZN11spirv_cross8Compiler3setINS_14SPIRExpressionEJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERjbEEERT_jDpOT0_(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(1)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11spirv_cross12CompilerGLSL17declare_temporaryB5cxx11Ejj(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(9848), i32 noundef, i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseIjLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(236) ptr @_ZN11spirv_cross8Compiler3setINS_14SPIRExpressionEJRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERjbEEERT_jDpOT0_(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(1)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN11spirv_cross12CompilerGLSL9statementIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS7_RA2_KcEEEvDpOT_(ptr noundef nonnull align 8 dereferenceable(9848), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(2)) #4 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 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !8, i64 0}


; 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.std::__detail::_Node_iterator.364" = type { %"struct.std::__detail::_Node_iterator_base.365" }
%"struct.std::__detail::_Node_iterator_base.365" = type { ptr }
%"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] }

@.str.298 = external hidden unnamed_addr constant [2 x i8], align 1

; 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

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 uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertERKj(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(236) ptr @_ZN11spirv_cross12CompilerGLSL7emit_opEjjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb(ptr noundef nonnull align 8 dereferenceable(9848) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %3, i1 noundef zeroext %4, i1 noundef zeroext %5) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::__detail::_Node_iterator.364", align 8
  %10 = alloca %"struct.std::__detail::_Node_iterator.364", align 8
  %11 = alloca i8, align 1
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca i8, align 1
  store i32 %1, ptr %7, align 4, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  br i1 %4, label %15, label %.critedge

15:                                               ; preds = %6
  %16 = getelementptr inbounds i8, ptr %0, i64 2400
  %17 = call ptr @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE4findERKj(ptr noundef nonnull align 8 dereferenceable(56) %16, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store ptr %17, ptr %9, align 8
  %18 = call ptr @_ZSt3endISt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(56) %16)
  store ptr %18, ptr %10, align 8
  %19 = call noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseIjLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br i1 %19, label %20, label %._crit_edge

._crit_edge:                                      ; preds = %15
  %.pre = load i32, ptr %7, align 4, !tbaa !5
  %.pre12 = load i32, ptr %8, align 4, !tbaa !5
  br label %29

20:                                               ; preds = %15
  %21 = getelementptr inbounds i8, ptr %0, i64 2456
  %22 = call { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertERKj(ptr noundef nonnull align 8 dereferenceable(56) %21, ptr noundef nonnull align 4 dereferenceable(4) %8)
  br i1 %5, label %23, label %26

23:                                               ; preds = %20
  %24 = getelementptr inbounds i8, ptr %0, i64 2512
  %25 = call { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertERKj(ptr noundef nonnull align 8 dereferenceable(56) %24, ptr noundef nonnull align 4 dereferenceable(4) %8)
  br label %26

26:                                               ; preds = %23, %20
  %27 = load i32, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #5
  store i8 1, ptr %11, align 1, !tbaa !9
  %28 = call noundef nonnull align 8 dereferenceable(236) ptr @_ZN11spirv_cross8Compiler3setINS_14SPIRExpressionEJRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERjbEEERT_jDpOT0_(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %27, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 1 dereferenceable(1) %11)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  br label %43

.critedge:                                        ; preds = %6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %29

29:                                               ; preds = %._crit_edge, %.critedge
  %30 = phi i32 [ %.pre12, %._crit_edge ], [ %2, %.critedge ]
  %31 = phi i32 [ %.pre, %._crit_edge ], [ %1, %.critedge ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #5
  call void @_ZN11spirv_cross12CompilerGLSL17declare_temporaryB5cxx11Ejj(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 8 dereferenceable(9848) %0, i32 noundef %31, i32 noundef %30)
  invoke void @_ZN11spirv_cross12CompilerGLSL9statementIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS7_RA2_KcEEEvDpOT_(ptr noundef nonnull align 8 dereferenceable(9848) %0, ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 1 dereferenceable(2) @.str.298)
          to label %32 unwind label %39

32:                                               ; preds = %29
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #5
  %33 = load i32, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #5
  %34 = load ptr, ptr %0, align 8, !tbaa !11
  %35 = getelementptr inbounds i8, ptr %34, i64 48
  %36 = load ptr, ptr %35, align 8
  call void %36(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %13, ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %33, i1 noundef zeroext true)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #5
  store i8 1, ptr %14, align 1, !tbaa !9
  %37 = invoke noundef nonnull align 8 dereferenceable(236) ptr @_ZN11spirv_cross8Compiler3setINS_14SPIRExpressionEJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERjbEEERT_jDpOT0_(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %33, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %38 unwind label %41

38:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #5
  br label %43

39:                                               ; preds = %29
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #5
  br label %44

41:                                               ; preds = %32
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #5
  br label %44

43:                                               ; preds = %38, %26
  %.010 = phi ptr [ %28, %26 ], [ %37, %38 ]
  ret ptr %.010

44:                                               ; preds = %41, %39
  %.pn = phi { ptr, i32 } [ %42, %41 ], [ %40, %39 ]
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE4findERKj(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @_ZSt3endISt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(236) ptr @_ZN11spirv_cross8Compiler3setINS_14SPIRExpressionEJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERjbEEERT_jDpOT0_(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11spirv_cross12CompilerGLSL17declare_temporaryB5cxx11Ejj(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(9848), i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseIjLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(236) ptr @_ZN11spirv_cross8Compiler3setINS_14SPIRExpressionEJRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERjbEEERT_jDpOT0_(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN11spirv_cross12CompilerGLSL9statementIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS7_RA2_KcEEEvDpOT_(ptr noundef nonnull align 8 dereferenceable(9848), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(2)) local_unnamed_addr #4 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 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}


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