; LLVM IR from Lut1n/ImpGears :: src/ImpGears/Descriptors (ImageIO)

; 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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3imp20decode_packet_headerEhRbRi(i8 noundef zeroext, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp6readU8ERSt14basic_ifstreamIcSt11char_traitsIcEERSt6vectorIhSaIhEEi(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp10readU8_rleERSt14basic_ifstreamIcSt11char_traitsIcEEPhii(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3) #2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca i8, align 1
  %12 = alloca %"class.std::vector", align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #4
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %19

19:                                               ; preds = %86, %4
  %20 = load i32, ptr %13, align 4, !tbaa !9
  %21 = load i32, ptr %7, align 4, !tbaa !9
  %22 = icmp slt i32 %20, %21
  br i1 %22, label %23, label %87

23:                                               ; preds = %19
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef %11, i64 noundef 1)
          to label %26 unwind label %39

26:                                               ; preds = %23
  %27 = load i8, ptr %11, align 1, !tbaa !11
  call void @_ZN3imp20decode_packet_headerEhRbRi(i8 noundef zeroext %27, ptr noundef nonnull align 1 dereferenceable(1) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %28 = load i8, ptr %9, align 1, !tbaa !12, !range !14, !noundef !15
  %29 = trunc i8 %28 to i1
  br i1 %29, label %30, label %71

30:                                               ; preds = %26
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @_ZN3imp6readU8ERSt14basic_ifstreamIcSt11char_traitsIcEERSt6vectorIhSaIhEEi(ptr noundef nonnull align 8 dereferenceable(256) %31, ptr noundef nonnull align 8 dereferenceable(24) %12, i32 noundef %32)
          to label %33 unwind label %39

33:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %34

34:                                               ; preds = %67, %33
  %35 = load i32, ptr %16, align 4, !tbaa !9
  %36 = load i32, ptr %10, align 4, !tbaa !9
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %43, label %38

38:                                               ; preds = %34
  store i32 4, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %70

39:                                               ; preds = %71, %30, %23
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %14, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #4
  br label %88

43:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %60, %43
  %45 = load i32, ptr %18, align 4, !tbaa !9
  %46 = load i32, ptr %8, align 4, !tbaa !9
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  store i32 7, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %63

49:                                               ; preds = %44
  %50 = load i32, ptr %18, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %51) #4
  %53 = load i8, ptr %52, align 1, !tbaa !11
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = load i32, ptr %13, align 4, !tbaa !9
  %56 = load i32, ptr %18, align 4, !tbaa !9
  %57 = add nsw i32 %55, %56
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds i8, ptr %54, i64 %58
  store i8 %53, ptr %59, align 1, !tbaa !11
  br label %60

60:                                               ; preds = %49
  %61 = load i32, ptr %18, align 4, !tbaa !9
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %18, align 4, !tbaa !9
  br label %44, !llvm.loop !16

63:                                               ; preds = %48
  %64 = load i32, ptr %8, align 4, !tbaa !9
  %65 = load i32, ptr %13, align 4, !tbaa !9
  %66 = add nsw i32 %65, %64
  store i32 %66, ptr %13, align 4, !tbaa !9
  br label %67

67:                                               ; preds = %63
  %68 = load i32, ptr %16, align 4, !tbaa !9
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %16, align 4, !tbaa !9
  br label %34, !llvm.loop !18

70:                                               ; preds = %38
  br label %86

71:                                               ; preds = %26
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = load i32, ptr %13, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i8, ptr %73, i64 %75
  %77 = load i32, ptr %10, align 4, !tbaa !9
  %78 = load i32, ptr %8, align 4, !tbaa !9
  %79 = mul nsw i32 %77, %78
  invoke void @_ZN3imp6readU8ERSt14basic_ifstreamIcSt11char_traitsIcEEPhi(ptr noundef nonnull align 8 dereferenceable(256) %72, ptr noundef %76, i32 noundef %79)
          to label %80 unwind label %39

80:                                               ; preds = %71
  %81 = load i32, ptr %10, align 4, !tbaa !9
  %82 = load i32, ptr %8, align 4, !tbaa !9
  %83 = mul nsw i32 %81, %82
  %84 = load i32, ptr %13, align 4, !tbaa !9
  %85 = add nsw i32 %84, %83
  store i32 %85, ptr %13, align 4, !tbaa !9
  br label %86

86:                                               ; preds = %80, %70
  br label %19, !llvm.loop !19

87:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #4
  ret void

88:                                               ; preds = %39
  %89 = load ptr, ptr %14, align 8
  %90 = load i32, ptr %15, align 4
  %91 = insertvalue { ptr, i32 } poison, ptr %89, 0
  %92 = insertvalue { ptr, i32 } %91, i32 %90, 1
  resume { ptr, i32 } %92
}

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = !{!"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 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}


; 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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3imp20decode_packet_headerEhRbRi(i8 noundef zeroext, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp6readU8ERSt14basic_ifstreamIcSt11char_traitsIcEERSt6vectorIhSaIhEEi(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp10readU8_rleERSt14basic_ifstreamIcSt11char_traitsIcEEPhii(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i8, align 1
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca %"class.std::vector", align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  %9 = icmp sgt i32 %2, 0
  br i1 %9, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %4
  %10 = icmp sgt i32 %3, 0
  br i1 %10, label %.lr.ph.split.us.preheader, label %.lr.ph.split

.lr.ph.split.us.preheader:                        ; preds = %.lr.ph
  %11 = zext nneg i32 %3 to i64
  %wide.trip.count = zext nneg i32 %3 to i64
  br label %.lr.ph.split.us

.lr.ph.split.us:                                  ; preds = %.lr.ph.split.us.preheader, %.loopexit.us
  %.02430.us = phi i32 [ %.2.us, %.loopexit.us ], [ 0, %.lr.ph.split.us.preheader ]
  %12 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull %7, i64 noundef 1)
          to label %13 unwind label %.split.us

13:                                               ; preds = %.lr.ph.split.us
  %14 = load i8, ptr %7, align 1, !tbaa !5
  call void @_ZN3imp20decode_packet_headerEhRbRi(i8 noundef zeroext %14, ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %15 = load i8, ptr %5, align 1, !tbaa !8, !range !10, !noundef !11
  %16 = trunc nuw i8 %15 to i1
  br i1 %16, label %26, label %17

17:                                               ; preds = %13
  %18 = sext i32 %.02430.us to i64
  %19 = getelementptr inbounds i8, ptr %1, i64 %18
  %20 = load i32, ptr %6, align 4, !tbaa !12
  %21 = mul nsw i32 %20, %3
  invoke void @_ZN3imp6readU8ERSt14basic_ifstreamIcSt11char_traitsIcEEPhi(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef %19, i32 noundef %21)
          to label %22 unwind label %.split.us

22:                                               ; preds = %17
  %23 = load i32, ptr %6, align 4, !tbaa !12
  %24 = mul nsw i32 %23, %3
  %25 = add nsw i32 %24, %.02430.us
  br label %.loopexit.us

26:                                               ; preds = %13
  invoke void @_ZN3imp6readU8ERSt14basic_ifstreamIcSt11char_traitsIcEERSt6vectorIhSaIhEEi(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %3)
          to label %.preheader26.us unwind label %.split.us

.loopexit.us.loopexit:                            ; preds = %._crit_edge.us.us
  %27 = trunc nsw i64 %indvars.iv.next36 to i32
  br label %.loopexit.us

.loopexit.us:                                     ; preds = %.loopexit.us.loopexit, %.preheader26.us, %22
  %.2.us = phi i32 [ %25, %22 ], [ %.02430.us, %.preheader26.us ], [ %27, %.loopexit.us.loopexit ]
  %28 = icmp slt i32 %.2.us, %2
  br i1 %28, label %.lr.ph.split.us, label %._crit_edge, !llvm.loop !14

.preheader26.us:                                  ; preds = %26
  %29 = load i32, ptr %6, align 4, !tbaa !12
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %.preheader.us.us.preheader, label %.loopexit.us

.preheader.us.us.preheader:                       ; preds = %.preheader26.us
  %31 = sext i32 %.02430.us to i64
  br label %.preheader.us.us

.preheader.us.us:                                 ; preds = %.preheader.us.us.preheader, %._crit_edge.us.us
  %indvars.iv35 = phi i64 [ %31, %.preheader.us.us.preheader ], [ %indvars.iv.next36, %._crit_edge.us.us ]
  %.02329.us.us = phi i32 [ 0, %.preheader.us.us.preheader ], [ %35, %._crit_edge.us.us ]
  %invariant.gep = getelementptr i8, ptr %1, i64 %indvars.iv35
  br label %32

32:                                               ; preds = %32, %.preheader.us.us
  %indvars.iv = phi i64 [ %indvars.iv.next, %32 ], [ 0, %.preheader.us.us ]
  %33 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv) #4
  %34 = load i8, ptr %33, align 1, !tbaa !5
  %gep = getelementptr i8, ptr %invariant.gep, i64 %indvars.iv
  store i8 %34, ptr %gep, align 1, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.us.us, label %32, !llvm.loop !16

._crit_edge.us.us:                                ; preds = %32
  %indvars.iv.next36 = add nsw i64 %indvars.iv35, %11
  %35 = add nuw nsw i32 %.02329.us.us, 1
  %36 = load i32, ptr %6, align 4, !tbaa !12
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %.preheader.us.us, label %.loopexit.us.loopexit, !llvm.loop !17

.split.us:                                        ; preds = %26, %17, %.lr.ph.split.us
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %50

.lr.ph.split:                                     ; preds = %.lr.ph, %.loopexit
  %.02430 = phi i32 [ %.2, %.loopexit ], [ 0, %.lr.ph ]
  %39 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull %7, i64 noundef 1)
          to label %40 unwind label %.split

40:                                               ; preds = %.lr.ph.split
  %41 = load i8, ptr %7, align 1, !tbaa !5
  call void @_ZN3imp20decode_packet_headerEhRbRi(i8 noundef zeroext %41, ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %42 = load i8, ptr %5, align 1, !tbaa !8, !range !10, !noundef !11
  %43 = trunc nuw i8 %42 to i1
  br i1 %43, label %44, label %51

44:                                               ; preds = %40
  invoke void @_ZN3imp6readU8ERSt14basic_ifstreamIcSt11char_traitsIcEERSt6vectorIhSaIhEEi(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %3)
          to label %.preheader26 unwind label %.split

.preheader26:                                     ; preds = %44
  %45 = load i32, ptr %6, align 4, !tbaa !12
  %46 = icmp sgt i32 %45, 0
  br i1 %46, label %.preheader.lr.ph, label %.loopexit

.preheader.lr.ph:                                 ; preds = %.preheader26
  %47 = mul i32 %45, %3
  %48 = add i32 %.02430, %47
  br label %.loopexit

.split:                                           ; preds = %51, %44, %.lr.ph.split
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %50

50:                                               ; preds = %.split.us, %.split
  %.us-phi31 = phi { ptr, i32 } [ %49, %.split ], [ %38, %.split.us ]
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  resume { ptr, i32 } %.us-phi31

51:                                               ; preds = %40
  %52 = sext i32 %.02430 to i64
  %53 = getelementptr inbounds i8, ptr %1, i64 %52
  %54 = load i32, ptr %6, align 4, !tbaa !12
  %55 = mul nsw i32 %54, %3
  invoke void @_ZN3imp6readU8ERSt14basic_ifstreamIcSt11char_traitsIcEEPhi(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef %53, i32 noundef %55)
          to label %56 unwind label %.split

56:                                               ; preds = %51
  %57 = load i32, ptr %6, align 4, !tbaa !12
  %58 = mul nsw i32 %57, %3
  %59 = add nsw i32 %58, %.02430
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader.lr.ph, %.preheader26, %56
  %.2 = phi i32 [ %59, %56 ], [ %.02430, %.preheader26 ], [ %48, %.preheader.lr.ph ]
  %60 = icmp slt i32 %.2, %2
  br i1 %60, label %.lr.ph.split, label %._crit_edge, !llvm.loop !14

._crit_edge:                                      ; preds = %.loopexit, %.loopexit.us, %4
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  ret void
}

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass