; LLVM IR from hbatagelo/abcg :: abcg/external/glslang/SPIRV/disassemble.ll (ZN3spv11SpirvStream19processInstructionsEv)

; 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"

%"class.spv::InstructionParameters" = type <{ ptr, i32, [4 x i8], %"class.spv::OperandParameters", i8, [7 x i8] }>
%"class.spv::OperandParameters" = type { %"class.std::vector.5", %"class.std::vector.10", %"class.std::vector.15" }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<spv::OperandClass, std::allocator<spv::OperandClass>>::_Vector_impl" }
%"struct.std::_Vector_base<spv::OperandClass, std::allocator<spv::OperandClass>>::_Vector_impl" = type { %"struct.std::_Vector_base<spv::OperandClass, std::allocator<spv::OperandClass>>::_Vector_impl_data" }
%"struct.std::_Vector_base<spv::OperandClass, std::allocator<spv::OperandClass>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl" }
%"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.15" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.spv::SpirvStream" = type <{ ptr, ptr, ptr, i32, i32, i32, [4 x i8], %"class.std::vector", %"class.std::vector.0", i32, [4 x i8], %"class.std::stack", i32, [4 x i8] }>
%"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.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<unsigned int, std::allocator<unsigned int>>::_Deque_impl" }
%"struct.std::_Deque_base<unsigned int, std::allocator<unsigned int>>::_Deque_impl" = type { %"struct.std::_Deque_base<unsigned int, std::allocator<unsigned int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<unsigned int, std::allocator<unsigned int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

@.str.6 = external hidden unnamed_addr constant [40 x i8], align 1
@_ZN3spv15InstructionDescE = external global [0 x %"class.spv::InstructionParameters"], align 8
@.str.7 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN3spvL4KillERSoPKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3spv11SpirvStream19processInstructionsEv(ptr noundef nonnull align 8 dereferenceable(180) %0) #0 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr %2, align 8
  br label %12

12:                                               ; preds = %111, %1
  %13 = getelementptr inbounds %"class.spv::SpirvStream", ptr %11, i32 0, i32 4
  %14 = load i32, ptr %13, align 4, !tbaa !9
  %15 = getelementptr inbounds %"class.spv::SpirvStream", ptr %11, i32 0, i32 3
  %16 = load i32, ptr %15, align 8, !tbaa !27
  %17 = icmp slt i32 %14, %16
  br i1 %17, label %18, label %115

18:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %19 = getelementptr inbounds %"class.spv::SpirvStream", ptr %11, i32 0, i32 4
  %20 = load i32, ptr %19, align 4, !tbaa !9
  store i32 %20, ptr %3, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %21 = getelementptr inbounds %"class.spv::SpirvStream", ptr %11, i32 0, i32 2
  %22 = load ptr, ptr %21, align 8, !tbaa !29
  %23 = getelementptr inbounds %"class.spv::SpirvStream", ptr %11, i32 0, i32 4
  %24 = load i32, ptr %23, align 4, !tbaa !9
  %25 = sext i32 %24 to i64
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %25) #5
  %27 = load i32, ptr %26, align 4, !tbaa !28
  store i32 %27, ptr %4, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %28 = load i32, ptr %4, align 4, !tbaa !28
  %29 = lshr i32 %28, 16
  store i32 %29, ptr %5, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %30 = load i32, ptr %4, align 4, !tbaa !28
  %31 = and i32 %30, 65535
  store i32 %31, ptr %6, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %32 = getelementptr inbounds %"class.spv::SpirvStream", ptr %11, i32 0, i32 4
  %33 = load i32, ptr %32, align 4, !tbaa !9
  %34 = load i32, ptr %5, align 4, !tbaa !28
  %35 = add i32 %33, %34
  store i32 %35, ptr %7, align 4, !tbaa !28
  %36 = getelementptr inbounds %"class.spv::SpirvStream", ptr %11, i32 0, i32 4
  %37 = load i32, ptr %36, align 4, !tbaa !9
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %36, align 4, !tbaa !9
  %39 = load i32, ptr %7, align 4, !tbaa !28
  %40 = getelementptr inbounds %"class.spv::SpirvStream", ptr %11, i32 0, i32 3
  %41 = load i32, ptr %40, align 8, !tbaa !27
  %42 = icmp sgt i32 %39, %41
  br i1 %42, label %43, label %46

43:                                               ; preds = %18
  %44 = getelementptr inbounds %"class.spv::SpirvStream", ptr %11, i32 0, i32 1
  %45 = load ptr, ptr %44, align 8, !tbaa !32
  call void @_ZN3spvL4KillERSoPKc(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef @.str.6)
  br label %46

46:                                               ; preds = %43, %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %47 = load i32, ptr %5, align 4, !tbaa !28
  %48 = sub i32 %47, 1
  store i32 %48, ptr %8, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !28
  %49 = load i32, ptr %6, align 4, !tbaa !30
  %50 = zext i32 %49 to i64
  %51 = getelementptr inbounds [0 x %"class.spv::InstructionParameters"], ptr @_ZN3spv15InstructionDescE, i64 0, i64 %50
  %52 = call noundef zeroext i1 @_ZNK3spv21InstructionParameters7hasTypeEv(ptr noundef nonnull align 8 dereferenceable(105) %51)
  br i1 %52, label %53, label %64

53:                                               ; preds = %46
  %54 = getelementptr inbounds %"class.spv::SpirvStream", ptr %11, i32 0, i32 2
  %55 = load ptr, ptr %54, align 8, !tbaa !29
  %56 = getelementptr inbounds %"class.spv::SpirvStream", ptr %11, i32 0, i32 4
  %57 = load i32, ptr %56, align 4, !tbaa !9
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %56, align 4, !tbaa !9
  %59 = sext i32 %57 to i64
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %59) #5
  %61 = load i32, ptr %60, align 4, !tbaa !28
  store i32 %61, ptr %9, align 4, !tbaa !28
  %62 = load i32, ptr %8, align 4, !tbaa !28
  %63 = add i32 %62, -1
  store i32 %63, ptr %8, align 4, !tbaa !28
  br label %64

64:                                               ; preds = %53, %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !28
  %65 = load i32, ptr %6, align 4, !tbaa !30
  %66 = zext i32 %65 to i64
  %67 = getelementptr inbounds [0 x %"class.spv::InstructionParameters"], ptr @_ZN3spv15InstructionDescE, i64 0, i64 %66
  %68 = call noundef zeroext i1 @_ZNK3spv21InstructionParameters9hasResultEv(ptr noundef nonnull align 8 dereferenceable(105) %67)
  br i1 %68, label %69, label %85

69:                                               ; preds = %64
  %70 = getelementptr inbounds %"class.spv::SpirvStream", ptr %11, i32 0, i32 2
  %71 = load ptr, ptr %70, align 8, !tbaa !29
  %72 = getelementptr inbounds %"class.spv::SpirvStream", ptr %11, i32 0, i32 4
  %73 = load i32, ptr %72, align 4, !tbaa !9
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %72, align 4, !tbaa !9
  %75 = sext i32 %73 to i64
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %71, i64 noundef %75) #5
  %77 = load i32, ptr %76, align 4, !tbaa !28
  store i32 %77, ptr %10, align 4, !tbaa !28
  %78 = load i32, ptr %8, align 4, !tbaa !28
  %79 = add i32 %78, -1
  store i32 %79, ptr %8, align 4, !tbaa !28
  %80 = load i32, ptr %3, align 4, !tbaa !28
  %81 = getelementptr inbounds %"class.spv::SpirvStream", ptr %11, i32 0, i32 7
  %82 = load i32, ptr %10, align 4, !tbaa !28
  %83 = zext i32 %82 to i64
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %83) #5
  store i32 %80, ptr %84, align 4, !tbaa !28
  br label %85

85:                                               ; preds = %69, %64
  %86 = load i32, ptr %10, align 4, !tbaa !28
  call void @_ZN3spv11SpirvStream14outputResultIdEj(ptr noundef nonnull align 8 dereferenceable(180) %11, i32 noundef %86)
  %87 = load i32, ptr %9, align 4, !tbaa !28
  call void @_ZN3spv11SpirvStream12outputTypeIdEj(ptr noundef nonnull align 8 dereferenceable(180) %11, i32 noundef %87)
  call void @_ZN3spv11SpirvStream12outputIndentEv(ptr noundef nonnull align 8 dereferenceable(180) %11)
  %88 = load i32, ptr %10, align 4, !tbaa !28
  %89 = load i32, ptr %9, align 4, !tbaa !28
  %90 = load i32, ptr %6, align 4, !tbaa !30
  %91 = load i32, ptr %8, align 4, !tbaa !28
  call void @_ZN3spv11SpirvStream22disassembleInstructionEjjNS_2OpEi(ptr noundef nonnull align 8 dereferenceable(180) %11, i32 noundef %88, i32 noundef %89, i32 noundef %90, i32 noundef %91)
  %92 = getelementptr inbounds %"class.spv::SpirvStream", ptr %11, i32 0, i32 4
  %93 = load i32, ptr %92, align 4, !tbaa !9
  %94 = load i32, ptr %7, align 4, !tbaa !28
  %95 = icmp ne i32 %93, %94
  br i1 %95, label %96, label %111

96:                                               ; preds = %85
  %97 = getelementptr inbounds %"class.spv::SpirvStream", ptr %11, i32 0, i32 1
  %98 = load ptr, ptr %97, align 8, !tbaa !32
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %98, ptr noundef @.str.7)
  %100 = getelementptr inbounds %"class.spv::SpirvStream", ptr %11, i32 0, i32 4
  %101 = load i32, ptr %100, align 4, !tbaa !9
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %99, i32 noundef %101)
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %102, ptr noundef @.str.8)
  %104 = load i32, ptr %7, align 4, !tbaa !28
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %103, i32 noundef %104)
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef @.str.9)
  %107 = load i32, ptr %3, align 4, !tbaa !28
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %106, i32 noundef %107)
  %109 = load i32, ptr %7, align 4, !tbaa !28
  %110 = getelementptr inbounds %"class.spv::SpirvStream", ptr %11, i32 0, i32 4
  store i32 %109, ptr %110, align 4, !tbaa !9
  br label %111

111:                                              ; preds = %96, %85
  %112 = getelementptr inbounds %"class.spv::SpirvStream", ptr %11, i32 0, i32 1
  %113 = load ptr, ptr %112, align 8, !tbaa !32
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %113, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %12, !llvm.loop !33

115:                                              ; preds = %12
  ret void
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3spv11SpirvStream14outputResultIdEj(ptr noundef nonnull align 8 dereferenceable(180), i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3spv11SpirvStream12outputTypeIdEj(ptr noundef nonnull align 8 dereferenceable(180), i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3spv11SpirvStream12outputIndentEv(ptr noundef nonnull align 8 dereferenceable(180)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3spv11SpirvStream22disassembleInstructionEjjNS_2OpEi(ptr noundef nonnull align 8 dereferenceable(180), i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

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

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 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 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !11, i64 28}
!10 = !{!"_ZTSN3spv11SpirvStreamE", !6, i64 8, !6, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !12, i64 40, !16, i64 64, !11, i64 88, !20, i64 96, !11, i64 176}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIjSaIjEE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_ZTSSt5stackIjSt5dequeIjSaIjEEE", !21, i64 0}
!21 = !{!"_ZTSSt5dequeIjSaIjEE", !22, i64 0}
!22 = !{!"_ZTSSt11_Deque_baseIjSaIjEE", !23, i64 0}
!23 = !{!"_ZTSNSt11_Deque_baseIjSaIjEE11_Deque_implE", !24, i64 0}
!24 = !{!"_ZTSNSt11_Deque_baseIjSaIjEE16_Deque_impl_dataE", !6, i64 0, !25, i64 8, !26, i64 16, !26, i64 48}
!25 = !{!"long", !7, i64 0}
!26 = !{!"_ZTSSt15_Deque_iteratorIjRjPjE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!27 = !{!10, !11, i64 24}
!28 = !{!11, !11, i64 0}
!29 = !{!10, !6, i64 16}
!30 = !{!31, !31, i64 0}
!31 = !{!"_ZTSN3spv2OpE", !7, i64 0}
!32 = !{!10, !6, i64 8}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}


; 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"

%"class.spv::InstructionParameters" = type <{ ptr, i32, [4 x i8], %"class.spv::OperandParameters", i8, [7 x i8] }>
%"class.spv::OperandParameters" = type { %"class.std::vector.5", %"class.std::vector.10", %"class.std::vector.15" }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<spv::OperandClass, std::allocator<spv::OperandClass>>::_Vector_impl" }
%"struct.std::_Vector_base<spv::OperandClass, std::allocator<spv::OperandClass>>::_Vector_impl" = type { %"struct.std::_Vector_base<spv::OperandClass, std::allocator<spv::OperandClass>>::_Vector_impl_data" }
%"struct.std::_Vector_base<spv::OperandClass, std::allocator<spv::OperandClass>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl" }
%"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.15" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>

@.str.6 = external hidden unnamed_addr constant [40 x i8], align 1
@_ZN3spv15InstructionDescE = external global [0 x %"class.spv::InstructionParameters"], align 8
@.str.7 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN3spvL4KillERSoPKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3spv11SpirvStream19processInstructionsEv(ptr noundef nonnull align 8 dereferenceable(180) %0) local_unnamed_addr #0 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 28
  %3 = getelementptr inbounds i8, ptr %0, i64 24
  %4 = load i32, ptr %2, align 4, !tbaa !5
  %5 = load i32, ptr %3, align 8, !tbaa !26
  %6 = icmp slt i32 %4, %5
  br i1 %6, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %1
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = getelementptr inbounds i8, ptr %0, i64 40
  br label %10

10:                                               ; preds = %.lr.ph, %61
  %11 = phi i32 [ %4, %.lr.ph ], [ %64, %61 ]
  %12 = load ptr, ptr %7, align 8, !tbaa !27
  %13 = sext i32 %11 to i64
  %14 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %13) #4
  %15 = load i32, ptr %14, align 4, !tbaa !28
  %16 = lshr i32 %15, 16
  %17 = and i32 %15, 65535
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = add i32 %18, %16
  %20 = add nsw i32 %18, 1
  store i32 %20, ptr %2, align 4, !tbaa !5
  %21 = load i32, ptr %3, align 8, !tbaa !26
  %22 = icmp sgt i32 %19, %21
  br i1 %22, label %23, label %25

23:                                               ; preds = %10
  %24 = load ptr, ptr %8, align 8, !tbaa !29
  tail call void @_ZN3spvL4KillERSoPKc(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull @.str.6)
  br label %25

25:                                               ; preds = %23, %10
  %26 = add nsw i32 %16, -1
  %27 = zext nneg i32 %17 to i64
  %28 = getelementptr inbounds [0 x %"class.spv::InstructionParameters"], ptr @_ZN3spv15InstructionDescE, i64 0, i64 %27
  %29 = tail call noundef zeroext i1 @_ZNK3spv21InstructionParameters7hasTypeEv(ptr noundef nonnull align 8 dereferenceable(105) %28)
  br i1 %29, label %30, label %38

30:                                               ; preds = %25
  %31 = load ptr, ptr %7, align 8, !tbaa !27
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %2, align 4, !tbaa !5
  %34 = sext i32 %32 to i64
  %35 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %34) #4
  %36 = load i32, ptr %35, align 4, !tbaa !28
  %37 = add nsw i32 %16, -2
  br label %38

38:                                               ; preds = %30, %25
  %.022 = phi i32 [ %37, %30 ], [ %26, %25 ]
  %.021 = phi i32 [ %36, %30 ], [ 0, %25 ]
  %39 = tail call noundef zeroext i1 @_ZNK3spv21InstructionParameters9hasResultEv(ptr noundef nonnull align 8 dereferenceable(105) %28)
  br i1 %39, label %40, label %50

40:                                               ; preds = %38
  %41 = load ptr, ptr %7, align 8, !tbaa !27
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %2, align 4, !tbaa !5
  %44 = sext i32 %42 to i64
  %45 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %41, i64 noundef %44) #4
  %46 = load i32, ptr %45, align 4, !tbaa !28
  %47 = add nsw i32 %.022, -1
  %48 = zext i32 %46 to i64
  %49 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %48) #4
  store i32 %11, ptr %49, align 4, !tbaa !28
  br label %50

50:                                               ; preds = %40, %38
  %.1 = phi i32 [ %47, %40 ], [ %.022, %38 ]
  %.0 = phi i32 [ %46, %40 ], [ 0, %38 ]
  tail call void @_ZN3spv11SpirvStream14outputResultIdEj(ptr noundef nonnull align 8 dereferenceable(180) %0, i32 noundef %.0)
  tail call void @_ZN3spv11SpirvStream12outputTypeIdEj(ptr noundef nonnull align 8 dereferenceable(180) %0, i32 noundef %.021)
  tail call void @_ZN3spv11SpirvStream12outputIndentEv(ptr noundef nonnull align 8 dereferenceable(180) %0)
  tail call void @_ZN3spv11SpirvStream22disassembleInstructionEjjNS_2OpEi(ptr noundef nonnull align 8 dereferenceable(180) %0, i32 noundef %.0, i32 noundef %.021, i32 noundef %17, i32 noundef %.1)
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %.not = icmp eq i32 %51, %19
  br i1 %.not, label %61, label %52

52:                                               ; preds = %50
  %53 = load ptr, ptr %8, align 8, !tbaa !29
  %54 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull @.str.7)
  %55 = load i32, ptr %2, align 4, !tbaa !5
  %56 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %54, i32 noundef %55)
  %57 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef nonnull @.str.8)
  %58 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %57, i32 noundef %19)
  %59 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull @.str.9)
  %60 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %59, i32 noundef %11)
  store i32 %19, ptr %2, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %52, %50
  %62 = load ptr, ptr %8, align 8, !tbaa !29
  %63 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %64 = load i32, ptr %2, align 4, !tbaa !5
  %65 = load i32, ptr %3, align 8, !tbaa !26
  %66 = icmp slt i32 %64, %65
  br i1 %66, label %10, label %._crit_edge, !llvm.loop !30

._crit_edge:                                      ; preds = %61, %1
  ret void
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3spv11SpirvStream14outputResultIdEj(ptr noundef nonnull align 8 dereferenceable(180), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3spv11SpirvStream12outputTypeIdEj(ptr noundef nonnull align 8 dereferenceable(180), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3spv11SpirvStream12outputIndentEv(ptr noundef nonnull align 8 dereferenceable(180)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3spv11SpirvStream22disassembleInstructionEjjNS_2OpEi(ptr noundef nonnull align 8 dereferenceable(180), i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3

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 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 = { 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 #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 = { 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, !10, i64 28}
!6 = !{!"_ZTSN3spv11SpirvStreamE", !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !11, i64 40, !15, i64 64, !10, i64 88, !19, i64 96, !10, i64 176}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTSSt6vectorIjSaIjEE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!15 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!19 = !{!"_ZTSSt5stackIjSt5dequeIjSaIjEEE", !20, i64 0}
!20 = !{!"_ZTSSt5dequeIjSaIjEE", !21, i64 0}
!21 = !{!"_ZTSSt11_Deque_baseIjSaIjEE", !22, i64 0}
!22 = !{!"_ZTSNSt11_Deque_baseIjSaIjEE11_Deque_implE", !23, i64 0}
!23 = !{!"_ZTSNSt11_Deque_baseIjSaIjEE16_Deque_impl_dataE", !7, i64 0, !24, i64 8, !25, i64 16, !25, i64 48}
!24 = !{!"long", !8, i64 0}
!25 = !{!"_ZTSSt15_Deque_iteratorIjRjPjE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!26 = !{!6, !10, i64 24}
!27 = !{!6, !7, i64 16}
!28 = !{!10, !10, i64 0}
!29 = !{!6, !7, i64 8}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}


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