; LLVM IR from NervanaSystems/ngraph :: src/ngraph/cpio.ll (ZN6ngraph4cpio6Reader13get_file_infoEv)

; 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.ngraph::cpio::Header" = type { i16, i16, i16, i16, i16, i16, i16, i16, i32, i16, i32 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.0 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.0 = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.std::fpos" = type { i64, %struct.__mbstate_t }
%struct.__mbstate_t = type { i32, %union.anon.1 }
%union.anon.1 = type { i32 }
%"class.ngraph::cpio::Reader" = type { ptr, %"class.std::basic_ifstream", %"class.std::vector" }
%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ngraph::cpio::FileInfo, std::allocator<ngraph::cpio::FileInfo>>::_Vector_impl" }
%"struct.std::_Vector_base<ngraph::cpio::FileInfo, std::allocator<ngraph::cpio::FileInfo>>::_Vector_impl" = type { %"struct.std::_Vector_base<ngraph::cpio::FileInfo, std::allocator<ngraph::cpio::FileInfo>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ngraph::cpio::FileInfo, std::allocator<ngraph::cpio::FileInfo>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ngraph4cpio6Header4readERSi(ptr dead_on_unwind noalias writable sret(%"class.ngraph::cpio::Header") align 4, ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

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

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

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) #1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgElSt12_Ios_Seekdir(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN6ngraph4cpio6Reader13get_file_infoEv(ptr noundef nonnull align 8 dereferenceable(552) %0) #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.ngraph::cpio::Header", align 4
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca %"class.std::fpos", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %12 = load ptr, ptr %2, align 8
  %13 = getelementptr inbounds %"class.ngraph::cpio::Reader", ptr %12, i32 0, i32 2
  %14 = call noundef zeroext i1 @_ZNKSt6vectorIN6ngraph4cpio8FileInfoESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  br i1 %14, label %15, label %112

15:                                               ; preds = %1
  br label %16

16:                                               ; preds = %99, %15
  %17 = getelementptr inbounds %"class.ngraph::cpio::Reader", ptr %12, i32 0, i32 0
  %18 = load ptr, ptr %17, align 8, !tbaa !9
  %19 = load ptr, ptr %18, align 8, !tbaa !26
  %20 = getelementptr i8, ptr %19, i64 -24
  %21 = load i64, ptr %20, align 8
  %22 = getelementptr inbounds i8, ptr %18, i64 %21
  %23 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %22)
  br i1 %23, label %24, label %111

24:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 28, ptr %3) #7
  %25 = getelementptr inbounds %"class.ngraph::cpio::Reader", ptr %12, i32 0, i32 0
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  call void @_ZN6ngraph4cpio6Header4readERSi(ptr dead_on_unwind writable sret(%"class.ngraph::cpio::Header") align 4 %3, ptr noundef nonnull align 8 dereferenceable(16) %26)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %27 = getelementptr inbounds %"class.ngraph::cpio::Header", ptr %3, i32 0, i32 9
  %28 = load i16, ptr %27, align 4, !tbaa !28
  %29 = zext i16 %28 to i64
  %30 = call noalias noundef nonnull ptr @_Znam(i64 noundef %29) #8
  store ptr %30, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %"class.ngraph::cpio::Reader", ptr %12, i32 0, i32 0
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %"class.ngraph::cpio::Header", ptr %3, i32 0, i32 9
  %35 = load i16, ptr %34, align 4, !tbaa !28
  %36 = zext i16 %35 to i64
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef %33, i64 noundef %36)
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #7
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %"class.ngraph::cpio::Header", ptr %3, i32 0, i32 9
  %40 = load i16, ptr %39, align 4, !tbaa !28
  %41 = zext i16 %40 to i32
  %42 = sub nsw i32 %41, 1
  %43 = sext i32 %42 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %38, i64 noundef %43, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %44 unwind label %59

44:                                               ; preds = %24
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = icmp eq ptr %45, null
  br i1 %46, label %48, label %47

47:                                               ; preds = %44
  call void @_ZdaPv(ptr noundef %45) #9
  br label %48

48:                                               ; preds = %47, %44
  %49 = getelementptr inbounds %"class.ngraph::cpio::Header", ptr %3, i32 0, i32 9
  %50 = load i16, ptr %49, align 4, !tbaa !28
  %51 = zext i16 %50 to i32
  %52 = srem i32 %51, 2
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %67

54:                                               ; preds = %48
  %55 = getelementptr inbounds %"class.ngraph::cpio::Reader", ptr %12, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  %57 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgElSt12_Ios_Seekdir(ptr noundef nonnull align 8 dereferenceable(16) %56, i64 noundef 1, i32 noundef 1)
          to label %58 unwind label %63

58:                                               ; preds = %54
  br label %67

59:                                               ; preds = %24
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %7, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  br label %110

63:                                               ; preds = %67, %54
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %7, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %8, align 4
  br label %109

67:                                               ; preds = %58, %48
  %68 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef @.str.3)
          to label %69 unwind label %63

69:                                               ; preds = %67
  br i1 %68, label %70, label %71

70:                                               ; preds = %69
  store i32 3, ptr %9, align 4
  br label %97

71:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #7
  %72 = getelementptr inbounds %"class.ngraph::cpio::Reader", ptr %12, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  %74 = invoke { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16) %73)
          to label %75 unwind label %100

75:                                               ; preds = %71
  %76 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 0
  %77 = extractvalue { i64, i64 } %74, 0
  store i64 %77, ptr %76, align 8
  %78 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 1
  %79 = extractvalue { i64, i64 } %74, 1
  store i64 %79, ptr %78, align 8
  %80 = invoke noundef i64 @_ZNKSt4fposI11__mbstate_tEcvlEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %81 unwind label %100

81:                                               ; preds = %75
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  store i64 %80, ptr %10, align 8, !tbaa !31
  %82 = getelementptr inbounds %"class.ngraph::cpio::Reader", ptr %12, i32 0, i32 2
  %83 = getelementptr inbounds %"class.ngraph::cpio::Header", ptr %3, i32 0, i32 10
  %84 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorIN6ngraph4cpio8FileInfoESaIS2_EE12emplace_backIJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERjRmEEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %82, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 4 dereferenceable(4) %83, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %85 unwind label %104

85:                                               ; preds = %81
  %86 = getelementptr inbounds %"class.ngraph::cpio::Reader", ptr %12, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8, !tbaa !9
  %88 = getelementptr inbounds %"class.ngraph::cpio::Header", ptr %3, i32 0, i32 10
  %89 = load i32, ptr %88, align 4, !tbaa !32
  %90 = urem i32 %89, 2
  %91 = getelementptr inbounds %"class.ngraph::cpio::Header", ptr %3, i32 0, i32 10
  %92 = load i32, ptr %91, align 4, !tbaa !32
  %93 = add i32 %90, %92
  %94 = zext i32 %93 to i64
  %95 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgElSt12_Ios_Seekdir(ptr noundef nonnull align 8 dereferenceable(16) %87, i64 noundef %94, i32 noundef 1)
          to label %96 unwind label %104

96:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  store i32 0, ptr %9, align 4
  br label %97

97:                                               ; preds = %96, %70
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 28, ptr %3) #7
  %98 = load i32, ptr %9, align 4
  switch i32 %98, label %119 [
    i32 0, label %99
    i32 3, label %111
  ]

99:                                               ; preds = %97
  br label %16, !llvm.loop !33

100:                                              ; preds = %75, %71
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %7, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  br label %108

104:                                              ; preds = %85, %81
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %7, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %8, align 4
  br label %108

108:                                              ; preds = %104, %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %109

109:                                              ; preds = %108, %63
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  br label %110

110:                                              ; preds = %109, %59
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 28, ptr %3) #7
  br label %114

111:                                              ; preds = %97, %16
  br label %112

112:                                              ; preds = %111, %1
  %113 = getelementptr inbounds %"class.ngraph::cpio::Reader", ptr %12, i32 0, i32 2
  ret ptr %113

114:                                              ; preds = %110
  %115 = load ptr, ptr %7, align 8
  %116 = load i32, ptr %8, align 4
  %117 = insertvalue { ptr, i32 } poison, ptr %115, 0
  %118 = insertvalue { ptr, i32 } %117, i32 %116, 1
  resume { ptr, i32 } %118

119:                                              ; preds = %97
  unreachable
}

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

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #6

declare { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16)) #2

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

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

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

attributes #0 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { 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 = { nobuiltin 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin 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, !6, i64 0}
!10 = !{!"_ZTSN6ngraph4cpio6ReaderE", !6, i64 0, !11, i64 8, !22, i64 528}
!11 = !{!"_ZTSSt14basic_ifstreamIcSt11char_traitsIcEE", !12, i64 0, !14, i64 16}
!12 = !{!"_ZTSSi", !13, i64 8}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSSt13basic_filebufIcSt11char_traitsIcEE", !15, i64 0, !7, i64 64, !17, i64 104, !19, i64 120, !20, i64 124, !20, i64 132, !20, i64 140, !6, i64 152, !13, i64 160, !18, i64 168, !18, i64 169, !18, i64 170, !7, i64 171, !6, i64 176, !6, i64 184, !18, i64 192, !6, i64 200, !6, i64 208, !13, i64 216, !6, i64 224, !6, i64 232}
!15 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !16, i64 56}
!16 = !{!"_ZTSSt6locale", !6, i64 0}
!17 = !{!"_ZTSSt12__basic_fileIcE", !6, i64 0, !18, i64 8}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTSSt13_Ios_Openmode", !7, i64 0}
!20 = !{!"_ZTS11__mbstate_t", !21, i64 0, !7, i64 4}
!21 = !{!"int", !7, i64 0}
!22 = !{!"_ZTSSt6vectorIN6ngraph4cpio8FileInfoESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIN6ngraph4cpio8FileInfoESaIS2_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN6ngraph4cpio8FileInfoESaIS2_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIN6ngraph4cpio8FileInfoESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!27, !27, i64 0}
!27 = !{!"vtable pointer", !8, i64 0}
!28 = !{!29, !30, i64 20}
!29 = !{!"_ZTSN6ngraph4cpio6HeaderE", !30, i64 0, !30, i64 2, !30, i64 4, !30, i64 6, !30, i64 8, !30, i64 10, !30, i64 12, !30, i64 14, !21, i64 16, !30, i64 20, !21, i64 24}
!30 = !{!"short", !7, i64 0}
!31 = !{!13, !13, i64 0}
!32 = !{!29, !21, i64 24}
!33 = distinct !{!33, !34}
!34 = !{!"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"

%"class.ngraph::cpio::Header" = type { i16, i16, i16, i16, i16, i16, i16, i16, i32, i16, i32 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.0 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.0 = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.std::fpos" = type { i64, %struct.__mbstate_t }
%struct.__mbstate_t = type { i32, %union.anon.1 }
%union.anon.1 = type { i32 }

@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ngraph4cpio6Header4readERSi(ptr dead_on_unwind noalias writable sret(%"class.ngraph::cpio::Header") align 4, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

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

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

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) #1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgElSt12_Ios_Seekdir(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN6ngraph4cpio6Reader13get_file_infoEv(ptr noundef nonnull align 8 dereferenceable(552) %0) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.ngraph::cpio::Header", align 4
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca i64, align 8
  %6 = alloca %"class.std::fpos", align 8
  %7 = getelementptr inbounds i8, ptr %0, i64 528
  %8 = tail call noundef zeroext i1 @_ZNKSt6vectorIN6ngraph4cpio8FileInfoESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  br i1 %8, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %1
  %9 = load ptr, ptr %0, align 8, !tbaa !5
  %10 = load ptr, ptr %9, align 8, !tbaa !25
  %11 = getelementptr i8, ptr %10, i64 -24
  %12 = load i64, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr %9, i64 %12
  %14 = tail call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %13)
  br i1 %14, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader
  %15 = getelementptr inbounds i8, ptr %2, i64 20
  %16 = getelementptr inbounds i8, ptr %6, i64 8
  %17 = getelementptr inbounds i8, ptr %2, i64 24
  br label %18

18:                                               ; preds = %.lr.ph, %55
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %2) #7
  %19 = load ptr, ptr %0, align 8, !tbaa !5
  call void @_ZN6ngraph4cpio6Header4readERSi(ptr dead_on_unwind nonnull writable sret(%"class.ngraph::cpio::Header") align 4 %2, ptr noundef nonnull align 8 dereferenceable(16) %19)
  %20 = load i16, ptr %15, align 4, !tbaa !27
  %21 = zext i16 %20 to i64
  %22 = call noalias noundef nonnull ptr @_Znam(i64 noundef %21) #8
  %23 = load ptr, ptr %0, align 8, !tbaa !5
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull %22, i64 noundef %21)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #7
  %25 = load i16, ptr %15, align 4, !tbaa !27
  %26 = zext i16 %25 to i64
  %27 = add nsw i64 %26, -1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull %22, i64 noundef %27, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %28 unwind label %34

28:                                               ; preds = %18
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  call void @_ZdaPv(ptr noundef nonnull %22) #9
  %29 = load i16, ptr %15, align 4, !tbaa !27
  %30 = and i16 %29, 1
  %.not = icmp eq i16 %30, 0
  br i1 %.not, label %38, label %31

31:                                               ; preds = %28
  %32 = load ptr, ptr %0, align 8, !tbaa !5
  %33 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgElSt12_Ios_Seekdir(ptr noundef nonnull align 8 dereferenceable(16) %32, i64 noundef 1, i32 noundef 1)
          to label %38 unwind label %36

34:                                               ; preds = %18
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  br label %68

36:                                               ; preds = %31
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %67

38:                                               ; preds = %31, %28
  %39 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.3)
  br i1 %39, label %.thread, label %40

.thread:                                          ; preds = %38
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %2) #7
  br label %.loopexit

40:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  %41 = load ptr, ptr %0, align 8, !tbaa !5
  %42 = invoke { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16) %41)
          to label %43 unwind label %62

43:                                               ; preds = %40
  %44 = extractvalue { i64, i64 } %42, 0
  store i64 %44, ptr %6, align 8
  %45 = extractvalue { i64, i64 } %42, 1
  store i64 %45, ptr %16, align 8
  %46 = call noundef i64 @_ZNKSt4fposI11__mbstate_tEcvlEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  store i64 %46, ptr %5, align 8, !tbaa !30
  %47 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorIN6ngraph4cpio8FileInfoESaIS2_EE12emplace_backIJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERjRmEEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %48 unwind label %64

48:                                               ; preds = %43
  %49 = load ptr, ptr %0, align 8, !tbaa !5
  %50 = load i32, ptr %17, align 4, !tbaa !31
  %51 = and i32 %50, 1
  %52 = add i32 %51, %50
  %53 = zext i32 %52 to i64
  %54 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgElSt12_Ios_Seekdir(ptr noundef nonnull align 8 dereferenceable(16) %49, i64 noundef %53, i32 noundef 1)
          to label %55 unwind label %64

55:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %2) #7
  %56 = load ptr, ptr %0, align 8, !tbaa !5
  %57 = load ptr, ptr %56, align 8, !tbaa !25
  %58 = getelementptr i8, ptr %57, i64 -24
  %59 = load i64, ptr %58, align 8
  %60 = getelementptr inbounds i8, ptr %56, i64 %59
  %61 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %60)
  br i1 %61, label %18, label %.loopexit

62:                                               ; preds = %40
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  br label %66

64:                                               ; preds = %48, %43
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %66

66:                                               ; preds = %64, %62
  %.pn = phi { ptr, i32 } [ %65, %64 ], [ %63, %62 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %67

67:                                               ; preds = %66, %36
  %.pn.pn = phi { ptr, i32 } [ %.pn, %66 ], [ %37, %36 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  br label %68

68:                                               ; preds = %67, %34
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %67 ], [ %35, %34 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %2) #7
  resume { ptr, i32 } %.pn.pn.pn

.loopexit:                                        ; preds = %55, %.preheader, %.thread, %1
  ret ptr %7
}

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

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #6

declare { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorIN6ngraph4cpio8FileInfoESaIS2_EE12emplace_backIJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERjRmEEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

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

attributes #0 = { 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { 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 = { nobuiltin 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin 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, !7, i64 0}
!6 = !{!"_ZTSN6ngraph4cpio6ReaderE", !7, i64 0, !10, i64 8, !21, i64 528}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt14basic_ifstreamIcSt11char_traitsIcEE", !11, i64 0, !13, i64 16}
!11 = !{!"_ZTSSi", !12, i64 8}
!12 = !{!"long", !8, i64 0}
!13 = !{!"_ZTSSt13basic_filebufIcSt11char_traitsIcEE", !14, i64 0, !8, i64 64, !16, i64 104, !18, i64 120, !19, i64 124, !19, i64 132, !19, i64 140, !7, i64 152, !12, i64 160, !17, i64 168, !17, i64 169, !17, i64 170, !8, i64 171, !7, i64 176, !7, i64 184, !17, i64 192, !7, i64 200, !7, i64 208, !12, i64 216, !7, i64 224, !7, i64 232}
!14 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !15, i64 56}
!15 = !{!"_ZTSSt6locale", !7, i64 0}
!16 = !{!"_ZTSSt12__basic_fileIcE", !7, i64 0, !17, i64 8}
!17 = !{!"bool", !8, i64 0}
!18 = !{!"_ZTSSt13_Ios_Openmode", !8, i64 0}
!19 = !{!"_ZTS11__mbstate_t", !20, i64 0, !8, i64 4}
!20 = !{!"int", !8, i64 0}
!21 = !{!"_ZTSSt6vectorIN6ngraph4cpio8FileInfoESaIS2_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIN6ngraph4cpio8FileInfoESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN6ngraph4cpio8FileInfoESaIS2_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN6ngraph4cpio8FileInfoESaIS2_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!25 = !{!26, !26, i64 0}
!26 = !{!"vtable pointer", !9, i64 0}
!27 = !{!28, !29, i64 20}
!28 = !{!"_ZTSN6ngraph4cpio6HeaderE", !29, i64 0, !29, i64 2, !29, i64 4, !29, i64 6, !29, i64 8, !29, i64 10, !29, i64 12, !29, i64 14, !20, i64 16, !29, i64 20, !20, i64 24}
!29 = !{!"short", !8, i64 0}
!30 = !{!12, !12, i64 0}
!31 = !{!28, !20, i64 24}


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