; LLVM IR from Try/Tempest :: Engine/libspirv/libspirv.ll (ZN8libspirv15MutableBytecode8Iterator6appendEj)

; 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.__gnu_cxx::__normal_iterator.0" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.libspirv::MutableBytecode::Iterator" = type { %"struct.libspirv::Bytecode::Iterator.base", ptr }
%"struct.libspirv::Bytecode::Iterator.base" = type <{ ptr, i32 }>
%"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 }
%"struct.libspirv::Bytecode::Iterator" = type <{ ptr, i32, [4 x i8] }>
%"struct.libspirv::Bytecode::OpCode" = type { i16, i16 }

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt8distanceIPKN8libspirv8Bytecode6OpCodeEENSt15iterator_traitsIT_E15difference_typeES6_S6_(ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8libspirv15MutableBytecode8Iterator18invalidateIteratorEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8libspirv15MutableBytecode8Iterator6appendEj(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1) #4 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %12 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %13 = getelementptr inbounds %"struct.libspirv::MutableBytecode::Iterator", ptr %12, i32 0, i32 1
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  %15 = getelementptr inbounds %"class.libspirv::MutableBytecode", ptr %14, i32 0, i32 1
  %16 = call noundef ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  %17 = getelementptr inbounds %"struct.libspirv::Bytecode::Iterator", ptr %12, i32 0, i32 0
  %18 = load ptr, ptr %17, align 8, !tbaa !14
  %19 = call noundef i64 @_ZSt8distanceIPKN8libspirv8Bytecode6OpCodeEENSt15iterator_traitsIT_E15difference_typeES6_S6_(ptr noundef %16, ptr noundef %18)
  store i64 %19, ptr %5, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %20 = load i64, ptr %5, align 8, !tbaa !15
  %21 = getelementptr inbounds %"struct.libspirv::MutableBytecode::Iterator", ptr %12, i32 0, i32 1
  %22 = load ptr, ptr %21, align 8, !tbaa !11
  %23 = getelementptr inbounds %"class.libspirv::MutableBytecode", ptr %22, i32 0, i32 1
  %24 = load i64, ptr %5, align 8, !tbaa !15
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %24) #5
  %26 = getelementptr inbounds %"struct.libspirv::Bytecode::OpCode", ptr %25, i32 0, i32 1
  %27 = load i16, ptr %26, align 2, !tbaa !17
  %28 = zext i16 %27 to i64
  %29 = add i64 %20, %28
  store i64 %29, ptr %6, align 8, !tbaa !15
  %30 = getelementptr inbounds %"struct.libspirv::MutableBytecode::Iterator", ptr %12, i32 0, i32 1
  %31 = load ptr, ptr %30, align 8, !tbaa !11
  %32 = getelementptr inbounds %"class.libspirv::MutableBytecode", ptr %31, i32 0, i32 1
  %33 = load i64, ptr %5, align 8, !tbaa !15
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %33) #5
  %35 = getelementptr inbounds %"struct.libspirv::Bytecode::OpCode", ptr %34, i32 0, i32 1
  %36 = load i16, ptr %35, align 2, !tbaa !17
  %37 = zext i16 %36 to i32
  %38 = add nsw i32 %37, 1
  %39 = trunc i32 %38 to i16
  store i16 %39, ptr %35, align 2, !tbaa !17
  %40 = load i64, ptr %6, align 8, !tbaa !15
  %41 = getelementptr inbounds %"struct.libspirv::MutableBytecode::Iterator", ptr %12, i32 0, i32 1
  %42 = load ptr, ptr %41, align 8, !tbaa !11
  %43 = getelementptr inbounds %"class.libspirv::MutableBytecode", ptr %42, i32 0, i32 1
  %44 = call noundef i64 @_ZNKSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #5
  %45 = icmp ult i64 %40, %44
  br i1 %45, label %46, label %62

46:                                               ; preds = %2
  %47 = getelementptr inbounds %"struct.libspirv::MutableBytecode::Iterator", ptr %12, i32 0, i32 1
  %48 = load ptr, ptr %47, align 8, !tbaa !11
  %49 = getelementptr inbounds %"class.libspirv::MutableBytecode", ptr %48, i32 0, i32 1
  %50 = load i64, ptr %6, align 8, !tbaa !15
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %50) #5
  %52 = getelementptr inbounds %"struct.libspirv::Bytecode::OpCode", ptr %51, i32 0, i32 0
  %53 = load i16, ptr %52, align 4, !tbaa !20
  %54 = zext i16 %53 to i32
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %56, label %62

56:                                               ; preds = %46
  %57 = getelementptr inbounds %"struct.libspirv::MutableBytecode::Iterator", ptr %12, i32 0, i32 1
  %58 = load ptr, ptr %57, align 8, !tbaa !11
  %59 = getelementptr inbounds %"class.libspirv::MutableBytecode", ptr %58, i32 0, i32 1
  %60 = load i64, ptr %6, align 8, !tbaa !15
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %59, i64 noundef %60) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %61, ptr align 4 %4, i64 4, i1 false), !tbaa.struct !21
  store i32 1, ptr %7, align 4
  br label %81

62:                                               ; preds = %46, %2
  %63 = getelementptr inbounds %"struct.libspirv::MutableBytecode::Iterator", ptr %12, i32 0, i32 1
  %64 = load ptr, ptr %63, align 8, !tbaa !11
  %65 = getelementptr inbounds %"class.libspirv::MutableBytecode", ptr %64, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %66 = getelementptr inbounds %"struct.libspirv::MutableBytecode::Iterator", ptr %12, i32 0, i32 1
  %67 = load ptr, ptr %66, align 8, !tbaa !11
  %68 = getelementptr inbounds %"class.libspirv::MutableBytecode", ptr %67, i32 0, i32 1
  %69 = call ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %68) #5
  %70 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %69, ptr %70, align 8
  %71 = load i64, ptr %6, align 8, !tbaa !15
  %72 = trunc i64 %71 to i32
  %73 = sext i32 %72 to i64
  %74 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN8libspirv8Bytecode6OpCodeESt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %10, i64 noundef %73) #5
  %75 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %74, ptr %75, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKN8libspirv8Bytecode6OpCodeESt6vectorIS3_SaIS3_EEEC2IPS3_vEERKNS0_IT_S8_EE(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  %76 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %8, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8
  %78 = call ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS2_S4_EERS7_(ptr noundef nonnull align 8 dereferenceable(24) %65, ptr %77, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %79 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %78, ptr %79, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  %80 = load i64, ptr %5, align 8, !tbaa !15
  call void @_ZN8libspirv15MutableBytecode8Iterator18invalidateIteratorEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %80)
  store i32 0, ptr %7, align 4
  br label %81

81:                                               ; preds = %62, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  %82 = load i32, ptr %7, align 4
  switch i32 %82, label %84 [
    i32 0, label %83
    i32 1, label %83
  ]

83:                                               ; preds = %81, %81
  ret void

84:                                               ; preds = %81
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN8libspirv8Bytecode6OpCodeESt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 align 2

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

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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, !6, i64 16}
!12 = !{!"_ZTSN8libspirv15MutableBytecode8IteratorE", !13, i64 0, !6, i64 16}
!13 = !{!"_ZTSN8libspirv8Bytecode8IteratorE", !6, i64 0, !10, i64 8}
!14 = !{!13, !6, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!18, !19, i64 2}
!18 = !{!"_ZTSN8libspirv8Bytecode6OpCodeE", !19, i64 0, !19, i64 2}
!19 = !{!"short", !7, i64 0}
!20 = !{!18, !19, i64 0}
!21 = !{i64 0, i64 2, !22, i64 2, i64 2, !22}
!22 = !{!19, !19, 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"

%"class.__gnu_cxx::__normal_iterator.0" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

; 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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt8distanceIPKN8libspirv8Bytecode6OpCodeEENSt15iterator_traitsIT_E15difference_typeES6_S6_(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8libspirv15MutableBytecode8Iterator6appendEj(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1) local_unnamed_addr #3 align 2 {
  %3 = alloca i32, align 4
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store i32 %1, ptr %3, align 4, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = load ptr, ptr %7, align 8, !tbaa !9
  %9 = getelementptr inbounds i8, ptr %8, i64 24
  %10 = tail call noundef ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  %11 = load ptr, ptr %0, align 8, !tbaa !13
  %12 = tail call noundef i64 @_ZSt8distanceIPKN8libspirv8Bytecode6OpCodeEENSt15iterator_traitsIT_E15difference_typeES6_S6_(ptr noundef %10, ptr noundef %11)
  %13 = load ptr, ptr %7, align 8, !tbaa !9
  %14 = getelementptr inbounds i8, ptr %13, i64 24
  %15 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %12) #4
  %16 = getelementptr inbounds i8, ptr %15, i64 2
  %17 = load i16, ptr %16, align 2, !tbaa !14
  %18 = zext i16 %17 to i64
  %19 = add i64 %12, %18
  %20 = load ptr, ptr %7, align 8, !tbaa !9
  %21 = getelementptr inbounds i8, ptr %20, i64 24
  %22 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %12) #4
  %23 = getelementptr inbounds i8, ptr %22, i64 2
  %24 = load i16, ptr %23, align 2, !tbaa !14
  %25 = add i16 %24, 1
  store i16 %25, ptr %23, align 2, !tbaa !14
  %26 = load ptr, ptr %7, align 8, !tbaa !9
  %27 = getelementptr inbounds i8, ptr %26, i64 24
  %28 = tail call noundef i64 @_ZNKSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #4
  %29 = icmp ult i64 %19, %28
  br i1 %29, label %30, label %40

30:                                               ; preds = %2
  %31 = load ptr, ptr %7, align 8, !tbaa !9
  %32 = getelementptr inbounds i8, ptr %31, i64 24
  %33 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %19) #4
  %34 = load i16, ptr %33, align 4, !tbaa !17
  %35 = icmp eq i16 %34, 0
  br i1 %35, label %36, label %40

36:                                               ; preds = %30
  %37 = load ptr, ptr %7, align 8, !tbaa !9
  %38 = getelementptr inbounds i8, ptr %37, i64 24
  %39 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %19) #4
  store i32 %1, ptr %39, align 4
  br label %48

40:                                               ; preds = %30, %2
  %41 = load ptr, ptr %7, align 8, !tbaa !9
  %42 = getelementptr inbounds i8, ptr %41, i64 24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %43 = tail call ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %42) #4
  store ptr %43, ptr %6, align 8
  %sext = shl i64 %19, 32
  %44 = ashr exact i64 %sext, 32
  %45 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN8libspirv8Bytecode6OpCodeESt6vectorIS3_SaIS3_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %44) #4
  store ptr %45, ptr %5, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKN8libspirv8Bytecode6OpCodeESt6vectorIS3_SaIS3_EEEC2IPS3_vEERKNS0_IT_S8_EE(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %46 = load ptr, ptr %4, align 8
  %47 = call ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS2_S4_EERS7_(ptr noundef nonnull align 8 dereferenceable(24) %42, ptr %46, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @_ZN8libspirv15MutableBytecode8Iterator18invalidateIteratorEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %12)
  br label %48

48:                                               ; preds = %40, %36
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 16}
!10 = !{!"_ZTSN8libspirv15MutableBytecode8IteratorE", !11, i64 0, !12, i64 16}
!11 = !{!"_ZTSN8libspirv8Bytecode8IteratorE", !12, i64 0, !6, i64 8}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!11, !12, i64 0}
!14 = !{!15, !16, i64 2}
!15 = !{!"_ZTSN8libspirv8Bytecode6OpCodeE", !16, i64 0, !16, i64 2}
!16 = !{!"short", !7, i64 0}
!17 = !{!15, !16, i64 0}


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