; LLVM IR from alibaba/euler :: euler/core/index/index_meta.ll (ZNK5euler9IndexMeta9SerializeEPNS_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.std::__detail::_Node_const_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"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 }
%"struct.std::pair" = type <{ %"class.std::__cxx11::basic_string", %"struct.euler::IndexMetaRecord", [4 x i8] }>
%"struct.euler::IndexMetaRecord" = type { i32, i32, i32 }

@.str.20 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [16 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 dso_local noundef i64 @_ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56)) #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordEELb1EEESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordEELb0ELb1EEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #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: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK5euler9IndexMeta9SerializeEPNS_6FileIOE(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef %1) #4 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 ptr, align 8
  %12 = alloca %"struct.std::__detail::_Node_const_iterator", align 8
  %13 = alloca %"struct.std::__detail::_Node_const_iterator", align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"class.euler::LogMessage", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %16 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %17 = getelementptr inbounds %"class.euler::IndexMeta", ptr %16, i32 0, i32 0
  %18 = call noundef i64 @_ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %17) #6
  %19 = trunc i64 %18 to i32
  store i32 %19, ptr %6, align 4, !tbaa !9
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = call noundef zeroext i1 @_ZN5euler6FileIO6AppendIjEEbRKT_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 4 dereferenceable(4) %6)
  br i1 %21, label %33, label %22

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

24:                                               ; preds = %22
  %25 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEjEOT_S3_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %23, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %26 unwind label %29

26:                                               ; preds = %24
  %27 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEA7_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %25, ptr noundef nonnull align 1 dereferenceable(7) @.str.26)
          to label %28 unwind label %29

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

29:                                               ; preds = %26, %24, %22
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %8, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %9, align 4
  call void @_ZN5euler10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %7) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr %7) #6
  br label %81

33:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %34 = getelementptr inbounds %"class.euler::IndexMeta", ptr %16, i32 0, i32 0
  store ptr %34, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %35 = load ptr, ptr %11, align 8, !tbaa !5
  %36 = call ptr @_ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %35) #6
  %37 = getelementptr inbounds %"struct.std::__detail::_Node_const_iterator", ptr %12, i32 0, i32 0
  %38 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %37, i32 0, i32 0
  store ptr %36, ptr %38, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %39 = load ptr, ptr %11, align 8, !tbaa !5
  %40 = call ptr @_ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %39) #6
  %41 = getelementptr inbounds %"struct.std::__detail::_Node_const_iterator", ptr %13, i32 0, i32 0
  %42 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %41, i32 0, i32 0
  store ptr %40, ptr %42, align 8
  br label %43

43:                                               ; preds = %74, %33
  %44 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordEELb1EEESE_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  br i1 %44, label %46, label %45

45:                                               ; preds = %43
  store i32 2, ptr %10, align 4
  br label %76

46:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %47 = call noundef nonnull align 8 dereferenceable(44) ptr @_ZNKSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordEELb0ELb1EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  store ptr %47, ptr %14, align 8, !tbaa !5
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = load ptr, ptr %14, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.std::pair", ptr %49, i32 0, i32 0
  %51 = call noundef zeroext i1 @_ZN5euler6FileIO6AppendERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %48, ptr noundef nonnull align 8 dereferenceable(32) %50)
  br i1 %51, label %52, label %57

52:                                               ; preds = %46
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = load ptr, ptr %14, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.std::pair", ptr %54, i32 0, i32 1
  %56 = call noundef zeroext i1 @_ZN5euler6FileIO6AppendINS_15IndexMetaRecordEEEbRKT_(ptr noundef nonnull align 8 dereferenceable(32) %53, ptr noundef nonnull align 4 dereferenceable(12) %55)
  br i1 %56, label %70, label %57

57:                                               ; preds = %52, %46
  call void @llvm.lifetime.start.p0(i64 392, ptr %15) #6
  call void @_ZN5euler10LogMessageC1EPKcii(ptr noundef nonnull align 8 dereferenceable(128) %15, ptr noundef @.str.20, i32 noundef 91, i32 noundef 3)
  %58 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEA16_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %15, ptr noundef nonnull align 1 dereferenceable(16) @.str.27)
          to label %59 unwind label %66

59:                                               ; preds = %57
  %60 = load ptr, ptr %14, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.std::pair", ptr %60, i32 0, i32 0
  %62 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEOT_S9_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %58, ptr noundef nonnull align 8 dereferenceable(32) %61)
          to label %63 unwind label %66

63:                                               ; preds = %59
  %64 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEA7_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %62, ptr noundef nonnull align 1 dereferenceable(7) @.str.26)
          to label %65 unwind label %66

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

66:                                               ; preds = %63, %59, %57
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %8, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %9, align 4
  call void @_ZN5euler10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %15) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %81

70:                                               ; preds = %52
  store i32 0, ptr %10, align 4
  br label %71

71:                                               ; preds = %70, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  %72 = load i32, ptr %10, align 4
  switch i32 %72, label %76 [
    i32 0, label %73
  ]

73:                                               ; preds = %71
  br label %74

74:                                               ; preds = %73
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordEELb0ELb1EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  br label %43

76:                                               ; preds = %71, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  %77 = load i32, ptr %10, align 4
  switch i32 %77, label %79 [
    i32 2, label %78
  ]

78:                                               ; preds = %76
  store i1 true, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %79

79:                                               ; preds = %78, %76, %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %80 = load i1, ptr %3, align 1
  ret i1 %80

81:                                               ; preds = %66, %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %82

82:                                               ; preds = %81
  %83 = load ptr, ptr %8, align 8
  %84 = load i32, ptr %9, align 4
  %85 = insertvalue { ptr, i32 } poison, ptr %83, 0
  %86 = insertvalue { ptr, i32 } %85, i32 %84, 1
  resume { ptr, i32 } %86
}

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEA16_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 1 dereferenceable(16)) #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 = { 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 = { 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 = { 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}


; 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.std::__detail::_Node_const_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }

@.str.20 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [16 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 dso_local noundef i64 @_ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordEELb1EEESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordEELb0ELb1EEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_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: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK5euler9IndexMeta9SerializeEPNS_6FileIOE(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef %1) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca %"class.euler::LogMessage", align 8
  %5 = alloca %"struct.std::__detail::_Node_const_iterator", align 8
  %6 = alloca %"struct.std::__detail::_Node_const_iterator", align 8
  %7 = alloca %"class.euler::LogMessage", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %8 = tail call noundef i64 @_ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #6
  %9 = trunc i64 %8 to i32
  store i32 %9, ptr %3, align 4, !tbaa !5
  %10 = call noundef zeroext i1 @_ZN5euler6FileIO6AppendIjEEbRKT_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 4 dereferenceable(4) %3)
  br i1 %10, label %20, label %11

11:                                               ; 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 85, i32 noundef 3)
  %12 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEA17_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %4, ptr noundef nonnull align 1 dereferenceable(17) @.str.25)
          to label %13 unwind label %18

13:                                               ; preds = %11
  %14 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEjEOT_S3_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %12, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %15 unwind label %18

15:                                               ; preds = %13
  %16 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEA7_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %14, ptr noundef nonnull align 1 dereferenceable(7) @.str.26)
          to label %17 unwind label %18

17:                                               ; preds = %15
  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 %40

18:                                               ; preds = %15, %13, %11
  %19 = 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 %41

20:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %21 = call ptr @_ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #6
  store ptr %21, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %22 = call ptr @_ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #6
  store ptr %22, ptr %6, align 8
  %23 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordEELb1EEESE_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %23, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %20, %37
  %24 = call noundef nonnull align 8 dereferenceable(44) ptr @_ZNKSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordEELb0ELb1EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %25 = call noundef zeroext i1 @_ZN5euler6FileIO6AppendERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %24)
  br i1 %25, label %26, label %29

26:                                               ; preds = %.lr.ph
  %27 = getelementptr inbounds i8, ptr %24, i64 32
  %28 = call noundef zeroext i1 @_ZN5euler6FileIO6AppendINS_15IndexMetaRecordEEEbRKT_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 4 dereferenceable(12) %27)
  br i1 %28, label %37, label %29

29:                                               ; preds = %26, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %7) #6
  call void @_ZN5euler10LogMessageC1EPKcii(ptr noundef nonnull align 8 dereferenceable(128) %7, ptr noundef nonnull @.str.20, i32 noundef 91, i32 noundef 3)
  %30 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEA16_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %7, ptr noundef nonnull align 1 dereferenceable(16) @.str.27)
          to label %31 unwind label %35

31:                                               ; preds = %29
  %32 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEOT_S9_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %30, ptr noundef nonnull align 8 dereferenceable(32) %24)
          to label %33 unwind label %35

33:                                               ; preds = %31
  %34 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageEA7_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %32, ptr noundef nonnull align 1 dereferenceable(7) @.str.26)
          to label %.critedge unwind label %35

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

35:                                               ; preds = %33, %31, %29
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5euler10LogMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %7) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %41

37:                                               ; preds = %26
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordEELb0ELb1EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %39 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5euler15IndexMetaRecordEELb1EEESE_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %39, label %.lr.ph, label %.loopexit

.loopexit:                                        ; preds = %37, %20, %.critedge
  %not. = phi i1 [ false, %.critedge ], [ true, %20 ], [ true, %37 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %40

40:                                               ; preds = %.loopexit, %17
  %.3 = phi i1 [ false, %17 ], [ %not., %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  ret i1 %.3

41:                                               ; preds = %35, %18
  %.pn = phi { ptr, i32 } [ %36, %35 ], [ %19, %18 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn
}

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN5euler10LogMessageENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEOT_S9_RKT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

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

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 = { 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 = { 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 = { 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"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass