; LLVM IR from NVIDIA/TensorRT :: quickstart/common/util.ll (ZNK4util14RGBImageReader7processEv)

; 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::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.10" }
%"struct.std::_Head_base.10" = type { ptr }
%"class.util::ImageBase" = type { ptr, %"class.nvinfer1::Dims64", %"struct.util::PPM" }
%"class.nvinfer1::Dims64" = type { i32, [8 x i64] }
%"struct.util::PPM" = type { %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, i32, i32, i32, %"class.std::vector" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"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 }
%"class.util::RGBImageReader" = type { %"class.util::ImageBase", %"class.std::vector.4", %"class.std::vector.4" }
%"class.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [46 x i8], align 1
@__PRETTY_FUNCTION__._ZNK4util14RGBImageReader7processEv = external hidden unnamed_addr constant [61 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #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: mustprogress uwtable
define dso_local void @_ZNK4util14RGBImageReader7processEv(ptr dead_on_unwind noalias writable sret(%"class.std::unique_ptr") align 8 %0, ptr noundef nonnull align 8 dereferenceable(232) %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i1, align 1
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %13 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %14 = getelementptr inbounds %"class.util::ImageBase", ptr %13, i32 0, i32 1
  %15 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %14, i32 0, i32 1
  %16 = getelementptr inbounds [8 x i64], ptr %15, i64 0, i64 1
  %17 = load i64, ptr %16, align 8, !tbaa !9
  %18 = trunc i64 %17 to i32
  store i32 %18, ptr %5, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %19 = getelementptr inbounds %"class.util::ImageBase", ptr %13, i32 0, i32 1
  %20 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %19, i32 0, i32 1
  %21 = getelementptr inbounds [8 x i64], ptr %20, i64 0, i64 2
  %22 = load i64, ptr %21, align 8, !tbaa !9
  %23 = trunc i64 %22 to i32
  store i32 %23, ptr %6, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %24 = getelementptr inbounds %"class.util::ImageBase", ptr %13, i32 0, i32 1
  %25 = getelementptr inbounds %"class.nvinfer1::Dims64", ptr %24, i32 0, i32 1
  %26 = getelementptr inbounds [8 x i64], ptr %25, i64 0, i64 3
  %27 = load i64, ptr %26, align 8, !tbaa !9
  %28 = trunc i64 %27 to i32
  store i32 %28, ptr %7, align 4, !tbaa !11
  store i1 false, ptr %8, align 1
  %29 = load ptr, ptr %13, align 8, !tbaa !13
  %30 = getelementptr inbounds ptr, ptr %29, i64 2
  %31 = load ptr, ptr %30, align 8
  %32 = call noundef i64 %31(ptr noundef nonnull align 8 dereferenceable(184) %13)
  %33 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %32, i64 4)
  %34 = extractvalue { i64, i1 } %33, 1
  %35 = extractvalue { i64, i1 } %33, 0
  %36 = select i1 %34, i64 -1, i64 %35
  %37 = call noalias noundef nonnull ptr @_Znam(i64 noundef %36) #7
  call void @_ZNSt10unique_ptrIfSt14default_deleteIfEEC2IS1_vEEPf(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %37) #6
  %38 = getelementptr inbounds %"class.util::ImageBase", ptr %13, i32 0, i32 2
  %39 = getelementptr inbounds %"struct.util::PPM", ptr %38, i32 0, i32 3
  %40 = load i32, ptr %39, align 4, !tbaa !15
  %41 = load i32, ptr %6, align 4, !tbaa !11
  %42 = icmp eq i32 %40, %41
  br i1 %42, label %43, label %109

43:                                               ; preds = %2
  %44 = getelementptr inbounds %"class.util::ImageBase", ptr %13, i32 0, i32 2
  %45 = getelementptr inbounds %"struct.util::PPM", ptr %44, i32 0, i32 4
  %46 = load i32, ptr %45, align 8, !tbaa !25
  %47 = load i32, ptr %7, align 4, !tbaa !11
  %48 = icmp eq i32 %46, %47
  br i1 %48, label %49, label %109

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

50:                                               ; preds = %105, %49
  %51 = load i32, ptr %9, align 4, !tbaa !11
  %52 = load i32, ptr %5, align 4, !tbaa !11
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %108

55:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %56 = load i32, ptr %6, align 4, !tbaa !11
  %57 = load i32, ptr %7, align 4, !tbaa !11
  %58 = mul nsw i32 %56, %57
  store i32 %58, ptr %12, align 4, !tbaa !11
  br label %59

59:                                               ; preds = %101, %55
  %60 = load i32, ptr %11, align 4, !tbaa !11
  %61 = load i32, ptr %12, align 4, !tbaa !11
  %62 = icmp slt i32 %60, %61
  br i1 %62, label %64, label %63

63:                                               ; preds = %59
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %104

64:                                               ; preds = %59
  %65 = getelementptr inbounds %"class.util::ImageBase", ptr %13, i32 0, i32 2
  %66 = getelementptr inbounds %"struct.util::PPM", ptr %65, i32 0, i32 6
  %67 = load i32, ptr %11, align 4, !tbaa !11
  %68 = load i32, ptr %5, align 4, !tbaa !11
  %69 = mul nsw i32 %67, %68
  %70 = load i32, ptr %9, align 4, !tbaa !11
  %71 = add nsw i32 %69, %70
  %72 = sext i32 %71 to i64
  %73 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %72) #6
  %74 = load i8, ptr %73, align 1, !tbaa !26
  %75 = uitofp i8 %74 to float
  %76 = getelementptr inbounds %"class.util::ImageBase", ptr %13, i32 0, i32 2
  %77 = getelementptr inbounds %"struct.util::PPM", ptr %76, i32 0, i32 5
  %78 = load i32, ptr %77, align 4, !tbaa !27
  %79 = sitofp i32 %78 to float
  %80 = fdiv float %75, %79
  %81 = getelementptr inbounds %"class.util::RGBImageReader", ptr %13, i32 0, i32 1
  %82 = load i32, ptr %9, align 4, !tbaa !11
  %83 = sext i32 %82 to i64
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %83) #6
  %85 = load float, ptr %84, align 4, !tbaa !28
  %86 = fsub float %80, %85
  %87 = getelementptr inbounds %"class.util::RGBImageReader", ptr %13, i32 0, i32 2
  %88 = load i32, ptr %9, align 4, !tbaa !11
  %89 = sext i32 %88 to i64
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %87, i64 noundef %89) #6
  %91 = load float, ptr %90, align 4, !tbaa !28
  %92 = fdiv float %86, %91
  %93 = call noundef ptr @_ZNKSt10unique_ptrIfSt14default_deleteIfEE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  %94 = load i32, ptr %9, align 4, !tbaa !11
  %95 = load i32, ptr %12, align 4, !tbaa !11
  %96 = mul nsw i32 %94, %95
  %97 = load i32, ptr %11, align 4, !tbaa !11
  %98 = add nsw i32 %96, %97
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds float, ptr %93, i64 %99
  store float %92, ptr %100, align 4, !tbaa !28
  br label %101

101:                                              ; preds = %64
  %102 = load i32, ptr %11, align 4, !tbaa !11
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %11, align 4, !tbaa !11
  br label %59, !llvm.loop !30

104:                                              ; preds = %63
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %9, align 4, !tbaa !11
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %9, align 4, !tbaa !11
  br label %50, !llvm.loop !32

108:                                              ; preds = %54
  br label %110

109:                                              ; preds = %43, %2
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 103, ptr noundef @__PRETTY_FUNCTION__._ZNK4util14RGBImageReader7processEv) #8
  unreachable

110:                                              ; preds = %108
  store i1 true, ptr %8, align 1
  store i32 1, ptr %10, align 4
  %111 = load i1, ptr %8, align 1
  br i1 %111, label %113, label %112

112:                                              ; preds = %110
  call void @_ZNSt10unique_ptrIfSt14default_deleteIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  br label %113

113:                                              ; preds = %112, %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #3

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #4

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nobuiltin allocsize(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 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 #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { noreturn 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{!16, !12, i64 148}
!16 = !{!"_ZTSN4util9ImageBaseE", !17, i64 8, !18, i64 80}
!17 = !{!"_ZTSN8nvinfer16Dims64E", !12, i64 0, !7, i64 8}
!18 = !{!"_ZTSN4util3PPME", !19, i64 0, !19, i64 32, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !21, i64 80}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !20, i64 0, !10, i64 8, !7, i64 16}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!21 = !{!"_ZTSSt6vectorIhSaIhEE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!16, !12, i64 152}
!26 = !{!7, !7, i64 0}
!27 = !{!16, !12, i64 156}
!28 = !{!29, !29, i64 0}
!29 = !{!"float", !7, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}


; 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::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.10" }
%"struct.std::_Head_base.10" = type { ptr }

@.str.1 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [46 x i8], align 1
@__PRETTY_FUNCTION__._ZNK4util14RGBImageReader7processEv = external hidden unnamed_addr constant [61 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4util14RGBImageReader7processEv(ptr dead_on_unwind noalias writable sret(%"class.std::unique_ptr") align 8 %0, ptr noundef nonnull align 8 dereferenceable(232) %1) local_unnamed_addr #1 align 2 {
  %3 = getelementptr inbounds i8, ptr %1, i64 24
  %4 = load i64, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %1, i64 32
  %6 = load i64, ptr %5, align 8, !tbaa !5
  %7 = trunc i64 %6 to i32
  %8 = getelementptr inbounds i8, ptr %1, i64 40
  %9 = load i64, ptr %8, align 8, !tbaa !5
  %10 = trunc i64 %9 to i32
  %11 = load ptr, ptr %1, align 8, !tbaa !9
  %12 = getelementptr inbounds i8, ptr %11, i64 16
  %13 = load ptr, ptr %12, align 8
  %14 = tail call noundef i64 %13(ptr noundef nonnull align 8 dereferenceable(184) %1)
  %15 = icmp ugt i64 %14, 4611686018427387903
  %16 = shl nuw i64 %14, 2
  %17 = select i1 %15, i64 -1, i64 %16
  %18 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %17) #4
  tail call void @_ZNSt10unique_ptrIfSt14default_deleteIfEEC2IS1_vEEPf(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %18) #5
  %19 = getelementptr inbounds i8, ptr %1, i64 148
  %20 = load i32, ptr %19, align 4, !tbaa !11
  %21 = icmp eq i32 %20, %7
  %22 = getelementptr inbounds i8, ptr %1, i64 152
  %23 = load i32, ptr %22, align 8
  %24 = icmp eq i32 %23, %10
  %or.cond = select i1 %21, i1 %24, i1 false
  br i1 %or.cond, label %.preheader, label %54

.preheader:                                       ; preds = %2
  %25 = trunc i64 %4 to i32
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %.lr.ph28, label %._crit_edge29

.lr.ph28:                                         ; preds = %.preheader
  %27 = mul nsw i32 %10, %7
  %28 = icmp sgt i32 %27, 0
  %29 = getelementptr inbounds i8, ptr %1, i64 160
  %30 = getelementptr inbounds i8, ptr %1, i64 156
  %31 = getelementptr inbounds i8, ptr %1, i64 184
  %32 = getelementptr inbounds i8, ptr %1, i64 208
  br i1 %28, label %.lr.ph.us.preheader, label %._crit_edge29

.lr.ph.us.preheader:                              ; preds = %.lr.ph28
  %33 = and i64 %4, 2147483647
  %34 = zext nneg i32 %27 to i64
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %._crit_edge.us
  %indvars.iv32 = phi i64 [ 0, %.lr.ph.us.preheader ], [ %indvars.iv.next33, %._crit_edge.us ]
  %35 = mul nuw nsw i64 %indvars.iv32, %34
  br label %36

36:                                               ; preds = %.lr.ph.us, %36
  %indvars.iv = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next, %36 ]
  %37 = mul nuw nsw i64 %indvars.iv, %33
  %38 = add nuw nsw i64 %37, %indvars.iv32
  %39 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %38) #5
  %40 = load i8, ptr %39, align 1, !tbaa !23
  %41 = uitofp i8 %40 to float
  %42 = load i32, ptr %30, align 4, !tbaa !24
  %43 = sitofp i32 %42 to float
  %44 = fdiv float %41, %43
  %45 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %indvars.iv32) #5
  %46 = load float, ptr %45, align 4, !tbaa !25
  %47 = fsub float %44, %46
  %48 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %indvars.iv32) #5
  %49 = load float, ptr %48, align 4, !tbaa !25
  %50 = fdiv float %47, %49
  %51 = tail call noundef ptr @_ZNKSt10unique_ptrIfSt14default_deleteIfEE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #5
  %52 = getelementptr inbounds float, ptr %51, i64 %indvars.iv
  %53 = getelementptr inbounds float, ptr %52, i64 %35
  store float %50, ptr %53, align 4, !tbaa !25
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %34
  br i1 %exitcond.not, label %._crit_edge.us, label %36, !llvm.loop !27

._crit_edge.us:                                   ; preds = %36
  %indvars.iv.next33 = add nuw nsw i64 %indvars.iv32, 1
  %exitcond36.not = icmp eq i64 %indvars.iv.next33, %33
  br i1 %exitcond36.not, label %._crit_edge29, label %.lr.ph.us, !llvm.loop !29

54:                                               ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 103, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK4util14RGBImageReader7processEv) #6
  unreachable

._crit_edge29:                                    ; preds = %._crit_edge.us, %.lr.ph28, %.preheader
  ret void
}

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(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 @_ZNKSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

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

attributes #0 = { 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 #1 = { 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 = { nobuiltin allocsize(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 = { builtin allocsize(0) }
attributes #5 = { nounwind }
attributes #6 = { noreturn 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !14, i64 148}
!12 = !{!"_ZTSN4util9ImageBaseE", !13, i64 8, !15, i64 80}
!13 = !{!"_ZTSN8nvinfer16Dims64E", !14, i64 0, !7, i64 8}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSN4util3PPME", !16, i64 0, !16, i64 32, !14, i64 64, !14, i64 68, !14, i64 72, !14, i64 76, !19, i64 80}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !17, i64 0, !6, i64 8, !7, i64 16}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !18, i64 0}
!18 = !{!"any pointer", !7, i64 0}
!19 = !{!"_ZTSSt6vectorIhSaIhEE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!23 = !{!7, !7, i64 0}
!24 = !{!12, !14, i64 156}
!25 = !{!26, !26, i64 0}
!26 = !{!"float", !7, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}


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