; LLVM IR from Try/Tempest :: Engine/gapi/spirv/meshconverter.ll (ZN13MeshConverter15analyzeBuiltinsEv)

; 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.libspirv::Bytecode::Iterator" = type <{ ptr, i32, [4 x i8] }>
%class.MeshConverter = type <{ %"struct.MeshConverter::Options", [6 x i8], ptr, %"class.libspirv::MutableBytecode", %"class.libspirv::MutableBytecode", [3 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x i8], %"class.std::unordered_map", %"class.std::unordered_map", %"class.std::unordered_map.5", %"class.std::vector.19", i32, i32, i32, i32, i32, i32, i8, [7 x i8] }>
%"struct.MeshConverter::Options" = type { i8, i8 }
%"class.libspirv::MutableBytecode" = type { %"class.libspirv::Bytecode.base", %"class.std::vector" }
%"class.libspirv::Bytecode.base" = type <{ ptr, i64, i32 }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<libspirv::Bytecode::OpCode, std::allocator<libspirv::Bytecode::OpCode>>::_Vector_impl" }
%"struct.std::_Vector_base<libspirv::Bytecode::OpCode, std::allocator<libspirv::Bytecode::OpCode>>::_Vector_impl" = type { %"struct.std::_Vector_base<libspirv::Bytecode::OpCode, std::allocator<libspirv::Bytecode::OpCode>>::_Vector_impl_data" }
%"struct.std::_Vector_base<libspirv::Bytecode::OpCode, std::allocator<libspirv::Bytecode::OpCode>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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.std::unordered_map.5" = type { %"class.std::_Hashtable.6" }
%"class.std::_Hashtable.6" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::vector.19" = type { %"struct.std::_Vector_base.20" }
%"struct.std::_Vector_base.20" = 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 }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13MeshConverter15analyzeBuiltinsEv(ptr noundef nonnull align 8 dereferenceable(425) %0) #0 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca %"struct.libspirv::Bytecode::Iterator", align 8
  %5 = alloca { ptr, i32 }, align 8
  %6 = alloca %"struct.libspirv::Bytecode::Iterator", align 8
  %7 = alloca { ptr, i32 }, align 8
  %8 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %9 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %10 = getelementptr inbounds %class.MeshConverter, ptr %9, i32 0, i32 2
  %11 = load ptr, ptr %10, align 8, !tbaa !9
  store ptr %11, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #5
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = call { ptr, i32 } @_ZNK8libspirv8Bytecode5beginEv(ptr noundef nonnull align 8 dereferenceable(20) %12)
  store { ptr, i32 } %13, ptr %5, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %4, ptr align 8 %5, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #5
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = call { ptr, i32 } @_ZNK8libspirv8Bytecode3endEv(ptr noundef nonnull align 8 dereferenceable(20) %14)
  store { ptr, i32 } %15, ptr %7, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 8 %7, i64 12, i1 false)
  br label %16

16:                                               ; preds = %102, %1
  %17 = call noundef zeroext i1 @_ZN8libspirvneERKNS_8Bytecode8IteratorES3_(ptr noundef nonnull align 8 dereferenceable(12) %4, ptr noundef nonnull align 8 dereferenceable(12) %6)
  br i1 %17, label %19, label %18

18:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %103

19:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %20 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode8IteratordeEv(ptr noundef nonnull align 8 dereferenceable(12) %4)
  store ptr %20, ptr %8, align 8, !tbaa !5
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = call noundef i32 @_ZNK8libspirv8Bytecode6OpCode2opEv(ptr noundef nonnull align 4 dereferenceable(4) %21)
  %23 = icmp eq i32 %22, 71
  br i1 %23, label %24, label %73

24:                                               ; preds = %19
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %25, i16 noundef zeroext 2)
  %27 = load i32, ptr %26, align 4, !tbaa !32
  %28 = icmp eq i32 %27, 11
  br i1 %28, label %29, label %73

29:                                               ; preds = %24
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %30, i16 noundef zeroext 3)
  %32 = load i32, ptr %31, align 4, !tbaa !32
  switch i32 %32, label %72 [
    i32 24, label %33
    i32 25, label %38
    i32 26, label %43
    i32 27, label %52
    i32 29, label %57
    i32 28, label %62
    i32 5294, label %67
    i32 5295, label %67
    i32 5296, label %67
  ]

33:                                               ; preds = %29
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %34, i16 noundef zeroext 1)
  %36 = load i32, ptr %35, align 4, !tbaa !32
  %37 = getelementptr inbounds %class.MeshConverter, ptr %9, i32 0, i32 6
  store i32 %36, ptr %37, align 4, !tbaa !33
  br label %72

38:                                               ; preds = %29
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %39, i16 noundef zeroext 1)
  %41 = load i32, ptr %40, align 4, !tbaa !32
  %42 = getelementptr inbounds %class.MeshConverter, ptr %9, i32 0, i32 7
  store i32 %41, ptr %42, align 8, !tbaa !34
  br label %72

43:                                               ; preds = %29
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %44, i16 noundef zeroext 1)
  %46 = load i32, ptr %45, align 4, !tbaa !32
  %47 = getelementptr inbounds %class.MeshConverter, ptr %9, i32 0, i32 8
  store i32 %46, ptr %47, align 4, !tbaa !35
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %48, i16 noundef zeroext 1)
  %50 = load i32, ptr %49, align 4, !tbaa !32
  %51 = getelementptr inbounds %class.MeshConverter, ptr %9, i32 0, i32 17
  store i32 %50, ptr %51, align 8, !tbaa !36
  br label %72

52:                                               ; preds = %29
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %53, i16 noundef zeroext 1)
  %55 = load i32, ptr %54, align 4, !tbaa !32
  %56 = getelementptr inbounds %class.MeshConverter, ptr %9, i32 0, i32 9
  store i32 %55, ptr %56, align 8, !tbaa !37
  br label %72

57:                                               ; preds = %29
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %58, i16 noundef zeroext 1)
  %60 = load i32, ptr %59, align 4, !tbaa !32
  %61 = getelementptr inbounds %class.MeshConverter, ptr %9, i32 0, i32 10
  store i32 %60, ptr %61, align 4, !tbaa !38
  br label %72

62:                                               ; preds = %29
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %63, i16 noundef zeroext 1)
  %65 = load i32, ptr %64, align 4, !tbaa !32
  %66 = getelementptr inbounds %class.MeshConverter, ptr %9, i32 0, i32 11
  store i32 %65, ptr %66, align 8, !tbaa !39
  br label %72

67:                                               ; preds = %29, %29, %29
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %68, i16 noundef zeroext 1)
  %70 = load i32, ptr %69, align 4, !tbaa !32
  %71 = getelementptr inbounds %class.MeshConverter, ptr %9, i32 0, i32 13
  store i32 %70, ptr %71, align 8, !tbaa !40
  br label %72

72:                                               ; preds = %67, %62, %57, %52, %43, %38, %33, %29
  br label %73

73:                                               ; preds = %72, %24, %19
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = call noundef i32 @_ZNK8libspirv8Bytecode6OpCode2opEv(ptr noundef nonnull align 4 dereferenceable(4) %74)
  %76 = icmp eq i32 %75, 72
  br i1 %76, label %77, label %92

77:                                               ; preds = %73
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %78, i16 noundef zeroext 3)
  %80 = load i32, ptr %79, align 4, !tbaa !32
  %81 = icmp eq i32 %80, 11
  br i1 %81, label %82, label %92

82:                                               ; preds = %77
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %83, i16 noundef zeroext 4)
  %85 = load i32, ptr %84, align 4, !tbaa !32
  switch i32 %85, label %91 [
    i32 0, label %86
  ]

86:                                               ; preds = %82
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %87, i16 noundef zeroext 1)
  %89 = load i32, ptr %88, align 4, !tbaa !32
  %90 = getelementptr inbounds %class.MeshConverter, ptr %9, i32 0, i32 12
  store i32 %89, ptr %90, align 4, !tbaa !41
  br label %91

91:                                               ; preds = %86, %82
  br label %92

92:                                               ; preds = %91, %77, %73
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  %94 = call noundef i32 @_ZNK8libspirv8Bytecode6OpCode2opEv(ptr noundef nonnull align 4 dereferenceable(4) %93)
  %95 = icmp eq i32 %94, 15
  br i1 %95, label %96, label %101

96:                                               ; preds = %92
  %97 = load ptr, ptr %8, align 8, !tbaa !5
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %97, i16 noundef zeroext 2)
  %99 = load i32, ptr %98, align 4, !tbaa !32
  %100 = getelementptr inbounds %class.MeshConverter, ptr %9, i32 0, i32 14
  store i32 %99, ptr %100, align 4, !tbaa !42
  br label %101

101:                                              ; preds = %96, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %102

102:                                              ; preds = %101
  call void @_ZN8libspirv8Bytecode8IteratorppEv(ptr noundef nonnull align 8 dereferenceable(12) %4)
  br label %16

103:                                              ; preds = %18
  ret void
}

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

declare { ptr, i32 } @_ZNK8libspirv8Bytecode5beginEv(ptr noundef nonnull align 8 dereferenceable(20)) #2

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

declare { ptr, i32 } @_ZNK8libspirv8Bytecode3endEv(ptr noundef nonnull align 8 dereferenceable(20)) #2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4), i16 noundef zeroext) #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8libspirv8Bytecode8IteratorppEv(ptr noundef nonnull align 8 dereferenceable(12)) #4 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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, !6, i64 8}
!10 = !{!"_ZTS13MeshConverter", !11, i64 0, !6, i64 8, !13, i64 16, !13, i64 64, !7, i64 112, !16, i64 124, !16, i64 128, !16, i64 132, !16, i64 136, !16, i64 140, !16, i64 144, !16, i64 148, !16, i64 152, !16, i64 156, !16, i64 160, !16, i64 164, !16, i64 168, !16, i64 172, !16, i64 176, !16, i64 180, !16, i64 184, !16, i64 188, !16, i64 192, !16, i64 196, !16, i64 200, !21, i64 208, !21, i64 264, !26, i64 320, !28, i64 376, !16, i64 400, !16, i64 404, !16, i64 408, !16, i64 412, !16, i64 416, !16, i64 420, !12, i64 424}
!11 = !{!"_ZTSN13MeshConverter7OptionsE", !12, i64 0, !12, i64 1}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"_ZTSN8libspirv15MutableBytecodeE", !14, i64 0, !17, i64 24}
!14 = !{!"_ZTSN8libspirv8BytecodeE", !6, i64 0, !15, i64 8, !16, i64 16}
!15 = !{!"long", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTSSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIN8libspirv8Bytecode6OpCodeESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIN8libspirv8Bytecode6OpCodeESaIS2_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN8libspirv8Bytecode6OpCodeESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"_ZTSSt13unordered_mapIjmSt4hashIjESt8equal_toIjESaISt4pairIKjmEEE", !22, i64 0}
!22 = !{!"_ZTSSt10_HashtableIjSt4pairIKjmESaIS2_ENSt8__detail10_Select1stESt8equal_toIjESt4hashIjENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE", !6, i64 0, !15, i64 8, !23, i64 16, !15, i64 24, !24, i64 32, !6, i64 48}
!23 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!24 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !25, i64 0, !15, i64 8}
!25 = !{!"float", !7, i64 0}
!26 = !{!"_ZTSSt13unordered_mapIjN13MeshConverter7VaryingESt4hashIjESt8equal_toIjESaISt4pairIKjS1_EEE", !27, i64 0}
!27 = !{!"_ZTSSt10_HashtableIjSt4pairIKjN13MeshConverter7VaryingEESaIS4_ENSt8__detail10_Select1stESt8equal_toIjESt4hashIjENS6_18_Mod_range_hashingENS6_20_Default_ranged_hashENS6_20_Prime_rehash_policyENS6_17_Hashtable_traitsILb0ELb0ELb1EEEE", !6, i64 0, !15, i64 8, !23, i64 16, !15, i64 24, !24, i64 32, !6, i64 48}
!28 = !{!"_ZTSSt6vectorIjSaIjEE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!16, !16, i64 0}
!33 = !{!10, !16, i64 124}
!34 = !{!10, !16, i64 128}
!35 = !{!10, !16, i64 132}
!36 = !{!10, !16, i64 168}
!37 = !{!10, !16, i64 136}
!38 = !{!10, !16, i64 140}
!39 = !{!10, !16, i64 144}
!40 = !{!10, !16, i64 152}
!41 = !{!10, !16, i64 148}
!42 = !{!10, !16, i64 156}


; 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.libspirv::Bytecode::Iterator" = type <{ ptr, i32, [4 x i8] }>

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN13MeshConverter15analyzeBuiltinsEv(ptr nocapture noundef nonnull align 8 dereferenceable(425) %0) local_unnamed_addr #0 align 2 {
  %2 = alloca %"struct.libspirv::Bytecode::Iterator", align 8
  %3 = alloca %"struct.libspirv::Bytecode::Iterator", align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #4
  %6 = tail call { ptr, i32 } @_ZNK8libspirv8Bytecode5beginEv(ptr noundef nonnull align 8 dereferenceable(20) %5)
  %.fca.0.extract17 = extractvalue { ptr, i32 } %6, 0
  %.fca.1.extract18 = extractvalue { ptr, i32 } %6, 1
  store ptr %.fca.0.extract17, ptr %2, align 8
  %.sroa.220.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 8
  store i32 %.fca.1.extract18, ptr %.sroa.220.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #4
  %7 = tail call { ptr, i32 } @_ZNK8libspirv8Bytecode3endEv(ptr noundef nonnull align 8 dereferenceable(20) %5)
  %.fca.0.extract = extractvalue { ptr, i32 } %7, 0
  %.fca.1.extract = extractvalue { ptr, i32 } %7, 1
  store ptr %.fca.0.extract, ptr %3, align 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  %8 = call noundef zeroext i1 @_ZN8libspirvneERKNS_8Bytecode8IteratorES3_(ptr noundef nonnull align 8 dereferenceable(12) %2, ptr noundef nonnull align 8 dereferenceable(12) %3)
  br i1 %8, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %1
  %9 = getelementptr inbounds i8, ptr %0, i64 152
  %10 = getelementptr inbounds i8, ptr %0, i64 144
  %11 = getelementptr inbounds i8, ptr %0, i64 140
  %12 = getelementptr inbounds i8, ptr %0, i64 136
  %13 = getelementptr inbounds i8, ptr %0, i64 132
  %14 = getelementptr inbounds i8, ptr %0, i64 168
  %15 = getelementptr inbounds i8, ptr %0, i64 128
  %16 = getelementptr inbounds i8, ptr %0, i64 124
  %17 = getelementptr inbounds i8, ptr %0, i64 148
  %18 = getelementptr inbounds i8, ptr %0, i64 156
  br label %19

._crit_edge:                                      ; preds = %72, %1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #4
  ret void

19:                                               ; preds = %.lr.ph, %72
  %20 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode8IteratordeEv(ptr noundef nonnull align 8 dereferenceable(12) %2)
  %21 = call noundef i32 @_ZNK8libspirv8Bytecode6OpCode2opEv(ptr noundef nonnull align 4 dereferenceable(4) %20)
  %22 = icmp eq i32 %21, 71
  br i1 %22, label %23, label %53

23:                                               ; preds = %19
  %24 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %20, i16 noundef zeroext 2)
  %25 = load i32, ptr %24, align 4, !tbaa !31
  %26 = icmp eq i32 %25, 11
  br i1 %26, label %27, label %53

27:                                               ; preds = %23
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %20, i16 noundef zeroext 3)
  %29 = load i32, ptr %28, align 4, !tbaa !31
  switch i32 %29, label %53 [
    i32 24, label %30
    i32 25, label %33
    i32 26, label %36
    i32 27, label %41
    i32 29, label %44
    i32 28, label %47
    i32 5294, label %50
    i32 5295, label %50
    i32 5296, label %50
  ]

30:                                               ; preds = %27
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %20, i16 noundef zeroext 1)
  %32 = load i32, ptr %31, align 4, !tbaa !31
  store i32 %32, ptr %16, align 4, !tbaa !32
  br label %53

33:                                               ; preds = %27
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %20, i16 noundef zeroext 1)
  %35 = load i32, ptr %34, align 4, !tbaa !31
  store i32 %35, ptr %15, align 8, !tbaa !33
  br label %53

36:                                               ; preds = %27
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %20, i16 noundef zeroext 1)
  %38 = load i32, ptr %37, align 4, !tbaa !31
  store i32 %38, ptr %13, align 4, !tbaa !34
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %20, i16 noundef zeroext 1)
  %40 = load i32, ptr %39, align 4, !tbaa !31
  store i32 %40, ptr %14, align 8, !tbaa !35
  br label %53

41:                                               ; preds = %27
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %20, i16 noundef zeroext 1)
  %43 = load i32, ptr %42, align 4, !tbaa !31
  store i32 %43, ptr %12, align 8, !tbaa !36
  br label %53

44:                                               ; preds = %27
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %20, i16 noundef zeroext 1)
  %46 = load i32, ptr %45, align 4, !tbaa !31
  store i32 %46, ptr %11, align 4, !tbaa !37
  br label %53

47:                                               ; preds = %27
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %20, i16 noundef zeroext 1)
  %49 = load i32, ptr %48, align 4, !tbaa !31
  store i32 %49, ptr %10, align 8, !tbaa !38
  br label %53

50:                                               ; preds = %27, %27, %27
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %20, i16 noundef zeroext 1)
  %52 = load i32, ptr %51, align 4, !tbaa !31
  store i32 %52, ptr %9, align 8, !tbaa !39
  br label %53

53:                                               ; preds = %27, %30, %33, %36, %41, %44, %47, %50, %23, %19
  %54 = call noundef i32 @_ZNK8libspirv8Bytecode6OpCode2opEv(ptr noundef nonnull align 4 dereferenceable(4) %20)
  %55 = icmp eq i32 %54, 72
  br i1 %55, label %56, label %66

56:                                               ; preds = %53
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %20, i16 noundef zeroext 3)
  %58 = load i32, ptr %57, align 4, !tbaa !31
  %59 = icmp eq i32 %58, 11
  br i1 %59, label %60, label %66

60:                                               ; preds = %56
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %20, i16 noundef zeroext 4)
  %62 = load i32, ptr %61, align 4, !tbaa !31
  %cond = icmp eq i32 %62, 0
  br i1 %cond, label %63, label %66

63:                                               ; preds = %60
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %20, i16 noundef zeroext 1)
  %65 = load i32, ptr %64, align 4, !tbaa !31
  store i32 %65, ptr %17, align 4, !tbaa !40
  br label %66

66:                                               ; preds = %63, %60, %56, %53
  %67 = call noundef i32 @_ZNK8libspirv8Bytecode6OpCode2opEv(ptr noundef nonnull align 4 dereferenceable(4) %20)
  %68 = icmp eq i32 %67, 15
  br i1 %68, label %69, label %72

69:                                               ; preds = %66
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4) %20, i16 noundef zeroext 2)
  %71 = load i32, ptr %70, align 4, !tbaa !31
  store i32 %71, ptr %18, align 4, !tbaa !41
  br label %72

72:                                               ; preds = %69, %66
  call void @_ZN8libspirv8Bytecode8IteratorppEv(ptr noundef nonnull align 8 dereferenceable(12) %2)
  %73 = call noundef zeroext i1 @_ZN8libspirvneERKNS_8Bytecode8IteratorES3_(ptr noundef nonnull align 8 dereferenceable(12) %2, ptr noundef nonnull align 8 dereferenceable(12) %3)
  br i1 %73, label %19, label %._crit_edge
}

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

declare { ptr, i32 } @_ZNK8libspirv8Bytecode5beginEv(ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #2

declare { ptr, i32 } @_ZNK8libspirv8Bytecode3endEv(ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode8IteratordeEv(ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8libspirv8Bytecode6OpCodeixEt(ptr noundef nonnull align 4 dereferenceable(4), i16 noundef zeroext) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8libspirv8Bytecode8IteratorppEv(ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #3 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { 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 = { 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, !11, i64 8}
!6 = !{!"_ZTS13MeshConverter", !7, i64 0, !11, i64 8, !12, i64 16, !12, i64 64, !9, i64 112, !15, i64 124, !15, i64 128, !15, i64 132, !15, i64 136, !15, i64 140, !15, i64 144, !15, i64 148, !15, i64 152, !15, i64 156, !15, i64 160, !15, i64 164, !15, i64 168, !15, i64 172, !15, i64 176, !15, i64 180, !15, i64 184, !15, i64 188, !15, i64 192, !15, i64 196, !15, i64 200, !20, i64 208, !20, i64 264, !25, i64 320, !27, i64 376, !15, i64 400, !15, i64 404, !15, i64 408, !15, i64 412, !15, i64 416, !15, i64 420, !8, i64 424}
!7 = !{!"_ZTSN13MeshConverter7OptionsE", !8, i64 0, !8, i64 1}
!8 = !{!"bool", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"_ZTSN8libspirv15MutableBytecodeE", !13, i64 0, !16, i64 24}
!13 = !{!"_ZTSN8libspirv8BytecodeE", !11, i64 0, !14, i64 8, !15, i64 16}
!14 = !{!"long", !9, i64 0}
!15 = !{!"int", !9, i64 0}
!16 = !{!"_ZTSSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIN8libspirv8Bytecode6OpCodeESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIN8libspirv8Bytecode6OpCodeESaIS2_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIN8libspirv8Bytecode6OpCodeESaIS2_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!20 = !{!"_ZTSSt13unordered_mapIjmSt4hashIjESt8equal_toIjESaISt4pairIKjmEEE", !21, i64 0}
!21 = !{!"_ZTSSt10_HashtableIjSt4pairIKjmESaIS2_ENSt8__detail10_Select1stESt8equal_toIjESt4hashIjENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE", !11, i64 0, !14, i64 8, !22, i64 16, !14, i64 24, !23, i64 32, !11, i64 48}
!22 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !11, i64 0}
!23 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !24, i64 0, !14, i64 8}
!24 = !{!"float", !9, i64 0}
!25 = !{!"_ZTSSt13unordered_mapIjN13MeshConverter7VaryingESt4hashIjESt8equal_toIjESaISt4pairIKjS1_EEE", !26, i64 0}
!26 = !{!"_ZTSSt10_HashtableIjSt4pairIKjN13MeshConverter7VaryingEESaIS4_ENSt8__detail10_Select1stESt8equal_toIjESt4hashIjENS6_18_Mod_range_hashingENS6_20_Default_ranged_hashENS6_20_Prime_rehash_policyENS6_17_Hashtable_traitsILb0ELb0ELb1EEEE", !11, i64 0, !14, i64 8, !22, i64 16, !14, i64 24, !23, i64 32, !11, i64 48}
!27 = !{!"_ZTSSt6vectorIjSaIjEE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!31 = !{!15, !15, i64 0}
!32 = !{!6, !15, i64 124}
!33 = !{!6, !15, i64 128}
!34 = !{!6, !15, i64 132}
!35 = !{!6, !15, i64 168}
!36 = !{!6, !15, i64 136}
!37 = !{!6, !15, i64 140}
!38 = !{!6, !15, i64 144}
!39 = !{!6, !15, i64 152}
!40 = !{!6, !15, i64 148}
!41 = !{!6, !15, i64 156}


; Effective O3 passes: GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass