; LLVM IR from NVIDIA/DALI :: third_party/opencv/exif/exif.ll (ZN4dali2cv10ExifReader9parseExifEv)

; 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.dali::cv::ExifEntry_t" = type { %"class.std::vector", %"class.std::__cxx11::basic_string", float, double, i32, i32, i16, i16, i16, i8, i8 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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] }
%"struct.std::pair.13" = type { i16, %"struct.dali::cv::ExifEntry_t" }
%"struct.std::pair.11" = type <{ %"struct.std::_Rb_tree_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"class.dali::cv::ExifReader" = type <{ %"class.std::vector.3", %"class.std::map", i32, [4 x i8] }>
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = 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.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, dali::cv::ExifEntry_t>, std::_Select1st<std::pair<const int, dali::cv::ExifEntry_t>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, dali::cv::ExifEntry_t>, std::_Select1st<std::pair<const int, dali::cv::ExifEntry_t>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali2cv10ExifReader9parseExifEv(ptr noundef nonnull align 8 dereferenceable(76) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"struct.dali::cv::ExifEntry_t", align 8
  %7 = alloca %"struct.std::pair.13", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::pair.11", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr %2, align 8
  %12 = call noundef i32 @_ZNK4dali2cv10ExifReader9getFormatEv(ptr noundef nonnull align 8 dereferenceable(76) %11)
  %13 = getelementptr inbounds %"class.dali::cv::ExifReader", ptr %11, i32 0, i32 2
  store i32 %12, ptr %13, align 8, !tbaa !9
  %14 = call noundef zeroext i1 @_ZNK4dali2cv10ExifReader12checkTagMarkEv(ptr noundef nonnull align 8 dereferenceable(76) %11)
  br i1 %14, label %16, label %15

15:                                               ; preds = %1
  br label %57

16:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %17 = call noundef i32 @_ZNK4dali2cv10ExifReader14getStartOffsetEv(ptr noundef nonnull align 8 dereferenceable(76) %11)
  store i32 %17, ptr %3, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %18 = load i32, ptr %3, align 4, !tbaa !25
  %19 = zext i32 %18 to i64
  %20 = call noundef i64 @_ZNK4dali2cv10ExifReader14getNumDirEntryEm(ptr noundef nonnull align 8 dereferenceable(76) %11, i64 noundef %19)
  store i64 %20, ptr %4, align 8, !tbaa !27
  %21 = load i32, ptr %3, align 4, !tbaa !25
  %22 = add i32 %21, 2
  store i32 %22, ptr %3, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store i64 0, ptr %5, align 8, !tbaa !27
  br label %23

23:                                               ; preds = %44, %16
  %24 = load i64, ptr %5, align 8, !tbaa !27
  %25 = load i64, ptr %4, align 8, !tbaa !27
  %26 = icmp ult i64 %24, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %56

28:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 88, ptr %6) #4
  %29 = load i32, ptr %3, align 4, !tbaa !25
  %30 = zext i32 %29 to i64
  call void @_ZN4dali2cv10ExifReader14parseExifEntryEm(ptr dead_on_unwind writable sret(%"struct.dali::cv::ExifEntry_t") align 8 %6, ptr noundef nonnull align 8 dereferenceable(76) %11, i64 noundef %30)
  %31 = getelementptr inbounds %"class.dali::cv::ExifReader", ptr %11, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 96, ptr %7) #4
  %32 = getelementptr inbounds %"struct.dali::cv::ExifEntry_t", ptr %6, i32 0, i32 6
  invoke void @_ZSt9make_pairIRtRN4dali2cv11ExifEntry_tEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS6_INS7_IT0_E4typeEE6__typeEEOS8_OSD_(ptr dead_on_unwind writable sret(%"struct.std::pair.13") align 8 %7, ptr noundef nonnull align 2 dereferenceable(2) %32, ptr noundef nonnull align 8 dereferenceable(88) %6)
          to label %33 unwind label %47

33:                                               ; preds = %28
  %34 = invoke { ptr, i8 } @_ZNSt3mapIiN4dali2cv11ExifEntry_tESt4lessIiESaISt4pairIKiS2_EEE6insertIS5_ItS2_EEENSt9enable_ifIXsr16is_constructibleIS7_T_EE5valueES5_ISt17_Rb_tree_iteratorIS7_EbEE4typeEOSD_(ptr noundef nonnull align 8 dereferenceable(48) %31, ptr noundef nonnull align 8 dereferenceable(96) %7)
          to label %35 unwind label %51

35:                                               ; preds = %33
  %36 = getelementptr inbounds { ptr, i8 }, ptr %10, i32 0, i32 0
  %37 = extractvalue { ptr, i8 } %34, 0
  store ptr %37, ptr %36, align 8
  %38 = getelementptr inbounds { ptr, i8 }, ptr %10, i32 0, i32 1
  %39 = extractvalue { ptr, i8 } %34, 1
  store i8 %39, ptr %38, align 8
  call void @_ZNSt4pairItN4dali2cv11ExifEntry_tEED2Ev(ptr noundef nonnull align 8 dereferenceable(96) %7) #4
  call void @llvm.lifetime.end.p0(i64 96, ptr %7) #4
  %40 = load i32, ptr %3, align 4, !tbaa !25
  %41 = zext i32 %40 to i64
  %42 = add i64 %41, 12
  %43 = trunc i64 %42 to i32
  store i32 %43, ptr %3, align 4, !tbaa !25
  call void @_ZN4dali2cv11ExifEntry_tD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %6) #4
  call void @llvm.lifetime.end.p0(i64 88, ptr %6) #4
  br label %44

44:                                               ; preds = %35
  %45 = load i64, ptr %5, align 8, !tbaa !27
  %46 = add i64 %45, 1
  store i64 %46, ptr %5, align 8, !tbaa !27
  br label %23, !llvm.loop !28

47:                                               ; preds = %28
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %8, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %9, align 4
  br label %55

51:                                               ; preds = %33
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %8, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %9, align 4
  call void @_ZNSt4pairItN4dali2cv11ExifEntry_tEED2Ev(ptr noundef nonnull align 8 dereferenceable(96) %7) #4
  br label %55

55:                                               ; preds = %51, %47
  call void @llvm.lifetime.end.p0(i64 96, ptr %7) #4
  call void @_ZN4dali2cv11ExifEntry_tD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %6) #4
  call void @llvm.lifetime.end.p0(i64 88, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %58

56:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %57

57:                                               ; preds = %56, %15
  ret void

58:                                               ; preds = %55
  %59 = load ptr, ptr %8, align 8
  %60 = load i32, ptr %9, align 4
  %61 = insertvalue { ptr, i32 } poison, ptr %59, 0
  %62 = insertvalue { ptr, i32 } %61, i32 %60, 1
  resume { ptr, i32 } %62
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4dali2cv10ExifReader12checkTagMarkEv(ptr noundef nonnull align 8 dereferenceable(76)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK4dali2cv10ExifReader14getStartOffsetEv(ptr noundef nonnull align 8 dereferenceable(76)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali2cv10ExifReader14parseExifEntryEm(ptr dead_on_unwind noalias writable sret(%"struct.dali::cv::ExifEntry_t") align 8, ptr noundef nonnull align 8 dereferenceable(76), i64 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3mapIiN4dali2cv11ExifEntry_tESt4lessIiESaISt4pairIKiS2_EEE6insertIS5_ItS2_EEENSt9enable_ifIXsr16is_constructibleIS7_T_EE5valueES5_ISt17_Rb_tree_iteratorIS7_EbEE4typeEOSD_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(96)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIRtRN4dali2cv11ExifEntry_tEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS6_INS7_IT0_E4typeEE6__typeEEOS8_OSD_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.13") align 8, ptr noundef nonnull align 2 dereferenceable(2), ptr noundef nonnull align 8 dereferenceable(88)) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 = { 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 = { 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, !24, i64 72}
!10 = !{!"_ZTSN4dali2cv10ExifReaderE", !11, i64 0, !15, i64 24, !24, i64 72}
!11 = !{!"_ZTSSt6vectorIhSaIhEE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!"_ZTSSt3mapIiN4dali2cv11ExifEntry_tESt4lessIiESaISt4pairIKiS2_EEE", !16, i64 0}
!16 = !{!"_ZTSSt8_Rb_treeIiSt4pairIKiN4dali2cv11ExifEntry_tEESt10_Select1stIS5_ESt4lessIiESaIS5_EE", !17, i64 0}
!17 = !{!"_ZTSNSt8_Rb_treeIiSt4pairIKiN4dali2cv11ExifEntry_tEESt10_Select1stIS5_ESt4lessIiESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !18, i64 0, !20, i64 8}
!18 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !19, i64 0}
!19 = !{!"_ZTSSt4lessIiE"}
!20 = !{!"_ZTSSt15_Rb_tree_header", !21, i64 0, !23, i64 32}
!21 = !{!"_ZTSSt18_Rb_tree_node_base", !22, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!22 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!23 = !{!"long", !7, i64 0}
!24 = !{!"_ZTSN4dali2cv11Endianess_tE", !7, i64 0}
!25 = !{!26, !26, i64 0}
!26 = !{!"int", !7, i64 0}
!27 = !{!23, !23, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.dali::cv::ExifEntry_t" = type { %"class.std::vector", %"class.std::__cxx11::basic_string", float, double, i32, i32, i16, i16, i16, i8, i8 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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] }
%"struct.std::pair.13" = type { i16, %"struct.dali::cv::ExifEntry_t" }

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

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare dso_local void @_ZN4dali2cv11ExifEntry_tD2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali2cv10ExifReader9parseExifEv(ptr noundef nonnull align 8 dereferenceable(76) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"struct.dali::cv::ExifEntry_t", align 8
  %3 = alloca %"struct.std::pair.13", align 8
  %4 = tail call noundef i32 @_ZNK4dali2cv10ExifReader9getFormatEv(ptr noundef nonnull align 8 dereferenceable(76) %0)
  %5 = getelementptr inbounds i8, ptr %0, i64 72
  store i32 %4, ptr %5, align 8, !tbaa !5
  %6 = tail call noundef zeroext i1 @_ZNK4dali2cv10ExifReader12checkTagMarkEv(ptr noundef nonnull align 8 dereferenceable(76) %0)
  br i1 %6, label %7, label %.loopexit

7:                                                ; preds = %1
  %8 = tail call noundef i32 @_ZNK4dali2cv10ExifReader14getStartOffsetEv(ptr noundef nonnull align 8 dereferenceable(76) %0)
  %9 = zext i32 %8 to i64
  %10 = tail call noundef i64 @_ZNK4dali2cv10ExifReader14getNumDirEntryEm(ptr noundef nonnull align 8 dereferenceable(76) %0, i64 noundef %9)
  %.not = icmp eq i64 %10, 0
  br i1 %.not, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %7
  %11 = add i32 %8, 2
  %12 = getelementptr inbounds i8, ptr %2, i64 80
  %13 = getelementptr inbounds i8, ptr %0, i64 24
  br label %14

14:                                               ; preds = %.lr.ph, %18
  %.014 = phi i32 [ %11, %.lr.ph ], [ %19, %18 ]
  %.0913 = phi i64 [ 0, %.lr.ph ], [ %20, %18 ]
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %2) #4
  %15 = zext i32 %.014 to i64
  call void @_ZN4dali2cv10ExifReader14parseExifEntryEm(ptr dead_on_unwind nonnull writable sret(%"struct.dali::cv::ExifEntry_t") align 8 %2, ptr noundef nonnull align 8 dereferenceable(76) %0, i64 noundef %15)
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %3) #4
  invoke void @_ZSt9make_pairIRtRN4dali2cv11ExifEntry_tEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS6_INS7_IT0_E4typeEE6__typeEEOS8_OSD_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.13") align 8 %3, ptr noundef nonnull align 2 dereferenceable(2) %12, ptr noundef nonnull align 8 dereferenceable(88) %2)
          to label %16 unwind label %21

16:                                               ; preds = %14
  %17 = invoke { ptr, i8 } @_ZNSt3mapIiN4dali2cv11ExifEntry_tESt4lessIiESaISt4pairIKiS2_EEE6insertIS5_ItS2_EEENSt9enable_ifIXsr16is_constructibleIS7_T_EE5valueES5_ISt17_Rb_tree_iteratorIS7_EbEE4typeEOSD_(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 8 dereferenceable(96) %3)
          to label %18 unwind label %23

18:                                               ; preds = %16
  call void @_ZNSt4pairItN4dali2cv11ExifEntry_tEED2Ev(ptr noundef nonnull align 8 dereferenceable(96) %3) #4
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %3) #4
  %19 = add i32 %.014, 12
  call void @_ZN4dali2cv11ExifEntry_tD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %2) #4
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %2) #4
  %20 = add nuw i64 %.0913, 1
  %exitcond.not = icmp eq i64 %20, %10
  br i1 %exitcond.not, label %.loopexit, label %14, !llvm.loop !24

21:                                               ; preds = %14
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %25

23:                                               ; preds = %16
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairItN4dali2cv11ExifEntry_tEED2Ev(ptr noundef nonnull align 8 dereferenceable(96) %3) #4
  br label %25

25:                                               ; preds = %23, %21
  %.pn = phi { ptr, i32 } [ %24, %23 ], [ %22, %21 ]
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %3) #4
  call void @_ZN4dali2cv11ExifEntry_tD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %2) #4
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %2) #4
  resume { ptr, i32 } %.pn

.loopexit:                                        ; preds = %18, %7, %1
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4dali2cv10ExifReader12checkTagMarkEv(ptr noundef nonnull align 8 dereferenceable(76)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK4dali2cv10ExifReader14getStartOffsetEv(ptr noundef nonnull align 8 dereferenceable(76)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali2cv10ExifReader14parseExifEntryEm(ptr dead_on_unwind noalias writable sret(%"struct.dali::cv::ExifEntry_t") align 8, ptr noundef nonnull align 8 dereferenceable(76), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3mapIiN4dali2cv11ExifEntry_tESt4lessIiESaISt4pairIKiS2_EEE6insertIS5_ItS2_EEENSt9enable_ifIXsr16is_constructibleIS7_T_EE5valueES5_ISt17_Rb_tree_iteratorIS7_EbEE4typeEOSD_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIRtRN4dali2cv11ExifEntry_tEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS6_INS7_IT0_E4typeEE6__typeEEOS8_OSD_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.13") align 8, ptr noundef nonnull align 2 dereferenceable(2), ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 = { 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 = { 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, !23, i64 72}
!6 = !{!"_ZTSN4dali2cv10ExifReaderE", !7, i64 0, !14, i64 24, !23, i64 72}
!7 = !{!"_ZTSSt6vectorIhSaIhEE", !8, i64 0}
!8 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !9, i64 0}
!9 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"_ZTSSt3mapIiN4dali2cv11ExifEntry_tESt4lessIiESaISt4pairIKiS2_EEE", !15, i64 0}
!15 = !{!"_ZTSSt8_Rb_treeIiSt4pairIKiN4dali2cv11ExifEntry_tEESt10_Select1stIS5_ESt4lessIiESaIS5_EE", !16, i64 0}
!16 = !{!"_ZTSNSt8_Rb_treeIiSt4pairIKiN4dali2cv11ExifEntry_tEESt10_Select1stIS5_ESt4lessIiESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !17, i64 0, !19, i64 8}
!17 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !18, i64 0}
!18 = !{!"_ZTSSt4lessIiE"}
!19 = !{!"_ZTSSt15_Rb_tree_header", !20, i64 0, !22, i64 32}
!20 = !{!"_ZTSSt18_Rb_tree_node_base", !21, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!21 = !{!"_ZTSSt14_Rb_tree_color", !12, i64 0}
!22 = !{!"long", !12, i64 0}
!23 = !{!"_ZTSN4dali2cv11Endianess_tE", !12, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}


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