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

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

@.str.1 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [24 x i8], align 1
@__PRETTY_FUNCTION__._ZN8libspirv15MutableBytecode8Iterator6insertERKNS_8BytecodeE = external hidden unnamed_addr constant [67 x i8], align 1

; 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 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) #4 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8libspirv15MutableBytecode8Iterator6insertERKNS_8BytecodeE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(20) %1) #5 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %10 = load ptr, ptr %3, align 8
  %11 = getelementptr inbounds %"struct.libspirv::Bytecode::Iterator", ptr %10, i32 0, i32 1
  %12 = load i32, ptr %11, align 8, !tbaa !9
  %13 = getelementptr inbounds %"struct.libspirv::MutableBytecode::Iterator", ptr %10, i32 0, i32 1
  %14 = load ptr, ptr %13, align 8, !tbaa !12
  %15 = getelementptr inbounds %"class.libspirv::Bytecode", ptr %14, i32 0, i32 2
  %16 = load i32, ptr %15, align 8, !tbaa !14
  %17 = icmp eq i32 %12, %16
  br i1 %17, label %18, label %19

18:                                               ; preds = %2
  br label %21

19:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 712, ptr noundef @__PRETTY_FUNCTION__._ZN8libspirv15MutableBytecode8Iterator6insertERKNS_8BytecodeE) #6
  unreachable

20:                                               ; No predecessors!
  br label %21

21:                                               ; preds = %20, %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %22 = getelementptr inbounds %"struct.libspirv::MutableBytecode::Iterator", ptr %10, i32 0, i32 1
  %23 = load ptr, ptr %22, align 8, !tbaa !12
  %24 = getelementptr inbounds %"class.libspirv::MutableBytecode", ptr %23, i32 0, i32 1
  %25 = call noundef ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  %26 = getelementptr inbounds %"struct.libspirv::Bytecode::Iterator", ptr %10, i32 0, i32 0
  %27 = load ptr, ptr %26, align 8, !tbaa !17
  %28 = call noundef i64 @_ZSt8distanceIPKN8libspirv8Bytecode6OpCodeEENSt15iterator_traitsIT_E15difference_typeES6_S6_(ptr noundef %25, ptr noundef %27)
  store i64 %28, ptr %5, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = call noundef i64 @_ZNK8libspirv8Bytecode4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %29)
  %31 = sub i64 %30, 5
  store i64 %31, ptr %6, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %32 = getelementptr inbounds %"struct.libspirv::MutableBytecode::Iterator", ptr %10, i32 0, i32 1
  %33 = load ptr, ptr %32, align 8, !tbaa !12
  %34 = getelementptr inbounds %"class.libspirv::MutableBytecode", ptr %33, i32 0, i32 1
  store ptr %34, ptr %7, align 8, !tbaa !5
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = call noundef i64 @_ZNKSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #7
  %38 = load i64, ptr %6, align 8, !tbaa !18
  %39 = add i64 %37, %38
  call void @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef %39)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = call noundef i64 @_ZNKSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #7
  %42 = load i64, ptr %6, align 8, !tbaa !18
  %43 = sub i64 %41, %42
  store i64 %43, ptr %8, align 8, !tbaa !18
  br label %44

44:                                               ; preds = %49, %21
  %45 = load i64, ptr %8, align 8, !tbaa !18
  %46 = load i64, ptr %5, align 8, !tbaa !18
  %47 = icmp ugt i64 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %60

49:                                               ; preds = %44
  %50 = load i64, ptr %8, align 8, !tbaa !18
  %51 = add i64 %50, -1
  store i64 %51, ptr %8, align 8, !tbaa !18
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = load i64, ptr %8, align 8, !tbaa !18
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %53) #7
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = load i64, ptr %8, align 8, !tbaa !18
  %57 = load i64, ptr %6, align 8, !tbaa !18
  %58 = add i64 %56, %57
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %58) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %59, ptr align 4 %54, i64 4, i1 false), !tbaa.struct !19
  br label %44, !llvm.loop !22

60:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 0, ptr %9, align 8, !tbaa !18
  br label %61

61:                                               ; preds = %78, %60
  %62 = load i64, ptr %9, align 8, !tbaa !18
  %63 = load i64, ptr %6, align 8, !tbaa !18
  %64 = icmp ult i64 %62, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %81

66:                                               ; preds = %61
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds %"class.libspirv::Bytecode", ptr %67, i32 0, i32 0
  %69 = load ptr, ptr %68, align 8, !tbaa !24
  %70 = load i64, ptr %9, align 8, !tbaa !18
  %71 = add i64 %70, 5
  %72 = getelementptr inbounds %"struct.libspirv::Bytecode::OpCode", ptr %69, i64 %71
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = load i64, ptr %5, align 8, !tbaa !18
  %75 = load i64, ptr %9, align 8, !tbaa !18
  %76 = add i64 %74, %75
  %77 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef %76) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %77, ptr align 4 %72, i64 4, i1 false), !tbaa.struct !19
  br label %78

78:                                               ; preds = %66
  %79 = load i64, ptr %9, align 8, !tbaa !18
  %80 = add i64 %79, 1
  store i64 %80, ptr %9, align 8, !tbaa !18
  br label %61, !llvm.loop !25

81:                                               ; preds = %65
  %82 = load i64, ptr %5, align 8, !tbaa !18
  %83 = load i64, ptr %6, align 8, !tbaa !18
  %84 = add i64 %82, %83
  call void @_ZN8libspirv15MutableBytecode8Iterator18invalidateIteratorEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %84)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK8libspirv8Bytecode4sizeEv(ptr noundef nonnull align 8 dereferenceable(20)) #4 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 = { noreturn nounwind "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 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { noreturn nounwind }
attributes #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"_ZTSN8libspirv8Bytecode8IteratorE", !6, i64 0, !11, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !6, i64 16}
!13 = !{!"_ZTSN8libspirv15MutableBytecode8IteratorE", !10, i64 0, !6, i64 16}
!14 = !{!15, !11, i64 16}
!15 = !{!"_ZTSN8libspirv8BytecodeE", !6, i64 0, !16, i64 8, !11, i64 16}
!16 = !{!"long", !7, i64 0}
!17 = !{!10, !6, i64 0}
!18 = !{!16, !16, i64 0}
!19 = !{i64 0, i64 2, !20, i64 2, i64 2, !20}
!20 = !{!21, !21, i64 0}
!21 = !{!"short", !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!15, !6, i64 0}
!25 = distinct !{!25, !23}


; 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::OpCode" = type { i16, i16 }

@.str.1 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [24 x i8], align 1
@__PRETTY_FUNCTION__._ZN8libspirv15MutableBytecode8Iterator6insertERKNS_8BytecodeE = external hidden unnamed_addr constant [67 x i8], align 1

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 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 uwtable
declare dso_local void @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #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) 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 @_ZN8libspirv15MutableBytecode8Iterator6insertERKNS_8BytecodeE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(20) %1) local_unnamed_addr #3 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  %6 = load ptr, ptr %5, align 8, !tbaa !11
  %7 = getelementptr inbounds i8, ptr %6, i64 16
  %8 = load i32, ptr %7, align 8, !tbaa !13
  %9 = icmp eq i32 %4, %8
  br i1 %9, label %11, label %10

10:                                               ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 712, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8libspirv15MutableBytecode8Iterator6insertERKNS_8BytecodeE) #4
  unreachable

11:                                               ; preds = %2
  %12 = getelementptr inbounds i8, ptr %6, i64 24
  %13 = tail call noundef ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  %14 = load ptr, ptr %0, align 8, !tbaa !16
  %15 = tail call noundef i64 @_ZSt8distanceIPKN8libspirv8Bytecode6OpCodeEENSt15iterator_traitsIT_E15difference_typeES6_S6_(ptr noundef %13, ptr noundef %14)
  %16 = tail call noundef i64 @_ZNK8libspirv8Bytecode4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %1)
  %17 = add i64 %16, -5
  %18 = load ptr, ptr %5, align 8, !tbaa !11
  %19 = getelementptr inbounds i8, ptr %18, i64 24
  %20 = tail call noundef i64 @_ZNKSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #5
  %21 = add i64 %20, %17
  tail call void @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %21)
  %22 = tail call noundef i64 @_ZNKSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #5
  %23 = sub i64 %22, %17
  %24 = icmp ugt i64 %23, %15
  br i1 %24, label %.lr.ph, label %.preheader

.preheader:                                       ; preds = %.lr.ph, %11
  %.not = icmp eq i64 %17, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph29

.lr.ph:                                           ; preds = %11, %.lr.ph
  %.02427 = phi i64 [ %25, %.lr.ph ], [ %23, %11 ]
  %25 = add i64 %.02427, -1
  %26 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %25) #5
  %27 = add i64 %25, %17
  %28 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %27) #5
  %29 = load i32, ptr %26, align 4
  store i32 %29, ptr %28, align 4
  %30 = icmp ugt i64 %25, %15
  br i1 %30, label %.lr.ph, label %.preheader, !llvm.loop !17

._crit_edge:                                      ; preds = %.lr.ph29, %.preheader
  %31 = add i64 %17, %15
  tail call void @_ZN8libspirv15MutableBytecode8Iterator18invalidateIteratorEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %31)
  ret void

.lr.ph29:                                         ; preds = %.preheader, %.lr.ph29
  %.028 = phi i64 [ %38, %.lr.ph29 ], [ 0, %.preheader ]
  %32 = load ptr, ptr %1, align 8, !tbaa !19
  %33 = getelementptr %"struct.libspirv::Bytecode::OpCode", ptr %32, i64 %.028
  %34 = getelementptr i8, ptr %33, i64 20
  %35 = add i64 %.028, %15
  %36 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN8libspirv8Bytecode6OpCodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %35) #5
  %37 = load i32, ptr %34, align 4
  store i32 %37, ptr %36, align 4
  %38 = add nuw i64 %.028, 1
  %exitcond.not = icmp eq i64 %38, %17
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph29, !llvm.loop !20
}

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

attributes #0 = { 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 #1 = { noreturn nounwind "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 = { noreturn nounwind }
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, !10, i64 8}
!6 = !{!"_ZTSN8libspirv8Bytecode8IteratorE", !7, i64 0, !10, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !7, i64 16}
!12 = !{!"_ZTSN8libspirv15MutableBytecode8IteratorE", !6, i64 0, !7, i64 16}
!13 = !{!14, !10, i64 16}
!14 = !{!"_ZTSN8libspirv8BytecodeE", !7, i64 0, !15, i64 8, !10, i64 16}
!15 = !{!"long", !8, i64 0}
!16 = !{!6, !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!14, !7, i64 0}
!20 = distinct !{!20, !18}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass