; LLVM IR from alibaba/euler :: euler/core/index/index_meta.ll (ZN5euler9IndexMeta11DeserializeEPNS_6FileIOE)

; 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.euler::LogMessage" = type { %"class.std::__cxx11::basic_ostringstream.base", ptr, i32, i32, %"class.std::basic_ios" }
%"class.std::__cxx11::basic_ostringstream.base" = type { %"class.std::basic_ostream.base", %"class.std::__cxx11::basic_stringbuf" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { 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] }
%"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 }
%"struct.euler::IndexMetaRecord" = type { i32, i32, i32 }
%"class.euler::IndexMeta" = type { %"class.std::unordered_map" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }

@.str.20 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [23 x i8], align 1

; 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: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

declare void @_ZN5euler10LogMessageC1EPKcii(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef, i32 noundef, i32 noundef) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN5euler10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEA21_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 1 dereferenceable(21)) #5

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5euler9IndexMeta7AddMetaERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_15IndexMetaRecordE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32), i64, i32) #6 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN5euler9IndexMeta11DeserializeEPNS_6FileIOE(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef %1) #6 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.euler::LogMessage", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.euler::LogMessage", align 8
  %14 = alloca %"struct.euler::IndexMetaRecord", align 4
  %15 = alloca %"class.euler::LogMessage", align 8
  %16 = alloca %"struct.euler::IndexMetaRecord", align 4
  %17 = alloca { i64, i32 }, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %18 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !9
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = call noundef zeroext i1 @_ZN5euler6FileIO4ReadIjEEbPT_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef %6)
  br i1 %20, label %28, label %21

21:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 392, ptr %7) #7
  call void @_ZN5euler10LogMessageC1EPKcii(ptr noundef nonnull align 8 dereferenceable(128) %7, ptr noundef @.str.20, i32 noundef 101, i32 noundef 3)
  %22 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEA21_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %7, ptr noundef nonnull align 1 dereferenceable(21) @.str.23)
          to label %23 unwind label %24

23:                                               ; preds = %21
  call void @_ZN5euler10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %7) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %7) #7
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %98

24:                                               ; preds = %21
  %25 = landingpad { ptr, i32 }
          cleanup
  %26 = extractvalue { ptr, i32 } %25, 0
  store ptr %26, ptr %8, align 8
  %27 = extractvalue { ptr, i32 } %25, 1
  store i32 %27, ptr %9, align 4
  call void @_ZN5euler10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %7) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %7) #7
  br label %100

28:                                               ; preds = %2
  %29 = getelementptr inbounds %"class.euler::IndexMeta", ptr %18, i32 0, i32 0
  call void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) %29) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %30

30:                                               ; preds = %90, %28
  %31 = load i32, ptr %11, align 4, !tbaa !9
  %32 = load i32, ptr %6, align 4, !tbaa !9
  %33 = icmp ult i32 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  store i32 2, ptr %10, align 4
  br label %95

35:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = invoke noundef zeroext i1 @_ZN5euler6FileIO4ReadEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %36, ptr noundef %12)
          to label %38 unwind label %43

38:                                               ; preds = %35
  br i1 %37, label %56, label %39

39:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 392, ptr %13) #7
  invoke void @_ZN5euler10LogMessageC1EPKcii(ptr noundef nonnull align 8 dereferenceable(128) %13, ptr noundef @.str.20, i32 noundef 108, i32 noundef 3)
          to label %40 unwind label %47

40:                                               ; preds = %39
  %41 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEA20_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %13, ptr noundef nonnull align 1 dereferenceable(20) @.str.28)
          to label %42 unwind label %51

42:                                               ; preds = %40
  call void @_ZN5euler10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %13) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %13) #7
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %87

43:                                               ; preds = %35
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %8, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %9, align 4
  br label %94

47:                                               ; preds = %39
  %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 = %40
  %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 @_ZN5euler10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %13) #7
  br label %55

55:                                               ; preds = %51, %47
  call void @llvm.lifetime.end.p0(i64 392, ptr %13) #7
  br label %94

56:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #7
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = invoke noundef zeroext i1 @_ZN5euler6FileIO4ReadINS_15IndexMetaRecordEEEbPT_(ptr noundef nonnull align 8 dereferenceable(32) %57, ptr noundef %14)
          to label %59 unwind label %64

59:                                               ; preds = %56
  br i1 %58, label %77, label %60

60:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 392, ptr %15) #7
  invoke void @_ZN5euler10LogMessageC1EPKcii(ptr noundef nonnull align 8 dereferenceable(128) %15, ptr noundef @.str.20, i32 noundef 113, i32 noundef 3)
          to label %61 unwind label %68

61:                                               ; preds = %60
  %62 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEA23_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %15, ptr noundef nonnull align 1 dereferenceable(23) @.str.29)
          to label %63 unwind label %72

63:                                               ; preds = %61
  call void @_ZN5euler10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %15) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %15) #7
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %86

64:                                               ; preds = %77, %56
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %8, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %9, align 4
  br label %93

68:                                               ; preds = %60
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %8, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %9, align 4
  br label %76

72:                                               ; preds = %61
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %8, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %9, align 4
  call void @_ZN5euler10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %15) #7
  br label %76

76:                                               ; preds = %72, %68
  call void @llvm.lifetime.end.p0(i64 392, ptr %15) #7
  br label %93

77:                                               ; preds = %59
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %14, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 %16, i64 12, i1 false)
  %78 = getelementptr inbounds { i64, i32 }, ptr %17, i32 0, i32 0
  %79 = load i64, ptr %78, align 4
  %80 = getelementptr inbounds { i64, i32 }, ptr %17, i32 0, i32 1
  %81 = load i32, ptr %80, align 4
  %82 = invoke noundef zeroext i1 @_ZN5euler9IndexMeta7AddMetaERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_15IndexMetaRecordE(ptr noundef nonnull align 8 dereferenceable(56) %18, ptr noundef nonnull align 8 dereferenceable(32) %12, i64 %79, i32 %81)
          to label %83 unwind label %64

83:                                               ; preds = %77
  br i1 %82, label %85, label %84

84:                                               ; preds = %83
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %86

85:                                               ; preds = %83
  store i32 0, ptr %10, align 4
  br label %86

86:                                               ; preds = %85, %84, %63
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #7
  br label %87

87:                                               ; preds = %86, %42
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  %88 = load i32, ptr %10, align 4
  switch i32 %88, label %95 [
    i32 0, label %89
  ]

89:                                               ; preds = %87
  br label %90

90:                                               ; preds = %89
  %91 = load i32, ptr %11, align 4, !tbaa !9
  %92 = add i32 %91, 1
  store i32 %92, ptr %11, align 4, !tbaa !9
  br label %30, !llvm.loop !16

93:                                               ; preds = %76, %64
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #7
  br label %94

94:                                               ; preds = %93, %55, %43
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %100

95:                                               ; preds = %87, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  %96 = load i32, ptr %10, align 4
  switch i32 %96, label %98 [
    i32 2, label %97
  ]

97:                                               ; preds = %95
  store i1 true, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %98

98:                                               ; preds = %97, %95, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %99 = load i1, ptr %3, align 1
  ret i1 %99

100:                                              ; preds = %94, %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %101

101:                                              ; preds = %100
  %102 = load ptr, ptr %8, align 8
  %103 = load i32, ptr %9, align 4
  %104 = insertvalue { ptr, i32 } poison, ptr %102, 0
  %105 = insertvalue { ptr, i32 } %104, i32 %103, 1
  resume { ptr, i32 } %105
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5euler6FileIO4ReadIjEEbPT_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5euler6FileIO4ReadEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEA20_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 1 dereferenceable(20)) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5euler6FileIO4ReadINS_15IndexMetaRecordEEEbPT_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEA23_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 1 dereferenceable(23)) #5

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 = { "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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i64 0, i64 4, !12, i64 4, i64 4, !14, i64 8, i64 4, !14}
!12 = !{!13, !13, i64 0}
!13 = !{!"_ZTSN5euler9IndexTypeE", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"_ZTSN5euler8DataTypeE", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"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.euler::LogMessage" = type { %"class.std::__cxx11::basic_ostringstream.base", ptr, i32, i32, %"class.std::basic_ios" }
%"class.std::__cxx11::basic_ostringstream.base" = type { %"class.std::basic_ostream.base", %"class.std::__cxx11::basic_stringbuf" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { 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] }
%"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 }
%"struct.euler::IndexMetaRecord" = type { i32, i32, i32 }

@.str.20 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [23 x i8], align 1

; 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: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

declare void @_ZN5euler10LogMessageC1EPKcii(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef, i32 noundef, i32 noundef) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN5euler10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEA21_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 1 dereferenceable(21)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5euler9IndexMeta7AddMetaERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_15IndexMetaRecordE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32), i64, i32) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN5euler9IndexMeta11DeserializeEPNS_6FileIOE(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull %1) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca %"class.euler::LogMessage", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.euler::LogMessage", align 8
  %7 = alloca %"struct.euler::IndexMetaRecord", align 8
  %8 = alloca %"class.euler::LogMessage", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  %9 = call noundef zeroext i1 @_ZN5euler6FileIO4ReadIjEEbPT_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %3)
  br i1 %9, label %15, label %10

10:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %4) #6
  call void @_ZN5euler10LogMessageC1EPKcii(ptr noundef nonnull align 8 dereferenceable(128) %4, ptr noundef nonnull @.str.20, i32 noundef 101, i32 noundef 3)
  %11 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEA21_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %4, ptr noundef nonnull align 1 dereferenceable(21) @.str.23)
          to label %12 unwind label %13

12:                                               ; preds = %10
  call void @_ZN5euler10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %4) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %4) #6
  br label %.loopexit

13:                                               ; preds = %10
  %14 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5euler10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %4) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %4) #6
  br label %52

15:                                               ; preds = %2
  call void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #6
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %.not44 = icmp eq i32 %16, 0
  br i1 %.not44, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %15
  %.sroa.23.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  br label %17

17:                                               ; preds = %.lr.ph, %47
  %.02645 = phi i32 [ 0, %.lr.ph ], [ %48, %47 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  %18 = invoke noundef zeroext i1 @_ZN5euler6FileIO4ReadEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %5)
          to label %19 unwind label %23

19:                                               ; preds = %17
  br i1 %18, label %30, label %20

20:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %6) #6
  invoke void @_ZN5euler10LogMessageC1EPKcii(ptr noundef nonnull align 8 dereferenceable(128) %6, ptr noundef nonnull @.str.20, i32 noundef 108, i32 noundef 3)
          to label %21 unwind label %25

21:                                               ; preds = %20
  %22 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEA20_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %6, ptr noundef nonnull align 1 dereferenceable(20) @.str.28)
          to label %.thread unwind label %27

.thread:                                          ; preds = %21
  call void @_ZN5euler10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %6) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %6) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  br label %.loopexit

23:                                               ; preds = %17
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %51

25:                                               ; preds = %20
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %29

27:                                               ; preds = %21
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5euler10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %6) #6
  br label %29

29:                                               ; preds = %27, %25
  %.pn = phi { ptr, i32 } [ %28, %27 ], [ %26, %25 ]
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %6) #6
  br label %51

30:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #6
  %31 = invoke noundef zeroext i1 @_ZN5euler6FileIO4ReadINS_15IndexMetaRecordEEEbPT_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %7)
          to label %32 unwind label %37

32:                                               ; preds = %30
  br i1 %31, label %44, label %33

33:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %8) #6
  invoke void @_ZN5euler10LogMessageC1EPKcii(ptr noundef nonnull align 8 dereferenceable(128) %8, ptr noundef nonnull @.str.20, i32 noundef 113, i32 noundef 3)
          to label %34 unwind label %39

34:                                               ; preds = %33
  %35 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEA23_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %8, ptr noundef nonnull align 1 dereferenceable(23) @.str.29)
          to label %36 unwind label %41

36:                                               ; preds = %34
  call void @_ZN5euler10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %8) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %8) #6
  br label %.thread36

37:                                               ; preds = %44, %30
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %50

39:                                               ; preds = %33
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %43

41:                                               ; preds = %34
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5euler10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %8) #6
  br label %43

43:                                               ; preds = %41, %39
  %.pn28 = phi { ptr, i32 } [ %42, %41 ], [ %40, %39 ]
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %8) #6
  br label %50

44:                                               ; preds = %32
  %.sroa.02.0.copyload = load i64, ptr %7, align 8
  %.sroa.23.0.copyload = load i32, ptr %.sroa.23.0..sroa_idx, align 8, !tbaa !9
  %45 = invoke noundef zeroext i1 @_ZN5euler9IndexMeta7AddMetaERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_15IndexMetaRecordE(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(32) %5, i64 %.sroa.02.0.copyload, i32 %.sroa.23.0.copyload)
          to label %46 unwind label %37

46:                                               ; preds = %44
  br i1 %45, label %47, label %.thread36

.thread36:                                        ; preds = %46, %36
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  br label %.loopexit

47:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  %48 = add nuw i32 %.02645, 1
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %.not.not = icmp ult i32 %48, %49
  br i1 %.not.not, label %17, label %.loopexit, !llvm.loop !11

50:                                               ; preds = %43, %37
  %.pn30 = phi { ptr, i32 } [ %38, %37 ], [ %.pn28, %43 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #6
  br label %51

51:                                               ; preds = %50, %29, %23
  %.pn30.pn = phi { ptr, i32 } [ %.pn30, %50 ], [ %.pn, %29 ], [ %24, %23 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  br label %52

.loopexit:                                        ; preds = %47, %15, %.thread, %.thread36, %12
  %.4 = phi i1 [ false, %12 ], [ false, %.thread36 ], [ false, %.thread ], [ true, %15 ], [ true, %47 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  ret i1 %.4

52:                                               ; preds = %51, %13
  %.pn30.pn.pn = phi { ptr, i32 } [ %.pn30.pn, %51 ], [ %14, %13 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn30.pn.pn
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEA20_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 1 dereferenceable(20)) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEA23_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 1 dereferenceable(23)) local_unnamed_addr #4

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 = { "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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTSN5euler8DataTypeE", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass